mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +00:00
[MOVED FROM BAD 19/29] shapewipe: Don't reset properties when going PAUSED->READY
Also use defines for the default values of the properties.
This commit is contained in:
parent
89605b416b
commit
a089677871
1 changed files with 5 additions and 4 deletions
|
@ -92,6 +92,9 @@ enum
|
||||||
PROP_BORDER
|
PROP_BORDER
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define DEFAULT_POSITION 0.0
|
||||||
|
#define DEFAULT_BORDER 0.0
|
||||||
|
|
||||||
static GstStaticPadTemplate video_sink_pad_template =
|
static GstStaticPadTemplate video_sink_pad_template =
|
||||||
GST_STATIC_PAD_TEMPLATE ("video_sink",
|
GST_STATIC_PAD_TEMPLATE ("video_sink",
|
||||||
GST_PAD_SINK,
|
GST_PAD_SINK,
|
||||||
|
@ -153,11 +156,11 @@ gst_shape_wipe_class_init (GstShapeWipeClass * klass)
|
||||||
|
|
||||||
g_object_class_install_property (gobject_class, PROP_POSITION,
|
g_object_class_install_property (gobject_class, PROP_POSITION,
|
||||||
g_param_spec_float ("position", "Position", "Position of the mask",
|
g_param_spec_float ("position", "Position", "Position of the mask",
|
||||||
0.0, 1.0, 0.0,
|
0.0, 1.0, DEFAULT_POSITION,
|
||||||
G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE));
|
G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE));
|
||||||
g_object_class_install_property (gobject_class, PROP_BORDER,
|
g_object_class_install_property (gobject_class, PROP_BORDER,
|
||||||
g_param_spec_float ("border", "Border", "Border of the mask",
|
g_param_spec_float ("border", "Border", "Border of the mask",
|
||||||
0.0, 1.0, 0.0,
|
0.0, 1.0, DEFAULT_BORDER,
|
||||||
G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE));
|
G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE));
|
||||||
|
|
||||||
gstelement_class->change_state =
|
gstelement_class->change_state =
|
||||||
|
@ -277,8 +280,6 @@ gst_shape_wipe_reset (GstShapeWipe * self)
|
||||||
|
|
||||||
self->fmt = GST_VIDEO_FORMAT_UNKNOWN;
|
self->fmt = GST_VIDEO_FORMAT_UNKNOWN;
|
||||||
self->width = self->height = 0;
|
self->width = self->height = 0;
|
||||||
self->mask_position = 0.0;
|
|
||||||
self->mask_border = 0.0;
|
|
||||||
self->mask_bpp = 0;
|
self->mask_bpp = 0;
|
||||||
|
|
||||||
gst_segment_init (&self->segment, GST_FORMAT_TIME);
|
gst_segment_init (&self->segment, GST_FORMAT_TIME);
|
||||||
|
|
Loading…
Reference in a new issue