proxy: signal the pending queue in ProxySrc.start()

If the proxy sink has already queued buffers in the shared
context pending queue and is waiting for space in the data
queue, we should signal that space is available when creating
it!
This commit is contained in:
Mathieu Duponchelle 2020-01-29 23:36:54 +01:00
parent 53e948b8da
commit bcae2423f5

View file

@ -311,7 +311,7 @@ struct ProxySinkPadHandler(Arc<ProxySinkPadHandlerInner>);
impl ProxySinkPadHandler {
fn new(proxy_ctx: ProxyContext) -> Self {
ProxySinkPadHandler(Arc::new(ProxySinkPadHandlerInner {
proxy_ctx: proxy_ctx,
proxy_ctx,
flush_rx: sync::Mutex::new(None),
}))
}
@ -1272,6 +1272,11 @@ impl ProxySrc {
.clone();
dataqueue.start().await;
let mut shared_ctx = state.proxy_ctx().unwrap().lock_shared().await;
if let Some(ref mut pending_queue) = shared_ctx.pending_queue {
pending_queue.notify_more_queue_space();
}
ProxySrcPadHandler::start_task(self.src_pad.as_ref(), element, dataqueue).await;
gst_debug!(SRC_CAT, obj: element, "Started");