mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-25 13:01:07 +00:00
fallbacksrc: Request the main pad first from fallbackswitch
By default the first created pad is the active one before the fallbackswitch is actually processing data.
This commit is contained in:
parent
96c28a5728
commit
08379ab389
1 changed files with 5 additions and 5 deletions
|
@ -932,11 +932,6 @@ impl FallbackSrc {
|
|||
switch.set_property("min-upstream-latency", min_latency.nseconds());
|
||||
switch.set_property("immediate-fallback", immediate_fallback);
|
||||
|
||||
let fallback_srcpad = fallback_input.static_pad("src").unwrap();
|
||||
let switch_fallbacksink = switch.request_pad_simple("sink_%u").unwrap();
|
||||
fallback_srcpad.link(&switch_fallbacksink).unwrap();
|
||||
switch_fallbacksink.set_property("priority", 1u32);
|
||||
|
||||
gst::Element::link_pads(&clocksync_queue, Some("src"), &clocksync, Some("sink")).unwrap();
|
||||
|
||||
let clocksync_srcpad = clocksync.static_pad("src").unwrap();
|
||||
|
@ -945,6 +940,11 @@ impl FallbackSrc {
|
|||
switch_mainsink.set_property("priority", 0u32);
|
||||
// clocksync_queue sink pad is not connected to anything yet at this point!
|
||||
|
||||
let fallback_srcpad = fallback_input.static_pad("src").unwrap();
|
||||
let switch_fallbacksink = switch.request_pad_simple("sink_%u").unwrap();
|
||||
fallback_srcpad.link(&switch_fallbacksink).unwrap();
|
||||
switch_fallbacksink.set_property("priority", 1u32);
|
||||
|
||||
let element_weak = element.downgrade();
|
||||
switch.connect_notify(Some("active-pad"), move |_switch, _pspec| {
|
||||
let element = match element_weak.upgrade() {
|
||||
|
|
Loading…
Reference in a new issue