fail to receive GST_MESSAGE_STATE_CHANGED (GST_STATE_NULL) of pipeline, but all receive the msg for all its children

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

fail to receive GST_MESSAGE_STATE_CHANGED (GST_STATE_NULL) of pipeline, but all receive the msg for all its children

Halley Zhao
Hi experts:
I want to do cleanup after pipeline changed to GST_STATE_NULL. however I received GST_MESSAGE_STATE_CHANGED with newstate of GST_STATE_NULL of its children element, but not the pipeline itself.

I don't know whether there is something wrong in my code, or it is by design?
my pipeline contains "appsrc-->h264parse-->videodecode-->appsink". here is my log:
the source code sees attachment

(cb_need_data, 148)emit eos signal
(bus_call, 61)End of stream

(bus_call, 84)my_sink state change, old state: PLAYING, new state: PAUSED
(bus_call, 84)my_vdec state change, old state: PLAYING, new state: PAUSED
(bus_call, 84)my_h264parse state change, old state: PLAYING, new state: PAUSED
(bus_call, 84)my_appsrc state change, old state: PLAYING, new state: PAUSED
(bus_call, 84)my_pipeline state change, old state: PLAYING, new state: PAUSED
(bus_call, 84)my_sink state change, old state: PAUSED, new state: READY
(bus_call, 84)my_vdec state change, old state: PAUSED, new state: READY
(bus_call, 84)my_h264parse state change, old state: PAUSED, new state: READY
(bus_call, 84)my_appsrc state change, old state: PAUSED, new state: READY
(bus_call, 84)my_pipeline state change, old state: PAUSED, new state: READY
(bus_call, 84)my_sink state change, old state: READY, new state: NULL
(bus_call, 84)my_vdec state change, old state: READY, new state: NULL

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

