diff --git a/subprojects/gst-plugins-base/docs/plugins/gst_plugins_cache.json b/subprojects/gst-plugins-base/docs/plugins/gst_plugins_cache.json index 03ad8158e4..12a764e284 100644 --- a/subprojects/gst-plugins-base/docs/plugins/gst_plugins_cache.json +++ b/subprojects/gst-plugins-base/docs/plugins/gst_plugins_cache.json @@ -6772,7 +6772,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-base/ext/gl/gstglvideoflip.c b/subprojects/gst-plugins-base/ext/gl/gstglvideoflip.c index e9215285d0..5bdba79c7a 100644 --- a/subprojects/gst-plugins-base/ext/gl/gstglvideoflip.c +++ b/subprojects/gst-plugins-base/ext/gl/gstglvideoflip.c @@ -106,6 +106,9 @@ static void gst_gl_video_flip_set_property (GObject * object, guint prop_id, static void gst_gl_video_flip_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); +static void gst_gl_video_flip_set_method (GstGLVideoFlip * vf, + GstVideoOrientationMethod method, gboolean from_tag); + static GstPadProbeReturn _input_sink_probe (GstPad * pad, GstPadProbeInfo * info, gpointer user_data); static GstPadProbeReturn _trans_src_probe (GstPad * pad, GstPadProbeInfo * info, @@ -131,6 +134,17 @@ gst_gl_video_flip_video_direction_interface_init (GstVideoDirectionInterface /* We implement the video-direction property */ } +static void +gst_gl_video_flip_constructed (GObject * object) +{ + GstGLVideoFlip *self = GST_GL_VIDEO_FLIP (object); + + if (self->method == (GstVideoOrientationMethod) DEFAULT_METHOD) { + gst_gl_video_flip_set_method (self, + (GstVideoOrientationMethod) DEFAULT_METHOD, FALSE); + } +} + static void gst_gl_video_flip_class_init (GstGLVideoFlipClass * klass) { @@ -143,13 +157,13 @@ gst_gl_video_flip_class_init (GstGLVideoFlipClass * klass) gobject_class->finalize = gst_gl_video_flip_finalize; gobject_class->set_property = gst_gl_video_flip_set_property; gobject_class->get_property = gst_gl_video_flip_get_property; + gobject_class->constructed = gst_gl_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_GL_VIDEO_FLIP_METHOD, DEFAULT_METHOD, - GST_PARAM_CONTROLLABLE | G_PARAM_READWRITE | G_PARAM_CONSTRUCT | - G_PARAM_STATIC_STRINGS)); + GST_PARAM_CONTROLLABLE | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_override_property (gobject_class, PROP_VIDEO_DIRECTION, "video-direction"); @@ -169,6 +183,12 @@ gst_gl_video_flip_init (GstGLVideoFlip * flip) gboolean res = TRUE; GstPad *pad; + /* 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 + */ + flip->method = (GstVideoOrientationMethod) DEFAULT_METHOD; + flip->aspect = 1.0; flip->input_capsfilter = gst_element_factory_make ("capsfilter", NULL);