diff --git a/subprojects/gst-plugins-good/docs/gst_plugins_cache.json b/subprojects/gst-plugins-good/docs/gst_plugins_cache.json index 7651a3eac5..b36b1cf0fd 100644 --- a/subprojects/gst-plugins-good/docs/gst_plugins_cache.json +++ b/subprojects/gst-plugins-good/docs/gst_plugins_cache.json @@ -26293,7 +26293,7 @@ "method": { "blurb": "method (deprecated, use video-direction instead)", "conditionally-available": false, - "construct": true, + "construct": false, "construct-only": false, "controllable": true, "default": "none (0)", diff --git a/subprojects/gst-plugins-good/gst/videofilter/gstvideoflip.c b/subprojects/gst-plugins-good/gst/videofilter/gstvideoflip.c index 07db89969d..688fe67005 100644 --- a/subprojects/gst-plugins-good/gst/videofilter/gstvideoflip.c +++ b/subprojects/gst-plugins-good/gst/videofilter/gstvideoflip.c @@ -1833,6 +1833,17 @@ gst_video_flip_get_property (GObject * object, guint prop_id, GValue * value, } } +static void +gst_video_flip_constructed (GObject * object) +{ + GstVideoFlip *self = GST_VIDEO_FLIP (object); + + if (self->method == (GstVideoOrientationMethod) PROP_METHOD_DEFAULT) { + gst_video_flip_set_method (self, + (GstVideoOrientationMethod) PROP_METHOD_DEFAULT, FALSE); + } +} + static void gst_video_flip_class_init (GstVideoFlipClass * klass) { @@ -1846,13 +1857,14 @@ gst_video_flip_class_init (GstVideoFlipClass * klass) gobject_class->set_property = gst_video_flip_set_property; gobject_class->get_property = gst_video_flip_get_property; + gobject_class->constructed = gst_video_flip_constructed; g_object_class_install_property (gobject_class, PROP_METHOD, g_param_spec_enum ("method", "method", "method (deprecated, use video-direction instead)", GST_TYPE_VIDEO_FLIP_METHOD, PROP_METHOD_DEFAULT, GST_PARAM_CONTROLLABLE | GST_PARAM_MUTABLE_PLAYING | - G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)); + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_override_property (gobject_class, PROP_VIDEO_DIRECTION, "video-direction"); /* override the overriden property's flags to include the mutable in playing @@ -1886,6 +1898,12 @@ gst_video_flip_class_init (GstVideoFlipClass * klass) static void gst_video_flip_init (GstVideoFlip * videoflip) { + /* We initialize to the default and call set_method() from constructed + * if the value hasn't changed, this ensures set_method() does get called + * even if the non-construct method / direction properties aren't set + */ + videoflip->method = (GstVideoOrientationMethod) PROP_METHOD_DEFAULT; + /* AUTO is not valid for active method, this is just to ensure we setup the * method in gst_video_flip_set_method() */ videoflip->active_method = GST_VIDEO_ORIENTATION_AUTO;