appsrc-codec.c (10K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: fail to receive GST_MESSAGE_STATE_CHANGED (GST_STATE_NULL) of pipeline, but all receive the msg for all its children

Halley Zhao
export GST_DEBUG=*:4
there is gst log"<my_pipeline> notifying about state-changed READY to NULL (VOID_PENDING pending)", but no msg got on GstBus

here are the log:

(bus_call, 84)my_pipeline state change, old state: PLAYING, new state: PAUSED
0:00:05.294249625 12094      0xebc8600 INFO              GST_STATES gstelement.c:2658:gst_element_continue_state:<my_pipeline> continue state change PAUSED to READY, final NULL
0:00:05.294405000 12094      0xebc8600 INFO              GST_STATES gstbin.c:2504:gst_bin_element_set_state:<my_sink> current PAUSED pending VOID_PENDING, desired next READY
0:00:05.294566500 12094      0xebc8600 INFO              GST_STATES gstelement.c:2676:gst_element_continue_state:<my_sink> completed state change to READY
0:00:05.294626250 12094      0xebc8600 INFO              GST_STATES gstelement.c:2579:_priv_gst_element_state_changed:<my_sink> notifying about state-changed PAUSED to READY (VOID_PENDING pending)
(bus_call, 84)my_sink state change, old state: PAUSED, new state: READY
0:00:05.294731000 12094      0xebc8600 INFO              GST_STATES gstbin.c:2952:gst_bin_change_state_func:<my_pipeline> child 'my_sink' changed state to 2(READY) successfully
0:00:05.294849875 12094      0xebc8600 INFO              GST_STATES gstbin.c:2504:gst_bin_element_set_state:<my_vdec> current PAUSED pending VOID_PENDING, desired next READY
0:00:05.317103625 12094      0xebc8600 INFO              GST_STATES gstelement.c:2676:gst_element_continue_state:<my_vdec> completed state change to READY
0:00:05.317294250 12094      0xebc8600 INFO              GST_STATES gstelement.c:2579:_priv_gst_element_state_changed:<my_vdec> notifying about state-changed PAUSED to READY (VOID_PENDING pending)
0:00:05.317593875 12094      0xebc8600 INFO              GST_STATES gstbin.c:2952:gst_bin_change_state_func:<my_pipeline> child 'my_vdec' changed state to 2(READY) successfully
(bus_call, 84)my_vdec state change, old state: PAUSED, new state: READY
0:00:05.317717375 12094      0xebc8600 INFO              GST_STATES gstbin.c:2504:gst_bin_element_set_state:<my_h264parse> current PAUSED pending VOID_PENDING, desired next READY
0:00:05.318214875 12094      0xebc8600 INFO              GST_STATES gstelement.c:2676:gst_element_continue_state:<my_h264parse> completed state change to READY
0:00:05.318281375 12094      0xebc8600 INFO              GST_STATES gstelement.c:2579:_priv_gst_element_state_changed:<my_h264parse> notifying about state-changed PAUSED to READY (VOID_PENDING pending)
(bus_call, 84)my_h264parse state change, old state: PAUSED, new state: READY
0:00:05.318393875 12094      0xebc8600 INFO              GST_STATES gstbin.c:2952:gst_bin_change_state_func:<my_pipeline> child 'my_h264parse' changed state to 2(READY) successfully
0:00:05.318517750 12094      0xebc8600 INFO              GST_STATES gstbin.c:2504:gst_bin_element_set_state:<my_appsrc> current PAUSED pending VOID_PENDING, desired next READY
0:00:05.318673500 12094      0xed408a0 INFO                    task gsttask.c:318:gst_task_func:<my_appsrc:src> Task resume from paused
0:00:05.319093500 12094      0xebc8600 INFO              GST_STATES gstelement.c:2676:gst_element_continue_state:<my_appsrc> completed state change to READY
0:00:05.319155625 12094      0xebc8600 INFO              GST_STATES gstelement.c:2579:_priv_gst_element_state_changed:<my_appsrc> notifying about state-changed PAUSED to READY (VOID_PENDING pending)
(bus_call, 84)my_appsrc state change, old state: PAUSED, new state: READY
0:00:05.319267375 12094      0xebc8600 INFO              GST_STATES gstbin.c:2952:gst_bin_change_state_func:<my_pipeline> child 'my_appsrc' changed state to 2(READY) successfully
0:00:05.319451375 12094      0xebc8600 INFO              GST_STATES gstelement.c:2651:gst_element_continue_state:<my_pipeline> committing state from PAUSED to READY, pending NULL, next NULL
0:00:05.319526500 12094      0xebc8600 INFO              GST_STATES gstelement.c:2579:_priv_gst_element_state_changed:<my_pipeline> notifying about state-changed PAUSED to READY (NULL pending)
(bus_call, 84)my_pipeline state change, old state: PAUSED, new state: READY
0:00:05.319628625 12094      0xebc8600 INFO              GST_STATES gstelement.c:2658:gst_element_continue_state:<my_pipeline> continue state change READY to NULL, final NULL
0:00:05.319799625 12094      0xebc8600 INFO              GST_STATES gstbin.c:2504:gst_bin_element_set_state:<my_sink> current READY pending VOID_PENDING, desired next NULL
0:00:06.443495875 12094      0xebc8600 INFO              GST_STATES gstelement.c:2676:gst_element_continue_state:<my_sink> completed state change to NULL
0:00:06.443610625 12094      0xebc8600 INFO              GST_STATES gstelement.c:2579:_priv_gst_element_state_changed:<my_sink> notifying about state-changed READY to NULL (VOID_PENDING pending)
0:00:06.443782875 12094      0xebc8600 INFO              GST_STATES gstbin.c:2952:gst_bin_change_state_func:<my_pipeline> child 'my_sink' changed state to 1(NULL) successfully
(bus_call, 84)my_sink state change, old state: READY, new state: NULL
0:00:06.443899625 12094      0xebc8600 INFO              GST_STATES gstbin.c:2504:gst_bin_element_set_state:<my_vdec> current READY pending VOID_PENDING, desired next NULL
0:00:06.450190250 12094      0xebc8600 INFO              GST_STATES gstelement.c:2676:gst_element_continue_state:<my_vdec> completed state change to NULL
0:00:06.450258625 12094      0xebc8600 INFO              GST_STATES gstelement.c:2579:_priv_gst_element_state_changed:<my_vdec> notifying about state-changed READY to NULL (VOID_PENDING pending)
(bus_call, 84)my_vdec state change, old state: READY, new state: NULL
0:00:06.450385750 12094      0xebc8600 INFO              GST_STATES gstbin.c:2952:gst_bin_change_state_func:<my_pipeline> child 'my_vdec' changed state to 1(NULL) successfully
0:00:06.450535125 12094      0xebc8600 INFO              GST_STATES gstbin.c:2504:gst_bin_element_set_state:<my_h264parse> current READY pending VOID_PENDING, desired next NULL
0:00:06.450629625 12094      0xebc8600 INFO              GST_STATES gstelement.c:2676:gst_element_continue_state:<my_h264parse> completed state change to NULL
0:00:06.450687375 12094      0xebc8600 INFO              GST_STATES gstelement.c:2579:_priv_gst_element_state_changed:<my_h264parse> notifying about state-changed READY to NULL (VOID_PENDING pending)
(bus_call, 84)my_h264parse state change, old state: READY, new state: NULL
0:00:06.450794500 12094      0xebc8600 INFO              GST_STATES gstbin.c:2952:gst_bin_change_state_func:<my_pipeline> child 'my_h264parse' changed state to 1(NULL) successfully
0:00:06.450913125 12094      0xebc8600 INFO              GST_STATES gstbin.c:2504:gst_bin_element_set_state:<my_appsrc> current READY pending VOID_PENDING, desired next NULL
0:00:06.451000500 12094      0xebc8600 INFO              GST_STATES gstelement.c:2676:gst_element_continue_state:<my_appsrc> completed state change to NULL
0:00:06.451056625 12094      0xebc8600 INFO              GST_STATES gstelement.c:2579:_priv_gst_element_state_changed:<my_appsrc> notifying about state-changed READY to NULL (VOID_PENDING pending)
(bus_call, 84)my_appsrc state change, old state: READY, new state: NULL
0:00:06.451159125 12094      0xebc8600 INFO              GST_STATES gstbin.c:2952:gst_bin_change_state_func:<my_pipeline> child 'my_appsrc' changed state to 1(NULL) successfully
0:00:06.451296000 12094      0xebc8600 INFO              GST_STATES gstelement.c:2676:gst_element_continue_state:<my_pipeline> completed state change to NULL
0:00:06.451355500 12094      0xebc8600 INFO              GST_STATES gstelement.c:2579:_priv_gst_element_state_changed:<my_pipeline> notifying about state-changed READY to NULL (VOID_PENDING pending)
(main, 282)unref the pipeline

Halley Zhao <[hidden email]> 于2019年5月8日周三 上午10:05写道:
Hi experts:
I want to do cleanup after pipeline changed to GST_STATE_NULL. however I received GST_MESSAGE_STATE_CHANGED with newstate of GST_STATE_NULL of its children element, but not the pipeline itself.

I don't know whether there is something wrong in my code, or it is by design?
my pipeline contains "appsrc-->h264parse-->videodecode-->appsink". here is my log:
the source code sees attachment

(cb_need_data, 148)emit eos signal
(bus_call, 61)End of stream

(bus_call, 84)my_sink state change, old state: PLAYING, new state: PAUSED
(bus_call, 84)my_vdec state change, old state: PLAYING, new state: PAUSED
(bus_call, 84)my_h264parse state change, old state: PLAYING, new state: PAUSED
(bus_call, 84)my_appsrc state change, old state: PLAYING, new state: PAUSED
(bus_call, 84)my_pipeline state change, old state: PLAYING, new state: PAUSED
(bus_call, 84)my_sink state change, old state: PAUSED, new state: READY
(bus_call, 84)my_vdec state change, old state: PAUSED, new state: READY
(bus_call, 84)my_h264parse state change, old state: PAUSED, new state: READY
(bus_call, 84)my_appsrc state change, old state: PAUSED, new state: READY
(bus_call, 84)my_pipeline state change, old state: PAUSED, new state: READY
(bus_call, 84)my_sink state change, old state: READY, new state: NULL
(bus_call, 84)my_vdec state change, old state: READY, new state: NULL

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

Re: fail to receive GST_MESSAGE_STATE_CHANGED (GST_STATE_NULL) of pipeline, but all receive the msg for all its children

Matthew Waters
In reply to this post by Halley Zhao
Not receiving READY->NULL state change messages is normal as the GstBus attached to the pipeline is set to flushing to avoid reference cycles.

Cheers
-Matt

On 8/5/19 12:05 pm, Halley Zhao wrote:
Hi experts:
I want to do cleanup after pipeline changed to GST_STATE_NULL. however I received GST_MESSAGE_STATE_CHANGED with newstate of GST_STATE_NULL of its children element, but not the pipeline itself.

I don't know whether there is something wrong in my code, or it is by design?
my pipeline contains "appsrc-->h264parse-->videodecode-->appsink". here is my log:
the source code sees attachment

(cb_need_data, 148)emit eos signal
(bus_call, 61)End of stream

(bus_call, 84)my_sink state change, old state: PLAYING, new state: PAUSED
(bus_call, 84)my_vdec state change, old state: PLAYING, new state: PAUSED
(bus_call, 84)my_h264parse state change, old state: PLAYING, new state: PAUSED
(bus_call, 84)my_appsrc state change, old state: PLAYING, new state: PAUSED
(bus_call, 84)my_pipeline state change, old state: PLAYING, new state: PAUSED
(bus_call, 84)my_sink state change, old state: PAUSED, new state: READY
(bus_call, 84)my_vdec state change, old state: PAUSED, new state: READY
(bus_call, 84)my_h264parse state change, old state: PAUSED, new state: READY
(bus_call, 84)my_appsrc state change, old state: PAUSED, new state: READY
(bus_call, 84)my_pipeline state change, old state: PAUSED, new state: READY
(bus_call, 84)my_sink state change, old state: READY, new state: NULL
(bus_call, 84)my_vdec state change, old state: READY, new state: NULL

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



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

signature.asc (499 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: fail to receive GST_MESSAGE_STATE_CHANGED (GST_STATE_NULL) of pipeline, but all receive the msg for all its children

Halley Zhao
In reply to this post by Halley Zhao
seems the msg is ignored because the gstbus is flushing at that time.
is it a bug?

export GST_DEBUG=*:6
0:00:07.640203750 12491     0x34c35600 INFO              GST_STATES gstelement.c:2579:_priv_gst_element_state_changed:<my_pipeline> notifying about state-changed READY to NULL (VOID_PENDING pending)
0:00:07.640232375 12491     0x34c35600 LOG              GST_MESSAGE gstmessage.c:301:gst_message_new_custom: source my_pipeline: creating new message 0x34db4480 state-changed
0:00:07.640260500 12491     0x34c35600 DEBUG                GST_BUS gstbus.c:318:gst_bus_post:<bus1> [msg 0x34db4480] posting on bus state-changed message: 0x34db4480, time 99:99:99.999999999, seq-num 192, element 'my_pipeline', GstMessageStateChanged, old-state=(GstState)GST_STATE_READY, new-state=(GstState)GST_STATE_NULL, pending-state=(GstState)GST_STATE_VOID_PENDING;
0:00:07.640319750 12491     0x34c35600 DEBUG                GST_BUS gstbus.c:410:gst_bus_post:<bus1> bus is flushing
0:00:07.640342000 12491     0x34c35600 LOG              GST_MESSAGE gstmessage.c:208:_gst_message_free: finalize message 0x34db4480, state-changed from my_pipeline
0:00:07.640369750 12491     0x34c35600 LOG               GST_STATES gstelement.c:3004:gst_element_change_state:<my_pipeline> exit state change 1
0:00:07.640391250 12491     0x34c35600 LOG               GST_STATES gstelement.c:3004:gst_element_change_state:<my_pipeline> exit state change 1
0:00:07.640411500 12491     0x34c35600 LOG               GST_STATES gstelement.c:3004:gst_element_change_state:<my_pipeline> exit state change 1
0:00:07.640432875 12491     0x34c35600 DEBUG             GST_STATES gstelement.c:2911:gst_element_set_state_func:<my_pipeline> returned SUCCESS

gstbus.c
 407   /* ERRORS */
 408 is_flushing:
 409   {
 410     GST_DEBUG_OBJECT (bus, "bus is flushing");
 411     GST_OBJECT_UNLOCK (bus);
 412     gst_message_unref (message);
 413
 414     return FALSE;
 415   }
 416 }

Halley Zhao <[hidden email]> 于2019年5月8日周三 上午10:28写道:
export GST_DEBUG=*:4
there is gst log"<my_pipeline> notifying about state-changed READY to NULL (VOID_PENDING pending)", but no msg got on GstBus

here are the log:

(bus_call, 84)my_pipeline state change, old state: PLAYING, new state: PAUSED
0:00:05.294249625 12094      0xebc8600 INFO              GST_STATES gstelement.c:2658:gst_element_continue_state:<my_pipeline> continue state change PAUSED to READY, final NULL
0:00:05.294405000 12094      0xebc8600 INFO              GST_STATES gstbin.c:2504:gst_bin_element_set_state:<my_sink> current PAUSED pending VOID_PENDING, desired next READY
0:00:05.294566500 12094      0xebc8600 INFO              GST_STATES gstelement.c:2676:gst_element_continue_state:<my_sink> completed state change to READY
0:00:05.294626250 12094      0xebc8600 INFO              GST_STATES gstelement.c:2579:_priv_gst_element_state_changed:<my_sink> notifying about state-changed PAUSED to READY (VOID_PENDING pending)
(bus_call, 84)my_sink state change, old state: PAUSED, new state: READY
0:00:05.294731000 12094      0xebc8600 INFO              GST_STATES gstbin.c:2952:gst_bin_change_state_func:<my_pipeline> child 'my_sink' changed state to 2(READY) successfully
0:00:05.294849875 12094      0xebc8600 INFO              GST_STATES gstbin.c:2504:gst_bin_element_set_state:<my_vdec> current PAUSED pending VOID_PENDING, desired next READY
0:00:05.317103625 12094      0xebc8600 INFO              GST_STATES gstelement.c:2676:gst_element_continue_state:<my_vdec> completed state change to READY
0:00:05.317294250 12094      0xebc8600 INFO              GST_STATES gstelement.c:2579:_priv_gst_element_state_changed:<my_vdec> notifying about state-changed PAUSED to READY (VOID_PENDING pending)
0:00:05.317593875 12094      0xebc8600 INFO              GST_STATES gstbin.c:2952:gst_bin_change_state_func:<my_pipeline> child 'my_vdec' changed state to 2(READY) successfully
(bus_call, 84)my_vdec state change, old state: PAUSED, new state: READY
0:00:05.317717375 12094      0xebc8600 INFO              GST_STATES gstbin.c:2504:gst_bin_element_set_state:<my_h264parse> current PAUSED pending VOID_PENDING, desired next READY
0:00:05.318214875 12094      0xebc8600 INFO              GST_STATES gstelement.c:2676:gst_element_continue_state:<my_h264parse> completed state change to READY
0:00:05.318281375 12094      0xebc8600 INFO              GST_STATES gstelement.c:2579:_priv_gst_element_state_changed:<my_h264parse> notifying about state-changed PAUSED to READY (VOID_PENDING pending)
(bus_call, 84)my_h264parse state change, old state: PAUSED, new state: READY
0:00:05.318393875 12094      0xebc8600 INFO              GST_STATES gstbin.c:2952:gst_bin_change_state_func:<my_pipeline> child 'my_h264parse' changed state to 2(READY) successfully
0:00:05.318517750 12094      0xebc8600 INFO              GST_STATES gstbin.c:2504:gst_bin_element_set_state:<my_appsrc> current PAUSED pending VOID_PENDING, desired next READY
0:00:05.318673500 12094      0xed408a0 INFO                    task gsttask.c:318:gst_task_func:<my_appsrc:src> Task resume from paused
0:00:05.319093500 12094      0xebc8600 INFO              GST_STATES gstelement.c:2676:gst_element_continue_state:<my_appsrc> completed state change to READY
0:00:05.319155625 12094      0xebc8600 INFO              GST_STATES gstelement.c:2579:_priv_gst_element_state_changed:<my_appsrc> notifying about state-changed PAUSED to READY (VOID_PENDING pending)
(bus_call, 84)my_appsrc state change, old state: PAUSED, new state: READY
0:00:05.319267375 12094      0xebc8600 INFO              GST_STATES gstbin.c:2952:gst_bin_change_state_func:<my_pipeline> child 'my_appsrc' changed state to 2(READY) successfully
0:00:05.319451375 12094      0xebc8600 INFO              GST_STATES gstelement.c:2651:gst_element_continue_state:<my_pipeline> committing state from PAUSED to READY, pending NULL, next NULL
0:00:05.319526500 12094      0xebc8600 INFO              GST_STATES gstelement.c:2579:_priv_gst_element_state_changed:<my_pipeline> notifying about state-changed PAUSED to READY (NULL pending)
(bus_call, 84)my_pipeline state change, old state: PAUSED, new state: READY
0:00:05.319628625 12094      0xebc8600 INFO              GST_STATES gstelement.c:2658:gst_element_continue_state:<my_pipeline> continue state change READY to NULL, final NULL
0:00:05.319799625 12094      0xebc8600 INFO              GST_STATES gstbin.c:2504:gst_bin_element_set_state:<my_sink> current READY pending VOID_PENDING, desired next NULL
0:00:06.443495875 12094      0xebc8600 INFO              GST_STATES gstelement.c:2676:gst_element_continue_state:<my_sink> completed state change to NULL
0:00:06.443610625 12094      0xebc8600 INFO              GST_STATES gstelement.c:2579:_priv_gst_element_state_changed:<my_sink> notifying about state-changed READY to NULL (VOID_PENDING pending)
0:00:06.443782875 12094      0xebc8600 INFO              GST_STATES gstbin.c:2952:gst_bin_change_state_func:<my_pipeline> child 'my_sink' changed state to 1(NULL) successfully
(bus_call, 84)my_sink state change, old state: READY, new state: NULL
0:00:06.443899625 12094      0xebc8600 INFO              GST_STATES gstbin.c:2504:gst_bin_element_set_state:<my_vdec> current READY pending VOID_PENDING, desired next NULL
0:00:06.450190250 12094      0xebc8600 INFO              GST_STATES gstelement.c:2676:gst_element_continue_state:<my_vdec> completed state change to NULL
0:00:06.450258625 12094      0xebc8600 INFO              GST_STATES gstelement.c:2579:_priv_gst_element_state_changed:<my_vdec> notifying about state-changed READY to NULL (VOID_PENDING pending)
(bus_call, 84)my_vdec state change, old state: READY, new state: NULL
0:00:06.450385750 12094      0xebc8600 INFO              GST_STATES gstbin.c:2952:gst_bin_change_state_func:<my_pipeline> child 'my_vdec' changed state to 1(NULL) successfully
0:00:06.450535125 12094      0xebc8600 INFO              GST_STATES gstbin.c:2504:gst_bin_element_set_state:<my_h264parse> current READY pending VOID_PENDING, desired next NULL
0:00:06.450629625 12094      0xebc8600 INFO              GST_STATES gstelement.c:2676:gst_element_continue_state:<my_h264parse> completed state change to NULL
0:00:06.450687375 12094      0xebc8600 INFO              GST_STATES gstelement.c:2579:_priv_gst_element_state_changed:<my_h264parse> notifying about state-changed READY to NULL (VOID_PENDING pending)
(bus_call, 84)my_h264parse state change, old state: READY, new state: NULL
0:00:06.450794500 12094      0xebc8600 INFO              GST_STATES gstbin.c:2952:gst_bin_change_state_func:<my_pipeline> child 'my_h264parse' changed state to 1(NULL) successfully
0:00:06.450913125 12094      0xebc8600 INFO              GST_STATES gstbin.c:2504:gst_bin_element_set_state:<my_appsrc> current READY pending VOID_PENDING, desired next NULL
0:00:06.451000500 12094      0xebc8600 INFO              GST_STATES gstelement.c:2676:gst_element_continue_state:<my_appsrc> completed state change to NULL
0:00:06.451056625 12094      0xebc8600 INFO              GST_STATES gstelement.c:2579:_priv_gst_element_state_changed:<my_appsrc> notifying about state-changed READY to NULL (VOID_PENDING pending)
(bus_call, 84)my_appsrc state change, old state: READY, new state: NULL
0:00:06.451159125 12094      0xebc8600 INFO              GST_STATES gstbin.c:2952:gst_bin_change_state_func:<my_pipeline> child 'my_appsrc' changed state to 1(NULL) successfully
0:00:06.451296000 12094      0xebc8600 INFO              GST_STATES gstelement.c:2676:gst_element_continue_state:<my_pipeline> completed state change to NULL
0:00:06.451355500 12094      0xebc8600 INFO              GST_STATES gstelement.c:2579:_priv_gst_element_state_changed:<my_pipeline> notifying about state-changed READY to NULL (VOID_PENDING pending)
(main, 282)unref the pipeline

Halley Zhao <[hidden email]> 于2019年5月8日周三 上午10:05写道:
Hi experts:
I want to do cleanup after pipeline changed to GST_STATE_NULL. however I received GST_MESSAGE_STATE_CHANGED with newstate of GST_STATE_NULL of its children element, but not the pipeline itself.

I don't know whether there is something wrong in my code, or it is by design?
my pipeline contains "appsrc-->h264parse-->videodecode-->appsink". here is my log:
the source code sees attachment

(cb_need_data, 148)emit eos signal
(bus_call, 61)End of stream

(bus_call, 84)my_sink state change, old state: PLAYING, new state: PAUSED
(bus_call, 84)my_vdec state change, old state: PLAYING, new state: PAUSED
(bus_call, 84)my_h264parse state change, old state: PLAYING, new state: PAUSED
(bus_call, 84)my_appsrc state change, old state: PLAYING, new state: PAUSED
(bus_call, 84)my_pipeline state change, old state: PLAYING, new state: PAUSED
(bus_call, 84)my_sink state change, old state: PAUSED, new state: READY
(bus_call, 84)my_vdec state change, old state: PAUSED, new state: READY
(bus_call, 84)my_h264parse state change, old state: PAUSED, new state: READY
(bus_call, 84)my_appsrc state change, old state: PAUSED, new state: READY
(bus_call, 84)my_pipeline state change, old state: PAUSED, new state: READY
(bus_call, 84)my_sink state change, old state: READY, new state: NULL
(bus_call, 84)my_vdec state change, old state: READY, new state: NULL

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

Re: fail to receive GST_MESSAGE_STATE_CHANGED (GST_STATE_NULL) of pipeline, but all receive the msg for all its children

Matthew Waters
In reply to this post by Matthew Waters
Downward state changes are always synchronous.

So once gst_element_set_state (pipeline, GST_STATE_NULL); completes, all the internal elements are in the NULL state and you can unref the pipeline.

On 8/5/19 12:42 pm, Halley Zhao wrote:
then, what's the right way to cleanup the pipeline to make sure it has already changed status to GST_STATE_NULL?

Matthew Waters <[hidden email]> 于2019年5月8日周三 上午10:32写道:
Not receiving READY->NULL state change messages is normal as the GstBus attached to the pipeline is set to flushing to avoid reference cycles.

Cheers
-Matt

On 8/5/19 12:05 pm, Halley Zhao wrote:
Hi experts:
I want to do cleanup after pipeline changed to GST_STATE_NULL. however I received GST_MESSAGE_STATE_CHANGED with newstate of GST_STATE_NULL of its children element, but not the pipeline itself.

I don't know whether there is something wrong in my code, or it is by design?
my pipeline contains "appsrc-->h264parse-->videodecode-->appsink". here is my log:
the source code sees attachment

(cb_need_data, 148)emit eos signal
(bus_call, 61)End of stream

(bus_call, 84)my_sink state change, old state: PLAYING, new state: PAUSED
(bus_call, 84)my_vdec state change, old state: PLAYING, new state: PAUSED
(bus_call, 84)my_h264parse state change, old state: PLAYING, new state: PAUSED
(bus_call, 84)my_appsrc state change, old state: PLAYING, new state: PAUSED
(bus_call, 84)my_pipeline state change, old state: PLAYING, new state: PAUSED
(bus_call, 84)my_sink state change, old state: PAUSED, new state: READY
(bus_call, 84)my_vdec state change, old state: PAUSED, new state: READY
(bus_call, 84)my_h264parse state change, old state: PAUSED, new state: READY
(bus_call, 84)my_appsrc state change, old state: PAUSED, new state: READY
(bus_call, 84)my_pipeline state change, old state: PAUSED, new state: READY
(bus_call, 84)my_sink state change, old state: READY, new state: NULL
(bus_call, 84)my_vdec state change, old state: READY, new state: NULL

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




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

signature.asc (499 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: fail to receive GST_MESSAGE_STATE_CHANGED (GST_STATE_NULL) of pipeline, but all receive the msg for all its children

Nicolas Dufresne-5
In reply to this post by Halley Zhao


Le mar. 7 mai 2019 22 h 40, Halley Zhao <[hidden email]> a écrit :
export GST_DEBUG=*:4
there is gst log"<my_pipeline> notifying about state-changed READY to NULL (VOID_PENDING pending)", but no msg got on GstBus

It's not really a bug. Messages are queued, and when GstPipeline goes to NULL state it flushes the bus in order to drop any remaining ref on pipeline elements.



here are the log:

(bus_call, 84)my_pipeline state change, old state: PLAYING, new state: PAUSED
0:00:05.294249625 12094      0xebc8600 INFO              GST_STATES gstelement.c:2658:gst_element_continue_state:<my_pipeline> continue state change PAUSED to READY, final NULL
0:00:05.294405000 12094      0xebc8600 INFO              GST_STATES gstbin.c:2504:gst_bin_element_set_state:<my_sink> current PAUSED pending VOID_PENDING, desired next READY
0:00:05.294566500 12094      0xebc8600 INFO              GST_STATES gstelement.c:2676:gst_element_continue_state:<my_sink> completed state change to READY
0:00:05.294626250 12094      0xebc8600 INFO              GST_STATES gstelement.c:2579:_priv_gst_element_state_changed:<my_sink> notifying about state-changed PAUSED to READY (VOID_PENDING pending)
(bus_call, 84)my_sink state change, old state: PAUSED, new state: READY
0:00:05.294731000 12094      0xebc8600 INFO              GST_STATES gstbin.c:2952:gst_bin_change_state_func:<my_pipeline> child 'my_sink' changed state to 2(READY) successfully
0:00:05.294849875 12094      0xebc8600 INFO              GST_STATES gstbin.c:2504:gst_bin_element_set_state:<my_vdec> current PAUSED pending VOID_PENDING, desired next READY
0:00:05.317103625 12094      0xebc8600 INFO              GST_STATES gstelement.c:2676:gst_element_continue_state:<my_vdec> completed state change to READY
0:00:05.317294250 12094      0xebc8600 INFO              GST_STATES gstelement.c:2579:_priv_gst_element_state_changed:<my_vdec> notifying about state-changed PAUSED to READY (VOID_PENDING pending)
0:00:05.317593875 12094      0xebc8600 INFO              GST_STATES gstbin.c:2952:gst_bin_change_state_func:<my_pipeline> child 'my_vdec' changed state to 2(READY) successfully
(bus_call, 84)my_vdec state change, old state: PAUSED, new state: READY
0:00:05.317717375 12094      0xebc8600 INFO              GST_STATES gstbin.c:2504:gst_bin_element_set_state:<my_h264parse> current PAUSED pending VOID_PENDING, desired next READY
0:00:05.318214875 12094      0xebc8600 INFO              GST_STATES gstelement.c:2676:gst_element_continue_state:<my_h264parse> completed state change to READY
0:00:05.318281375 12094      0xebc8600 INFO              GST_STATES gstelement.c:2579:_priv_gst_element_state_changed:<my_h264parse> notifying about state-changed PAUSED to READY (VOID_PENDING pending)
(bus_call, 84)my_h264parse state change, old state: PAUSED, new state: READY
0:00:05.318393875 12094      0xebc8600 INFO              GST_STATES gstbin.c:2952:gst_bin_change_state_func:<my_pipeline> child 'my_h264parse' changed state to 2(READY) successfully
0:00:05.318517750 12094      0xebc8600 INFO              GST_STATES gstbin.c:2504:gst_bin_element_set_state:<my_appsrc> current PAUSED pending VOID_PENDING, desired next READY
0:00:05.318673500 12094      0xed408a0 INFO                    task gsttask.c:318:gst_task_func:<my_appsrc:src> Task resume from paused
0:00:05.319093500 12094      0xebc8600 INFO              GST_STATES gstelement.c:2676:gst_element_continue_state:<my_appsrc> completed state change to READY
0:00:05.319155625 12094      0xebc8600 INFO              GST_STATES gstelement.c:2579:_priv_gst_element_state_changed:<my_appsrc> notifying about state-changed PAUSED to READY (VOID_PENDING pending)
(bus_call, 84)my_appsrc state change, old state: PAUSED, new state: READY
0:00:05.319267375 12094      0xebc8600 INFO              GST_STATES gstbin.c:2952:gst_bin_change_state_func:<my_pipeline> child 'my_appsrc' changed state to 2(READY) successfully
0:00:05.319451375 12094      0xebc8600 INFO              GST_STATES gstelement.c:2651:gst_element_continue_state:<my_pipeline> committing state from PAUSED to READY, pending NULL, next NULL
0:00:05.319526500 12094      0xebc8600 INFO              GST_STATES gstelement.c:2579:_priv_gst_element_state_changed:<my_pipeline> notifying about state-changed PAUSED to READY (NULL pending)
(bus_call, 84)my_pipeline state change, old state: PAUSED, new state: READY
0:00:05.319628625 12094      0xebc8600 INFO              GST_STATES gstelement.c:2658:gst_element_continue_state:<my_pipeline> continue state change READY to NULL, final NULL
0:00:05.319799625 12094      0xebc8600 INFO              GST_STATES gstbin.c:2504:gst_bin_element_set_state:<my_sink> current READY pending VOID_PENDING, desired next NULL
0:00:06.443495875 12094      0xebc8600 INFO              GST_STATES gstelement.c:2676:gst_element_continue_state:<my_sink> completed state change to NULL
0:00:06.443610625 12094      0xebc8600 INFO              GST_STATES gstelement.c:2579:_priv_gst_element_state_changed:<my_sink> notifying about state-changed READY to NULL (VOID_PENDING pending)
0:00:06.443782875 12094      0xebc8600 INFO              GST_STATES gstbin.c:2952:gst_bin_change_state_func:<my_pipeline> child 'my_sink' changed state to 1(NULL) successfully
(bus_call, 84)my_sink state change, old state: READY, new state: NULL
0:00:06.443899625 12094      0xebc8600 INFO              GST_STATES gstbin.c:2504:gst_bin_element_set_state:<my_vdec> current READY pending VOID_PENDING, desired next NULL
0:00:06.450190250 12094      0xebc8600 INFO              GST_STATES gstelement.c:2676:gst_element_continue_state:<my_vdec> completed state change to NULL
0:00:06.450258625 12094      0xebc8600 INFO              GST_STATES gstelement.c:2579:_priv_gst_element_state_changed:<my_vdec> notifying about state-changed READY to NULL (VOID_PENDING pending)
(bus_call, 84)my_vdec state change, old state: READY, new state: NULL
0:00:06.450385750 12094      0xebc8600 INFO              GST_STATES gstbin.c:2952:gst_bin_change_state_func:<my_pipeline> child 'my_vdec' changed state to 1(NULL) successfully
0:00:06.450535125 12094      0xebc8600 INFO              GST_STATES gstbin.c:2504:gst_bin_element_set_state:<my_h264parse> current READY pending VOID_PENDING, desired next NULL
0:00:06.450629625 12094      0xebc8600 INFO              GST_STATES gstelement.c:2676:gst_element_continue_state:<my_h264parse> completed state change to NULL
0:00:06.450687375 12094      0xebc8600 INFO              GST_STATES gstelement.c:2579:_priv_gst_element_state_changed:<my_h264parse> notifying about state-changed READY to NULL (VOID_PENDING pending)
(bus_call, 84)my_h264parse state change, old state: READY, new state: NULL
0:00:06.450794500 12094      0xebc8600 INFO              GST_STATES gstbin.c:2952:gst_bin_change_state_func:<my_pipeline> child 'my_h264parse' changed state to 1(NULL) successfully
0:00:06.450913125 12094      0xebc8600 INFO              GST_STATES gstbin.c:2504:gst_bin_element_set_state:<my_appsrc> current READY pending VOID_PENDING, desired next NULL
0:00:06.451000500 12094      0xebc8600 INFO              GST_STATES gstelement.c:2676:gst_element_continue_state:<my_appsrc> completed state change to NULL
0:00:06.451056625 12094      0xebc8600 INFO              GST_STATES gstelement.c:2579:_priv_gst_element_state_changed:<my_appsrc> notifying about state-changed READY to NULL (VOID_PENDING pending)
(bus_call, 84)my_appsrc state change, old state: READY, new state: NULL
0:00:06.451159125 12094      0xebc8600 INFO              GST_STATES gstbin.c:2952:gst_bin_change_state_func:<my_pipeline> child 'my_appsrc' changed state to 1(NULL) successfully
0:00:06.451296000 12094      0xebc8600 INFO              GST_STATES gstelement.c:2676:gst_element_continue_state:<my_pipeline> completed state change to NULL
0:00:06.451355500 12094      0xebc8600 INFO              GST_STATES gstelement.c:2579:_priv_gst_element_state_changed:<my_pipeline> notifying about state-changed READY to NULL (VOID_PENDING pending)
(main, 282)unref the pipeline

Halley Zhao <[hidden email]> 于2019年5月8日周三 上午10:05写道:
Hi experts:
I want to do cleanup after pipeline changed to GST_STATE_NULL. however I received GST_MESSAGE_STATE_CHANGED with newstate of GST_STATE_NULL of its children element, but not the pipeline itself.

I don't know whether there is something wrong in my code, or it is by design?
my pipeline contains "appsrc-->h264parse-->videodecode-->appsink". here is my log:
the source code sees attachment

(cb_need_data, 148)emit eos signal
(bus_call, 61)End of stream

(bus_call, 84)my_sink state change, old state: PLAYING, new state: PAUSED
(bus_call, 84)my_vdec state change, old state: PLAYING, new state: PAUSED
(bus_call, 84)my_h264parse state change, old state: PLAYING, new state: PAUSED
(bus_call, 84)my_appsrc state change, old state: PLAYING, new state: PAUSED
(bus_call, 84)my_pipeline state change, old state: PLAYING, new state: PAUSED
(bus_call, 84)my_sink state change, old state: PAUSED, new state: READY
(bus_call, 84)my_vdec state change, old state: PAUSED, new state: READY
(bus_call, 84)my_h264parse state change, old state: PAUSED, new state: READY
(bus_call, 84)my_appsrc state change, old state: PAUSED, new state: READY
(bus_call, 84)my_pipeline state change, old state: PAUSED, new state: READY
(bus_call, 84)my_sink state change, old state: READY, new state: NULL
(bus_call, 84)my_vdec state change, old state: READY, new state: NULL
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

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