[Live-devel] Issue in sharing source via OnDemandServerMediaSubsession

Ross Finlayson finlayson at live555.com
Thu Dec 26 08:13:13 PST 2019



> On Dec 27, 2019, at 2:08 AM, Steve Ha <steveha at u2sr.com> wrote:
> 
> After seeing no issue in the testOnDemandRtspServer, I check my program again and 
> I found the cause.

I’m glad to hear this!


> Previously I handled streaming ON/OFF in the function 
> DerivedOnDemandxxx::deleteStream(clientSessionId, streamToken) {}
> Now I realized that doing so is reasonable only when reuseFirstSource = False.
> When  reuseFirstSource = True, the right place to control stream is at function 
> DerivedOnDemandxxx ::closeStreamSource(FramedSource* inputSource) {}

Actually, an even simpler solution would be to turn off streaming only in your “FramedSource” subclass’s destructor.  Then you wouldn’t need to redefine “closeStreamSource()” (or “deleteStream()”) at all.

(See, for example, “liveMedia/DeviceSource.cpp”)


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




More information about the live-devel mailing list