<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">
Hello,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
I tried to restream the same video (.mp4 file) infinetely using a <span style="font-family: Courier New;">
factory_uri</span> <span style="background-color: rgb(255, 255, 255);"> </span><span style="background-color: rgb(204, 204, 204); font-family: Courier New;"><i>gst_rtsp_media_factory_uri_new
</i></span><i>()</i>.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
I used the <span style="font-family: Courier New;"><i>media_configure</i></span> (or
<span style="font-family: Courier New;"><i>media_constructed</i></span>) callback to get the pipeline from the media and connect to the
<span style="font-family: Courier New; background-color: rgb(204, 204, 204);">"message"</span> signal.<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="font-family: Courier New;"><i>  GstElement *pipeline = gst_rtsp_media_get_pipeline (media);</i></span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<div><span style="font-family: Courier New;"><i>  GstBus *bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));</i></span></div>
<div><span style="font-family: Courier New;"><i>  gst_bus_add_signal_watch (bus);</i></span></div>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="font-family: Courier New;"><i>  g_signal_connect (bus, "message", G_CALLBACK (message_cb), loop);</i></span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
But an error occurs.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
As a second try, I edited the rtsp-media.c file, eventually <span style="font-family: Courier New; background-color: rgb(204, 204, 204);">
default_handle_message().</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
When the stream goes to the end, I seek to the beginning then I play the media again:<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="font-family: Courier New;">  case GST_MESSAGE_EOS:</span><br>
</div>
<div class="elementToProof"><span style="font-family: Courier New;">    gst_element_seek(priv->pipeline, 1.0, GST_FORMAT_TIME,</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<div class="elementToProof"><span style="font-family: Courier New;">                     GST_SEEK_FLAG_ACCURATE | GST_SEEK_FLAG_SEGMENT | GST_SEEK_FLAG_FLUSH,</span></div>
<div class="elementToProof"><span style="font-family: Courier New;">                     GST_SEEK_TYPE_SET, 0, GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE</span></div>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="font-family: Courier New;">                     );</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="font-family: Courier New;">    gst_rtsp_media_set_pipeline_state (media, GST_STATE_PLAYING);</span><br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
But it dosen't work when the video ends in VLC.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Could you help me, please, to restream a uri file infinetely using gst-rtsp-server?</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div id="Signature">
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
</div>
<div style="">
<p style="color:rgb(32,31,30); font-family:Calibri,sans-serif; font-size:11pt; margin:0cm 0cm 0.0001pt; text-align:start; background-color:rgb(255,255,255)">
</p>
<p style="font-size:11pt;font-family:Calibri,sans-serif;margin:0"><span style="color:#1F497D;font-size:12pt">Best Regards
</span><span style="color:#1F497D;font-size:10pt;font-family:Arial,sans-serif">/ Veuillez agréer mes salutations les plus distinguées,</span><span style="color:black;font-size:12pt"></span></p>
<p style="font-size:11pt;font-family:Calibri,sans-serif;margin:0"><span style="color:#1F497D;font-size:10pt;font-family:Arial,sans-serif" lang="en-US">--</span> 
<br>
</p>
<p></p>
<p style="color:rgb(32,31,30); font-family:Calibri,sans-serif; font-size:11pt; margin:0cm 0cm 0.0001pt; text-align:start; background-color:rgb(255,255,255)">
<br>
</p>
<p style="color:rgb(32,31,30); font-family:Calibri,sans-serif; font-size:11pt; margin:0cm 0cm 0.0001pt; text-align:start; background-color:rgb(255,255,255)">
<b><span style="margin:0px; font-family:"Arial Narrow",sans-serif; color:rgb(84,100,114)">Mohamed JRIBI</span></b><span style="margin:0px; font-family:"Arial Narrow",sans-serif; color:rgb(84,100,114)"></span></p>
<p style="margin:0cm 0cm 0.0001pt; text-align:start; background-color:rgb(255,255,255)">
<font face="Arial Narrow, sans-serif" color="#546472"><span style="font-size:13.3333px">Technical Leader<br>
</span></font></p>
<p style="color:rgb(32,31,30); font-family:Calibri,sans-serif; font-size:11pt; margin:0cm 0cm 0.0001pt; text-align:start; background-color:rgb(255,255,255)">
<i><span style="margin:0px; font-size:7pt; font-family:"Arial Narrow",sans-serif; color:rgb(84,100,114)"> </span></i></p>
<p style="color:rgb(32,31,30); font-family:Calibri,sans-serif; font-size:11pt; margin:0cm 0cm 0.0001pt; text-align:start; background-color:rgb(255,255,255)">
<span style="margin:0px; font-size:10pt; font-family:"Arial Narrow",sans-serif; color:rgb(84,100,114)">Office : (+216) 70 68 79 17 (ext. 718)</span></p>
<p style="color:rgb(32,31,30); font-family:Calibri,sans-serif; font-size:11pt; margin:0cm 0cm 0.0001pt; text-align:start; background-color:rgb(255,255,255)">
<span style="margin:0px; font-size:10pt; font-family:"Arial Narrow",sans-serif; color:rgb(84,100,114)">Voip   : (+33) 5 35  54 25 18 (ext. 718)</span></p>
<p style="color:rgb(32,31,30); font-family:Calibri,sans-serif; font-size:11pt; margin:0cm 0cm 0.0001pt; text-align:start; background-color:rgb(255,255,255)">
<span style="margin:0px; font-size:10pt; font-family:"Arial Narrow",sans-serif; color:rgb(84,100,114)">GSM  : (+216) 98 790 448</span></p>
<p style="color:rgb(32,31,30); font-family:Calibri,sans-serif; font-size:11pt; margin:0cm 0cm 0.0001pt; text-align:start; background-color:rgb(255,255,255)">
<span style="margin:0px; font-size:7pt; font-family:"Arial Narrow",sans-serif; color:rgb(84,100,114)"> </span></p>
<p style="color:rgb(32,31,30); font-family:Calibri,sans-serif; font-size:11pt; margin:0cm 0cm 0.0001pt; text-align:start; background-color:rgb(255,255,255)">
<span style="margin:0px; font-size:10pt"><img class="EmojiInsert" alt="logo_ACTIA_mail_2017" style="margin:0px; width:2.0916in; height:0.45in" width="201" height="43" data-outlook-trace="F:0|T:1" src="cid:image001.jpg@01D5DA9D.F1C7C720"></span></p>
<p style="color:rgb(32,31,30); font-family:Calibri,sans-serif; font-size:11pt; margin:0cm 0cm 0.0001pt; text-align:start; background-color:rgb(255,255,255)">
<span style="margin:0px; font-size:7pt"> </span></p>
<p style="color:rgb(32,31,30); font-family:Calibri,sans-serif; font-size:11pt; margin:0cm 0cm 0.0001pt; text-align:start; background-color:rgb(255,255,255)">
<b><span style="margin:0px; font-size:10pt; font-family:"Arial Narrow",sans-serif; color:rgb(84,100,114)"></span></b></p>
<p style="margin:0cm 0cm 0.0001pt; font-size:11pt; font-family:Calibri,sans-serif; color:rgb(32,31,30); font-weight:400; background-color:rgb(255,255,255)">
<b><span style="margin:0px; font-size:10pt; font-family:"Arial Narrow",sans-serif; color:rgb(84,100,114)">ACTIA Engineering Services (Site SFAX)</span></b></p>
<p style="margin:0cm 0cm 0.0001pt; font-size:11pt; font-family:Calibri,sans-serif; color:rgb(32,31,30); font-weight:400; background-color:rgb(255,255,255)">
<span style="margin:0px; font-size:10pt; font-family:"Arial Narrow",sans-serif; color:rgb(84,100,114)">Parc Technologique "El-Ons" SFAX</span><span style="margin:0px"></span></p>
<p style="margin:0cm 0cm 0.0001pt; font-size:11pt; font-family:Calibri,sans-serif; color:rgb(32,31,30); font-weight:400; background-color:rgb(255,255,255)">
<span style="margin:0px; font-size:10pt; font-family:"Arial Narrow",sans-serif; color:rgb(84,100,114)">Hotel d’entreprise<span> </span></span><span style="margin:0px; font-size:10pt; font-family:"Arial Narrow",sans-serif">2<sup>eme</sup></span><sup><span style="margin:0px"> <span> </span></span></sup><span style="margin:0px; font-size:10pt; font-family:"Arial Narrow",sans-serif; color:rgb(84,100,114)">Etage 
 - 3021 Sakiet Ezzit (Tunisie)</span></p>
