mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
track-video-transition: Properly emit notify for the invert and border properties
This commit is contained in:
parent
26aebe2d3d
commit
686792609a
1 changed files with 41 additions and 14 deletions
|
@ -29,6 +29,12 @@
|
||||||
G_DEFINE_TYPE (GESTrackVideoTransition, ges_track_video_transition,
|
G_DEFINE_TYPE (GESTrackVideoTransition, ges_track_video_transition,
|
||||||
GES_TYPE_TRACK_TRANSITION);
|
GES_TYPE_TRACK_TRANSITION);
|
||||||
|
|
||||||
|
static inline void
|
||||||
|
ges_track_video_transition_set_border_internal (GESTrackVideoTransition * self,
|
||||||
|
guint border);
|
||||||
|
static inline void
|
||||||
|
ges_track_video_transition_set_inverted_internal (GESTrackVideoTransition *
|
||||||
|
self, gboolean inverted);
|
||||||
static inline gboolean
|
static inline gboolean
|
||||||
ges_track_video_transition_set_transition_type_internal (GESTrackVideoTransition
|
ges_track_video_transition_set_transition_type_internal (GESTrackVideoTransition
|
||||||
* self, GESVideoStandardTransitionType type);
|
* self, GESVideoStandardTransitionType type);
|
||||||
|
@ -250,14 +256,16 @@ ges_track_video_transition_set_property (GObject * object,
|
||||||
|
|
||||||
switch (property_id) {
|
switch (property_id) {
|
||||||
case PROP_BORDER:
|
case PROP_BORDER:
|
||||||
ges_track_video_transition_set_border (tr, g_value_get_uint (value));
|
ges_track_video_transition_set_border_internal (tr,
|
||||||
|
g_value_get_uint (value));
|
||||||
break;
|
break;
|
||||||
case PROP_TRANSITION_TYPE:
|
case PROP_TRANSITION_TYPE:
|
||||||
ges_track_video_transition_set_transition_type_internal (tr,
|
ges_track_video_transition_set_transition_type_internal (tr,
|
||||||
g_value_get_enum (value));
|
g_value_get_enum (value));
|
||||||
break;
|
break;
|
||||||
case PROP_INVERT:
|
case PROP_INVERT:
|
||||||
ges_track_video_transition_set_inverted (tr, g_value_get_boolean (value));
|
ges_track_video_transition_set_inverted_internal (tr,
|
||||||
|
g_value_get_boolean (value));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||||
|
@ -667,6 +675,33 @@ ges_track_video_transition_duration_changed (GESTrackObject * object,
|
||||||
GST_LOG ("done updating controller");
|
GST_LOG ("done updating controller");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void
|
||||||
|
ges_track_video_transition_set_border_internal (GESTrackVideoTransition * self,
|
||||||
|
guint value)
|
||||||
|
{
|
||||||
|
GESTrackVideoTransitionPrivate *priv = self->priv;
|
||||||
|
|
||||||
|
if (!priv->smpte) {
|
||||||
|
priv->pending_border_value = value;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
g_object_set (priv->smpte, "border", value, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void
|
||||||
|
ges_track_video_transition_set_inverted_internal (GESTrackVideoTransition *
|
||||||
|
self, gboolean inverted)
|
||||||
|
{
|
||||||
|
GESTrackVideoTransitionPrivate *priv = self->priv;
|
||||||
|
|
||||||
|
if (!priv->smpte) {
|
||||||
|
priv->pending_inverted = inverted;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
g_object_set (priv->smpte, "invert", inverted, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static inline gboolean
|
static inline gboolean
|
||||||
ges_track_video_transition_set_transition_type_internal (GESTrackVideoTransition
|
ges_track_video_transition_set_transition_type_internal (GESTrackVideoTransition
|
||||||
* self, GESVideoStandardTransitionType type)
|
* self, GESVideoStandardTransitionType type)
|
||||||
|
@ -726,13 +761,9 @@ void
|
||||||
ges_track_video_transition_set_border (GESTrackVideoTransition * self,
|
ges_track_video_transition_set_border (GESTrackVideoTransition * self,
|
||||||
guint value)
|
guint value)
|
||||||
{
|
{
|
||||||
GESTrackVideoTransitionPrivate *priv = self->priv;
|
ges_track_video_transition_set_border_internal (self, value);
|
||||||
|
|
||||||
if (!priv->smpte) {
|
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_BORDER]);
|
||||||
priv->pending_border_value = value;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
g_object_set (priv->smpte, "border", value, NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -773,13 +804,9 @@ void
|
||||||
ges_track_video_transition_set_inverted (GESTrackVideoTransition * self,
|
ges_track_video_transition_set_inverted (GESTrackVideoTransition * self,
|
||||||
gboolean inverted)
|
gboolean inverted)
|
||||||
{
|
{
|
||||||
GESTrackVideoTransitionPrivate *priv = self->priv;
|
ges_track_video_transition_set_inverted (self, inverted);
|
||||||
|
|
||||||
if (!priv->smpte) {
|
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_INVERT]);
|
||||||
priv->pending_inverted = inverted;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
g_object_set (priv->smpte, "invert", inverted, NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue