1 /* GStreamer
2  * Copyright (C) 2013 Thiago Santos <thiago.sousa.santos@collabora.com>
3  *
4  * validate.c - Validate generic functions
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  */
21 
22 #ifndef __GST_VALIDATE_INTERNAL_H__
23 #define __GST_VALIDATE_INTERNAL_H__
24 
25 #include <gst/gst.h>
26 #include "gst-validate-scenario.h"
27 #include "gst-validate-monitor.h"
28 #include <json-glib/json-glib.h>
29 
30 extern G_GNUC_INTERNAL GstDebugCategory *gstvalidate_debug;
31 #define GST_CAT_DEFAULT gstvalidate_debug
32 
33 extern G_GNUC_INTERNAL GRegex *newline_regex;
34 extern G_GNUC_INTERNAL GstClockTime _priv_start_time;
35 
36 extern G_GNUC_INTERNAL GQuark _Q_VALIDATE_MONITOR;
37 
38 /* If an action type is 1 (TRUE) we also consider it is a config to keep backward compatibility */
39 #define IS_CONFIG_ACTION_TYPE(type) (((type) & GST_VALIDATE_ACTION_TYPE_CONFIG) || ((type) == TRUE))
40 
41 extern G_GNUC_INTERNAL GType _gst_validate_action_type_type;
42 
43 void init_scenarios (void);
44 
45 /* FIXME 2.0 Remove that as this is only for backward compatibility
46  * as we used to have to print actions in the action execution function
47  * and this is done by the scenario itself now */
48 G_GNUC_INTERNAL gboolean _action_check_and_set_printed (GstValidateAction *action);
49 G_GNUC_INTERNAL gboolean gst_validate_action_is_subaction (GstValidateAction *action);
50 G_GNUC_INTERNAL void _priv_validate_override_registry_deinit (void);
51 
52 G_GNUC_INTERNAL GstValidateReportingDetails gst_validate_runner_get_default_reporting_details (GstValidateRunner *runner);
53 
54 G_GNUC_INTERNAL GstValidateMonitor * gst_validate_get_monitor (GObject *object);
55 G_GNUC_INTERNAL void gst_validate_init_runner (void);
56 G_GNUC_INTERNAL void gst_validate_deinit_runner (void);
57 G_GNUC_INTERNAL void gst_validate_report_deinit (void);
58 G_GNUC_INTERNAL gboolean gst_validate_send (JsonNode * root);
59 #endif
60