mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-21 05:26:23 +00:00
validate: Create a gst-validate-types.h header where we define types
And include it from validate.h. This way we avoid to need to typedef GstValidateAction twice, which is a C11 feature
This commit is contained in:
parent
a1da4cd733
commit
8e5b495c62
5 changed files with 36 additions and 8 deletions
|
@ -20,6 +20,7 @@ libgstvalidate_@GST_API_VERSION@_la_SOURCES = \
|
|||
|
||||
libgstvalidate_@GST_API_VERSION@include_HEADERS = \
|
||||
validate.h \
|
||||
gst-validate-types.h \
|
||||
gst-validate-bin-monitor.h \
|
||||
gst-validate-pipeline-monitor.h \
|
||||
gst-validate-element-monitor.h \
|
||||
|
|
|
@ -29,11 +29,10 @@ typedef guintptr GstValidateIssueId;
|
|||
|
||||
#include <gst/gst.h>
|
||||
#include <gst/validate/gst-validate-reporter.h>
|
||||
#include "gst-validate-types.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _GstValidateAction GstValidateAction;
|
||||
|
||||
GType gst_validate_report_get_type (void);
|
||||
#define GST_TYPE_VALIDATE_REPORT (gst_validate_report_get_type ())
|
||||
|
||||
|
@ -185,7 +184,6 @@ void gst_validate_report_add_message (GstValidateReport *report,
|
|||
gst_validate_reporter_get_name (r->reporter), \
|
||||
GST_VALIDATE_ISSUE_ARGS (r->issue), \
|
||||
r->message
|
||||
|
||||
void gst_validate_report_init (void);
|
||||
GstValidateIssue *gst_validate_issue_from_id (GstValidateIssueId issue_id);
|
||||
GstValidateIssueId gst_validate_issue_get_id (GstValidateIssue * issue);
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include <glib.h>
|
||||
#include <glib-object.h>
|
||||
|
||||
#include "gst-validate-types.h"
|
||||
#include <gst/validate/gst-validate-runner.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
@ -36,10 +37,7 @@ G_BEGIN_DECLS
|
|||
#define GST_IS_VALIDATE_SCENARIO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_VALIDATE_SCENARIO))
|
||||
#define GST_VALIDATE_SCENARIO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_VALIDATE_SCENARIO, GstValidateScenarioClass))
|
||||
|
||||
typedef struct _GstValidateScenario GstValidateScenario;
|
||||
typedef struct _GstValidateScenarioClass GstValidateScenarioClass;
|
||||
typedef struct _GstValidateScenarioPrivate GstValidateScenarioPrivate;
|
||||
typedef struct _GstValidateAction GstValidateAction;
|
||||
typedef struct _GstValidateActionParameter GstValidateActionParameter;
|
||||
|
||||
GST_EXPORT GType _gst_validate_action_type;
|
||||
|
@ -104,8 +102,6 @@ void gst_validate_action_set_done (GstValidateAction *action);
|
|||
#define GST_IS_VALIDATE_ACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_VALIDATE_ACTION))
|
||||
GType gst_validate_action_get_type (void);
|
||||
|
||||
typedef struct _GstValidateActionType GstValidateActionType;
|
||||
|
||||
/**
|
||||
* GstValidateActionTypeFlags:
|
||||
* @GST_VALIDATE_ACTION_TYPE_NONE: No special flag
|
||||
|
|
30
validate/gst/validate/gst-validate-types.h
Normal file
30
validate/gst/validate/gst-validate-types.h
Normal file
|
@ -0,0 +1,30 @@
|
|||
/* GStreamer
|
||||
*
|
||||
* Copyright (C) 2015 Thibault Saunier <thibault.saunier@collabora.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __GST_VALIDATE_TYPES_H__
|
||||
#define __GST_VALIDATE_TYPES_H__
|
||||
|
||||
typedef struct _GstValidateScenario GstValidateScenario;
|
||||
typedef struct _GstValidateScenarioClass GstValidateScenarioClass;
|
||||
|
||||
typedef struct _GstValidateAction GstValidateAction;
|
||||
typedef struct _GstValidateActionType GstValidateActionType;
|
||||
|
||||
#endif /* __GST_VALIDATE_TYPESS_ */
|
|
@ -5,6 +5,9 @@
|
|||
#ifndef _GST_VALIDATE_H
|
||||
#define _GST_VALIDATE_H
|
||||
|
||||
#include <gst/validate/gst-validate-types.h>
|
||||
#include <gst/validate/gst-validate-enums.h>
|
||||
|
||||
#include <gst/validate/gst-validate-runner.h>
|
||||
#include <gst/validate/gst-validate-monitor-factory.h>
|
||||
#include <gst/validate/gst-validate-override-registry.h>
|
||||
|
|
Loading…
Reference in a new issue