mirror of https://github.com/mpv-player/mpv
ao: add ao_stop_streaming
This commit is contained in:
parent
bfadd31957
commit
aebe58203b
|
@ -267,6 +267,16 @@ int ao_read_data_converted(struct ao *ao, struct ao_convert_fmt *fmt,
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Called by pull-based AO to indicate the AO has stopped requesting more data,
|
||||||
|
// usually when EOF is got from ao_read_data().
|
||||||
|
// After this function is called, the core will call ao->driver->start() again
|
||||||
|
// when more audio data after EOF arrives.
|
||||||
|
void ao_stop_streaming(struct ao *ao)
|
||||||
|
{
|
||||||
|
struct buffer_state *p = ao->buffer_state;
|
||||||
|
p->streaming = false;
|
||||||
|
}
|
||||||
|
|
||||||
int ao_control(struct ao *ao, enum aocontrol cmd, void *arg)
|
int ao_control(struct ao *ao, enum aocontrol cmd, void *arg)
|
||||||
{
|
{
|
||||||
struct buffer_state *p = ao->buffer_state;
|
struct buffer_state *p = ao->buffer_state;
|
||||||
|
|
|
@ -234,4 +234,6 @@ void ao_wakeup(struct ao *ao);
|
||||||
int ao_read_data_converted(struct ao *ao, struct ao_convert_fmt *fmt,
|
int ao_read_data_converted(struct ao *ao, struct ao_convert_fmt *fmt,
|
||||||
void **data, int samples, int64_t out_time_ns);
|
void **data, int samples, int64_t out_time_ns);
|
||||||
|
|
||||||
|
void ao_stop_streaming(struct ao *ao);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue