> I have a USB camera that I can stream as MJPEG using a JPEGVideoSource 
> subclass.
> It all works nicely and the frames are streamed and received ok. I would 
> however like
> to be able to limit the frame rate of the stream, as it now seems to be 20+ 
> fps. In this
> case it's way too high as the use case is a surveillance camera that grabs a 
> big overview
> image, not video conferencing. I tried looking at the FAQ and the examples 
> but didn't
> see anything.

I'm not sure I understand your question.  You have written your own media 
source class (in this case, a subclass of "JPEGVideoSource") that delivers 
encoded (JPEG) frames.  You want to reduce its frame rate - i.e., how soon it 
calls "FramedSource::afterGetting()" in response to each call to 
"doGetNextFrame()".  So just do it.  This is your code :-)


> Also, is there some way to know when all clients have disconnected from a 
> RTSP source
> so that I could stop grabbing and encoding frames?

This should happen automatically.  I.e., when the last concurrent RTSP client 
has disconnected (or timed out), then your media source class's destructor will 
get called.  Therefore, you should write your media source class's destructor 
so that it stops grabbing/encoding.

Don't forget to have your subclass of "OnDemandServerMediaSubsession" set the 
"reuseFirstSource" parameter to True when it calls the 
"OnDemandServerMediaSubsession" constructor.  This will ensure that no more 
than one instance of your media source class will ever be created concurrently, 
regardless of the number of concurrent RTSP clients.


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