mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 03:19:40 +00:00
validate:override-registry: Make use of gst_validate_element_has_klass
Summary: + Fix a minor mixup bug between klass_overrides and name_overrides Depends on D205 Reviewers: Mathieu_Du Differential Revision: http://phabricator.freedesktop.org/D206
This commit is contained in:
parent
40d00e8614
commit
38df412a54
1 changed files with 4 additions and 11 deletions
|
@ -31,8 +31,8 @@
|
|||
|
||||
#include "gst-validate-report.h"
|
||||
#include "gst-validate-utils.h"
|
||||
#include "gst-validate-monitor.h"
|
||||
#include "gst-validate-internal.h"
|
||||
#include "gst-validate-monitor.h"
|
||||
#include "gst-validate-override.h"
|
||||
#include "gst-validate-override-registry.h"
|
||||
|
||||
|
@ -49,7 +49,7 @@ typedef struct
|
|||
} GstValidateOverrideRegistryGTypeEntry;
|
||||
|
||||
static GMutex _gst_validate_override_registry_mutex;
|
||||
static GstValidateOverrideRegistry *_registry_default;
|
||||
static GstValidateOverrideRegistry *_registry_default = NULL;
|
||||
|
||||
#define GST_VALIDATE_OVERRIDE_REGISTRY_LOCK(r) g_mutex_lock (&r->mutex)
|
||||
#define GST_VALIDATE_OVERRIDE_REGISTRY_UNLOCK(r) g_mutex_unlock (&r->mutex)
|
||||
|
@ -173,23 +173,16 @@ static void
|
|||
GstValidateOverrideRegistryNameEntry *entry;
|
||||
GList *iter;
|
||||
GstElement *element;
|
||||
GstElementClass *klass;
|
||||
const gchar *klassname;
|
||||
|
||||
element = gst_validate_monitor_get_element (monitor);
|
||||
if (!element)
|
||||
return;
|
||||
|
||||
klass = GST_ELEMENT_GET_CLASS (element);
|
||||
klassname =
|
||||
gst_element_class_get_metadata (klass, GST_ELEMENT_METADATA_KLASS);
|
||||
|
||||
for (iter = registry->name_overrides.head; iter; iter = g_list_next (iter)) {
|
||||
for (iter = registry->klass_overrides.head; iter; iter = g_list_next (iter)) {
|
||||
|
||||
entry = iter->data;
|
||||
|
||||
/* TODO It would be more correct to split it before comparing */
|
||||
if (strstr (klassname, entry->name) != NULL) {
|
||||
if (gst_validate_element_has_klass (element, entry->name)) {
|
||||
gst_validate_monitor_attach_override (monitor, entry->override);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue