[Live-devel] Implementing SEEK for MPEG1/2 stream on demand
Filippo Cacace
f.cacace at unicampus.it
Wed Feb 2 15:01:40 PST 2005
Hello,
I am trying to implement a prototypical implementation of a
PLAY-with-SEEK RTSP request (i.e. when the client issues a "PLAY" like
npt=1.00-3.00) on a Video subsession. Presently, I am focusing on a
'limited' SEEK, that is, a SEEK that allows only starting the stream at
a certain point instead than at the beginning.
I would like an advice about the correctness of the approach:
In the current LIVE version, the server calls the
OnDemandServerMediaSubsession::seek_stream() function, which just does
nothing.
I want to re-implement this seek_stream() function in a lower class, for
example MPEG1or2Videobla-blaSubsession to call a seek() function in the
class StreamState.
This last funcion would be similar to startplaying(), but instead of
calling RTPSink->startplaying(source), would create a buffer and call
MPEGVideoStreamFramer::getNextFramer() with an afterGettingFunc in
charge of controlling the Presentation Time until it reaches the seekNPT
value.
At this point the seek() function would call startplaying() in order to
send the packets like in the usual case.
An alternative is to modify the RTPSink->startplaying() function with a
seekNPT parameter (that defaults to 0). When this parameter is different
from 0, the function would behave like usual, doing all its things
except the actual sending of the packets (this requires a modification
in the afterGettingFrame funcion passed to the
Framer::getNextFrame(...)).
Can anybody tell me whether this could work or not?
Thanks in advance,
Filippo Cacace
More information about the live-devel
mailing list