GNOME Bugzilla – Bug 453650
[audiobasesrc] two alsasrcs do not work in one pipeline
Last modified: 2007-10-16 11:44:10 UTC
Please describe the problem: I need to join streams from two soundcards and mux it with some video. I have built a sample pipeline with one soundcard and it works fine: gst-launch -v videotestsrc num-buffers=100 ! ffmpegcolorspace ! ffdeinterlace ! tee name="tee0" ! fakesink \ tee0. ! queue ! ffenc_h263p ! tee name="tee1" ! fakesink \ tee1. ! queue ! matroskamux name="mux" ! filesink location="/tmp/1.mkv" \ alsasrc device="hw:0" ! "audio/x-raw-int,width=16,rate=48000,channels=2" ! adder name="mix" \ ! tee name="tee2" ! ffenc_ac3 ! tee name="tee3" ! "audio/x-ac3,width=16,rate=48000,channels=2" ! mux. \ tee3. ! queue ! fakesink When I add a second card (even without linking to the 'adder' element) then pipeline stops alsasrc device="hw:1" ! "audio/x-raw-int,width=16,rate=48000,channels=2" ! fakesink The error is: Setting pipeline to PLAYING ... 0:00:00.231934000 15579 0x804f050 WARN pipeline gstpipeline.c:568:gst_pipeline_change_state:<pipeline0> error: Selected clock cannot be used in pipeline. 0:00:00.232189000 15579 0x804f050 WARN pipeline gstpipeline.c:568:gst_pipeline_change_state:<pipeline0> error: Pipeline cannot operate with selected clock ERROR: pipeline doesn't want to play In my C-program with only one alsasrc I have to manually set pipeline's clock (got it from alsasrc) and it works, but I didn't find the way how two alsasrc can work together. Steps to reproduce: Run pipeline with two alsasrc Actual results: Got error: Pipeline cannot operate with selected clock Expected results: Two alsasrc should work both together Does this happen every time? yes Other information:
I can reproduce this with the gutsy packages (core/base 0.10.14) with: gst-launch-0.10 alsasrc device=null ! queue ! fakesink alsasrc device=null ! queue ! fakesink but can't reproduce this with CVS. Not sure which commit fixed it though.
*** Bug 464142 has been marked as a duplicate of this bug. ***
This is fixed in CVS: 2007-10-08 Wim Taymans <wim.taymans@gmail.com> * gst-libs/gst/audio/gstbaseaudiosrc.c: (gst_base_audio_src_create): Also handle the case where there is no clock set on the audio source, like in the unit tests. 2007-09-10 Wim Taymans <wim.taymans@gmail.com> * gst-libs/gst/audio/gstbaseaudiosrc.c: (gst_base_audio_src_class_init), (gst_base_audio_src_init), (gst_base_audio_src_provide_clock), (gst_base_audio_src_set_property), (gst_base_audio_src_get_property), (gst_base_audio_src_create): * gst-libs/gst/audio/gstbaseaudiosrc.h: Allow othe clocks than the internal clock to be used for the pipeline. Add property to disable clock provide. API: GstBaseAudioSrc::provide-clock (the pipeline above won't work right though because of the null device thing - but it should work with real audio devices).