<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>
<!--
@font-face
{font-family:新細明體}
@font-face
{font-family:新細明體}
@font-face
{font-family:Calibri}
@font-face
{}
@font-face
{font-family:Tahoma}
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"新細明體","serif"}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline}
p.msochpdefault, li.msochpdefault, div.msochpdefault
{margin-right:0cm;
margin-left:0cm;
font-size:12.0pt;
font-family:"Calibri","sans-serif"}
span.emailstyle17
{font-family:"Calibri","sans-serif";
color:#1F497D}
span.EmailStyle19
{font-family:"Calibri","sans-serif";
color:#1F497D}
span.EmailStyle20
{font-family:"Calibri","sans-serif";
color:#1F497D}
.MsoChpDefault
{font-size:10.0pt}
@page WordSection1
{margin:72.0pt 90.0pt 72.0pt 90.0pt}
div.WordSection1
{}
-->
</style>
</head>
<body lang="ZH-TW" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif"; color:#1F497D">Hi,</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif"; color:#1F497D">I found that the GstRTSPStreamTransport will be removed when the problem occurs.</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif"; color:#1F497D">The do_send_messages(.. ) in rtsp-client.c will call set_data_seq(..) if the message has been queued for transmission in watch.</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif"; color:#1F497D">And the function do_send_data(..) and do_send_data_list(..) in rtsp-client.c will return FALSE if the transmission is still ongoing.
</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif"; color:#1F497D">That will cause push_data(..) call in function check_transport_backlog(..) in rtsp-stream.c to return FALSE.</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif"; color:#1F497D">And it will remove the GstRTSPStreamTransport by calling update_transport (stream, trans, FALSE).</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif"; color:#1F497D">This will make the transmission managed by the GstRTSPStreamTransport be stopped forever.</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif"; color:#1F497D">Is there a way to add the GstRTSPStreamTransport back or to avoid removing it when the message queued is still transmitted in watch?</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif"; color:#1F497D">Thanks,</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif"; color:#1F497D">Bruce</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<div>
<div style="border:none; border-top:solid #B5C4DF 1.0pt; padding:3.0pt 0cm 0cm 0cm">
<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""> Bruce Liang
<br>
<b>Sent:</b> Monday, May 30, 2022 8:10 PM<br>
<b>To:</b> 'Discussion of the development of and with GStreamer'<br>
<b>Subject:</b> RE: (gst-rtsp-server)1 client can't receive rtp packet while 2 clients connect to server choosing rtsp over tcp</span></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif"; color:#1F497D">Hi,</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif"; color:#1F497D">The problem occurs when 100Mbps network cable is used.</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif"; color:#1F497D">If the 1Gbps network cable is used, the problem will not occur.</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif"; color:#1F497D">Thanks,</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri","sans-serif"; color:#1F497D">Bruce</span></p>
<div>
<div style="border:none; border-top:solid #B5C4DF 1.0pt; padding:3.0pt 0cm 0cm 0cm">
<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""> gstreamer-devel [mailto:gstreamer-devel-bounces@lists.freedesktop.org]
<b>On Behalf Of </b>Bruce Liang via gstreamer-devel<br>
<b>Sent:</b> Friday, May 27, 2022 6:03 PM<br>
<b>To:</b> Discussion of the development of and with GStreamer<br>
<b>Cc:</b> Bruce Liang<br>
<b>Subject:</b> (gst-rtsp-server)1 client can't receive rtp packet while 2 clients connect to server choosing rtsp over tcp</span></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Hi, </span><span lang="EN-US"></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> </span><span lang="EN-US"></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">I'm using gst-rtsp-server to create a rtsp server and add 1 factory to it.</span><span lang="EN-US"></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">The factory is set to shared and the pipeline description contains only 1 payloader rtph264pay.</span><span lang="EN-US"></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> </span><span lang="EN-US"></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">When the first client requests stream from the server choosing rtsp over tcp, it work properly.</span><span lang="EN-US"></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Then the second client also requests stream from the server choosing rtsp over tcp, it works well at begining:</span><span lang="EN-US"></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> </span><span lang="EN-US"></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">0:10:04.837385023 420 0x1a5a790 DEBUG rtspclient rtsp-client.c:4917:do_send_messages:<GstRTSPClient@0x7574c430> emit 'message-sent' signal</span><span lang="EN-US"></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">0:10:04.837462440 420 0x1a5a790 INFO rtspclient rtsp-client.c:2300:do_keepalive: keep session 0x757c19d8 alive</span><span lang="EN-US"></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> </span><span lang="EN-US"></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">But if there is a large I frame that has size over 200KB sent to the second client, the following log shows:</span><span lang="EN-US"></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> </span><span lang="EN-US"></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">0:10:04.842062023 420 0x1a5a790 DEBUG rtspclient rtsp-client.c:4908:do_send_messages:<GstRTSPClient@0x7574c430> wait for message 1, channel 0</span><span lang="EN-US"></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">0:10:04.869407273 420 0x7550ccc0 DEBUG rtspclient rtsp-client.c:4961:message_sent:<GstRTSPClient@0x7574c430> emit 'message-sent' signal</span><span lang="EN-US"></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> </span><span lang="EN-US"></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">There is no rtp packet sent to second client after the large I frame sent, while the server continues to send rtp packet to the first client.</span><span lang="EN-US"></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> </span><span lang="EN-US"></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Is there a way to handle this problem?</span><span lang="EN-US"></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> </span><span lang="EN-US"></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Thanks,</span><span lang="EN-US"></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Bruce</span><span lang="EN-US"></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><span lang="EN-US">*** Confidentiality Note *** This e-mail message and any accompanying documents are for sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure
or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
</span></p>
</div>
*** Confidentiality Note *** This e-mail message and any accompanying documents are for sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If
you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
</body>
</html>