[MPlayer-cvslog] r27680 - in trunk: DOCS/tech/slave.txt command.c

reimar subversion at mplayerhq.hu
Wed Oct 1 19:05:30 CEST 2008


Author: reimar
Date: Wed Oct  1 19:05:30 2008
New Revision: 27680

Log:
Add a "pause" property to allow checking if MPlayer is paused.
Behaviour without pausing_keep_force prefix is a bit weird.

Modified:
   trunk/DOCS/tech/slave.txt
   trunk/command.c

Modified: trunk/DOCS/tech/slave.txt
==============================================================================
--- trunk/DOCS/tech/slave.txt	(original)
+++ trunk/DOCS/tech/slave.txt	Wed Oct  1 19:05:30 2008
@@ -470,6 +470,7 @@ name               type      min     max
 osdlevel           int       0       3       X   X   X    as -osdlevel
 speed              float     0.01    100     X   X   X    as -speed
 loop               int       -1              X   X   X    as -loop
+pause              flag      0       1       X            1 if paused, use with pausing_keep_force
 filename           string                    X            file playing wo path
 path               string                    X            file playing
 demuxer            string                    X            demuxer used

Modified: trunk/command.c
==============================================================================
--- trunk/command.c	(original)
+++ trunk/command.c	Wed Oct  1 19:05:30 2008
@@ -554,6 +554,12 @@ static int mp_property_metadata(m_option
     return M_PROPERTY_NOT_IMPLEMENTED;
 }
 
+static int mp_property_pause(m_option_t * prop, int action, void *arg,
+                             MPContext * mpctx)
+{
+    return m_property_flag_ro(prop, action, arg, mpctx->osd_function == OSD_PAUSE);
+}
+
 
 ///@}
 
@@ -2000,6 +2006,8 @@ static const m_option_t mp_properties[] 
      CONF_RANGE, -2, 10, NULL },
     { "metadata", mp_property_metadata, CONF_TYPE_STRING_LIST,
      0, 0, 0, NULL },
+    { "pause", mp_property_pause, CONF_TYPE_FLAG,
+     M_OPT_RANGE, 0, 1, NULL },
 
     // Audio
     { "volume", mp_property_volume, CONF_TYPE_FLOAT,



More information about the MPlayer-cvslog mailing list