> On Dec 27, 2019, at 2:08 AM, Steve Ha <stev...@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/


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

Reply via email to