1 /* GStreamer 2 * 3 * Copyright (C) 2013 Thibault Saunier <thibault.saunier@collabora.com> 4 * 5 * gst-validate-utils.h - Some utility functions 6 * 7 * This library is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU Library General Public 9 * License as published by the Free Software Foundation; either 10 * version 2.1 of the License, or (at your option) any later version. 11 * 12 * This library is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * Library General Public License for more details. 16 * 17 * You should have received a copy of the GNU Library General Public 18 * License along with this library; if not, write to the 19 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 20 * Boston, MA 02111-1307, USA. 21 */ 22 23 #ifndef EXPRESSION_PARSER_H 24 #define EXPRESSION_PARSER_H 25 26 #include<setjmp.h> 27 #include<stdlib.h> 28 #include<glib.h> 29 #include<gio/gio.h> 30 #include <gst/gst.h> 31 #include "gst-validate-scenario.h" 32 #include "gst-validate-reporter.h" 33 34 typedef int (*GstValidateParseVariableFunc) (const gchar *name, 35 double *value, gpointer user_data); 36 37 GST_VALIDATE_API 38 gdouble gst_validate_utils_parse_expression (const gchar *expr, 39 GstValidateParseVariableFunc variable_func, 40 gpointer user_data, 41 gchar **error); 42 GST_VALIDATE_API 43 guint gst_validate_utils_flags_from_str (GType type, const gchar * str_flags); 44 GST_VALIDATE_API 45 gboolean gst_validate_utils_enum_from_str (GType type, 46 const gchar * str_enum, 47 guint * enum_value); 48 49 GST_VALIDATE_API 50 GList * gst_validate_utils_structs_parse_from_filename (const gchar * scenario_file); 51 GST_VALIDATE_API 52 GList * gst_validate_structs_parse_from_gfile (GFile * scenario_file); 53 54 GST_VALIDATE_API 55 gboolean gst_validate_element_has_klass (GstElement * element, const gchar * klass); 56 GST_VALIDATE_API 57 gboolean gst_validate_utils_get_clocktime (GstStructure *structure, const gchar * name, 58 GstClockTime * retval); 59 60 GST_VALIDATE_API 61 GstValidateActionReturn gst_validate_object_set_property (GstValidateReporter * reporter, 62 GObject * object, 63 const gchar * property, 64 const GValue * value, 65 gboolean optional); 66 67 GST_VALIDATE_API 68 void gst_validate_spin_on_fault_signals (void); 69 70 GST_VALIDATE_API 71 gboolean gst_validate_element_matches_target (GstElement * element, GstStructure * s); 72 73 #endif 74