Commit c3d69815 authored by Edward Hervey's avatar Edward Hervey 🤘

ext/ffmpeg/gstffmpegcodecmap.c: Added proper mime types for mxf and gxf formats.

Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids):
Added proper mime types for mxf and gxf formats.
Added known configuration for asf muxer. Implies allowing the ffmpeg asf
muxer to take WMV and WMA.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_chain):
Most demuxers/formats don't give keyframe information on encoded
audio streams. We therefore don't discard them, and use the clipping
functionnality to drop the decoded buffers we didn't need.
parent 0932c8c3
2006-10-09 Edward Hervey <edward@fluendo.com>
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids):
Added proper mime types for mxf and gxf formats.
Added known configuration for asf muxer. Implies allowing the ffmpeg asf
muxer to take WMV and WMA.
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_chain):
Most demuxers/formats don't give keyframe information on encoded
audio streams. We therefore don't discard them, and use the clipping
functionnality to drop the decoded buffers we didn't need.
2006-10-09 Edward Hervey <edward@fluendo.com>
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
......
......@@ -1620,6 +1620,10 @@ gst_ffmpeg_formatid_to_caps (const gchar * format_name)
caps = gst_caps_from_string ("image/gif");
} else if (!strcmp (format_name, "ogg")) {
caps = gst_caps_from_string ("application/ogg");
} else if (!strcmp (format_name, "mxf")) {
caps = gst_caps_from_string ("application/mxf");
} else if (!strcmp (format_name, "gxf")) {
caps = gst_caps_from_string ("application/gxf");
} else if (!strcmp (format_name, "yuv4mpegpipe")) {
caps = gst_caps_new_simple ("application/x-yuv4mpeg",
"y4mversion", G_TYPE_INT, 1,
......@@ -1687,6 +1691,12 @@ gst_ffmpeg_formatid_get_codecids (const gchar *format_name,
*video_codec_list = flv_video_list;
*audio_codec_list = flv_audio_list;
} else if (!strcmp (format_name, "asf")) {
static enum CodecID asf_video_list[] = { CODEC_ID_WMV1, CODEC_ID_WMV2, CODEC_ID_NONE };
static enum CodecID asf_audio_list[] = { CODEC_ID_WMAV1, CODEC_ID_WMAV2, CODEC_ID_NONE };
*video_codec_list = asf_video_list;
*audio_codec_list = asf_audio_list;
} else {
GST_LOG ("Format %s not found", format_name);
return FALSE;
......
......@@ -1791,10 +1791,13 @@ gst_ffmpegdec_chain (GstPad * pad, GstBuffer * inbuf)
ffmpegdec->next_ts = GST_CLOCK_TIME_NONE;
}
oclass = (GstFFMpegDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec));
/* do early keyframe check pretty bad to rely on the keyframe flag in the
* source for this as it might not even be parsed (UDP/file/..). */
if (G_UNLIKELY (ffmpegdec->waiting_for_key)) {
if (GST_BUFFER_FLAG_IS_SET (inbuf, GST_BUFFER_FLAG_DELTA_UNIT))
if (GST_BUFFER_FLAG_IS_SET (inbuf, GST_BUFFER_FLAG_DELTA_UNIT) &&
oclass->in_plugin->type != CODEC_TYPE_AUDIO)
goto skip_keyframe;
GST_DEBUG_OBJECT (ffmpegdec, "got keyframe");
......@@ -1808,8 +1811,6 @@ gst_ffmpegdec_chain (GstPad * pad, GstBuffer * inbuf)
"Received new data of size %d, ts:%" GST_TIME_FORMAT ", dur:%"GST_TIME_FORMAT,
GST_BUFFER_SIZE (inbuf), GST_TIME_ARGS (pending_timestamp), GST_TIME_ARGS (pending_duration));
oclass = (GstFFMpegDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec));
/* parse cache joining. If there is cached data, its timestamp will be what we
* send to the parse. */
if (ffmpegdec->pcache) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment