summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-10-01 17:05:30 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-10-01 17:05:30 +0000
commit52ef7eb2635aae55649c384b62e58f0bb98a658f (patch)
tree22bfcdbf814c45a627d0d52e7616330e3c41a126
parent70901aa00603d6e05e9e26369bc6d26e526c5228 (diff)
downloadmpv-52ef7eb2635aae55649c384b62e58f0bb98a658f.tar.bz2
mpv-52ef7eb2635aae55649c384b62e58f0bb98a658f.tar.xz
Add a "pause" property to allow checking if MPlayer is paused.
Behaviour without pausing_keep_force prefix is a bit weird. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27680 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--DOCS/tech/slave.txt1
-rw-r--r--command.c8
2 files changed, 9 insertions, 0 deletions
diff --git a/DOCS/tech/slave.txt b/DOCS/tech/slave.txt
index 681f2d653c..fe68dccda9 100644
--- a/DOCS/tech/slave.txt
+++ b/DOCS/tech/slave.txt
@@ -470,6 +470,7 @@ name type min max get set step comment
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
diff --git a/command.c b/command.c
index ebf40c9a45..6fe5b267ce 100644
--- a/command.c
+++ b/command.c
@@ -554,6 +554,12 @@ static int mp_property_metadata(m_option_t * prop, int action, void *arg,
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,