summaryrefslogtreecommitdiffstats
path: root/player/playloop.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-02-28 01:31:38 +0100
committerwm4 <wm4@nowhere>2014-02-28 01:31:38 +0100
commitc30bf22d8d31336696430406b0483bfc9821c8bb (patch)
tree20686c0dee0993bc01199f8e87150c6622319a9a /player/playloop.c
parent1852555ca1100e06e970a9c9703ebcb045ff6006 (diff)
downloadmpv-c30bf22d8d31336696430406b0483bfc9821c8bb.tar.bz2
mpv-c30bf22d8d31336696430406b0483bfc9821c8bb.tar.xz
client API: rename MPV_EVENT_PLAYBACK_START, add MPV_EVENT_SEEK
Rename MPV_EVENT_PLAYBACK_START to MPV_EVENT_FILE_LOADED. Add MPV_EVENT_SEEK and MPV_EVENT_PLAYBACK_RESTART.
Diffstat (limited to 'player/playloop.c')
-rw-r--r--player/playloop.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/player/playloop.c b/player/playloop.c
index d1d15ca192..0989b5116c 100644
--- a/player/playloop.c
+++ b/player/playloop.c
@@ -208,6 +208,8 @@ static void seek_reset(struct MPContext *mpctx, bool reset_ao)
#if HAVE_ENCODING
encode_lavc_discontinuity(mpctx->encode_lavc_ctx);
#endif
+
+ mp_notify(mpctx, MPV_EVENT_SEEK, NULL);
}
// return -1 if seek failed (non-seekable stream?), 0 otherwise
@@ -1167,6 +1169,7 @@ void run_playloop(struct MPContext *mpctx)
if (mpctx->d_audio)
fill_audio_out_buffers(mpctx, endpts);
mpctx->restart_playback = false;
+ mp_notify(mpctx, MPV_EVENT_PLAYBACK_RESTART, NULL);
}
mpctx->time_frame = 0;
get_relative_time(mpctx);
@@ -1207,6 +1210,8 @@ void run_playloop(struct MPContext *mpctx)
mpctx->opts->playback_speed * buffered_audio);
}
mpctx->playback_pts = a_pos;
+ if (was_restart)
+ mp_notify(mpctx, MPV_EVENT_PLAYBACK_RESTART, NULL);
}
update_subtitles(mpctx);