[MPlayer-cvslog] r22954 - trunk/stream/stream_dvdnav.c
nicodvb
subversion at mplayerhq.hu
Mon Apr 9 18:05:58 CEST 2007
Author: nicodvb
Date: Mon Apr 9 18:05:58 2007
New Revision: 22954
Modified:
trunk/stream/stream_dvdnav.c
Log:
implemented STREAM_CTRL_GET_CURRENT_TIME and STREAM_CTRL_SEEK_TO_TIME - dvdnav from mphq required
Modified: trunk/stream/stream_dvdnav.c
==============================================================================
--- trunk/stream/stream_dvdnav.c (original)
+++ trunk/stream/stream_dvdnav.c Mon Apr 9 18:05:58 2007
@@ -328,6 +328,26 @@ static int control(stream_t *stream, int
}
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;
More information about the MPlayer-cvslog
mailing list