ext/ffmpeg/gstffmpegcodecmap.c: Specify H.263 variant and version in the caps (fixes #361636)

Original commit message from CVS:
Patch by: Ville Syrjala <ville.syrjala@movial.fi>
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_caps_to_codecid):
Specify H.263 variant and version in the caps (fixes #361636)
This commit is contained in:
Ville Syrjala 2006-11-16 07:28:28 +00:00 committed by Stefan Kost
parent bb5e57a5f1
commit 5eae399a60
2 changed files with 25 additions and 4 deletions

View file

@ -1,3 +1,11 @@
2006-11-16 Stefan Kost <ensonic@users.sf.net>
Patch by: Ville Syrjala <ville.syrjala@movial.fi>
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_caps_to_codecid):
Specify H.263 variant and version in the caps (fixes #361636)
2006-11-14 Michael Smith <msmith@fluendo.com>
* ext/ffmpeg/gstffmpegcodecmap.c:

View file

@ -204,16 +204,25 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id,
break;
case CODEC_ID_H263:
caps = gst_ff_vid_caps_new (context, "video/x-h263", NULL);
if (encode) {
caps = gst_ff_vid_caps_new (context, "video/x-h263",
"variant", G_TYPE_STRING, "itu",
"h263version", G_TYPE_STRING, "h263", NULL);
} else {
caps = gst_ff_vid_caps_new (context, "video/x-h263",
"variant", G_TYPE_STRING, "itu", NULL);
}
break;
case CODEC_ID_H263P:
caps = gst_ff_vid_caps_new (context, "video/x-h263",
"variant", G_TYPE_STRING, "h263p", NULL);
"variant", G_TYPE_STRING, "itu",
"h263version", G_TYPE_STRING, "h263p", NULL);
break;
case CODEC_ID_H263I:
caps = gst_ff_vid_caps_new (context, "video/x-intel-h263", NULL);
caps = gst_ff_vid_caps_new (context, "video/x-intel-h263",
"variant", G_TYPE_STRING, "intel", NULL);
break;
case CODEC_ID_H261:
@ -1874,7 +1883,11 @@ gst_ffmpeg_caps_to_codecid (const GstCaps * caps, AVCodecContext * context)
id = CODEC_ID_DVAUDIO;
audio = TRUE;
} else if (!strcmp (mimetype, "video/x-h263")) {
id = CODEC_ID_H263; /* or H263P */
const gchar *h263version = gst_structure_get_string (structure, "h263version");
if (h263version && !strcmp (h263version, "h263p"))
id = CODEC_ID_H263P;
else
id = CODEC_ID_H263;
video = TRUE;
} else if (!strcmp (mimetype, "video/x-intel-h263")) {
id = CODEC_ID_H263I;