summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2004-07-12 11:41:51 +0000
committerWim Taymans <wim.taymans@gmail.com>2004-07-12 11:41:51 +0000
commitf20b4f68be8c6f3c8a0640a2ff2420af14487854 (patch)
tree8e2f28caa84509adcf404e6769b2fd7347250c2b
parentc7b8dc09e18ae5740fb1e52a8d0323918c12b308 (diff)
downloadgst-plugins-bad-f20b4f68be8c6f3c8a0640a2ff2420af14487854.tar.gz
gst-plugins-bad-f20b4f68be8c6f3c8a0640a2ff2420af14487854.tar.bz2
gst-plugins-bad-f20b4f68be8c6f3c8a0640a2ff2420af14487854.zip
gst-libs/gst/riff/riff-media.c: Fix the template caps to include some more media types.
Original commit message from CVS: * gst-libs/gst/riff/riff-media.c: (gst_riff_create_audio_caps), (gst_riff_create_video_template_caps): Fix the template caps to include some more media types.
-rw-r--r--ChangeLog6
-rw-r--r--gst-libs/gst/riff/riff-media.c8
2 files changed, 12 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 7a2ab4ec..60b25660 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2004-07-12 Wim Taymans <wim@fluendo.com>
+ * gst-libs/gst/riff/riff-media.c: (gst_riff_create_audio_caps),
+ (gst_riff_create_video_template_caps):
+ Fix the template caps to include some more media types.
+
+2004-07-12 Wim Taymans <wim@fluendo.com>
+
* gst/playback/gstdecodebin.c: (gst_decode_bin_get_type),
(gst_decode_bin_class_init), (gst_decode_bin_factory_filter),
(compare_ranks), (print_feature), (gst_decode_bin_init),
diff --git a/gst-libs/gst/riff/riff-media.c b/gst-libs/gst/riff/riff-media.c
index c6ca1501..4a9ad87f 100644
--- a/gst-libs/gst/riff/riff-media.c
+++ b/gst-libs/gst/riff/riff-media.c
@@ -335,6 +335,8 @@ gst_riff_create_audio_caps (guint16 codec_id,
{
gboolean block_align = FALSE;
GstCaps *caps = NULL;
+ gint rate_min = 8000, rate_max = 96000;
+ gint channels_max = 2;
switch (codec_id) {
case GST_RIFF_WAVE_FORMAT_MPEGL3: /* mp3 */
@@ -419,6 +421,7 @@ gst_riff_create_audio_caps (guint16 codec_id,
break;
case GST_RIFF_WAVE_FORMAT_A52:
+ channels_max = 6;
caps = gst_caps_new_simple ("audio/x-ac3", NULL);
if (codec_name)
*codec_name = g_strdup ("AC3");
@@ -438,8 +441,8 @@ gst_riff_create_audio_caps (guint16 codec_id,
"block_align", G_TYPE_INT, strf->blockalign, NULL);
} else {
gst_caps_set_simple (caps,
- "rate", GST_TYPE_INT_RANGE, 8000, 96000,
- "channels", GST_TYPE_INT_RANGE, 1, 2, NULL);
+ "rate", GST_TYPE_INT_RANGE, rate_min, rate_max,
+ "channels", GST_TYPE_INT_RANGE, 1, channels_max, NULL);
if (block_align)
gst_caps_set_simple (caps,
"block_align", GST_TYPE_INT_RANGE, 1, 8192, NULL);
@@ -495,6 +498,7 @@ gst_riff_create_video_template_caps (void)
GST_MAKE_FOURCC ('M', 'P', 'E', 'G'),
GST_MAKE_FOURCC ('H', '2', '6', '3'),
GST_MAKE_FOURCC ('D', 'I', 'V', 'X'),
+ GST_MAKE_FOURCC ('D', 'X', '5', '0'),
GST_MAKE_FOURCC ('X', 'V', 'I', 'D'),
GST_MAKE_FOURCC ('3', 'I', 'V', '1'),
GST_MAKE_FOURCC ('c', 'v', 'i', 'd'),