mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-29 18:48:44 +00:00
ext/ffmpeg/: Add the CODEC_FLAG_GLOBAL_HEADER to the exposed flags, and makes it as such configurable as a property. ...
Original commit message from CVS: Patch by: Mark Nauwelaerts <manauw at skynet dot be> and Thomas Vander Stichele <thomas at apestaart dot org> * ext/ffmpeg/gstffmpegcfg.c: (gst_ffmpeg_flags_get_type): * ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps), (gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid), (gst_ffmpeg_get_codecid_longname): Add the CODEC_FLAG_GLOBAL_HEADER to the exposed flags, and makes it as such configurable as a property. Fixes #393187.
This commit is contained in:
parent
eff0fefa3e
commit
ed36eb0fc5
3 changed files with 25 additions and 1 deletions
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
|||
2007-04-12 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
Patch by: Mark Nauwelaerts <manauw at skynet dot be> and
|
||||
Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
* ext/ffmpeg/gstffmpegcfg.c: (gst_ffmpeg_flags_get_type):
|
||||
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps),
|
||||
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid),
|
||||
(gst_ffmpeg_get_codecid_longname):
|
||||
Add the CODEC_FLAG_GLOBAL_HEADER to the exposed flags, and makes it as such
|
||||
configurable as a property. Fixes #393187.
|
||||
|
||||
2007-04-12 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
Patch by: Yves Lefebvre <ivanohe at abacom dot com>
|
||||
|
|
|
@ -267,6 +267,7 @@ gst_ffmpeg_flags_get_type (void)
|
|||
{CODEC_FLAG_GRAY, "Only decode/encode grayscale", "gray"},
|
||||
{CODEC_FLAG_NORMALIZE_AQP, "Normalize Adaptive Quantization (masking, etc)", "aqp"},
|
||||
{CODEC_FLAG_TRELLIS_QUANT, "Trellis Quantization", "trellis"},
|
||||
{CODEC_FLAG_GLOBAL_HEADER, "Global headers in extradata instead of every keyframe", "global-headers"},
|
||||
{CODEC_FLAG_AC_PRED, "H263 Advanced Intra Coding / MPEG4 AC prediction", "aic"},
|
||||
{CODEC_FLAG_H263P_UMV, "Unlimited Motion Vector", "umv"},
|
||||
{CODEC_FLAG_CBP_RD, "Rate Distoration Optimization for CBP", "cbp-rd"},
|
||||
|
|
|
@ -534,6 +534,7 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id,
|
|||
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-vp3", NULL);
|
||||
break;
|
||||
|
||||
#ifdef CODEC_ID_VP5
|
||||
case CODEC_ID_VP5:
|
||||
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-vp5", NULL);
|
||||
break;
|
||||
|
@ -545,6 +546,7 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id,
|
|||
case CODEC_ID_VP6F:
|
||||
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-vp6-flash", NULL);
|
||||
break;
|
||||
#endif
|
||||
|
||||
case CODEC_ID_THEORA:
|
||||
caps = gst_ff_vid_caps_new (context, codec_id, "video/x-theora", NULL);
|
||||
|
@ -1493,6 +1495,7 @@ gst_ffmpeg_caps_with_codectype (enum CodecType type,
|
|||
/*
|
||||
* caps_with_codecid () transforms a GstCaps for a known codec
|
||||
* ID into a filled-in context.
|
||||
* codec_data from caps will override possible extradata already in the context
|
||||
*/
|
||||
|
||||
void
|
||||
|
@ -1513,12 +1516,16 @@ gst_ffmpeg_caps_with_codecid (enum CodecID codec_id,
|
|||
buf = GST_BUFFER_CAST (gst_value_get_mini_object (value));
|
||||
size = GST_BUFFER_SIZE (buf);
|
||||
|
||||
/* free the old one if it is there */
|
||||
if (context->extradata)
|
||||
av_free (context->extradata);
|
||||
|
||||
/* allocate with enough padding */
|
||||
context->extradata =
|
||||
av_mallocz (GST_ROUND_UP_16 (size + FF_INPUT_BUFFER_PADDING_SIZE));
|
||||
memcpy (context->extradata, GST_BUFFER_DATA (buf), size);
|
||||
context->extradata_size = size;
|
||||
} else {
|
||||
} else if (context->extradata == NULL) {
|
||||
/* no extradata, alloc dummy with 0 sized, some codecs insist on reading
|
||||
* extradata anyway which makes then segfault. */
|
||||
context->extradata =
|
||||
|
@ -2128,6 +2135,7 @@ gst_ffmpeg_caps_to_codecid (const GstCaps * caps, AVCodecContext * context)
|
|||
} else if (!strcmp (mimetype, "video/x-vp3")) {
|
||||
id = CODEC_ID_VP3;
|
||||
video = TRUE;
|
||||
#ifdef CODEC_ID_VP5
|
||||
} else if (!strcmp (mimetype, "video/x-vp5")) {
|
||||
id = CODEC_ID_VP5;
|
||||
video = TRUE;
|
||||
|
@ -2137,6 +2145,7 @@ gst_ffmpeg_caps_to_codecid (const GstCaps * caps, AVCodecContext * context)
|
|||
} else if (!strcmp (mimetype, "video/x-vp6-flash")) {
|
||||
id = CODEC_ID_VP6F;
|
||||
video = TRUE;
|
||||
#endif
|
||||
} else if (!strcmp (mimetype, "video/x-flash-screen")) {
|
||||
id = CODEC_ID_FLASHSV;
|
||||
video = TRUE;
|
||||
|
@ -2532,6 +2541,7 @@ gst_ffmpeg_get_codecid_longname (enum CodecID codec_id)
|
|||
case CODEC_ID_VP3:
|
||||
name = "VP3 video";
|
||||
break;
|
||||
#ifdef CODEC_ID_VP5
|
||||
case CODEC_ID_VP5:
|
||||
name = "VP5 video";
|
||||
break;
|
||||
|
@ -2541,6 +2551,7 @@ gst_ffmpeg_get_codecid_longname (enum CodecID codec_id)
|
|||
case CODEC_ID_VP6F:
|
||||
name = "VP6 Flash video";
|
||||
break;
|
||||
#endif
|
||||
case CODEC_ID_FLASHSV:
|
||||
name = "Flash Screen Video";
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue