[DVDnav-discuss] [PATCH] "dvdnav_jump_to_sector" as an alternative to "dvdnav_time_search" (REV 6: add mode argument)

Roger Pack rogerdpack2 at gmail.com
Fri Oct 19 01:16:24 CEST 2012


On Wed, Apr 25, 2012 at 9:48 PM, gnosygnu <gnosygnu at gmail.com> wrote:
> This revision features one minor change. It adds a new "mode"
> parameter to "dvdnav_jump_to_sector".
>
> As per the included comment:
>
> /* NOTE: Mode is currently unimplemented. Only 0 should be passed. */
> /* 1 and -1 are for future implementation */
> /*  0: Default. Jump to a time which may be either <> time_in_pts_ticks */
> /*  1: After. Always jump to a time that is > time_in_pts_ticks */
> /* -1: Before. Always jump to a time that is < time_in_pts_ticks */
> dvdnav_status_t dvdnav_jump_to_sector_by_time(dvdnav_t *this,
>             uint64_t time_in_pts_ticks, int32_t mode)

Looks like the right interface to me.

As a small nit,
maybe return DVDNAV_STATUS_ERR instead of NULL on failure.

and use

int32_t result = DVDNAV_STATUS_OK;

instead of
int32_t result = 0;

Also maybe fail if they pass in anything besides 0 for the mode
parameter of dvdnav_jump_to_sector_by_time.

Also would it be possible to ask for a write up some where (maybe on a
wiki somewhere?) that describes the overall general process used? Like
"you do this, then that".  It's so poorly documented on the web, it
would be nice to get a brain dump.
Thanks!
-roger-


More information about the DVDnav-discuss mailing list