From: Claudio C. <kl...@us...> - 2006-12-20 10:35:01
|
Thibaut Mattern wrote: > On 12/19/06, Claudio Ciccani <kl...@us...> wrote: >> Thibaut Mattern wrote: >>> On 12/18/06, Claudio Ciccani <kl...@us...> wrote: >>>> Update of /cvsroot/xine/xine-lib/src/xine-engine >>>> In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv12672/xine-engine >>>> >>>> Modified Files: >>>> xine.c >>>> Log Message: >>>> Added INPUT_CAP_NOCACHE: disable usage of internal input cache by >>>> default. > > sounds really like : warning, hack detected It's not a hack. Let me explain how I have implemented (initial) seekability in the RTSP plugin: - when the rtsp session is started, the PLAY request is not executed immediatly but it will be done the first time rtsp_session_read() is called to read a RTP(RVP) packet - when you call xine_play() with an intial time offset, the demuxer plugin reads the already buffered RM headers, then it calls input_plugin->seek_time() to seek to the requested time offset - input_plugin->seek_time() doesn't seek immediatly, instead the time offset is recorded by calling rtsp_session_set_start_time() - when the demuxer plugin starts reading packets, the input plugin issues the PLAY request with the previously provided start time. As you can see, to make seekability work, the demuxer must call seek_time() before it starts reading packets. This is not possibile if xine is using the input_cache plugin because it starts filling the cache when the stream is opened, i.e. before the demuxer plugin can call seek_time(). > Current API: > int xine_open (xine_stream_t *stream, const char *mrl); > int xine_play (xine_stream_t *stream, int start_pos, int start_time); > > I propose to add these functions to the public API: > int xine_open_time (xine_stream_t *stream, const char *mrl, int start_time); > int xine_play2 (xine_stream_t *stream); /* or find a better name */ > int xine_seek (xine_stream_t *stream, int start_pos, int start_time); I haven't discussed my changes on the list before applying them because they are backward compatible. Indeed both the plublic and the internal API are unchanged. However if want to make an API change, adding input_plugin->open2( start_time ) should be enough according to me. -- Regards, Claudio Ciccani kl...@us... http://directfb.org http://sf.net/projects/php-directfb |