mirror of https://github.com/mpv-player/mpv
ao_pipewire: support set_pause
This commit is contained in:
parent
d419cc562d
commit
2407e1b2d0
|
@ -693,6 +693,15 @@ static void start(struct ao *ao)
|
||||||
pw_thread_loop_unlock(p->loop);
|
pw_thread_loop_unlock(p->loop);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool set_pause(struct ao *ao, bool paused)
|
||||||
|
{
|
||||||
|
struct priv *p = ao->priv;
|
||||||
|
pw_thread_loop_lock(p->loop);
|
||||||
|
pw_stream_set_active(p->stream, !paused);
|
||||||
|
pw_thread_loop_unlock(p->loop);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
#define CONTROL_RET(r) (!r ? CONTROL_OK : CONTROL_ERROR)
|
#define CONTROL_RET(r) (!r ? CONTROL_OK : CONTROL_ERROR)
|
||||||
|
|
||||||
static int control(struct ao *ao, enum aocontrol cmd, void *arg)
|
static int control(struct ao *ao, enum aocontrol cmd, void *arg)
|
||||||
|
@ -884,7 +893,7 @@ const struct ao_driver audio_out_pipewire = {
|
||||||
.uninit = uninit,
|
.uninit = uninit,
|
||||||
.reset = reset,
|
.reset = reset,
|
||||||
.start = start,
|
.start = start,
|
||||||
|
.set_pause = set_pause,
|
||||||
.control = control,
|
.control = control,
|
||||||
|
|
||||||
.hotplug_init = hotplug_init,
|
.hotplug_init = hotplug_init,
|
||||||
|
|
Loading…
Reference in New Issue