I need to mix streams from two soundcards and mux it with some video. I have built a sample pipeline with one soundcard and it works fine:<br><br>gst-launch -v videotestsrc num-buffers=100 ! ffmpegcolorspace ! ffdeinterlace ! tee name="tee0" ! fakesink \
<br> tee0. ! queue ! ffenc_h263p ! tee name="tee1" ! fakesink \ <br> tee1. ! queue ! matroskamux name="mux" ! filesink location="/tmp/1.mkv" \
<br> alsasrc device="hw:0" ! "audio/x-raw-int,width=16,rate=48000,channels=2" ! adder name="mix" \ <br> ! tee name="tee2" ! ffenc_ac3 ! tee name="tee3" ! "audio/x-ac3,width=16,rate=48000,channels=2" ! mux. \
<br> tee3. ! queue ! fakesink<br><br>When I add second card (even without linking to the 'adder' element) then pipeline stops<br><br> alsasrc device="hw:1" ! "audio/x-raw-int,width=16,rate=48000,channels=2" ! fakesink
<br><br>The error is:<br><br>Setting pipeline to PLAYING ...<br>0:00:00.231934000 15579 0x804f050 WARN pipeline gstpipeline.c:568:gst_pipeline_change_state:<pipeline0> error: Selected clock cannot be used in pipeline.
<br>0:00:00.232189000 15579 0x804f050 WARN pipeline gstpipeline.c:568:gst_pipeline_change_state:<pipeline0> error: Pipeline cannot operate with selected clock<br>ERROR: pipeline doesn't want to play
<br><br>In my C-program I have to manually set pipeline's clock (got it from alsasrc) and it works, but I don't know how to work correctly with two alsasrcs.<br><br>