[MPlayer-cvslog] CVS: main/libmpdemux demux_demuxers.c,1.6,1.7

Reimar Döffinger CVS syncmail at mplayerhq.hu
Sun Oct 30 10:13:34 CET 2005


CVS change done by Reimar Döffinger CVS

Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv26961

Modified Files:
	demux_demuxers.c 
Log Message:
Provide DEMUXER_CTRL_GET_TIME_LENGTH and DEMUXER_CTRL_GET_PERCENT_POS.
Might need some more fine-tuning.
together with rev. 1.318 of mencoder.c fixes bug #116


Index: demux_demuxers.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_demuxers.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- demux_demuxers.c	23 Aug 2005 08:03:26 -0000	1.6
+++ demux_demuxers.c	30 Oct 2005 09:13:32 -0000	1.7
@@ -107,6 +107,19 @@
 }
   
 
+static int demux_demuxers_control(demuxer_t *demuxer,int cmd, void *arg){
+  dd_priv_t* priv = demuxer->priv;
+  switch (cmd) {
+    case DEMUXER_CTRL_GET_TIME_LENGTH:
+      *((double *)arg) = demuxer_get_time_length(priv->vd);
+      return DEMUXER_CTRL_OK;
+    case DEMUXER_CTRL_GET_PERCENT_POS:
+      *((int *)arg) = demuxer_get_percent_pos(priv->vd);
+      return DEMUXER_CTRL_OK;
+  }
+  return DEMUXER_CTRL_NOTIMPL;
+}
+
 demuxer_desc_t demuxer_desc_demuxers = {
   "Demuxers demuxer",
   "", // Not selectable
@@ -120,5 +133,5 @@
   NULL,
   demux_close_demuxers,
   demux_demuxers_seek,
-  NULL
+  demux_demuxers_control
 };




More information about the MPlayer-cvslog mailing list