After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 788058 - Use GObject properties in GstVaapiDisplay
Use GObject properties in GstVaapiDisplay
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer-vaapi
unspecified
Other All
: Normal normal
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-09-22 18:06 UTC by Víctor Manuel Jáquez Leal
Modified: 2017-09-25 10:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
libs: display: remove libgstvaapi_init_once() (2.37 KB, patch)
2017-09-22 18:06 UTC, Víctor Manuel Jáquez Leal
committed Details | Review
libs: display: remove gst_vaapi_display_properties_init() (1.46 KB, patch)
2017-09-22 18:06 UTC, Víctor Manuel Jáquez Leal
committed Details | Review
libs: display: install properties in class (2.54 KB, patch)
2017-09-22 18:06 UTC, Víctor Manuel Jáquez Leal
committed Details | Review
libs: display: optimize properties setters and getters (6.74 KB, patch)
2017-09-22 18:07 UTC, Víctor Manuel Jáquez Leal
committed Details | Review
libs: display: initialize value if they are not yet (2.06 KB, patch)
2017-09-22 18:07 UTC, Víctor Manuel Jáquez Leal
committed Details | Review
vaapisink: use GObject setter and getter (3.52 KB, patch)
2017-09-22 18:07 UTC, Víctor Manuel Jáquez Leal
committed Details | Review
tests: display: use GObject getter (3.33 KB, patch)
2017-09-22 18:07 UTC, Víctor Manuel Jáquez Leal
committed Details | Review

Description Víctor Manuel Jáquez Leal 2017-09-22 18:06:40 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.
Comment 1 Víctor Manuel Jáquez Leal 2017-09-22 18:06:46 UTC
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()
Comment 2 Víctor Manuel Jáquez Leal 2017-09-22 18:06:51 UTC
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()
Comment 3 Víctor Manuel Jáquez Leal 2017-09-22 18:06:57 UTC
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.
Comment 4 Víctor Manuel Jáquez Leal 2017-09-22 18:07:02 UTC
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().
Comment 5 Víctor Manuel Jáquez Leal 2017-09-22 18:07:08 UTC
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.
Comment 6 Víctor Manuel Jáquez Leal 2017-09-22 18:07:14 UTC
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.
Comment 7 Víctor Manuel Jáquez Leal 2017-09-22 18:07:19 UTC
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.
Comment 8 Víctor Manuel Jáquez Leal 2017-09-25 10:50:29 UTC
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