GNOME Bugzilla – Bug 788058
Use GObject properties in GstVaapiDisplay
Last modified: 2017-09-25 10:51:52 UTC
GstVaapiDisplay has converted into a GObject descendant since bug 768266, nonetheless the properties were still handled a the old GstVaapiObject. This patch set turns these properties as a normal GObject properties.
Created attachment 360278 [details] [review] libs: display: remove libgstvaapi_init_once() It is not required since it can be unrolled in gst_vaapi_display_class_init()
Created attachment 360279 [details] [review] libs: display: remove gst_vaapi_display_properties_init() Remove gst_vaapi_display_properties_init() since it can be unrolled in gst_vaapi_display_class_init()
Created attachment 360280 [details] [review] libs: display: install properties in class Install the properties in the class as a normal GObject. Implement set_property() and get_property() vmethods.
Created attachment 360281 [details] [review] libs: display: optimize properties setters and getters Shuffled some code to avoid to find the properties descriptor in the array twice, adding the internal functions _set_property() and _get_property().
Created attachment 360282 [details] [review] libs: display: initialize value if they are not yet This is a difference between the GObject API and the GstVaapi one: the GValue passed to get a property value, in GObject has to be initialized with g_value_init(), but in GstVaapi is has not. In order to overcome this mismatch, this patch call g_value_init() internally only in the passed one is not already initialized.
Created attachment 360283 [details] [review] vaapisink: use GObject setter and getter Instead of using gst_vaapi_display_set_property() or gst_vaapi_display_get_property(), this patch set replace it usage with g_object_set() or g_object_get(). Also the internal helper cb_set_value() is removed since it is not used anymore.
Created attachment 360284 [details] [review] tests: display: use GObject getter Instead of using the gst_vaapi_display_get_property(), this patch replaces it with g_object_get_property() to dump the available VA display properties.
Attachment 360278 [details] pushed as 9116ffb - libs: display: remove libgstvaapi_init_once() Attachment 360279 [details] pushed as 9dcaa0d - libs: display: remove gst_vaapi_display_properties_init() Attachment 360280 [details] pushed as 0eeef92 - libs: display: install properties in class Attachment 360281 [details] pushed as 6b35e00 - libs: display: optimize properties setters and getters Attachment 360282 [details] pushed as b23ccc6 - libs: display: initialize value if they are not yet Attachment 360283 [details] pushed as b063511 - vaapisink: use GObject setter and getter Attachment 360284 [details] pushed as 7d74176 - tests: display: use GObject getter