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