From e227c83e6b857c7b87758741e0ab7a8b8c424a50 Mon Sep 17 00:00:00 2001 From: Brijesh Singh Date: Sun, 9 May 2010 05:34:03 -0500 Subject: [PATCH] gstreamer ti tracker 462 --- src/gsttividdec.c | 10 ++++++++-- src/gsttividdec2.c | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/gsttividdec.c b/src/gsttividdec.c index e3714d6..51da81d 100644 --- a/src/gsttividdec.c +++ b/src/gsttividdec.c @@ -83,7 +83,7 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE( GST_PAD_ALWAYS, GST_STATIC_CAPS ("video/mpeg, " - "mpegversion=(int){ 2, 4 }, " /* MPEG versions 2 and 4 */ + "mpegversion=(int){ 2, 4 }, " /* MPEG versions 2 and 4 */ "systemstream=(boolean)false, " "framerate=(fraction)[ 0, MAX ], " "width=(int)[ 1, MAX ], " @@ -91,7 +91,8 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE( "video/x-h264, " /* H264 */ "framerate=(fraction)[ 0, MAX ], " "width=(int)[ 1, MAX ], " - "height=(int)[ 1, MAX ]" + "height=(int)[ 1, MAX ] ;" + "video/x-xvid" /* XVID */ ) ); @@ -606,6 +607,11 @@ static gboolean gst_tividdec_set_sink_caps(GstPad *pad, GstCaps *caps) codec = gst_ticodec_get_codec("H.264 Video Decoder"); } + /* XVID Decode */ + else if (!strcmp(mime, "video/x-xvid")) { + codec = gst_ticodec_get_codec("MPEG4 Video Decoder"); + } + /* Mime type not supported */ else { GST_ELEMENT_ERROR(viddec, STREAM, NOT_IMPLEMENTED, diff --git a/src/gsttividdec2.c b/src/gsttividdec2.c index 79b28a5..6bf421b 100644 --- a/src/gsttividdec2.c +++ b/src/gsttividdec2.c @@ -84,7 +84,7 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE( GST_PAD_ALWAYS, GST_STATIC_CAPS ("video/mpeg, " - "mpegversion=(int){ 2, 4 }, " /* MPEG versions 2 and 4 */ + "mpegversion=(int){ 2, 4 }, " /* MPEG versions 2 and 4 */ "systemstream=(boolean)false, " "framerate=(fraction)[ 0, MAX ], " "width=(int)[ 1, MAX ], " @@ -92,7 +92,8 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE( "video/x-h264, " /* H264 */ "framerate=(fraction)[ 0, MAX ], " "width=(int)[ 1, MAX ], " - "height=(int)[ 1, MAX ]" + "height=(int)[ 1, MAX ] ;" + "video/x-xvid" /* XVID */ ) ); @@ -616,6 +617,11 @@ static gboolean gst_tividdec2_set_sink_caps(GstPad *pad, GstCaps *caps) codec = gst_ticodec_get_codec("H.264 Video Decoder"); } + /* XVID Decode */ + else if (!strcmp(mime, "video/x-xvid")) { + codec = gst_ticodec_get_codec("MPEG4 Video Decoder"); + } + /* Mime type not supported */ else { GST_ELEMENT_ERROR(viddec2, STREAM, NOT_IMPLEMENTED, -- 1.5.4.3