<head>
        <title></title>
</head>
<body>
<div class="userStyles" style=" font-family: Arial; font-size: 12pt; color: #000000;">Thank you for your response. The gst-launch script here is only for illustration. My C app is over 1000 lines of code and I do not wish to post it to the mailing list.<br>
<br>
I have duplicated the crash of the gst-launch script on an Ubuntu desktop running gstreamer 1.14.1, but I still don't know if 1.14.4 would help. I have run into build issues in other parts of my yocto build when I try to bring in the 1.14.4 recipe from another yocto branch.<br>
<br>
So, I would be very interested in seeing the patches you used.<br>
<br>
I have the following caps set on my interleave element in the C app, which I think sets the channel mask correctly:<br>
interleave_0_caps = gst_caps_from_string("audio/x-raw,channels=1,channel-mask=(bitmask)0x1");<br>
...<br>
interleave_1_caps = gst_caps_from_string("audio/x-raw,channels=1,channel-mask=(bitmask)0x2");<br>
...<br>
gst_element_link_filtered (audiomixer0, audioconvert_interleave_0, interleave_0_caps)<br>
...<br>
 gst_element_link_filtered (audiomixer1, audioconvert_interleave_1, interleave_1_caps)
<footer class="replyforwardcontainer"><br>
<br>
<span>On Fri, 19 Jul 2019 21:25:38 -0400, Nicolas Dufresne <nicolas@ndufresne.ca> wrote:</span><br>
 
<div dir="auto">
<div> 
<div class="gmail_quote">
<div class="gmail_attr" dir="ltr">Le ven. 19 juill. 2019 15 h 40, <<a href="mailto:mark.wattier@eqware.net">mark.wattier@eqware.net</a>> a écrit :</div>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div class="m_4181301523250821030userStyles" style="font-family:Arial;font-size:12pt;color:#000000">I am developing a gstreamer app in C that receives multiple RTP audio streams over UDP, sends a copy of each to a WAV file, and sends another copy to an alsasrc. To select which stream goes to alsasrc, I am using an audiomixer element and I set the volume on the sink pads appropriately. This all works when I have a single channel going to alsasrc.<br>
<br>
I need to have two streams going to alsasrc, each of which can be selected independently. For this, I have set up an interleave element and a second audiomixer. Each of the 8 incoming streams has a tee, sending the output to each audiomixer.<br>
<br>
This also works, but only when I use a single stream for input. When I add a second stream, I get an Internal data stream error, reason: not-negotiated. With debug on, I chased this back to the audiomixer element, where I got the following message:<br>
0:00:15.634352592 ^[[332m 1297^[[00m   0x243920 ^[[37mDEBUG  ^[[00m ^[[00m          audiomixer gstaudiomixer.c:402:gst_audiomixer_setcaps:<audiomixer0:sink_1>^[[00m got input caps<br>
audio/x-raw, layout=(string)interleaved, rate=(int)16000, format=(string)S16LE, channels=(int)1, channel-mask=(bitmask)0x0000000000000001, but current caps are<br>
audio/x-raw, layout=(string)interleaved, rate=(int)16000, format=(string)S16LE, channels=(int)1, channel-mask=(bitmask)0x0000000000000001<br>
<br>
The caps are the same. I dug deeper, adding my own GST_DEBUG statements and found that gst_audio_info_is_equal was returning false to gst_audiomixer_setcaps, because of this section:<br>
if (memcmp (info->position, other->position,<br>
          GST_AUDIO_INFO_CHANNELS (info) * sizeof (GstAudioChannelPosition)) !=<br>
      0)<br>
    return FALSE;<br>
<br>
I have tried many combinations of properties for the audiomixer and interleave elements. I admit I do not completely understand how to use the start-time or alignment threshold properties, but they seem like that could lead to a solution.<br>
<br>
I am stuck using gstreamer 1.12.2 for this embedded product, using yocto, branch rocko. I have a hunch that 1.14.4, from yocto branch thud, might resolve this problem, but I would rather not mix up versions in our SDK if I can help it, and it can be difficult to port versions across yocto branches.</div>
</div>
</blockquote>
</div>
</div>

<div dir="auto"> </div>

<div dir="auto">I do the same in a more complicated way, I'm pretty sure I can help. I'm on 1.10.3 still for that application, but this didn't work so well without patches, which I believe most are covered in 1.14+.</div>

<div dir="auto"> </div>

<div dir="auto">The difference between audiomixer and audiointerleaver in such case, is that adding interleaver pads changes the caps. The other issue is that you need a channel mapping, I have never figured out how to do that from gst-launch-1.0.</div>

<div dir="auto"> </div>

<div dir="auto"> </div>

<div dir="auto">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div class="m_4181301523250821030userStyles" style="font-family:Arial;font-size:12pt;color:#000000"><br>
The following is a simplified gst-launch pipeline which results in a very similar failure. In this example, the error propogates back to the udpsrc rather than coming up in audiomixer.<br>
<br>
gst-launch-1.0 -v interleave name=i ! \<br>
 audioconvert ! \<br>
 alsasink sync=false buffer-time=1000  \<br>
\<br>
udpsrc port=5000 buffer-size=1000 ! \<br>
 "application/x-rtp, media=(string)audio, clock-rate=(int)16000, encoding-name=(string)L16" ! \<br>
 rtpL16depay ! \<br>
 queue ! \<br>
 audio/x-raw,format=S16BE,layout=interleaved,rate=16000,channels=1 ! \<br>
 audioconvert ! \<br>
 "audio/x-raw,channels=1,channel-mask=(bitmask)0x1" ! \<br>
 tee name=t0 ! queue ! audiomixer name=mix0 !\<br>
 i.sink_0  \<br>
\<br>
udpsrc port=5001 buffer-size=1000 ! \<br>
 "application/x-rtp, media=(string)audio, clock-rate=(int)16000, encoding-name=(string)L16" ! \<br>
 rtpL16depay ! \<br>
 queue ! \<br>
 audio/x-raw,format=S16BE,layout=interleaved,rate=16000,channels=1 ! \<br>
 audioconvert ! \<br>
"audio/x-raw,channels=1,channel-mask=(bitmask)0x2" ! \<br>
 tee name=t1 ! queue ! audiomixer name=mix1 !\<br>
 i.sink_1 \<br>
t0. ! queue ! mix1. \<br>
t1. ! queue ! mix0.<br>
<br>
<br>
 </div>
</div>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" rel="noreferrer" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a></blockquote>
</div>
</div>
</div>
_______________________________________________<br>
gstreamer-devel mailing list<br>
gstreamer-devel@lists.freedesktop.org<br>
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</footer>
</div>


</body>