# HG changeset patch # User nicodvb # Date 1176134758 0 # Node ID a6486d2975d232df80cc58fd442226de6666d9aa # Parent 23e746c5c15c2f6fa0bbb9cb5bf3e9a0d28fd6f1 implemented STREAM_CTRL_GET_CURRENT_TIME and STREAM_CTRL_SEEK_TO_TIME - dvdnav from mphq required diff -r 23e746c5c15c -r a6486d2975d2 stream/stream_dvdnav.c --- a/stream/stream_dvdnav.c Mon Apr 09 15:08:29 2007 +0000 +++ b/stream/stream_dvdnav.c Mon Apr 09 16:05:58 2007 +0000 @@ -328,6 +328,26 @@ } break; } +#ifdef MP_DVDNAV + case STREAM_CTRL_GET_CURRENT_TIME: + { + double tm; + tm = dvdnav_get_current_time(priv->dvdnav)/90000.0f; + if(tm != -1) + { + *((double *)arg) = tm; + return 1; + } + break; + } + case STREAM_CTRL_SEEK_TO_TIME: + { + uint64_t tm = (uint64_t) (*((double*)arg) * 90000); + if(dvdnav_time_search(priv->dvdnav, tm) == DVDNAV_STATUS_OK) + return 1; + break; + } +#endif } return STREAM_UNSUPORTED;