summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
authorRonald S. Bultje <rbultje@ronald.bitfreak.net>2003-04-12 15:04:01 +0000
committerRonald S. Bultje <rbultje@ronald.bitfreak.net>2003-04-12 15:04:01 +0000
commit0df9d22764a6c490d5bccda37ae58270de8a78f0 (patch)
tree7d81d2491f0d7495fddc8fe28dd39c93cda03ffd /gst
parenta224fb23d32f02cd59910a8f610ea7912faabaa3 (diff)
downloadgst-plugins-bad-0df9d22764a6c490d5bccda37ae58270de8a78f0.tar.gz
gst-plugins-bad-0df9d22764a6c490d5bccda37ae58270de8a78f0.tar.bz2
gst-plugins-bad-0df9d22764a6c490d5bccda37ae58270de8a78f0.zip
Fixes #110252
Original commit message from CVS: Fixes #110252
Diffstat (limited to 'gst')
-rw-r--r--gst/modplug/gstmodplug.cc22
1 files changed, 19 insertions, 3 deletions
diff --git a/gst/modplug/gstmodplug.cc b/gst/modplug/gstmodplug.cc
index a6f6ca3d..adc3a7da 100644
--- a/gst/modplug/gstmodplug.cc
+++ b/gst/modplug/gstmodplug.cc
@@ -80,7 +80,7 @@ GST_PAD_TEMPLATE_FACTORY (modplug_src_template_factory,
"src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
- GST_CAPS_NEW (
+ GST_CAPS_NEW ( /* use16bit = TRUE */
"modplug_src",
"audio/raw",
"format", GST_PROPS_STRING ("int"),
@@ -91,6 +91,18 @@ GST_PAD_TEMPLATE_FACTORY (modplug_src_template_factory,
"depth", GST_PROPS_INT (16),
"rate", GST_PROPS_INT_RANGE (11025, 44100),
"channels", GST_PROPS_INT_RANGE (1, 2)
+ ),
+ GST_CAPS_NEW ( /* use16bit = FALSE */
+ "modplug_src",
+ "audio/raw",
+ "format", GST_PROPS_STRING ("int"),
+ "law", GST_PROPS_INT (0),
+ "endianness", GST_PROPS_INT (G_BYTE_ORDER),
+ "signed", GST_PROPS_BOOLEAN (FALSE),
+ "width", GST_PROPS_INT (8),
+ "depth", GST_PROPS_INT (8),
+ "rate", GST_PROPS_INT_RANGE (11025, 44100),
+ "channels", GST_PROPS_INT_RANGE (1, 2)
)
)
@@ -540,15 +552,19 @@ gst_modplug_update_metadata (GstModPlug *modplug)
static gboolean
modplug_negotiate (GstModPlug *modplug)
{
+ gboolean sign;
modplug->length = 1152 * modplug->channel;
if (modplug->_16bit)
{
modplug->length *= 2;
modplug->bitsPerSample = 16;
+ sign = TRUE;
}
- else
+ else {
modplug->bitsPerSample = 8;
+ sign = FALSE;
+ }
if (!GST_PAD_CAPS (modplug->srcpad)) {
if (!gst_pad_try_set_caps (modplug->srcpad,
@@ -558,7 +574,7 @@ modplug_negotiate (GstModPlug *modplug)
"format", GST_PROPS_STRING ("int"),
"law", GST_PROPS_INT (0),
"endianness", GST_PROPS_INT (G_BYTE_ORDER),
- "signed", GST_PROPS_BOOLEAN (TRUE),
+ "signed", GST_PROPS_BOOLEAN (sign),
"width", GST_PROPS_INT (modplug->bitsPerSample),
"depth", GST_PROPS_INT (modplug->bitsPerSample),
"rate", GST_PROPS_INT (modplug->frequency),