<p style="color:rgb(32,31,30); font-family:Calibri,sans-serif; font-size:11pt; margin:0cm 0cm 0.0001pt; text-align:start; background-color:rgb(255,255,255)">
<span style="margin:0px; font-size:10pt; font-family:"Arial Narrow",sans-serif"><span style="margin:0px; color:rgb(84,100,114)"></span></span></p>
<p style="color:rgb(32,31,30); font-family:Calibri,sans-serif; font-size:11pt; margin:0cm 0cm 0.0001pt; text-align:start; background-color:rgb(255,255,255)">
<span style="margin:0px; font-size:10pt; font-family:"Arial Narrow",sans-serif"><a href="http://www.actia.com/" target="_blank" rel="noopener noreferrer" style="margin:0px; color:rgb(149,79,114); text-decoration:underline">http://www.actia.com</a><span style="margin:0px; color:rgb(84,100,114)"></span></span></p>
<p style="color:rgb(32,31,30); font-family:Calibri,sans-serif; font-size:11pt; margin:0cm 0cm 0.0001pt; text-align:start; background-color:rgb(255,255,255)">
<span style="margin:0px; font-size:7pt; font-family:"Arial Narrow",sans-serif; color:rgb(84,100,114)"> </span></p>
<p style="color:rgb(32,31,30); font-family:Calibri,sans-serif; font-size:11pt; margin:0cm 0cm 0.0001pt; text-align:start; background-color:rgb(255,255,255)">
<span style="margin:0px; font-size:10pt"><a href="http://www.youtube.com/ActiaOfficialCom" target="_blank" rel="noopener noreferrer" style="margin:0px; color:rgb(149,79,114); text-decoration:underline"><span style="margin:0px; font-size:9pt; font-family:"Arial Narrow",sans-serif; color:blue"><img class="EmojiInsert" alt="icon_mail_youtube" style="margin:0px; width:0.5333in; height:0.5333in" width="51" height="51" data-outlook-trace="F:0|T:1" src="cid:image002.jpg@01D5DA9D.F1C7C720"></span></a></span><span style="margin:0px; font-size:9pt; font-family:"Arial Narrow",sans-serif; color:rgb(84,100,114)">     <span> </span></span><span style="margin:0px; font-size:10pt"><a href="http://www.linkedin.com/company/actia" target="_blank" rel="noopener noreferrer" style="margin:0px; color:rgb(149,79,114); text-decoration:underline"><span style="margin:0px; font-size:9pt; font-family:"Arial Narrow",sans-serif; color:blue"><img class="EmojiInsert" alt="icon_mail_linkedin" style="margin:0px; width:0.5333in; height:0.5333in" width="51" height="51" data-outlook-trace="F:0|T:1" src="cid:image003.jpg@01D5DA9D.F1C7C720"></span></a></span><span style="margin:0px; font-size:9pt; font-family:"Arial Narrow",sans-serif; color:rgb(84,100,114)">      </span><span style="margin:0px; font-size:10pt"><a href="http://www.actia.com/" target="_blank" rel="noopener noreferrer" style="margin:0px; color:rgb(149,79,114); text-decoration:underline"><span style="margin:0px; font-size:9pt; font-family:"Arial Narrow",sans-serif; color:blue"><img class="EmojiInsert" alt="icon_mail_web" style="margin:0px; width:0.5333in; height:0.5333in" width="51" height="51" data-outlook-trace="F:0|T:1" src="cid:image004.jpg@01D5DA9D.F1C7C720"></span></a></span><span style="margin:0px; font-size:9pt; font-family:"Arial Narrow",sans-serif; color:rgb(84,100,114)"></span></p>
<p style="color:rgb(32,31,30); font-family:Calibri,sans-serif; font-size:11pt; margin:0cm 0cm 0.0001pt; text-align:start; background-color:rgb(255,255,255)">
<span style="margin:0px; font-size:8pt; font-family:"Arial Narrow",sans-serif; color:rgb(84,100,114)"> </span></p>
<p style="color:rgb(32,31,30); font-family:Calibri,sans-serif; font-size:11pt; margin:0cm 0cm 0.0001pt; text-align:start; background-color:rgb(255,255,255)">
<span style="margin:0px">----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span></p>
<p style="color:rgb(32,31,30); font-family:Calibri,sans-serif; font-size:11pt; margin:0cm 0cm 5pt; background-color:rgb(255,255,255); text-align:justify">
<span style="margin:0px; font-size:7pt; font-family:Arial,sans-serif; color:rgb(64,64,64)">Ce courrier</span><span style="margin:0px; font-size:9pt; font-family:Verdana,sans-serif; color:rgb(102,102,102); background:white"><span> </span></span><span style="margin:0px; font-size:7pt; font-family:Arial,sans-serif; color:rgb(64,64,64)">et
 toutes ses pièces jointes sont destinés exclusivement aux personnes ou institutions dont le nom figure ci-dessus et peuvent contenir des informations protégées par le secret professionnel, dont la divulgation est strictement prohibée.</span></p>
<p style="color:rgb(32,31,30); font-family:Calibri,sans-serif; font-size:11pt; margin:0cm 0cm 5pt; background-color:rgb(255,255,255); text-align:justify">
<span style="margin:0px; font-size:7pt; font-family:Arial,sans-serif; color:rgb(64,64,64)">Tout message électronique est susceptible d'altération. ACTIA Engineering Services décline toute responsabilité au titre de ce message s'il a été altéré, déformé ou falsifié.
 Si vous n'êtes pas destinataire, nous vous avisons que sa lecture, sa reproduction</span></p>
<p style="color:rgb(32,31,30); font-family:Calibri,sans-serif; font-size:11pt; margin:0cm 0cm 5pt; background-color:rgb(255,255,255); text-align:justify">
<span style="margin:0px; font-size:7pt; font-family:Arial,sans-serif; color:rgb(64,64,64)">ou sa distribution sont strictement interdites. Nous vous prions en conséquence de nous aviser immédiatement par retour de ce courrier.</span></p>
<p style="color:rgb(32,31,30); font-family:Calibri,sans-serif; font-size:11pt; margin:0cm 0cm 5pt; background-color:rgb(255,255,255); text-align:justify">
<span style="margin:0px; font-size:7pt; font-family:Arial,sans-serif; color:rgb(64,64,64)"> </span></p>
<p style="color:rgb(32,31,30); font-family:Calibri,sans-serif; font-size:11pt; margin:0cm 0cm 0.0001pt; background-color:rgb(255,255,255); text-align:justify">
<span style="margin:0px; font-size:7pt; font-family:Arial,sans-serif; color:rgb(64,64,64)" lang="EN-US">This mail and any attachments are intended solely for the use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized
 review, use, disclosure or</span></p>
<div style="color:rgb(32,31,30); font-size:15px; margin:0px; padding:0cm 0cm 1pt; border-top:none; border-right:none; border-bottom:1pt solid windowtext; border-left:none; text-align:start; background-color:rgb(255,255,255)">
<p style="margin:0cm 0cm 0.0001pt; font-size:11pt; font-family:Calibri,sans-serif; text-align:justify; border:none; padding:0cm">
<span style="margin:0px; font-size:7pt; font-family:Arial,sans-serif; color:rgb(64,64,64)" lang="EN-US">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.
 Thank you</span><span style="margin:0px; font-size:7pt; font-family:Arial,sans-serif; color:green" lang="EN-US">.</span></p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>