[MPlayer-users] [DVDnav-discuss] [PATCH] "dvdnav_jump_to_sector" as an alternative to "dvdnav_time_search" (Overview: Source to follow)

Roger Pack rogerdpack2 at gmail.com
Fri Nov 11 19:07:55 CET 2011


> Currently, dvdnav_time_search is marked "FIXME: right now, this
> function does not use the time tables but interpolates only the cell
> times". This method is usually inaccurate: it interpolates using
> sectors, but one sector does not equal one fixed unit of time. For
> example, if there is a 10:00 cell and the cell is 1000 sectors long,
> it assumes that 5:00 is at sector 500. Jumping to sector 500 may
> actually jump instead to 5:12.
>
> My patch jumps to a time using the time map and the vobu address map.
> I placed it in a new function called "dvdnav_jump_to_sector"

Ok I tried out the new search functionality (in mplayer, as a drop in
replacement: https://gist.github.com/1358679)

It works well.  Lightning-sharp DVD seeking accuracy.  Thanks!

Mplayer "used" to sometimes advance by 15 seconds, when it requested
it to go forward 10 (or sometimes, it would even go *backward* when
you attempting to go 10 seconds forward--weird), this fixes it right
up.  Seeking is precise now.
That being said, it seems to "jerk" (take a little bit longer) when
seeking.  But I'm ok with that for accuracy sake :) (maybe it could be
optimized to be faster?)

For the VLC dev's, this maybe helpful in clearing up
http://trac.videolan.org/vlc/ticket/4 et al.

Some code feedback:
I think method documentation for "public" api's goes in the .h file.
Also I think the method should be declare not at the bottom of the .h
file but in the middle :)

Also why not use uint64_t like dvdnav_time_search does?
And maybe return value for dvdnav_jump_to_sector_by_time should be
dvdnav_status_t ?
Thanks.
-roger-


More information about the MPlayer-users mailing list