summaryrefslogtreecommitdiffstats
path: root/stream/stream_dvdnav.c
diff options
context:
space:
mode:
authornicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-04-09 16:05:58 +0000
committernicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-04-09 16:05:58 +0000
commit2c4331cbccee1c9edf7350e34b74c51c4aa747dc (patch)
treebf4c7657d10f54eeacf9b101b8723a5b42772c45 /stream/stream_dvdnav.c
parent2276bef69cc5896a4a47a1d1813f1ed9791962a7 (diff)
downloadmpv-2c4331cbccee1c9edf7350e34b74c51c4aa747dc.tar.bz2
mpv-2c4331cbccee1c9edf7350e34b74c51c4aa747dc.tar.xz
implemented STREAM_CTRL_GET_CURRENT_TIME and STREAM_CTRL_SEEK_TO_TIME - dvdnav from mphq required
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22954 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream/stream_dvdnav.c')
-rw-r--r--stream/stream_dvdnav.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/stream/stream_dvdnav.c b/stream/stream_dvdnav.c
index 5d52b72d48..17906a3838 100644
--- a/stream/stream_dvdnav.c
+++ b/stream/stream_dvdnav.c
@@ -328,6 +328,26 @@ static int control(stream_t *stream, int cmd, void* arg) {
}
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;