mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
ext/ffmpeg/gstffmpegcodecmap.c: Add mmf to _get_codecids, so we can use the mmf muxer.
Original commit message from CVS: * 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).
This commit is contained in:
parent
0e07d784d2
commit
bb5e57a5f1
3 changed files with 30 additions and 8 deletions
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
|||
2006-11-14 Michael Smith <msmith@fluendo.com>
|
||||
|
||||
* 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 <edward@fluendo.com>
|
||||
|
||||
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue