<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Wow… Yeah, it was right in front of me the whole time…
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Thanks for catching that for me! Works as expected now!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Tim Müller [via GStreamer-devel] [mailto:ml-node+<a href="/user/SendEmail.jtp?type=node&node=4667844&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>]
<br>
<b>Sent:</b> July-07-14 4:15 PM<br>
<b>To:</b> David Weldon<br>
<b>Subject:</b> Re: Interleave with Alsasink Pipeline Problem<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">On Mon, 2014-07-07 at 15:50 -0700, adweldon wrote: <br>
<br>
> In my application, I tried to set the channel-mask by doing the <br>
> following below; which never seemed to work. Using your debug trap, I <br>
> see now that channel_mask is set to 0x21 for some reason?? Even <br>
> hard-coding it to 0x03 still still results in the wrong mask. Perhaps <br>
> I'm setting the caps on the pad incorrectly... <br>
<br>
0x21 is FRONT_LEFT | REAR_RIGHT, which is what your GValueArray code <br>
does. Maybe you meant FRONT_RIGHT ? <br>
<br>
Regards <br>
-Tim <o:p></o:p></p>
<div>
<p class="MsoNormal"><br>
> <br>
> Output: <br>
> <br>
> 0:00:00.705327387 12248 0xccf770 DEBUG GST_EVENT <br>
> gstpad.c:5098:gst_pad_send_event_unchecked:<alsasink:sink> have event <br>
> type caps event: 0x7f9be4003c70, time 99:99:99.999999999, seq-num 66, <br>
> GstEventCaps, caps=(GstCaps)"audio/x-raw\,\ format\=\(string\)S16LE\,\ <br>
> layout\=\(string\)interleaved\,\ rate\=\(int\)44100\,\ channels\=\(int <br>
> \)2\,\ channel-mask\=\(bitmask\)0x0000000000000021"; <br>
> 0:00:00.705378555 12248 0xccf770 DEBUG GST_CAPS <br>
> gstutils.c:2852:gst_pad_query_accept_caps:<alsasink:sink> accept caps <br>
> of audio/x-raw, format=(string)S16LE, layout=(string)interleaved, <br>
> rate=(int)44100, channels=(int)2, <br>
> channel-mask=(bitmask)0x0000000000000021 <br>
> <br>
> <br>
> Code Snippet: <br>
> <br>
> interleave = gst_element_factory_make ("interleave", <br>
> "interleave"); <br>
> g_assert (interleave != NULL); <br>
> <br>
> //Create audiochannel position array... Compiled with ignore <br>
> warnings flag becuase GValueArray is not supported any longer. <br>
> GValueArray *positions = g_value_array_new (2); <br>
> GValue val = { 0, }; <br>
> g_value_init (&val, GST_TYPE_AUDIO_CHANNEL_POSITION); <br>
> g_value_set_enum (&val, GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT); <br>
> g_value_array_append (positions, &val); <br>
> g_value_reset (&val); <br>
> g_value_set_enum (&val, GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT); <br>
> g_value_array_append (positions, &val); <br>
> g_value_unset (&val); <br>
> <br>
> g_print ("setting channel positions\n"); <br>
> g_object_set(G_OBJECT(interleave), "channel-positions-from-input", <br>
> FALSE, NULL); <br>
> g_object_set (interleave, "channel-positions", positions, NULL); <br>
> <br>
> guint64 channel_mask = GST_AUDIO_CHANNEL_POSITION_MASK(FRONT_LEFT) <br>
> | GST_AUDIO_CHANNEL_POSITION_MASK(FRONT_RIGHT); <br>
> g_print ("channel_mask: 0x%x\n", channel_mask); <br>
> <br>
> GstCaps *caps = gst_caps_new_simple( <br>
> "audio/x-raw", <br>
> "rate", G_TYPE_INT, 22000, <br>
> "channels", G_TYPE_INT, 2, <br>
> "channel-mask", GST_TYPE_BITMASK, channel_mask, <br>
> NULL); <br>
> <br>
> GstPad *srcpad = gst_element_get_static_pad (interleave, "src"); <br>
> g_assert(srcpad); <br>
> gst_pad_set_caps(srcpad, caps ); <br>
> <br>
> <br>
> <br>
> <br>
> ______________________________________________________________________ <br>
> From: Tim Müller [via GStreamer-devel] [ml-node+[hidden email]] <br>
> Sent: Monday, July 07, 2014 2:57 PM <br>
> To: David Weldon <br>
> Subject: Re: Interleave with Alsasink Pipeline Problem <br>
> <br>
> <br>
> On Mon, 2014-07-07 at 11:04 -0700, adweldon wrote: <br>
> <br>
> Hi David, <br>
> <br>
> <br>
> > I'm trying to create a fairly simple pipeline using test sources, <br>
> the <br>
> > interleave element and my alsasink. I'm essentially trying to have <br>
> > different test sources interleaved into a multichannel stream, and <br>
> played <br>
> > out on the alsasink. We are starting with basic two channel stereo <br>
> right <br>
> > now, so nothing too complicated. <br>
> > <br>
> > The following pipeline using pulsesink, works: <br>
> > gst-launch-1.0 -v interleave name=i ! pulsesink audiotestsrc <br>
> name=t1 <br>
> > volume=0.2 freq=133 ! queue ! i. audiotestsrc name=t2 volume=0.1 <br>
> freq=200 ! <br>
> > queue ! i. <br>
> > <br>
> > Replacing pulsesink with alsasink results in: <br>
> > <br>
> > WARN basesrc gstbasesrc.c:2933:gst_base_src_loop:<t1> error: <br>
> Internal data <br>
> > flow error. <br>
> > WARN basesrc gstbasesrc.c:2933:gst_base_src_loop:<t1> error: <br>
> streaming task <br>
> > paused, reason not-negotiated (-4) <br>
> > INFO GST_ERROR_SYSTEM <br>
> gstelement.c:1834:gst_element_message_full:<t1> <br>
> > posting message: Internal data flow error. <br>
> > GST_ERROR_SYSTEM gstelement.c:1857:gst_element_message_full:<t1> <br>
> posted <br>
> > error message: Internal data flow error. <br>
> > <br>
> > Also: <br>
> > WARN alsa conf.c:4694:snd_config_expand: alsalib error: Unknown <br>
> parameters <br>
> > {AES0 0x02 AES1 0x82 AES2 0x00 AES3 0x02} <br>
> > WARN alsa pcm.c:2239:snd_pcm_open_noupdate: alsalib error: Unknown <br>
> PCM <br>
> > default:{AES0 0x02 AES1 0x82 AES2 0x00 AES3 0x02} <br>
> <br>
> <br>
> <br>
> I don't think this warning has anything to do with it. <br>
> <br>
> > Removing a source, the audio will play... I have created a custom <br>
> app that <br>
> > does basically the same thing as the launch pipeline, but it results <br>
> in the <br>
> > same errors. I have also tried playing with channel masks and what <br>
> not in <br>
> > the app to no avail... <br>
> > <br>
> > Any help is appreciated, <br>
> <br>
> The debug log should tell you what the problem is: <br>
> <br>
> $ GST_DEBUG=*:6 gst-launch-1.0 -v interleave name=i ! alsasink \ <br>
> audiotestsrc name=t1 volume=0.2 freq=133 ! queue ! i. \ <br>
> audiotestsrc name=t2 volume=0.1 freq=200 ! queue ! i. \ <br>
> 2>&1 | grep --max-count=1 -B25 not-negotiated <br>
> <br>
> Problem appears to be that interleave output audio with 2 <br>
> unpositioned <br>
> channels (channels=2,channel-mask=0), whereas alsa wants left/right <br>
> for <br>
> channels=2 (i.e. channels=2,channel-mask=3). pulsesink doesn't seem <br>
> to <br>
> care that's why it works. <br>
> <br>
> This makes it work (i.e. forcing a left/right layout on the caps): <br>
> <br>
> gst-launch-1.0 -v interleave name=i ! capssetter <br>
> caps='audio/x-raw,channel-mask=(bitmask)0x03' ! alsasink <br>
> audiotestsrc <br>
> name=t1 volume=0.2 freq=133 ! queue ! i. audiotestsrc name=t2 <br>
> volume=0.1 freq=200 ! queue ! i. <br>
> <br>
> In code one would do that via interleave's properties I suppose, but <br>
> with gst-launch this is the only way. <br>
> <br>
> Cheers <br>
> -Tim <br>
> <br>
> <br>
> <br>
> _______________________________________________ <br>
> gstreamer-devel mailing list <br>
> <a href="/user/SendEmail.jtp?type=node&node=4667823&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>
<br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_top" rel="nofollow" link="external">
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
-- <br>
Tim Müller, Centricular Ltd - <a href="http://www.centricular.com" target="_top" rel="nofollow" link="external">
http://www.centricular.com</a><br>
<br>
_______________________________________________ <br>
gstreamer-devel mailing list <br>
<a href="/user/SendEmail.jtp?type=node&node=4667823&i=1" target="_top" rel="nofollow" link="external">[hidden email]</a>
<br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_top" rel="nofollow" link="external">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br>
<o:p></o:p></p>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="1" width="100%" noshade="" style="color:#CCCCCC" align="center">
</div>
<div>
<div>
<p class="MsoNormal"><b><span style="font-size:9.0pt;font-family:"Tahoma","sans-serif";color:#444444">If you reply to this email, your message will be added to the discussion below:<o:p></o:p></span></b></p>
</div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Tahoma","sans-serif";color:#444444"><a href="http://gstreamer-devel.966125.n4.nabble.com/Interleave-with-Alsasink-Pipeline-Problem-tp4667819p4667823.html" target="_top" rel="nofollow" link="external">http://gstreamer-devel.966125.n4.nabble.com/Interleave-with-Alsasink-Pipeline-Problem-tp4667819p4667823.html</a>
<o:p></o:p></span></p>
</div>
<div style="margin-top:4.8pt">
<p class="MsoNormal" style="line-height:18.0pt"><span style="font-size:8.5pt;font-family:"Tahoma","sans-serif";color:#666666">To unsubscribe from Interleave with Alsasink Pipeline Problem,
<a href="" target="_top" rel="nofollow" link="external">
click here</a>.<br>
<a href="http://gstreamer-devel.966125.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" target="_top" rel="nofollow" link="external"><span style="font-size:7.0pt;font-family:"Times New Roman","serif"">NAML</span></a>
<o:p></o:p></span></p>
</div>
</div>
<br/><hr align="left" width="300" />
View this message in context: <a href="http://gstreamer-devel.966125.n4.nabble.com/Interleave-with-Alsasink-Pipeline-Problem-tp4667819p4667844.html">RE: Interleave with Alsasink Pipeline Problem</a><br/>
Sent from the <a href="http://gstreamer-devel.966125.n4.nabble.com/">GStreamer-devel mailing list archive</a> at Nabble.com.<br/>