lua: add playback-start event
This commit is contained in:
1 parent
0f5e22079a
commit
119efdc197
3 files changed
+4
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user