<div dir="auto">Thanks Matthew.<div dir="auto"><br></div><div dir="auto">Got it working.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 20 Feb 2022, 13:22 Matthew Waters, <<a href="mailto:ystreet00@gmail.com">ystreet00@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
Nothing has to be unlinked to not send data. It is entirely
possible to have things linked and not data flowing. You can drop
data manually with a pad probe, or you could change the element
states to not have them producing data. It all depends on what your
exact requirements and elements involved are.<br>
<br>
Cheers<br>
-Matt<br>
<br>
<div>On 18/2/22 20:37, Busayo Famutimi
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">Thanks Matthew.</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">Just to understand clearly, I have the
following in a pipeline,<br>
<div><br>
</div>
<div>"wasapisrc role=comms use-audioclient3=true
low-latency=true ! queue ! audioconvert ! audioresample !
queue ! opusenc ! rtpopuspay name=audiopay ! queue
name=audio_queue !
application/x-rtp,media=audio,encoding-name=OPUS,payload=111
! webrtcbin ".</div>
<div><br>
</div>
<div>To mute, the queue (named audio_queue) src pad and the
webrtcbin sink_pad (sink_%u) have to be unlinked and</div>
<div><br>
</div>
<div>to unmute, both pads must be linked back together.</div>
<div><br>
</div>
<div>Is my understanding correct?</div>
<div><br>
</div>
<div>Thanks.</div>
<div><br>
<div><br>
</div>
<div><br>
</div>
</div>
</div>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Fri, Feb 18, 2022 at 2:53
AM Matthew Waters <<a href="mailto:ystreet00@gmail.com" target="_blank" rel="noreferrer">ystreet00@gmail.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div> Setting the sendrecv/recvonly/sendonly does not change
what data you push into webrtcbin. If you want 'mute'
functionality, stop pushing audio/video into webrtcbin.<br>
<br>
Cheers<br>
-Matt<br>
<br>
<div>On 18/2/22 05:15, Busayo Famutimi via gstreamer-devel
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div dir="ltr">Hello.
<div><br>
</div>
<div>Please I have a working webrtc peer connection
using. However, I am unable to set the transceivers
(both audio and video) dynamically.</div>
<div><br>
</div>
<div>I have the following code:</div>
<div><br>
</div>
<div>
<div style="color:rgb(212,212,212);background-color:rgb(30,30,30);font-family:Consolas,"Courier New",monospace;font-size:14px;line-height:19px;white-space:pre-wrap"><div><span style="color:rgb(78,201,176)">GArray</span> *<span style="color:rgb(156,220,254)">transceivers</span>;</div><div> <span style="color:rgb(220,220,170)">g_signal_emit_by_name</span>(<span style="color:rgb(156,220,254)">voip_data</span>-><span style="color:rgb(156,220,254)">webrtc</span>, <span style="color:rgb(206,145,120)">"get-transceivers"</span>, &<span style="color:rgb(156,220,254)">transceivers</span>);</div><div> <span style="color:rgb(86,156,214)">g_assert</span>(<span style="color:rgb(156,220,254)">transceivers</span> != <span style="color:rgb(86,156,214)">NULL</span> && <span style="color:rgb(156,220,254)">transceivers</span>-><span style="color:rgb(156,220,254)">len</span> > <span style="color:rgb(181,206,168)">1</span>);</div><div> <span style="color:rgb(197,134,192)">for</span> (<span style="color:rgb(78,201,176)">guint</span> <span style="color:rgb(156,220,254)">i</span> = <span style="color:rgb(181,206,168)">0</span>; <span style="color:rgb(156,220,254)">i</span> < <span style="color:rgb(156,220,254)">transceivers</span>-><span style="color:rgb(156,220,254)">len</span>; <span style="color:rgb(156,220,254)">i</span>++) </div><div> {</div><div> <span style="color:rgb(78,201,176)">GstWebRTCRTPTransceiver</span> *<span style="color:rgb(156,220,254)">transceiver</span> = <span style="color:rgb(86,156,214)">g_array_index</span>(<span style="color:rgb(156,220,254)">transceivers</span>, <span style="color:rgb(78,201,176)">GstWebRTCRTPTransceiver</span> *, <span style="color:rgb(156,220,254)">i</span>);</div><div> <span style="color:rgb(78,201,176)">GstWebRTCKind</span> <span style="color:rgb(156,220,254)">kind</span>;</div><div> <span style="color:rgb(220,220,170)">g_object_get</span>(<span style="color:rgb(156,220,254)">transceiver</span>, <span style="color:rgb(206,145,120)">"kind"</span>, &<span style="color:rgb(156,220,254)">kind</span>, <span style="color:rgb(86,156,214)">NULL</span>);</div><div> <span style="color:rgb(197,134,192)">if</span> (<span style="color:rgb(156,220,254)">kind</span> == <span style="color:rgb(79,193,255)">GST_WEBRTC_KIND_AUDIO</span>)</div><div> {</div><div> <span style="color:rgb(197,134,192)">if</span> (<span style="color:rgb(156,220,254)">mic_action</span> == <span style="color:rgb(79,193,255)">MUTE_MIC</span>)
</div><div> <span style="color:rgb(220,220,170)">g_object_set</span>(<span style="color:rgb(156,220,254)">transceiver</span>, <span style="color:rgb(206,145,120)">"direction"</span>, <span style="color:rgb(79,193,255)">GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_RECVONLY</span>, <span style="color:rgb(86,156,214)">NULL</span>);</div><div> <span style="color:rgb(197,134,192)">else</span> <span style="color:rgb(197,134,192)">if</span> (<span style="color:rgb(156,220,254)">mic_action</span> == <span style="color:rgb(79,193,255)">UNMUTE_MIC</span>)</div><div> <span style="color:rgb(220,220,170)">g_object_set</span>(<span style="color:rgb(156,220,254)">transceiver</span>, <span style="color:rgb(206,145,120)">"direction"</span>, <span style="color:rgb(79,193,255)">GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_SENDRECV</span>, <span style="color:rgb(86,156,214)">NULL</span>);</div><div> <span style="color:rgb(197,134,192)">else</span></div><div> <span style="color:rgb(86,156,214)">g_assert_not_reached</span>();</div><div> }</div><div> }</div><div> <span style="color:rgb(220,220,170)">g_array_unref</span>(<span style="color:rgb(156,220,254)">transceivers</span>);</div></div>
</div>
<div><br>
</div>
<div>but the other peer still receives audio.</div>
<div><br>
</div>
<div>I am trying to create the mute/unmute microphone
functionality.</div>
<div><br>
</div>
<div>How can this be achieved?</div>
<div><br>
</div>
<div>Thanks.</div>
</div>
</div>
</blockquote>
<br>
</div>
</blockquote>
</div>
</blockquote>
<br>
</div>
</blockquote></div>