indent

Original commit message from CVS:
indent
parent d5cfdabb
2004-03-29 Thomas Vander Stichele <thomas at apestaart dot org>
* ext/ffmpeg/*.c: indent
2004-03-25 Ronald Bultje <rbultje@ronald.bitfreak.net>
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_base_init):
......
......@@ -33,16 +33,16 @@
#include <ffmpeg/avformat.h>
#endif
extern gboolean gst_ffmpegdemux_register (GstPlugin *plugin);
extern gboolean gst_ffmpegdec_register (GstPlugin *plugin);
extern gboolean gst_ffmpegenc_register (GstPlugin *plugin);
extern gboolean gst_ffmpegmux_register (GstPlugin *plugin);
extern gboolean gst_ffmpegcsp_register (GstPlugin *plugin);
extern gboolean gst_ffmpegdemux_register (GstPlugin * plugin);
extern gboolean gst_ffmpegdec_register (GstPlugin * plugin);
extern gboolean gst_ffmpegenc_register (GstPlugin * plugin);
extern gboolean gst_ffmpegmux_register (GstPlugin * plugin);
extern gboolean gst_ffmpegcsp_register (GstPlugin * plugin);
extern URLProtocol gstreamer_protocol;
static gboolean
plugin_init (GstPlugin *plugin)
plugin_init (GstPlugin * plugin)
{
if (!gst_library_load ("gstbytestream"))
return FALSE;
......@@ -54,7 +54,7 @@ plugin_init (GstPlugin *plugin)
gst_ffmpegenc_register (plugin);
gst_ffmpegdec_register (plugin);
gst_ffmpegdemux_register (plugin);
/*gst_ffmpegmux_register (plugin);*/
/*gst_ffmpegmux_register (plugin); */
gst_ffmpegcsp_register (plugin);
register_protocol (&gstreamer_protocol);
......@@ -63,14 +63,9 @@ plugin_init (GstPlugin *plugin)
return TRUE;
}
GST_PLUGIN_DEFINE (
GST_VERSION_MAJOR,
GST_VERSION_MINOR,
"ffmpeg",
"All FFMPEG codecs",
plugin_init,
FFMPEG_VERSION,
"LGPL",
"FFMpeg",
"http://ffmpeg.sourceforge.net/"
)
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
GST_VERSION_MINOR,
"ffmpeg",
"All FFMPEG codecs",
plugin_init,
FFMPEG_VERSION, "LGPL", "FFMpeg", "http://ffmpeg.sourceforge.net/")
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -34,18 +34,17 @@
typedef struct _GstProtocolInfo GstProtocolInfo;
struct _GstProtocolInfo {
GstPad *pad;
struct _GstProtocolInfo
{
GstPad *pad;
int flags;
int flags;
GstByteStream *bs;
gboolean eos;
gboolean eos;
};
static int
gst_ffmpegdata_open (URLContext *h,
const char *filename,
int flags)
static int
gst_ffmpegdata_open (URLContext * h, const char *filename, int flags)
{
GstProtocolInfo *info;
GstPad *pad;
......@@ -54,8 +53,7 @@ gst_ffmpegdata_open (URLContext *h,
info->flags = flags;
/* we don't support R/W together */
if (flags != URL_RDONLY &&
flags != URL_WRONLY) {
if (flags != URL_RDONLY && flags != URL_WRONLY) {
g_warning ("Only read-only or write-only are supported");
return -EINVAL;
}
......@@ -87,10 +85,8 @@ gst_ffmpegdata_open (URLContext *h,
return 0;
}
static int
gst_ffmpegdata_read (URLContext *h,
unsigned char *buf,
int size)
static int
gst_ffmpegdata_read (URLContext * h, unsigned char *buf, int size)
{
GstByteStream *bs;
guint32 total, request;
......@@ -144,7 +140,7 @@ gst_ffmpegdata_read (URLContext *h,
}
}
} while (!info->eos && total != request);
memcpy (buf, data, total);
gst_bytestream_flush (bs, total);
......@@ -152,9 +148,7 @@ gst_ffmpegdata_read (URLContext *h,
}
static int
gst_ffmpegdata_write (URLContext *h,
unsigned char *buf,
int size)
gst_ffmpegdata_write (URLContext * h, unsigned char *buf, int size)
{
GstProtocolInfo *info;
GstBuffer *outbuf;
......@@ -174,9 +168,7 @@ gst_ffmpegdata_write (URLContext *h,
}
static offset_t
gst_ffmpegdata_seek (URLContext *h,
offset_t pos,
int whence)
gst_ffmpegdata_seek (URLContext * h, offset_t pos, int whence)
{
GstSeekType seek_type = 0;
GstProtocolInfo *info;
......@@ -216,16 +208,17 @@ gst_ffmpegdata_seek (URLContext *h,
}
static int
gst_ffmpegdata_close (URLContext *h)
gst_ffmpegdata_close (URLContext * h)
{
GstProtocolInfo *info;
info = (GstProtocolInfo *) h->priv_data;
switch (info->flags) {
case URL_WRONLY: {
case URL_WRONLY:{
/* send EOS - that closes down the stream */
GstEvent *event = gst_event_new (GST_EVENT_EOS);
gst_pad_push (info->pad, GST_DATA (event));
}
break;
......@@ -243,11 +236,10 @@ gst_ffmpegdata_close (URLContext *h)
}
URLProtocol gstreamer_protocol = {
.name = "gstreamer",
.url_open = gst_ffmpegdata_open,
.url_read = gst_ffmpegdata_read,
.name = "gstreamer",
.url_open = gst_ffmpegdata_open,
.url_read = gst_ffmpegdata_read,
.url_write = gst_ffmpegdata_write,
.url_seek = gst_ffmpegdata_seek,
.url_seek = gst_ffmpegdata_seek,
.url_close = gst_ffmpegdata_close,
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment