summaryrefslogtreecommitdiff
path: root/ext/ffmpeg/gstffmpegmux.c
diff options
context:
space:
mode:
authorMichael Smith <msmith@xiph.org>2006-11-14 12:34:20 +0000
committerMichael Smith <msmith@xiph.org>2006-11-14 12:34:20 +0000
commitbb5e57a5f184f4e8835f39c34a2b92962ae9e0e1 (patch)
tree9a9fec6c2eba9384f7402fd273a270a17862dca2 /ext/ffmpeg/gstffmpegmux.c
parent0e07d784d271c0269521a1d9995450f5add68a46 (diff)
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).
Diffstat (limited to 'ext/ffmpeg/gstffmpegmux.c')
-rw-r--r--ext/ffmpeg/gstffmpegmux.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/ext/ffmpeg/gstffmpegmux.c b/ext/ffmpeg/gstffmpegmux.c
index bf285c9..09ecf14 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;
}