[Live-devel] Extend RTSPServer and RTSPClient problems

Ross Finlayson finlayson at live555.com
Fri Jan 6 06:53:44 PST 2012


> I want to subclass  RTSPServer and RTSPClient classes to extend my specific functions.

I don't recommend trying to modify or 'extend' the RTSP protocol, because - if you do so - you will end up with a protocol that noone else will understand.  So, I'm not convinced that you need to subclass "RTSPClient" at all.

Note that 'custom' functionality can often be added to RTSP using the standard "GET_PARAMETER" and "SET_PARAMETER" commands, which you can send using the "RTSPClient::sendGetParameterCommand()" and "RTSPClient::sendSetParameterCommand()" functions - i.e., without making any modifications to "RTSPClient", or to the RTSP protocol in general.

See, for example
	http://lists.live555.com/pipermail/live-devel/2011-January/013072.html


> Also, when I want to add another video format to be processed by the server

I think you mean "client" here.

> , I found that I need to override the ceateSourceObjects method to generate my specific RTPSource.

That's correct.  However, the preferred mechanism for doing this is described in the comment that's near the top of the header file "liveMedia/include/MediaSession.hh" - i.e., the comment that begins:
	/* NOTE: To support receiving your own custom RTP payload format, 
	...


> I wonder if I want to subclass RTSPServer and RTSPClient classes,  what is the minimum classes that I also need to subclass them to make it work? (RTSPClientSession, MediaSubSession, or …)


As I noted above, I don't think that you need to subclass "RTSPClient".  You will not need to subclass "RTSPServer" either, *unless* you want to extend the functionality of one or more of the standard RTSP commands - most likely "GET_PARAMETER" and/or "SET_PARAMETER", as noted above.  Again, for more information on how to do this, see
	http://lists.live555.com/pipermail/live-devel/2011-January/013072.html

Also, if you want your server to stream from a new kind of data source - e.g., to stream from an input device, rather than from a file - then you will need to define your own subclass of "OnDemandServerMediaSubsession".  (I'm assuming here that you want to stream via unicast, rather than via multicast.)  This has been described several times on this mailing list, and in this FAQ entry:
	http://www.live555.com/liveMedia/faq.html#liveInput-unicast


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20120106/c55e5112/attachment.html>


More information about the live-devel mailing list