stream: implement cork and flush

Implement cork with _set_active and flush with the new _flush
method.
This commit is contained in:
Wim Taymans 2018-10-09 16:39:19 +02:00
parent 0870fc8673
commit a91dea00d0

View file

@ -1383,7 +1383,7 @@ pa_operation* pa_stream_cork(pa_stream *s, int b, pa_stream_success_cb_t cb, voi
s->corked = b;
pw_log_warn("Not Implemented %d", b);
pw_stream_set_active(s->stream, !b);
o = pa_operation_new(s->context, s, on_success, sizeof(struct success_ack));
d = o->userdata;
d->cb = cb;
@ -1404,7 +1404,8 @@ pa_operation* pa_stream_flush(pa_stream *s, pa_stream_success_cb_t cb, void *use
PA_CHECK_VALIDITY_RETURN_NULL(s->context, s->state == PA_STREAM_READY, PA_ERR_BADSTATE);
PA_CHECK_VALIDITY_RETURN_NULL(s->context, s->direction != PA_STREAM_UPLOAD, PA_ERR_BADSTATE);
pw_log_warn("Not Implemented");
pw_stream_flush(s->stream, false);
update_timing_info(s);
o = pa_operation_new(s->context, s, on_success, sizeof(struct success_ack));
d = o->userdata;
d->cb = cb;