summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2003-06-19 19:36:26 +0000
committerDavid Schleef <ds@schleef.org>2003-06-19 19:36:26 +0000
commit52340ac70668e15117ba85018b9c992bb3671dc8 (patch)
treeb3644f5f52b27afb04d4757c2f0b8a0786f7f727
parentfc881ebfedf213ab4c553717d3e5aa6391d2bdea (diff)
downloadgst-plugins-bad-52340ac70668e15117ba85018b9c992bb3671dc8.tar.gz
gst-plugins-bad-52340ac70668e15117ba85018b9c992bb3671dc8.tar.bz2
gst-plugins-bad-52340ac70668e15117ba85018b9c992bb3671dc8.zip
Revert last two changes and do it my way. :)
Original commit message from CVS: Revert last two changes and do it my way. :)
-rw-r--r--gst/qtdemux/qtdemux.c59
1 files changed, 18 insertions, 41 deletions
diff --git a/gst/qtdemux/qtdemux.c b/gst/qtdemux/qtdemux.c
index 05d9244b..65aab1f8 100644
--- a/gst/qtdemux/qtdemux.c
+++ b/gst/qtdemux/qtdemux.c
@@ -154,7 +154,7 @@ static void qtdemux_parse(GstQTDemux *qtdemux, GNode *node, void *buffer, int le
static QtNodeType *qtdemux_type_get(guint32 fourcc);
static void qtdemux_node_dump(GstQTDemux *qtdemux, GNode *node);
static void qtdemux_parse_tree(GstQTDemux *qtdemux);
-static GstCaps *qtdemux_video_caps(GstQTDemux *qtdemux, guint32 fourcc, gint width, gint height);
+static GstCaps *qtdemux_video_caps(GstQTDemux *qtdemux, guint32 fourcc);
static GstCaps *qtdemux_audio_caps(GstQTDemux *qtdemux, guint32 fourcc);
static GType gst_qtdemux_get_type (void)
@@ -555,12 +555,8 @@ void gst_qtdemux_add_stream(GstQTDemux *qtdemux, QtDemuxStream *stream)
GST_PAD_TEMPLATE_GET (src_video_templ), g_strdup_printf ("video_%02d",
qtdemux->n_video_streams));
if(stream->caps){
- if(gst_caps_has_property(stream->caps,"width")){
- gst_caps_set(stream->caps,"width",GST_PROPS_INT(stream->width));
- }
- if(gst_caps_has_property(stream->caps,"height")){
- gst_caps_set(stream->caps,"height",GST_PROPS_INT(stream->height));
- }
+ gst_caps_set(stream->caps,"width",GST_PROPS_INT(stream->width));
+ gst_caps_set(stream->caps,"height",GST_PROPS_INT(stream->height));
}
qtdemux->n_video_streams++;
}else{
@@ -1305,9 +1301,7 @@ static void qtdemux_parse_trak(GstQTDemux *qtdemux, GNode *trak)
g_print("frame count: %u\n", QTDEMUX_GUINT16_GET(stsd->data+offset+48));
stream->caps = qtdemux_video_caps(qtdemux,
- QTDEMUX_FOURCC_GET(stsd->data+offset+4),
- QTDEMUX_GUINT16_GET(stsd->data+offset+32),
- QTDEMUX_GUINT16_GET(stsd->data+offset+34));
+ QTDEMUX_FOURCC_GET(stsd->data+offset+4));
g_print("caps %s\n",gst_caps_to_string(stream->caps));
}else if(stream->subtype == FOURCC_soun){
int version;
@@ -1504,66 +1498,49 @@ done2:
gst_qtdemux_add_stream(qtdemux,stream);
}
-#ifdef G_HAVE_ISO_VARARGS
-
-#define GST_QT_CAPS_NEW(name, mime, ...) \
- GST_CAPS_NEW (name, mime, \
- "width", GST_PROPS_INT (width), \
- "height", GST_PROPS_INT (height), \
- __VA_ARGS__)
-
-#elif defined(G_HAVE_GNUC_VARARGS)
-
-#define GST_QT_CAPS_NEW(name, mime, props...) \
- GST_CAPS_NEW (name, mime, \
- "width", GST_PROPS_INT (width), \
- "height", GST_PROPS_INT (height), \
- props)
-
-#endif
-static GstCaps *qtdemux_video_caps(GstQTDemux *qtdemux, guint32 fourcc,
- gint width, gint height)
+static GstCaps *qtdemux_video_caps(GstQTDemux *qtdemux, guint32 fourcc)
{
switch(fourcc){
case GST_MAKE_FOURCC('j','p','e','g'):
/* JPEG */
+ return GST_CAPS_NEW("jpeg_caps","video/jpeg",NULL);
case GST_MAKE_FOURCC('m','j','p','a'):
/* Motion-JPEG (format A) */
+ return GST_CAPS_NEW("mjpa_caps","video/jpeg",NULL);
case GST_MAKE_FOURCC('m','j','p','b'):
/* Motion-JPEG (format B) */
- return GST_QT_CAPS_NEW("jpeg_caps","video/jpeg",NULL);
+ return GST_CAPS_NEW("mjpa_caps","video/jpeg",NULL);
case GST_MAKE_FOURCC('S','V','Q','3'):
- return GST_QT_CAPS_NEW("SVQ3_caps","video/x-svq",
+ return GST_CAPS_NEW("SVQ3_caps","video/x-svq",
"svqversion", GST_PROPS_INT(3),NULL);
case GST_MAKE_FOURCC('s','v','q','i'):
case GST_MAKE_FOURCC('S','V','Q','1'):
- return GST_QT_CAPS_NEW("SVQ1_caps","video/x-svq",
+ return GST_CAPS_NEW("SVQ1_caps","video/x-svq",
"svqversion", GST_PROPS_INT(1),NULL);
case GST_MAKE_FOURCC('r','a','w',' '):
/* uncompressed RGB */
- return GST_QT_CAPS_NEW("raw__caps","video/raw",
+ return GST_CAPS_NEW("raw__caps","video/raw",
"format",GST_PROPS_FOURCC(GST_MAKE_FOURCC('R','G','B',' ')));
case GST_MAKE_FOURCC('Y','u','v','2'):
/* uncompressed YUV2 */
- return GST_QT_CAPS_NEW("Yuv2_caps","video/raw",
+ return GST_CAPS_NEW("Yuv2_caps","video/raw",
"format",GST_PROPS_FOURCC(GST_MAKE_FOURCC('Y','U','V','2')));
case GST_MAKE_FOURCC('m','p','e','g'):
/* MPEG */
- return GST_QT_CAPS_NEW("mpeg_caps","video/mpeg",NULL);
+ return GST_CAPS_NEW("mpeg_caps","video/mpeg",NULL);
case GST_MAKE_FOURCC('g','i','f',' '):
- return GST_QT_CAPS_NEW("gif__caps","image/gif",NULL);
+ return GST_CAPS_NEW("gif__caps","image/gif",NULL);
case GST_MAKE_FOURCC('h','2','6','3'):
/* H.263 */
/* ffmpeg uses the height/width props, don't know why */
- return GST_QT_CAPS_NEW("h263_caps","video/h263", NULL);
+ return GST_CAPS_NEW("h263_caps","video/h263",NULL);
case GST_MAKE_FOURCC('m','p','4','v'):
/* MPEG-4 */
- return GST_QT_CAPS_NEW("mp4v_caps", "video/mpeg",
- "mpegversion", GST_PROPS_INT(4),
- "systemstream", GST_PROPS_BOOLEAN(FALSE), NULL);
+ return GST_CAPS_NEW("mp4v_caps", "video/mpeg",
+ "mpegversion",GST_PROPS_INT(4));
case GST_MAKE_FOURCC('3','I','V','1'):
- return GST_QT_CAPS_NEW("3IV1_caps", "video/3ivx",NULL);
+ return GST_CAPS_NEW("3IV1_caps", "video/3ivx",NULL);
case GST_MAKE_FOURCC('r','p','z','a'):
case GST_MAKE_FOURCC('c','v','i','d'):
/* Cinepak */