Discussion:
audioconvert refuses to convert mono into stereo in Gstreamer 1.09
Thomas Roos
2013-09-30 09:46:10 UTC
Permalink
The actual problem occured in own C code but can be boiled down to the
following gst-launch pipelines.
Are "channels=(int)1, channel-mask=(bitmask)0x0000000000000000" valid caps
for mono audio?
Depending on the answer to that that question either *avdec_g722* or *
audioconvert* needs to be fixed IMHO.
Can anybody confirm this ?

1) Good pipeline

***@ipac:~# *GST_DEBUG=3 gst-launch-1.0 audiotestsrc ! avenc_g722
! avdec_g722 ! audioconvert ! audio/x-raw, channels=1 ! fakesink*
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
0:00:00.182954856 694 0xf0120 FIXME default
gstutils.c:3622:gst_pad_create_stream_id_printf_valist:<audiotestsrc0:src>
Creating random stream-id, consider implementing a deterministic way of
creating a stream-id
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
^CCaught interrupt -- handling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 5513031006 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

1) Bad pipeline

***@ipac:~# *GST_DEBUG=3 gst-launch-1.0 audiotestsrc ! avenc_g722
! avdec_g722 ! audioconvert ! audio/x-raw, channels=2 ! fakesink*
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
0:00:00.182148390 696 0xf0120 FIXME default
gstutils.c:3622:gst_pad_create_stream_id_printf_valist:<audiotestsrc0:src>
Creating random stream-id, consider implementing a deterministic way of
creating a stream-id
0:00:00.192402311 696 0xf0120 WARN basetransform
gstbasetransform.c:1348:gst_base_transform_setcaps:<audioconvert0>
transform could not transform audio/x-raw, rate=(int)16000,
channels=(int)1, channel-mask=(bitmask)0x0000000000000000,
format=(string)S16LE, layout=(string)interleaved in anything we support
0:00:00.194904758 696 0xf0120 WARN basetransform
gstbasetransform.c:1348:gst_base_transform_setcaps:<audioconvert0>
transform could not transform audio/x-raw, rate=(int)16000,
channels=(int)1, channel-mask=(bitmask)0x0000000000000000,
format=(string)S16LE, layout=(string)interleaved in anything we support
0:00:00.196186498 696 0xf0120 WARN basesrc
gstbasesrc.c:2812:gst_base_src_loop:<audiotestsrc0> error: Internal data
flow error.
0:00:00.196949439 696 0xf0120 WARN basesrc
gstbasesrc.c:2812:gst_base_src_loop:<audiotestsrc0> error: streaming task
paused, reason not-negotiated (-4)
ERROR: from element /GstPipeline:pipeline0/GstAudioTestSrc:audiotestsrc0:
Internal data flow error.
Additional debug info:
gstbasesrc.c(2812): gst_base_src_loop ():
/GstPipeline:pipeline0/GstAudioTestSrc:audiotestsrc0:
streaming task paused, reason not-negotiated (-4)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...
***@ipac:~#
harishjennykn
2013-09-30 11:03:52 UTC
Permalink
Hi,

channels=(int)1, channel-mask=(bitmask)0x0000000000000000

*is INVALID caps for mono audio.*

channel-mask can be
channel-mask=(bitmask)0x0000000000000001 , 0x0000000000000002 ,
0x0000000000000004 etc.

And regarding the bad pipeline example -
GST_DEBUG=3 gst-launch-1.0 audiotestsrc ! avenc_g722 ! avdec_g722 !
audioconvert ! audio/x-raw, channels=2 ! fakesink

It did play for me in the latest gstreamer code.



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/audioconvert-refuses-to-convert-mono-into-stereo-in-Gstreamer-1-09-tp4662260p4662261.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
Loading...