[Live-devel] Find a particular rtsp session

Lackey, Brad Brad.Lackey at schneider-electric.com
Wed Jun 15 09:26:33 PDT 2011


Perfect, thank you!

-----Original Message-----
From: live-devel-bounces at ns.live555.com
[mailto:live-devel-bounces at ns.live555.com] On Behalf Of Ross Finlayson
Sent: Tuesday, June 14, 2011 8:30 PM
To: LIVE555 Streaming Media - development & use
Subject: Re: [Live-devel] Find a particular rtsp session

>Thanks! That put me on the right track, one last question. Once I 
>have a list of RTSPClientSession objects, what's the best way to 
>grab it's FramedSource? There doesn't seem to be a straight forward 
>way to acquire it.

You're right - there isn't, unfortunately.  This information isn't 
exposed to the "RTSPServer" code, because it's not needed there. 
Instead, it's used by the "ServerMediaS(ubs)ession" object for the 
stream, via the 'streamToken' pointer (which the "RTSPServer" code 
treats as opaque).

Here's what I would do.  Unfortunately it requires first moving the 
definition of "class StreamState" from 
"OnDemandServerMediaSubsession.cpp" to 
"include/OnDemandServerMediaSubsession.hh".  (I might make that 
change in a future release of the code.)

1/ Have your "OnDemandServerMediaSubsession" subclass export a function
	FramedSource* framedSource(void* streamToken) {
		StreamState* streamState = (StreamState*)streamToken;
		return streamState->mediaSource();
	}

2/ In your "RTSPServer" subclass, for each RTSPClientSession*
clientSession :
	for (unsigned i = 0; i < fNumStreamStates; ++i) {
		YourOnDemandServerMediaSubsession* subsession
			= (YourOnDemandServerMediaSubsession*) 
(fStreamStates[i].subsession);
		FramedSource* source = 
subsession->framedSource(fStreamStates[i].streamToken);
	}
-- 

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
_______________________________________________
live-devel mailing list
live-devel at lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________



More information about the live-devel mailing list