Restore decoupling#610
Conversation
…cluding clocksync This changes the webrtcbin's clocksync element to sync=false, which was delaying packets by up to one frame as it aligns them to the wall clock.
… avoid possible oscillation
|
|
||
| // Start the sink's own sub-pipeline runner | ||
| if let Err(error) = sink.start() { | ||
| warn!("Failed to start sink {sink_id}: {error:?}"); |
There was a problem hiding this comment.
just to be sure, we are failing here, but the insert will happen still ?
There was a problem hiding this comment.
Great question. In short, this is keeping the same behavior, which contains a fragility we need to improve. See below.
Each Pipeline has a PipelineRunner, which runs independently. The "Streams" are groups of one Source Pipeline + multiple Sink Pipelines.
When the Source Pipeline of a Stream fails (e.g., if v4l2src's device is closed by Linux), there's a watcher that tears down and recreates the whole Stream (Source Pipeline + each Sink Pipeline).
When a Sink Pipeline of a Stream fails (e.g., if something happens to the socket), it just dies forever.
The lack of communication upstream (from Sink Pipelines to Source Pipelines) was intentional: we don't want the Source or other Sinks to be disturbed by a Sink. What it is lacking is the same recreation strategy used by the Source Pipeline.
Also, in the future, the API should surface the status of each Pipeline Sink of a Stream, but for that, we must semantically separate the Stream concept from the Source Pipeline concept, which today is very liquid/mixed because that was the original design.
There was a problem hiding this comment.
Ok, that's a pretty fair point.
The proxysrc's queue is configured with 5s, tested to be more than enough for all tests of CPU stress and network impairment.
9743539 to
7c12166
Compare
This allows generalization for dynamic sinks, such as WebRTCSink
7c12166 to
498d163
Compare
As a follow-up to some problems found in #593's introduced strategy of removing the decoupling between the sinks, this patch:
Solves:
Evaluation: