summaryrefslogtreecommitdiffstats
path: root/libmpv/client.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-04-14 22:33:41 +0200
committerwm4 <wm4@nowhere>2014-04-14 22:33:41 +0200
commit196619671d8bde5112f82b5ec5db881ff8e99f43 (patch)
treec99a86dc469a0ffb7e3026cb7251142e5710cb4d /libmpv/client.h
parent60b900487257a3435df02c2b2ce54551c59e4311 (diff)
downloadmpv-196619671d8bde5112f82b5ec5db881ff8e99f43.tar.bz2
mpv-196619671d8bde5112f82b5ec5db881ff8e99f43.tar.xz
client API: remove mpv_event_pause_reason
And slightly adjust the semantics of MPV_EVENT_PAUSE/MPV_EVENT_UNPAUSE. The real pause state can now be queried with the "core-idle" property, the user pause state with the "pause" property, whether the player is paused due to cache with "paused-for-cache", and the keep open event can be guessed with the "eof-reached" property.
Diffstat (limited to 'libmpv/client.h')
-rw-r--r--libmpv/client.h35
1 files changed, 5 insertions, 30 deletions
diff --git a/libmpv/client.h b/libmpv/client.h
index bd529d8677..0539903e8e 100644
--- a/libmpv/client.h
+++ b/libmpv/client.h
@@ -843,11 +843,14 @@ typedef enum mpv_event_id {
*/
MPV_EVENT_IDLE = 11,
/**
- * Playback was paused.
+ * Playback was paused. This indicates the logical pause state (like the
+ * property "pause" as opposed to the "core-idle" propetty). This event
+ * is sent whenever any pause state changes, not only the logical state,
+ * so you might get multiple MPV_EVENT_PAUSE events in a row.
*/
MPV_EVENT_PAUSE = 12,
/**
- * Playback was unpaused.
+ * Playback was unpaused. See MPV_EVENT_PAUSE for not so obvious details.
*/
MPV_EVENT_UNPAUSE = 13,
/**
@@ -975,32 +978,6 @@ typedef struct mpv_event_log_message {
const char *text;
} mpv_event_log_message;
-typedef struct mpv_event_pause_reason {
- /**
- * Actual pause state (0 or 1)
- */
- int real_paused;
- /**
- * User requested pause state (0 or 1)
- */
- int user_paused;
- /**
- * 1 if the action was triggered by an input command (or via an user key
- * binding), 0 otherwise.
- */
- int by_command;
- /**
- * 1 if the action was triggered by a low (or recovering) cache state,
- * 0 otherwise.
- */
- int by_cache;
- /**
- * 1 if the pausing was triggered because the end of playback was reached,
- * and the "keep-open" option is enabled, 0 otherwise.
- */
- int by_keep_open;
-} mpv_event_pause_reason;
-
typedef struct mpv_event_end_file {
/**
* Identifies the reason why playback was stopped:
@@ -1063,8 +1040,6 @@ typedef struct mpv_event {
* MPV_EVENT_GET_PROPERTY_REPLY: mpv_event_property*
* MPV_EVENT_PROPERTY_CHANGE: mpv_event_property*
* MPV_EVENT_LOG_MESSAGE: mpv_event_log_message*
- * MPV_EVENT_PAUSE: mpv_event_pause_reason*
- * MPV_EVENT_UNPAUSE: mpv_event_pause_reason*
* MPV_EVENT_SCRIPT_INPUT_DISPATCH: mpv_event_script_input_dispatch*
* MPV_EVENT_CLIENT_MESSAGE: mpv_event_client_message*
* MPV_EVENT_END_FILE: mpv_event_end_file*