> On Jun 19, 2024, at 12:30 PM, Lutz Fiebach <l...@fiebach.de> wrote:
> 
> Maybe you can also give me some advice regarding the stream handling.
> I just want to know if it is the right way to use a FramedSource, store all 
> clients in a map with the required information and then copy the nal frames 
> for all active clients into their individual queue.
> Or are there other or better ways to copy the nal frames directly into an 
> H264 sink and let live555 do the multiplication of the streams for the 
> clients?

Sorry, but I’m not sure I understand your question.

Note that if you are implementing a stream source (a “FramedSource” subclass) 
for use by a RTSP server, then you don’t need to concern yourself with the 
server’s clients (including who they are, and how many clients there are).  Our 
RTSP server implementation automatically keeps track of the server’s clients.  
As the implementor of a data source  (a “FramedSource” subclass), all you need 
to concern yourself with is how to create and delete this source (i.e., your 
subclass’s constructor and destructor), and how to implement the 
“doGetNextFrame()” virtual function.  Your data source implementation should 
have no notion of ‘client’.

Also, if you have multiple, independent data sources (e.g., multiple video 
streams), then you should have one instance (of your “FramedSource” subclass) 
for each one.  You should try to use a single object to implement multiple data 
sources.

One thing to keep in mind: If your stream(s) are live source(s) (e.g., from 
video camera(s)), then you should set the “reuseFirstSource” parameter (in your 
“ServerMediaSubsession” constructor) to True.  This tells the server to reuse 
the same input source for the second (and subsequent) clients for the stream, 
rather than creating a new instance of the source for each new client.  But if 
your streams are prerecorded data (e.g., from a file), then you should probably 
set “reuseFirstSource” to False.


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/



_______________________________________________
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel

Reply via email to