diff options
author | Olivier CrĂȘte <olivier.crete@collabora.co.uk> | 2009-03-05 21:35:46 -0500 |
---|---|---|
committer | Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> | 2010-05-10 15:41:45 +0200 |
commit | 2b891aff61f30b4f12b597bb1ae325368903a22b (patch) | |
tree | 2faf6e7b683da4fc5beb631b99e69577f0d4dab8 | |
parent | 21e855d167489a61aa2e8751d7b169ceccc6943e (diff) |
codecmap: Respect the various h263 options
See #577784.
-rw-r--r-- | ext/ffmpeg/gstffmpegcodecmap.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/ext/ffmpeg/gstffmpegcodecmap.c b/ext/ffmpeg/gstffmpegcodecmap.c index 664153d..5aa9d08 100644 --- a/ext/ffmpeg/gstffmpegcodecmap.c +++ b/ext/ffmpeg/gstffmpegcodecmap.c @@ -542,6 +542,15 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, caps = gst_ff_vid_caps_new (context, codec_id, "video/x-h263", "variant", G_TYPE_STRING, "itu", "h263version", G_TYPE_STRING, "h263p", NULL); + if (encode && context) { + + gst_caps_set_simple (caps, + "annex-f", G_TYPE_BOOLEAN, context->flags & CODEC_FLAG_4MV, + "annex-j", G_TYPE_BOOLEAN, context->flags & CODEC_FLAG_LOOP_FILTER, + "annex-i", G_TYPE_BOOLEAN, context->flags & CODEC_FLAG_AC_PRED, + "annex-t", G_TYPE_BOOLEAN, context->flags & CODEC_FLAG_AC_PRED, + NULL); + } break; case CODEC_ID_H263I: @@ -2374,6 +2383,26 @@ gst_ffmpeg_caps_with_codecid (enum CodecID codec_id, " to a pixel format", GST_FOURCC_ARGS (fourcc)); break; } + break; + } + case CODEC_ID_H263P: + { + gboolean val; + + if (!gst_structure_get_boolean (str, "annex-f", &val) || val) + context->flags |= CODEC_FLAG_4MV; + else + context->flags &= ~CODEC_FLAG_4MV; + if ((!gst_structure_get_boolean (str, "annex-i", &val) || val) && + (!gst_structure_get_boolean (str, "annex-t", &val) || val)) + context->flags |= CODEC_FLAG_AC_PRED; + else + context->flags &= ~CODEC_FLAG_AC_PRED; + if (!gst_structure_get_boolean (str, "annex-j", &val) || val) + context->flags |= CODEC_FLAG_LOOP_FILTER; + else + context->flags &= ~CODEC_FLAG_LOOP_FILTER; + break; } case CODEC_ID_ADPCM_G726: { |