mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-09-03 10:43:55 +00:00
ssim: Fix the way we handle when an override is attached
This commit is contained in:
parent
7c84ca55d3
commit
1e2bf1c841
3 changed files with 15 additions and 4 deletions
|
@ -394,6 +394,7 @@ gst_validate_monitor_attach_override (GstValidateMonitor * monitor,
|
||||||
gst_object_unref (runner);
|
gst_object_unref (runner);
|
||||||
if (mrunner)
|
if (mrunner)
|
||||||
gst_object_unref (mrunner);
|
gst_object_unref (mrunner);
|
||||||
|
gst_validate_override_attached (override);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -185,7 +185,6 @@ static void
|
||||||
GST_INFO_OBJECT (registry, "Adding override %s to %s", entry->name, name);
|
GST_INFO_OBJECT (registry, "Adding override %s to %s", entry->name, name);
|
||||||
|
|
||||||
gst_validate_monitor_attach_override (monitor, entry->override);
|
gst_validate_monitor_attach_override (monitor, entry->override);
|
||||||
gst_validate_override_attached (entry->override);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -192,8 +192,6 @@ _runner_set (GObject * object, GParamSpec * pspec, gpointer user_data)
|
||||||
GstValidateRunner *runner =
|
GstValidateRunner *runner =
|
||||||
gst_validate_reporter_get_runner (GST_VALIDATE_REPORTER (self));
|
gst_validate_reporter_get_runner (GST_VALIDATE_REPORTER (self));
|
||||||
|
|
||||||
self->priv->is_attached = TRUE;
|
|
||||||
|
|
||||||
g_signal_connect (runner, "stopping", G_CALLBACK (runner_stopping), self);
|
g_signal_connect (runner, "stopping", G_CALLBACK (runner_stopping), self);
|
||||||
gst_object_unref (runner);
|
gst_object_unref (runner);
|
||||||
}
|
}
|
||||||
|
@ -284,8 +282,9 @@ _can_attach (GstValidateOverride * override, GstValidateMonitor * monitor)
|
||||||
GstElement *element = NULL;
|
GstElement *element = NULL;
|
||||||
GstStructure *structure;
|
GstStructure *structure;
|
||||||
gboolean res = TRUE;
|
gboolean res = TRUE;
|
||||||
|
ValidateSsimOverride *self = VALIDATE_SSIM_OVERRIDE (override);
|
||||||
|
|
||||||
if (VALIDATE_SSIM_OVERRIDE (override)->priv->is_attached) {
|
if (self->priv->is_attached) {
|
||||||
GST_ERROR_OBJECT (override, "Already attached");
|
GST_ERROR_OBJECT (override, "Already attached");
|
||||||
|
|
||||||
goto fail;
|
goto fail;
|
||||||
|
@ -332,6 +331,15 @@ fail:
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
validate_ssim_override_attached (GstValidateOverride * override)
|
||||||
|
{
|
||||||
|
ValidateSsimOverride *self = VALIDATE_SSIM_OVERRIDE (override);
|
||||||
|
GST_ERROR_OBJECT (override, "ATTACGHED!");
|
||||||
|
|
||||||
|
self->priv->is_attached = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_finalize (GObject * object)
|
_finalize (GObject * object)
|
||||||
{
|
{
|
||||||
|
@ -355,8 +363,11 @@ static void
|
||||||
validate_ssim_override_class_init (ValidateSsimOverrideClass * klass)
|
validate_ssim_override_class_init (ValidateSsimOverrideClass * klass)
|
||||||
{
|
{
|
||||||
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
||||||
|
GstValidateOverrideClass *override_class =
|
||||||
|
GST_VALIDATE_OVERRIDE_CLASS (klass);
|
||||||
|
|
||||||
gobject_class->finalize = _finalize;
|
gobject_class->finalize = _finalize;
|
||||||
|
override_class->attached = validate_ssim_override_attached;
|
||||||
|
|
||||||
if (!gst_validate_is_initialized ())
|
if (!gst_validate_is_initialized ())
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue