<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div dir="auto">Perfect, that what I've done and it's working like a charm đź‘Ť I've indeed extracted an underlying class with one instance shared across all my custom source inputs, so that input sources can be destroyed/created at anytime. Works great.</div>
<div dir="auto"><br>
</div>
<div dir="auto">I'll now try to have the stream to be accessible on the internet, I think I have seen some example or documentation mentioning http/port 80 somewhere, I will check that tomorrow.</div>
<div dir="auto"><br>
</div>
<div dir="auto">Thanks once again for your help, really appreciated.</div>
<div><br>
</div>
<div id="ms-outlook-mobile-signature" dir="auto"><br>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> live-devel <live-devel-bounces@us.live555.com> on behalf of Ross Finlayson <finlayson@live555.com><br>
<b>Sent:</b> Monday, January 9, 2023 6:24:49 PM<br>
<b>To:</b> LIVE555 Streaming Media - development & use <live-devel@us.live555.com><br>
<b>Subject:</b> Re: [Live-devel] question RTSP server</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText"><br>
<br>
> On Jan 9, 2023, at 6:21 AM, g.jaegy <g.jaegy@imagine3d.fr> wrote:<br>
> <br>
> Fantastic, thanks a lot for that quick and very precise answer.<br>
> <br>
> I've managed to update the code quickly, however, I'm just facing a little issue : I am not completely sure what the "reuseFirstSource" parameter in the OnDemandServerMediaSubsession() constructor means.<br>
<br>
This parameter is important if more than one RTSP client is streaming from the server at the same time. If "reuseFirstSource” is set to True, then each of these multiple RTSP clients will get data from the same source object, rather than the source object
being created anew for each new RTSP client. So, when you’re streaming from a live source (rather than a file), as you are doing, setting “reuseFirstSource” to True is the right thing to do.<br>
<br>
HOWEVER, this doesn’t mean that your source object will be created only once, and destroyed only once. As you discovered, the source object will get created once by “sdpLines()” (to implement the first RTSP “DESCRIBE” command), and then destroyed. It will
then get created again (to implement the RTSP “SETUP” command), and later destroyed when the streaming ends. And this latter create/destroy sequence can happen multiple times, if a new client starts streaming after the previous client has ended.<br>
<br>
Therefore, it’s important that you take this into account when you implement the constructor and destructor for your source object. These can get called multiple times, in sequence - but not concurrently (provided that “reuseFirstSource” is True). E.g., you
can see constructor,destructor,constructor,destructor - but not constructor,constructor,destructor,destructor.<br>
<br>
<br>
> So, I guess I'll have to instanciate both the framer, and my custom input source to that, each time createNewStreamSource() gets called.
<br>
<br>
Yes, your “createNewStreamSource()” implementation must create a new input source object, and then a new “H265VideoStreamDiscreteFramer” object that uses it. However, the implementation of your input source object can use a single underlying data structure
(the actual data source).<br>
<br>
<br>
Ross Finlayson<br>
Live Networks, Inc.<br>
<a href="http://www.live555.com/">http://www.live555.com/</a><br>
<br>
<br>
_______________________________________________<br>
live-devel mailing list<br>
live-devel@lists.live555.com<br>
<a href="http://lists.live555.com/mailman/listinfo/live-devel">http://lists.live555.com/mailman/listinfo/live-devel</a><br>
</div>
</span></font></div>
</body>
</html>