videoflip: fix setting of method property at construction time
authorMathieu Duponchelle <mathieu@centricular.com>
Wed, 3 May 2023 13:42:01 +0000 (15:42 +0200)
committerTim-Philipp Müller <tim@centricular.com>
Fri, 5 May 2023 10:58:37 +0000 (11:58 +0100)
commitb17fbb231cde6fd72e356daa43122084693fef7d
tree581862a93ead287eb9ab1990a1f9779f81d5222a
parent009fa58df19ca6c5dc7c1a7b764bfd5be439a7ef
videoflip: fix setting of method property at construction time

Since c2f890ab, element properties are gathered from the parse-launch
line and passed at object construction.

This caused the following issue to happen in videoflip:

* videoflip installed a CONSTRUCT property named method, now deprecated
* videoflip now also overrides that property with a video-direction
  property

GObject construction causes method to be set first at construct time,
with the user-provided value, then video-direction with the default
value.

The user-provided value was thus overridden, causing a regression.

Fix by not installing the properties as CONSTRUCT, and explicitly
implementing constructed() instead in order to ensure that we do still
call gst_video_flip_set_method() at least once during construction.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2529

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4551>
subprojects/gst-plugins-good/docs/gst_plugins_cache.json
subprojects/gst-plugins-good/gst/videofilter/gstvideoflip.c