summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Hervey <bilboed@bilboed.com>2007-12-17 09:49:25 +0000
committerEdward Hervey <bilboed@bilboed.com>2007-12-17 09:49:25 +0000
commitd0cf9fb57cb1a60583eeb978ba198c4822a58a24 (patch)
tree0e8ccda7b9ccb2852277bbcb78d7616f9f018243
parent4807d901105876bc94a6303f7a076a506359ce7e (diff)
ext/ffmpeg/: Handle VC-1 properly , which is handled differently from WMV3.
Original commit message from CVS: * ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps), (gst_ffmpeg_caps_to_codecid): * ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_open): Handle VC-1 properly , which is handled differently from WMV3.
-rw-r--r--ChangeLog7
-rw-r--r--ext/ffmpeg/gstffmpegcodecmap.c15
-rw-r--r--ext/ffmpeg/gstffmpegdec.c1
3 files changed, 21 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index a862410..656d887 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2007-12-17 Edward Hervey <edward.hervey@collabora.co.uk>
+ * ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps),
+ (gst_ffmpeg_caps_to_codecid):
+ * ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_open):
+ Handle VC-1 properly , which is handled differently from WMV3.
+
+2007-12-17 Edward Hervey <edward.hervey@collabora.co.uk>
+
* autogen.sh:
Fix call to ffmpegrev
* configure.ac:
diff --git a/ext/ffmpeg/gstffmpegcodecmap.c b/ext/ffmpeg/gstffmpegcodecmap.c
index f3e906c..abb7832 100644
--- a/ext/ffmpeg/gstffmpegcodecmap.c
+++ b/ext/ffmpeg/gstffmpegcodecmap.c
@@ -631,10 +631,14 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id,
break;
case CODEC_ID_WMV3:
- case CODEC_ID_VC1:
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-wmv",
"wmvversion", G_TYPE_INT, 3, NULL);
break;
+ case CODEC_ID_VC1:
+ caps = gst_ff_vid_caps_new (context, codec_id, "video/x-wmv",
+ "wmvversion", G_TYPE_INT, 3, "fourcc", GST_TYPE_FOURCC,
+ GST_MAKE_FOURCC('W', 'V', 'C', '1'), NULL);
+ break;
case CODEC_ID_QDM2:
caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-qdm2", NULL);
break;
@@ -2051,7 +2055,14 @@ gst_ffmpeg_caps_to_codecid (const GstCaps * caps, AVCodecContext * context)
id = CODEC_ID_WMV2;
break;
case 3:
- id = CODEC_ID_WMV3;
+ {
+ guint32 fourcc;
+ if (gst_structure_get_fourcc (structure, "fourcc", &fourcc)) {
+ if (fourcc == GST_MAKE_FOURCC ('W', 'V', 'C', '1'))
+ id = CODEC_ID_VC1;
+ } else
+ id = CODEC_ID_WMV3;
+ }
break;
}
}
diff --git a/ext/ffmpeg/gstffmpegdec.c b/ext/ffmpeg/gstffmpegdec.c
index 5d0c958..39f2107 100644
--- a/ext/ffmpeg/gstffmpegdec.c
+++ b/ext/ffmpeg/gstffmpegdec.c
@@ -498,6 +498,7 @@ gst_ffmpegdec_open (GstFFMpegDec * ffmpegdec)
case CODEC_ID_MPEG4:
case CODEC_ID_MJPEG:
case CODEC_ID_MP3:
+ case CODEC_ID_VC1:
GST_LOG_OBJECT (ffmpegdec, "not using parser, blacklisted codec");
ffmpegdec->pctx = NULL;
break;