Pipeline freeze if one of the input is inactive

classic Classic list List threaded Threaded
2 messages Options
Vnd
Reply | Threaded
Open this post in threaded view
|

Pipeline freeze if one of the input is inactive

Vnd
This post was updated on .
All,

I am using input-selector to switch between two input. When both the inputs are active switching is working as expected.

But pipeline will not start if one of the input is missing. decodebin with no input is blocking the pipeline pre-rolling. Same is seem with decodebin3 too. I have used 1.12.1 for testing.

gst-launch-1.0 \
udpsrc port=6000 ! decodebin ! video/x-raw ! insel.sink_0 \
udpsrc port=6002 ! decodebin ! video/x-raw ! insel.sink_1 \
input-selector sync-streams=false name=insel ! checksumsink


Below pipeline works even if second input is not active. I am suspecting decodebin(3) in above pipeline.

gst-launch-1.0 \
udpsrc port=6000 ! insel.sink_0 \
udpsrc port=6002 ! insel.sink_1 \
input-selector sync-streams=false name=insel ! checksumsink

What could be the problem ??


Vnd
Reply | Threaded
Open this post in threaded view
|

Re: Pipeline freeze if one of the input is inactive

Vnd
By setting  async-handling=true property in decodebin helps pipeline to go to playing state but latency message is posted by dec2 very frequently. This leads to latency redistribution. CPU utilisation goes high due to repeated latency message distribution.

I Further digged into code latency is posted by the bin's base function gst_bin_change_state_func in GST_STATE_PLAYING state change. Why this function is called again and again for dec2 decodebin ??

gst-launch-1.0 \
udpsrc port=6000 ! decodebin async-handling=true name=dec1 ! video/x-raw ! insel.sink_0 \
udpsrc port=6003 ! decodebin async-handling=true name=dec2 ! video/x-raw ! insel.sink_1 \
input-selector sync-streams=false name=insel ! checksumsink

Console dump:
0:00:02.646478606 fe6da9d06fa7a5d9f82f90a5eaf394dccb158321
Redistribute latency...
Redistribute latency...
Redistribute latency...
Redistribute latency...
0:00:02.686478606 b80ea0cb6ebd7e601e8d6c7e3288402b3765d7c9
0:00:02.726478606 28da25f355796e250501aa752d18ea5e8049f093

Any other way of doing it ??
 ~ VND