int mpv_open_cplugin(mpv_handle handle){
mpv_event event = mpv_wait_event(handle, -1);
sleep(2);
printf("will run show-progress\n");
const char cmd_show_progress[2] = {"show-progress", NULL};
mpv_command_async(handle, 200, cmd_show_progress);
while (1){
mpv_event event = mpv_wait_event(handle, -1);
int exit = 0;
// printf("stepping through touchpad state machine\n");
switch(event->event_id){
case MPV_EVENT_SHUTDOWN:
return 0;
case MPV_EVENT_COMMAND_REPLY:
}
// usleep(4);
}
return 0;
- 4: on the same console, run `mpv $MEDIAFILE`, replacing `$MEDIAFILE` with a path to a playable video.
### Expected Behavior
mpv plays file for 2 seconds, then prints ` will run show progress` on console output, then shows HUD with progress bar.
### Actual Behavior
mpv plays file for 2 seconds, then prints ` will run show progress` on console output, then continues playing without displaying the HUD.
### Log File
[output.txt](https://github.com/mpv-player/mpv/files/15491017/output.txt)
### Sample Files
_No response_
### I carefully read all instruction and confirm that I did the following:
- [X] I tested with the latest mpv version to validate that the issue is not already fixed.
- [X] I provided all required information including system and mpv version.
- [X] I produced the log file with the exact same set of files, parameters, and conditions used in "Reproduction Steps", with the addition of `--log-file=output.txt`.
- [X] I produced the log file while the behaviors described in "Actual Behavior" were actively observed.
- [X] I attached the full, untruncated log file.
- [X] I attached the backtrace in the case of a crash.
0.34.1 is outdated and not supported. This was fixed by 5c2051b1adbfdf476df5e57080ea0ea79abee1a7. You can workaround this by using the osd-auto prefix for the command.
mpv Information
Other Information
running on Ubuntu 22.04 with KDE Plasma 5.24.
note: the same command works if you pipe it via socket.
Reproduction Steps
struct state { mpv_handle *mpv; };
int mpv_open_cplugin(mpv_handle handle){ mpv_event event = mpv_wait_event(handle, -1); sleep(2); printf("will run show-progress\n"); const char cmd_show_progress[2] = {"show-progress", NULL}; mpv_command_async(handle, 200, cmd_show_progress); while (1){ mpv_event event = mpv_wait_event(handle, -1); int exit = 0;
}
install showprogress.so to plugins folder
gcc -o ~/.config/mpv/scripts/progress.so showprogress.c -shared -fPIC