[MPlayer-dev-eng] [PATCH] stream aided seeking (dvd precise seeking)
Nico Sabbi
nsabbi at email.it
Tue Nov 7 18:30:22 CET 2006
Reimar Döffinger wrote:
>Hmm... I don't like too much seeking the stream without the demuxer
>having the slightest clue.
>Maybe adding something similar to
>ADCTRL_RESYNC_STREAM/VDCTRL_RESYNC_STREAM but for demuxers would be a
>good idea?
>
>
this would not call the demuxer; rather I'm tempted to add a ->flush()
member
to demuxer_t and call that instead if it's supported, but for the time
being I can move that code away from demuxer.c and patch demux_mpg instead,
at least until we decide what's the best solution
>
>
>
>>+ if(flags & 2) { //percentage seek
>>
>>
>That does not look right. There is percentage-based and second-based
>seek, and both exist in relative and absolute variants.
>And if done similar to e.g. demux_lavf.c, line 432 you shouldn't need to
>duplicate the STREAM_CTRL_SEEK_TO_TIME control.
>
>
i'll check it
>
>
>
>
>>+int demuxer_get_current_time(demuxer_t *demuxer){
>>+ double get_time_ans = 0;
>>+ unsigned tm;
>>+ sh_video_t *sh_video = demuxer->video->sh;
>>+ // <= 0 means DEMUXER_CTRL_NOTIMPL or DEMUXER_CTRL_DONTKNOW
>>+ if(stream_control(demuxer->stream, STREAM_CTRL_GET_CURRENT_TIME,(void *)&tm)!=STREAM_UNSUPORTED) {
>>+ get_time_ans = (double) tm / 1000.0f;
>>+ } else if(sh_video) get_time_ans = sh_video->pts;
>>+ return (int) get_time_ans;
>>+}
>>
>>
>
>The function name and the comment both confuse me quite a bit.
>
>
>
it's supposed to return the time reported by either the stream layer or
the demuxer layer,
if the former call fails, but the comment is a c&p remnant that I forgot
to remove
More information about the MPlayer-dev-eng
mailing list