<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<p style="margin-top:0px;color:rgb(51, 51, 51);font-family:DIN-Web-Pro, Helvetica, Arial, sans-serif;font-size:15px;letter-spacing:0.15px;background-color:rgb(255, 255, 255)">
Hello !</p>
<p style="margin-top:0px;color:rgb(51, 51, 51);font-family:DIN-Web-Pro, Helvetica, Arial, sans-serif;font-size:15px;letter-spacing:0.15px;background-color:rgb(255, 255, 255)">
<br>
</p>
<p style="color:rgb(51, 51, 51);font-family:DIN-Web-Pro, Helvetica, Arial, sans-serif;font-size:15px;letter-spacing:0.15px;background-color:rgb(255, 255, 255)">
I am developing a Nvidia deepstream inference application with multiple RTSP sources.<br>
Where each individual source is constructed using uridecodebin plugin. Until this point, I have developed a pipeline with multiple source bins are connected to typical inference pipeline as per our use case something like this.</p>
<p style="color:rgb(51, 51, 51);font-family:DIN-Web-Pro, Helvetica, Arial, sans-serif;font-size:15px;letter-spacing:0.15px;background-color:rgb(255, 255, 255)">
source-bin-0 --|<br>
source-bin-1 --|—[Inference pipeline as per Nvidia Deepstream Inference plugins]<br>
source-bin-2 --|</p>
<p style="color:rgb(51, 51, 51);font-family:DIN-Web-Pro, Helvetica, Arial, sans-serif;font-size:15px;letter-spacing:0.15px;background-color:rgb(255, 255, 255)">
Which is working totally fine!</p>
<p style="color:rgb(51, 51, 51);font-family:DIN-Web-Pro, Helvetica, Arial, sans-serif;font-size:15px;letter-spacing:0.15px;background-color:rgb(255, 255, 255)">
<br>
</p>
<p style="color:rgb(51, 51, 51);font-family:DIN-Web-Pro, Helvetica, Arial, sans-serif;font-size:15px;letter-spacing:0.15px;background-color:rgb(255, 255, 255)">
I am looking to incorporate RTSP reconnection in case any of the RTSP sources (camera) is down for a while and comes up after some time.</p>
<p style="color:rgb(51, 51, 51);font-family:DIN-Web-Pro, Helvetica, Arial, sans-serif;font-size:15px;letter-spacing:0.15px;background-color:rgb(255, 255, 255)">
<br>
</p>
<p style="color:rgb(51, 51, 51);font-family:DIN-Web-Pro, Helvetica, Arial, sans-serif;font-size:15px;letter-spacing:0.15px;background-color:rgb(255, 255, 255)">
In case of source error, I am setting a particular uridecodebin state to NULL and then to PLAY again.</p>
<p style="color:rgb(51, 51, 51);font-family:DIN-Web-Pro, Helvetica, Arial, sans-serif;font-size:15px;letter-spacing:0.15px;background-color:rgb(255, 255, 255)">
My observations after performing some test cases are:</p>
<ol style="margin:1em 0px 1em 1.25em;padding:0px 0px 0px 1.25em;clear:both;color:rgb(51, 51, 51);font-family:DIN-Web-Pro, Helvetica, Arial, sans-serif;font-size:15px;letter-spacing:0.15px;background-color:rgb(255, 255, 255)">
<li>When I am using [rtspsrc-decodebin] as the source-bin my reconnection logic of setting the state to NULL and PLAY works fine and I am able to reconnect to my RTSP source successfully. Here when I set the source-bin state to PLAY it returns me GST_STATE_CHANGE_ASYNC
 and the source-bin is able to provide frames to the upstream elements.</li><li>But In the case of [uridecodebin] as the source-bin, my same reconnection logic does not work. Here the observation is after I set the source-bin state to PLAY it returns me GST_STATE_CHANGE_NO_PREROLL and my overall pipeline gets stuck. It is not giving
 me the further error of source disconnected but also not able to provide frames to the upstream elements.</li></ol>
<p style="color:rgb(51, 51, 51);font-family:DIN-Web-Pro, Helvetica, Arial, sans-serif;font-size:15px;letter-spacing:0.15px;background-color:rgb(255, 255, 255)">
The main difference I can conclude here is that when I am using uridecodebin and changing state to PLAY it is returning with GST_STATE_CHANGE_NO_PREROLL and I am not able to reconnect, while with rtspsrc it is returning GST_STATE_CHANGE_ASYNC and I am able
 to connect.</p>
<p style="color:rgb(51, 51, 51);font-family:DIN-Web-Pro, Helvetica, Arial, sans-serif;font-size:15px;letter-spacing:0.15px;background-color:rgb(255, 255, 255)">
I am seeking help to successfully reconnect to my RTSP source when I am using uridecodebin as the source-bin.</p>
<p style="color:rgb(51, 51, 51);font-family:DIN-Web-Pro, Helvetica, Arial, sans-serif;font-size:15px;letter-spacing:0.15px;background-color:rgb(255, 255, 255)">
Thank you in advance!!</p>
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Regards,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Hardik Panchal</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Software Engineer at eInfochips(An Arrow Company).</div>
</body>
</html>