diff --git a/ChangeLog b/ChangeLog index 088258d146..3f9af7cc11 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2006-11-14 Michael Smith + + * ext/ffmpeg/gstffmpegcodecmap.c: + (gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid): + Add mmf to _get_codecids, so we can use the mmf muxer. + Use "audio/x-adpcm" rather than the dubious looking "x-adpcm" as our + caps type for the adpcm variants. + + * ext/ffmpeg/gstffmpegmux.c: (gst_ffmpegmux_base_init): + Allow muxers that allow either only audio or only video, needed for + mmf (audio only). + 2006-10-26 Edward Hervey * ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps), diff --git a/ext/ffmpeg/gstffmpegcodecmap.c b/ext/ffmpeg/gstffmpegcodecmap.c index ee38b2ff44..d37a254426 100644 --- a/ext/ffmpeg/gstffmpegcodecmap.c +++ b/ext/ffmpeg/gstffmpegcodecmap.c @@ -1779,6 +1779,11 @@ gst_ffmpeg_formatid_get_codecids (const gchar *format_name, *video_codec_list = mov_video_list; *audio_codec_list = mov_audio_list; + } else if (!strcmp (format_name, "mmf")) { + static enum CodecID mmf_audio_list[] = { + CODEC_ID_ADPCM_YAMAHA}; + *video_codec_list = NULL; + *audio_codec_list = mmf_audio_list; } else { GST_LOG ("Format %s not found", format_name); return FALSE; @@ -2089,7 +2094,7 @@ gst_ffmpeg_caps_to_codecid (const GstCaps * caps, AVCodecContext * context) id = CODEC_ID_FFV1; video = TRUE; } - } else if (!strcmp (mimetype, "x-adpcm")) { + } else if (!strcmp (mimetype, "audio/x-adpcm")) { const gchar *layout; layout = gst_structure_get_string (structure, "layout"); diff --git a/ext/ffmpeg/gstffmpegmux.c b/ext/ffmpeg/gstffmpegmux.c index bf285c9a49..09ecf14729 100644 --- a/ext/ffmpeg/gstffmpegmux.c +++ b/ext/ffmpeg/gstffmpegmux.c @@ -156,14 +156,19 @@ gst_ffmpegmux_base_init (gpointer g_class) /* pad templates */ srctempl = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, params->srccaps); - audiosinktempl = gst_pad_template_new ("audio_%d", - GST_PAD_SINK, GST_PAD_REQUEST, params->audiosinkcaps); - videosinktempl = gst_pad_template_new ("video_%d", - GST_PAD_SINK, GST_PAD_REQUEST, params->videosinkcaps); - gst_element_class_add_pad_template (element_class, srctempl); - gst_element_class_add_pad_template (element_class, videosinktempl); - gst_element_class_add_pad_template (element_class, audiosinktempl); + + if (params->audiosinkcaps) { + audiosinktempl = gst_pad_template_new ("audio_%d", + GST_PAD_SINK, GST_PAD_REQUEST, params->audiosinkcaps); + gst_element_class_add_pad_template (element_class, audiosinktempl); + } + + if (params->videosinkcaps) { + videosinktempl = gst_pad_template_new ("video_%d", + GST_PAD_SINK, GST_PAD_REQUEST, params->videosinkcaps); + gst_element_class_add_pad_template (element_class, videosinktempl); + } klass->in_plugin = params->in_plugin; }