[MPlayer-dev-eng] [PATCH] stream aided seeking (dvd precise seeking)

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Tue Nov 7 19:24:42 CET 2006


Hello,
On Tue, Nov 07, 2006 at 06:30:22PM +0100, Nico Sabbi wrote:
> 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

Seems overcomplicated. Did you maybe misunderstand me? I just meant
adding a
demux_control(demuxer, DEMUXER_CTRL_RESYNC, 0);
or so after stream-seeking.
Why would that be any different from a flush function except IMO being
simpler?

> 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

No, that's not really better. And maybe such a "notification" will never
be needed, I just felt a bit uncomfortable about 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

I still find it confusing because it only calls a stream function but no
demuxer function. Could you please add a doxygen-comment?

Greetings,
Reimar Döffinger



More information about the MPlayer-dev-eng mailing list