fail to receive GST_MESSAGE_STATE_CHANGED (GST_STATE_NULL) of pipeline, but all receive the msg for all its children
Halley Zhao
aihua.halley.zhao at gmail.com
Wed May 8 02:40:00 UTC 2019
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 <aihua.halley.zhao at gmail.com> 于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 <aihua.halley.zhao at gmail.com> 于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
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190508/3d9ca281/attachment-0001.html>
More information about the gstreamer-devel
mailing list