<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:854535082;
        mso-list-template-ids:-1279472380;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[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]-->
</head>
<body lang="EN-IN" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p style="background:white"><span style="font-size:11.5pt;font-family:"Helvetica",sans-serif;color:#333333;letter-spacing:.1pt">Hello !<o:p></o:p></span></p>
<p style="background:white"><span style="font-size:11.5pt;font-family:"Helvetica",sans-serif;color:#333333;letter-spacing:.1pt"><o:p> </o:p></span></p>
<p style="background:white"><span style="font-size:11.5pt;font-family:"Helvetica",sans-serif;color:#333333;letter-spacing:.1pt">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.<o:p></o:p></span></p>
<p style="background:white"><span style="font-size:11.5pt;font-family:"Helvetica",sans-serif;color:#333333;letter-spacing:.1pt">source-bin-0 --|<br>
source-bin-1 --|—[Inference pipeline as per Nvidia Deepstream Inference plugins]<br>
source-bin-2 --|<o:p></o:p></span></p>
<p style="background:white"><span style="font-size:11.5pt;font-family:"Helvetica",sans-serif;color:#333333;letter-spacing:.1pt">Which is working totally fine!<o:p></o:p></span></p>
<p style="background:white"><span style="font-size:11.5pt;font-family:"Helvetica",sans-serif;color:#333333;letter-spacing:.1pt"><o:p> </o:p></span></p>
<p style="background:white"><span style="font-size:11.5pt;font-family:"Helvetica",sans-serif;color:#333333;letter-spacing:.1pt">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.<o:p></o:p></span></p>
<p style="background:white"><span style="font-size:11.5pt;font-family:"Helvetica",sans-serif;color:#333333;letter-spacing:.1pt"><o:p> </o:p></span></p>
<p style="background:white"><span style="font-size:11.5pt;font-family:"Helvetica",sans-serif;color:#333333;letter-spacing:.1pt">In case of source error, I am setting a particular uridecodebin state to NULL and then to PLAY again.<o:p></o:p></span></p>
<p style="background:white"><span style="font-size:11.5pt;font-family:"Helvetica",sans-serif;color:#333333;letter-spacing:.1pt">My observations after performing some test cases are:<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:51.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1;background:white">
<![if !supportLists]><span style="font-size:11.5pt;font-family:"Helvetica",sans-serif;color:#333333;letter-spacing:.1pt"><span style="mso-list:Ignore">1.<span style="font:7.0pt "Times New Roman"">   
</span></span></span><![endif]><span style="font-size:11.5pt;font-family:"Helvetica",sans-serif;color:#333333;letter-spacing:.1pt">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.<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:51.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1;background:white">
<![if !supportLists]><span style="font-size:11.5pt;font-family:"Helvetica",sans-serif;color:#333333;letter-spacing:.1pt"><span style="mso-list:Ignore">2.<span style="font:7.0pt "Times New Roman"">   
</span></span></span><![endif]><span style="font-size:11.5pt;font-family:"Helvetica",sans-serif;color:#333333;letter-spacing:.1pt">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.<o:p></o:p></span></p>
<p style="background:white"><span style="font-size:11.5pt;font-family:"Helvetica",sans-serif;color:#333333;letter-spacing:.1pt">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.<o:p></o:p></span></p>
<p style="background:white"><span style="font-size:11.5pt;font-family:"Helvetica",sans-serif;color:#333333;letter-spacing:.1pt">I am seeking help to successfully reconnect to my RTSP source when I am using uridecodebin as the source-bin.<o:p></o:p></span></p>
<p style="background:white"><span style="font-size:11.5pt;font-family:"Helvetica",sans-serif;color:#333333;letter-spacing:.1pt">Thank you in advance!!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">Hardik Panchal<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">Software Engineer at eInfochips(An Arrow Company).<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
</div>
</body>
</html>