gst_element_set_state failure and bus messages

Carlos Rafael Giani dv at pseudoterminal.org
Tue Jul 29 07:33:41 PDT 2014


On 2014-07-29 16:14, Nicolas Dufresne wrote:
> Few suggestion:
>
> - Use the latest stable from the 1.2 series
> - Make sure you check the state change source object (state change is
> reported for each elements independently).
> - Make sure you do your cleanup when you receive an error message. The
> state after an error is undefined. You must set your pipeline state to
> NULL in order to recover.

The strange thing though is that I _didn't_ get any error messages. (I 
assume you mean getting error messages through the bus.)
But if the state is undefined after a state change failure, it makes 
sense that I don't see any statechange messages on the bus.

>
> Le mardi 29 juillet 2014 à 11:50 +0200, Carlos Rafael Giani a écrit :
>> Hello,
>>
>> I saw something strange the other day with state changes with GStreamer
>> 1.2.0. During a test, I intentionally used filesrc with an invalid
>> filename. As expected, the state change from READY to PAUSED failed. As
>> part of the cleanup operation that followed, I called
>> gst_element_set_state() again, this time setting the pipeline to the
>> NULL state. This returned GST_STATE_CHANGE_SUCCESS , so the state change
>> finished immediately. Perhaps the pipeline is automatically set to NULL
>> if a state change fails?
>>
>> Either way, I also noticed that the bus watch did not get any kind of
>> message that the state was changed to NULL. This caused problems,
>> because some final cleanup operations rely on seeing a state change to
>> NULL in the bus watch.
>>
>> Is this some kind of exception? If state change fails, it is implicitely
>> set to NULL, and no state change messages will occur? Or perhaps this is
>> just a bug? I will test with a newer GStreamer version today.
>> Also, if a state change finishes immediately (that is, returns
>> GST_STATE_CHANGE_SUCCESS instead of GST_STATE_CHANGE_ASYNC), will it
>> still produce bus watch statechange messages?
>>
>> cheers
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



More information about the gstreamer-devel mailing list