mirror of
https://github.com/mpv-player/mpv
synced 2025-03-25 04:38:01 +00:00
lua: add playback-start event
This commit is contained in:
parent
0f5e22079a
commit
119efdc197
@ -3223,6 +3223,7 @@ void mp_flush_events(struct MPContext *mpctx)
|
||||
switch (event) {
|
||||
case MP_EVENT_TICK: name = "tick"; break;
|
||||
case MP_EVENT_TRACKS_CHANGED: name = "track-layout"; break;
|
||||
case MP_EVENT_PLAYBACK_START: name = "playback-start"; break;
|
||||
case MP_EVENT_START_FILE: name = "start"; break;
|
||||
case MP_EVENT_END_FILE: name = "end"; break;
|
||||
default: ;
|
||||
|
@ -40,6 +40,7 @@ enum mp_event {
|
||||
MP_EVENT_PROPERTY, // char*, property that is changed
|
||||
MP_EVENT_TRACKS_CHANGED,
|
||||
MP_EVENT_START_FILE,
|
||||
MP_EVENT_PLAYBACK_START,
|
||||
MP_EVENT_END_FILE,
|
||||
};
|
||||
|
||||
|
@ -1332,6 +1332,8 @@ goto_reopen_demuxer: ;
|
||||
if (mpctx->opts->pause)
|
||||
pause_player(mpctx);
|
||||
|
||||
mp_notify(mpctx, MP_EVENT_PLAYBACK_START, NULL);
|
||||
|
||||
playback_start = mp_time_sec();
|
||||
mpctx->error_playing = false;
|
||||
while (!mpctx->stop_play)
|
||||
|
Loading…
Reference in New Issue
Block a user