From c30bf22d8d31336696430406b0483bfc9821c8bb Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 28 Feb 2014 01:31:38 +0100 Subject: 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. --- player/playloop.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'player/playloop.c') 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); -- cgit v1.2.3