[Live-devel] Trick mode
finlayson at live.com
Fri Mar 4 12:59:54 PST 2005
When you talk about "trick mode support", are you referring to RTSP client
support, or RTSP server support.
RTSP *client* support for 'trick play' has been in place for several
months. Note the "start", "end" and "scale" parameters to
RTSP *server* support for 'trick play' has also been in place for several
months, but note that parts of this are (necessarily) media type
specific. I.e., there has to be some new code added for each different
type of media file that you wish to stream.
In particular, to support 'trick mode' when streaming from a media type,
changes need to be made to the corresponding subclass of
1/ To add support for seeking within a stream, you will need to implement
the following virtual functions:
virtual float duration() const;
Returns the file's duration, in seconds
virtual void seekStreamSource(FramedSource* inputSource, float seekNPT);
(Attempts to) seek within the input source.
2/ To add support for 'fast forward' and/or 'reverse play', you will also
need to implement the following virtual functions:
virtual void testScaleFactor(float& scale);
Inspects the input value of "scale", and, if necessary, changes it to a
nearby value that we support. (E.g., if the input value of "scale" is 3.3,
you might change it to 3 (an integer).) If there's no 'nearby' value that
you support, just set "scale" to 1 (the default value).
virtual void setStreamSourceScale(FramedSource* inputSource, float scale);
Actually sets the scale factor for a specific input source. (The value
of "scale" will previously have been passed in and out of
"testScaleFactor()", so we know that it is a value that we support.)
This functionality has currently been added to
"MP3AudioFileServerMediaSubsession" (fast forward only; no reverse play),
and "WAVAudioFileServerMediaSubsession", for streaming from MP3 files and
WAV audio file, respectively.
Support for other file types is ongoing. (As always, requests by paying
customers take priority.)
More information about the live-devel