Pipeline set state to Ready hangs pipeline.
Антон Шаров
sharov_am at mail.ru
Tue Aug 8 12:43:05 UTC 2023
Hi.
Given following code, where I want to step over frames for some video files:
foreach (var videoFile in videoFiles)
{
var fileSrc = readerPipe.GetByName("filesrc");
fileSrc["location"] = videoFile;
var appSink = (AppSink) readerPipe.GetByName("my_appsink");
readerPipe.SetState(State.Playing);
var step = 1;
while (step < frameNumber)
{
appSink.PullSample();
step++;
}
// some code
readerPipe.SetState(State.Ready); //<--blocks here
}
Here is log:
0:00:15.991079000 INFO pipeline gstpipeline.c:534:gst_pipeline_change_state:<frame_stepper> pipeline is not live (???)
0:00:15.991360000 INFO GST_STATES gstelement.c:3122:gst_element_change_state:<frame_stepper> forcing commit state READY <= READY
0:00:15.991640300 INFO GST_STATES gstelement.c:2792:gst_element_continue_state:<frame_stepper> committing state from PLAYING to PAUSED, pending READY, next READY
0:00:15.991926500 INFO GST_STATES gstelement.c:2720:_priv_gst_element_state_changed:<frame_stepper> notifying about state-changed PLAYING to PAUSED (READY pending)
0:00:15.992426400 INFO GST_STATES gstelement.c:2799:gst_element_continue_state:<frame_stepper> continue state change PAUSED to READY, final READY
0:00:15.992718200 INFO GST_STATES gstbin.c:2484:gst_bin_element_set_state:<my_appsink> current PLAYING pending PAUSED, desired next READY
0:00:15.993014000 INFO GST_STATES gstelement.c:2817:gst_element_continue_state:<my_appsink> completed state change to READY
0:00:15.993297400 INFO GST_STATES gstelement.c:2720:_priv_gst_element_state_changed:<my_appsink> notifying about state-changed PLAYING to READY (VOID_PENDING pending)
0:00:15.993632800 INFO GST_STATES gstbin.c:2939:gst_bin_change_state_func:<frame_stepper> child 'my_appsink' changed state to 2(READY) successfully
0:00:15.993920500 INFO GST_STATES gstbin.c:2484:gst_bin_element_set_state:<decodebin> current PAUSED pending VOID_PENDING, desired next READY
0:00:15.994215900 INFO GST_STATES gstbin.c:2484:gst_bin_element_set_state:<d3d11h264dec0> current PAUSED pending VOID_PENDING, desired next READY
I don’t see anything weired in logs except «pipeline is not live».
Why is that? Is it possible to reuse same pipe over multiply video files? What I’m doing wrong?
Thanks in advance.
KR
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20230808/1a48bb1b/attachment.htm>
More information about the gstreamer-devel
mailing list