GNOME Bugzilla – Bug 783798
utils: Add a function to get a string representation of GstStateChange
Last modified: 2017-06-20 13:54:00 UTC
I have wanted that function quite a few times (for debugging purpose) and figured it was time to write it.
Created attachment 353778 [details] [review] utils: Add a function to get a string representation of GstStateChange API: gst_state_change_get_name
Looks good to me, but is e.g. "NULL to READY" really a "name" or is it more like a description? Undecided whether it's worth caring about though :) Please also add it to .def file (run 'make update-exports', unless you're sure you can add it in the right place).
How about making it "NULL->READY" or similar? Is that more like a name?
Review of attachment 353778 [details] [review]: Also thanks for adding this, I needed it a few times already :) ::: gst/gstutils.c @@ +1284,3 @@ + return "PAUSED to READY"; + case GST_STATE_CHANGE_READY_TO_NULL: + return "READY to NULL"; This is not enough unfortunately: there are (valid!) state changes like READY->READY, PAUSED->PAUSED, PLAYING->PLAYING, NULL->NULL
Created attachment 353833 [details] [review] element: Add missing values for "to same" state changes
Created attachment 353834 [details] [review] utils: Add a function to get a string representation of GstStateChange API: gst_state_change_get_name
Created attachment 353837 [details] [review] element: Add missing values for "to same" state changes https://bugzilla.gnome.org/show_bug.cgi?id=783798 And handle newly added GstStateChange values in GstPipeline
Created attachment 353838 [details] [review] utils: Add a function to get a string representation of GstStateChange API: gst_state_change_get_name
Created attachment 353839 [details] [review] element: Add missing values for "to same" state changes https://bugzilla.gnome.org/show_bug.cgi?id=783798 And handle newly added GstStateChange values in GstPipeline
Created attachment 353840 [details] [review] utils: Add a function to get a string representation of GstStateChange API: gst_state_change_get_name
Created attachment 353842 [details] [review] flactag: Fix warning with the newly added GstStateChange values
Created attachment 353843 [details] [review] Handle newly added GstStateChange values The GstStateChange should not be concidered 'closed' and new values can be added to it, thuse a `default:` handler should be added.
Created attachment 353855 [details] [review] Handle newly added GstStateChange values
Comment on attachment 353855 [details] [review] Handle newly added GstStateChange values The commit message should probably mention "alsasrc"
Attachment 353839 [details] pushed as 54e16cc - element: Add missing values for "to same" state changes Attachment 353840 [details] pushed as 3a1f2c2 - utils: Add a function to get a string representation of GstStateChange
Attachment 353842 [details] pushed as 5ff3106 - flactag: Fix warning with the newly added GstStateChange values