Fantastic, thanks a lot for that quick and very precise answer. 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.
I set it to True as explained in the documentation. I initially thought I could instantiate one single H265VideoStreamDiscreteFramer object (and one single "customized" class for its FramedSource input source), however I quickly got an execution violation as both the framer and the input source objects are destroyed in OnDemandServerMediaSubsession::sdpLines() by the "Medium::close(dummyRTPSink);" line. So, I guess I'll have to instanciate both the framer, and my custom input source to that, each time createNewStreamSource() gets called. Or do I have to only instanciate a new frame, but use the same single input source object ? Thanks a lot ! -----Original Message----- From: live-devel <live-devel-boun...@us.live555.com> On Behalf Of Ross Finlayson Sent: Monday, January 9, 2023 12:27 PM To: LIVE555 Streaming Media - development & use <live-de...@us.live555.com> Subject: Re: [Live-devel] question RTSP server > On Jan 9, 2023, at 2:57 AM, g.jaegy <g.ja...@imagine3d.fr> wrote: > > Hi, > I have a RTSP server that can stream a H265 stream from a custom H265 packet > source, used by a “H265VideoStreamDiscreteFramer” object (basically a live > screen capture of a Vulkan application sent down to NVenc which generated the > H265 packets). It uses a “PassiveServerMediaSubsession” object and thus > relies on multicast UDP packets. > This works great, however, I would like to add support for an optional TCP > transport for RTP/RTCP (so user can configure the service to stream over TCP > rather than multicast UDP). > I’ve managed to figure out I must replace the “PassiveServerMediaSubsession” > subsession with an “OnDemandServerMediaSubsession” one. Is that correct ? Yes. > “OnDemandServerMediaSubsession” being a base class, I’ve then tried to find > a class that inherit from it, however, all I’ve found was the > “H265VideoFileServerMediaSubsession”, which uses a file as input. > So, I’m not sure how to move forward. Should I write a custom class, that > inherits from “OnDemandServerMediaSubsession” ? Yes. However, this requires reimplementing just two virtual functions in this subclass: “createNewStreamSource()” and “createNewRTPSink()”. “createNewStreamSource()” should be simple: Just create an instance of your source object, and pass it to “H265VideoStreamDiscreteFramer::createNew()”. And the code for “createNewRTPSink()” will probably be exactly the same as that in “H265VideoFileServerMediaSubsession.cpp”. For more details, see: http://live555.com/liveMedia/faq.html#liveInput-unicast 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 _______________________________________________ live-devel mailing list live-devel@lists.live555.com http://lists.live555.com/mailman/listinfo/live-devel