Appsrc stuck at flushing step

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

Appsrc stuck at flushing step

msemsar
Dear All,
I am having the following pipeline, which sometimes fails to start.
It does not give any specific error, only stuck at flushing of appsrc (i.e. logs are pausing after gst_pad_push() = flushing and  pausing task, reason flushing)
I have attached the logs for reference. Gstreamer version is 1.2.4-0ubuntu1.1.
Thanks in advance,

appsrc name=videoSrc format=3 stream-type=0 ! video/x-raw, format=(string)UYVY, width=1920, height=1080 ! nvvidconv name=videoConvert ! video/x-raw(memory:NVMM), format=I420 ! omxh264enc name=h264enc  ! video/x-h264, stream-format=avc ! matroskamux streamable=true ! filesink name=videoPath1 location=vid_es_fifo_0



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

test.txt (868K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Appsrc stuck at flushing step

Tim Müller
On Tue, 2017-03-21 at 12:31 -0400, mehdi semsarzadeh wrote:

Hi,

Dear All,
I am having the following pipeline, which sometimes fails to start.
It does not give any specific error, only stuck at flushing of appsrc (i.e. logs are pausing after gst_pad_push() = flushing and  pausing task, reason flushing)
I have attached the logs for reference. Gstreamer version is 1.2.4-0ubuntu1.1.
Thanks in advance,

appsrc name=videoSrc format=3 stream-type=0 ! video/x-raw, format=(string)UYVY, width=1920, height=1080 ! nvvidconv name=videoConvert ! video/x-raw(memory:NVMM), format=I420 ! omxh264enc name=h264enc  ! video/x-h264, stream-format=avc ! matroskamux streamable=true ! filesink name=videoPath1 location=vid_es_fifo_0
Are you adding elements to a running pipeline?

If so, you need to first set their state to PLAYING after adding them, and only then link them into the pipeline.

From the log it looks like the element is still in NULL state when it receives data, which means the pads aren't activated yet, which means appsrc will get a flushing flow return and will think the pipeline is shutting down or flushing, and thus silently stop.

Cheers
-Tim
-- 
Tim Müller, Centricular Ltd - http://www.centricular.com

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Appsrc stuck at flushing step

msemsar
Thanks Tim,
I am not adding elements to a running pipeline.

Actually, I cloud realize the issue. It seems that the order of terminating the pipeline was not correct and g_main_loop_quit where get called before EOS being moved through the pipeline and get received by bus.
In other words, I think we should follow these steps, when we want to stop the pipeline:
  • emit the end-of-stream event and send it to appsrc: g_signal_emit_by_name(nameofappsrcelement, "end-of-stream", &ret);
  • wait for bus to send the EOS message (this means that EOS has gone through the pipeline), and call g_main_loop_quit upon receiving EOS message from bus
Thanks

On Thu, Mar 23, 2017 at 6:15 AM, Tim Müller <[hidden email]> wrote:
On Tue, 2017-03-21 at 12:31 -0400, mehdi semsarzadeh wrote:

Hi,

Dear All,
I am having the following pipeline, which sometimes fails to start.
It does not give any specific error, only stuck at flushing of appsrc (i.e. logs are pausing after gst_pad_push() = flushing and  pausing task, reason flushing)
I have attached the logs for reference. Gstreamer version is 1.2.4-0ubuntu1.1.
Thanks in advance,

appsrc name=videoSrc format=3 stream-type=0 ! video/x-raw, format=(string)UYVY, width=1920, height=1080 ! nvvidconv name=videoConvert ! video/x-raw(memory:NVMM), format=I420 ! omxh264enc name=h264enc  ! video/x-h264, stream-format=avc ! matroskamux streamable=true ! filesink name=videoPath1 location=vid_es_fifo_0
Are you adding elements to a running pipeline?

If so, you need to first set their state to PLAYING after adding them, and only then link them into the pipeline.

From the log it looks like the element is still in NULL state when it receives data, which means the pads aren't activated yet, which means appsrc will get a flushing flow return and will think the pipeline is shutting down or flushing, and thus silently stop.

Cheers
-Tim
-- 
Tim Müller, Centricular Ltd - http://www.centricular.com

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel




--
Mehdi Semsarzadeh

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel