AC_SUBST(GST_PKG_DEPS)
dnl define an ERROR_CFLAGS Makefile variable
-AG_GST_SET_ERROR_CFLAGS($GST_GIT, [-Wredundant-decls -Wundef])
+AG_GST_SET_ERROR_CFLAGS($GST_GIT, [-Wredundant-decls -Wundef -Wwrite-strings])
dnl define correct level for debugging messages
AG_GST_SET_LEVEL_DEFAULT($GST_GIT)
#ifndef GST_DISABLE_OPTION_PARSING
static void
-split_and_iterate (const gchar * stringlist, gchar * separator,
+split_and_iterate (const gchar * stringlist, const gchar * separator,
GFunc iterator, gpointer user_data)
{
gchar **strings;
{
static const struct
{
- gchar *opt;
+ const gchar *opt;
int val;
} options[] = {
{
#define GST_CAT_DEFAULT GST_CAT_BUFFER_LIST
#define GROUP_START NULL
-static const gpointer STOLEN = "";
+static gconstpointer STOLEN = "";
/**
* GstBufferList:
g_assert (it->last_returned->data != GROUP_START);
buffer = it->last_returned->data;
- it->last_returned->data = STOLEN;
+ it->last_returned->data = (gpointer) STOLEN;
return buffer;
}
}
static void
-debug_dump_pad (GstPad * pad, gchar * color_name, gchar * element_name,
- GstDebugGraphDetails details, FILE * out, const gint indent)
+debug_dump_pad (GstPad * pad, const gchar * color_name,
+ const gchar * element_name, GstDebugGraphDetails details, FILE * out,
+ const gint indent)
{
GstPadTemplate *pad_templ;
GstPadPresence presence;
- gchar *pad_name, *style_name;
+ gchar *pad_name;
+ const gchar *style_name;
const gchar *spc = &spaces[MAX (sizeof (spaces) - (1 + indent * 2), 0)];
pad_name = debug_dump_make_object_name (GST_OBJECT (pad));
GstPadDirection dir;
gchar *element_name;
gchar *target_element_name;
- gchar *color_name;
+ const gchar *color_name;
dir = gst_pad_get_direction (pad);
element_name = debug_dump_make_object_name (GST_OBJECT (element));
target_element_name =
debug_dump_make_object_name (GST_OBJECT (target_element));
} else {
- target_element_name = "";
+ target_element_name = g_strdup ("");
}
debug_dump_pad (target_pad, color_name, target_element_name, details,
out, indent);
- if (target_element) {
- g_free (target_element_name);
+ g_free (target_element_name);
+ if (target_element)
gst_object_unref (target_element);
- }
gst_object_unref (target_pad);
}
gst_object_unref (tmp_pad);
}
static gchar *
-debug_dump_describe_caps (GstCaps * caps, GstDebugGraphDetails details,
- gboolean * need_free)
+debug_dump_describe_caps (GstCaps * caps, GstDebugGraphDetails details)
{
gchar *media = NULL;
if (gst_caps_is_any (caps) || gst_caps_is_empty (caps)) {
media = gst_caps_to_string (caps);
- *need_free = TRUE;
} else {
GString *str = NULL;
}
media = g_string_free (str, FALSE);
- *need_free = TRUE;
}
} else {
if (GST_CAPS_IS_SIMPLE (caps))
media =
- (gchar *) gst_structure_get_name (gst_caps_get_structure (caps, 0));
+ g_strdup (gst_structure_get_name (gst_caps_get_structure (caps, 0)));
else
- media = "*";
- *need_free = FALSE;
+ media = g_strdup ("*");
}
return media;
}
GstElement *peer_element, *target_element;
GstPad *peer_pad, *target_pad, *tmp_pad;
GstCaps *caps, *peer_caps;
- gboolean free_caps, free_peer_caps;
- gboolean free_media, free_media_src, free_media_sink;
gchar *media = NULL;
gchar *media_src = NULL, *media_sink = NULL;
gchar *pad_name, *element_name;
const gchar *spc = &spaces[MAX (sizeof (spaces) - (1 + indent * 2), 0)];
if ((peer_pad = gst_pad_get_peer (pad))) {
- free_media = free_media_src = free_media_sink = FALSE;
if ((details & GST_DEBUG_GRAPH_SHOW_MEDIA_TYPE) ||
(details & GST_DEBUG_GRAPH_SHOW_CAPS_DETAILS)
) {
- if ((caps = gst_pad_get_negotiated_caps (pad))) {
- free_caps = TRUE;
- } else {
- free_caps = FALSE;
- if (!(caps = (GstCaps *)
- gst_pad_get_pad_template_caps (pad))) {
- /* this should not happen */
- media = "?";
- }
- }
- if ((peer_caps = gst_pad_get_negotiated_caps (peer_pad))) {
- free_peer_caps = TRUE;
- } else {
- free_peer_caps = FALSE;
- peer_caps = (GstCaps *) gst_pad_get_pad_template_caps (peer_pad);
- }
- if (caps) {
- media = debug_dump_describe_caps (caps, details, &free_media);
- /* check if peer caps are different */
- if (peer_caps && !gst_caps_is_equal (caps, peer_caps)) {
- gchar *tmp;
- gboolean free_tmp;
-
- tmp = debug_dump_describe_caps (peer_caps, details, &free_tmp);
- if (gst_pad_get_direction (pad) == GST_PAD_SRC) {
- media_src = media;
- free_media_src = free_media;
- media_sink = tmp;
- free_media_sink = free_tmp;
- } else {
- media_src = tmp;
- free_media_src = free_tmp;
- media_sink = media;
- free_media_sink = free_media;
- }
- media = NULL;
- free_media = FALSE;
- }
- if (free_caps) {
- gst_caps_unref (caps);
+ caps = gst_pad_get_negotiated_caps (pad);
+ if (!caps)
+ caps = gst_caps_copy (gst_pad_get_pad_template_caps (pad));
+ peer_caps = gst_pad_get_negotiated_caps (peer_pad);
+ if (!peer_caps)
+ peer_caps = gst_caps_copy (gst_pad_get_pad_template_caps (peer_pad));
+
+ media = debug_dump_describe_caps (caps, details);
+ /* check if peer caps are different */
+ if (peer_caps && !gst_caps_is_equal (caps, peer_caps)) {
+ gchar *tmp;
+
+ tmp = debug_dump_describe_caps (peer_caps, details);
+ if (gst_pad_get_direction (pad) == GST_PAD_SRC) {
+ media_src = media;
+ media_sink = tmp;
+ } else {
+ media_src = tmp;
+ media_sink = media;
}
+ media = NULL;
}
- if (free_peer_caps && peer_caps) {
- gst_caps_unref (peer_caps);
- }
+ gst_caps_unref (peer_caps);
+ gst_caps_unref (caps);
}
pad_name = debug_dump_make_object_name (GST_OBJECT (pad));
if (element) {
element_name = debug_dump_make_object_name (GST_OBJECT (element));
} else {
- element_name = "";
+ element_name = g_strdup ("");
}
peer_pad_name = debug_dump_make_object_name (GST_OBJECT (peer_pad));
if ((peer_element = gst_pad_get_parent_element (peer_pad))) {
peer_element_name =
debug_dump_make_object_name (GST_OBJECT (peer_element));
} else {
- peer_element_name = "";
+ peer_element_name = g_strdup ("");
}
if (GST_IS_GHOST_PAD (pad)) {
target_element_name =
debug_dump_make_object_name (GST_OBJECT (target_element));
} else {
- target_element_name = "";
+ target_element_name = g_strdup ("");
}
/* src ghostpad relationship */
fprintf (out, "%s%s_%s -> %s_%s [style=dashed, minlen=0]\n", spc,
target_element_name, target_pad_name, element_name, pad_name);
g_free (target_pad_name);
- if (target_element) {
- g_free (target_element_name);
+ g_free (target_element_name);
+ if (target_element)
gst_object_unref (target_element);
- }
gst_object_unref (target_pad);
}
gst_object_unref (tmp_pad);
target_element_name =
debug_dump_make_object_name (GST_OBJECT (target_element));
} else {
- target_element_name = "";
+ target_element_name = g_strdup ("");
}
/* sink ghostpad relationship */
fprintf (out, "%s%s_%s -> %s_%s [style=dashed, minlen=0]\n", spc,
debug_dump_element_pad_link (target_pad, target_element, details, out,
indent);
g_free (target_pad_name);
- if (target_element) {
- g_free (target_element_name);
+ g_free (target_element_name);
+ if (target_element)
gst_object_unref (target_element);
- }
gst_object_unref (target_pad);
}
gst_object_unref (tmp_pad);
if (media) {
fprintf (out, "%s%s_%s -> %s_%s [label=\"%s\"]\n", spc,
element_name, pad_name, peer_element_name, peer_pad_name, media);
- if (free_media) {
- g_free (media);
- }
+ g_free (media);
} else if (media_src && media_sink) {
/* dot has some issues with placement of head and taillabels,
* we need an empty label to make space */
"headlabel=\"%s\", taillabel=\"%s\"]\n",
spc, element_name, pad_name, peer_element_name, peer_pad_name,
media_src, media_sink);
- if (free_media_src)
- g_free (media_src);
- if (free_media_sink)
- g_free (media_sink);
+ g_free (media_src);
+ g_free (media_sink);
} else {
fprintf (out, "%s%s_%s -> %s_%s\n", spc,
element_name, pad_name, peer_element_name, peer_pad_name);
}
g_free (pad_name);
- if (element) {
- g_free (element_name);
- }
+ g_free (element_name);
g_free (peer_pad_name);
- if (peer_element) {
- g_free (peer_element_name);
+ g_free (peer_element_name);
+ if (peer_element)
gst_object_unref (peer_element);
- }
gst_object_unref (peer_pad);
}
}
while (standards->nick) {
standards->quark = g_quark_from_static_string (standards->nick);
- g_hash_table_insert (_nick_to_format, standards->nick, standards);
+ g_hash_table_insert (_nick_to_format, (gpointer) standards->nick,
+ standards);
g_hash_table_insert (_format_to_nick, GINT_TO_POINTER (standards->value),
standards);
format->description = g_strdup (description);
format->quark = g_quark_from_static_string (format->nick);
- g_hash_table_insert (_nick_to_format, format->nick, format);
+ g_hash_table_insert (_nick_to_format, (gpointer) format->nick, format);
g_hash_table_insert (_format_to_nick, GINT_TO_POINTER (format->value),
format);
_gst_formats = g_list_append (_gst_formats, format);
*/
struct _GstFormatDefinition
{
- GstFormat value;
- gchar *nick;
- gchar *description;
- GQuark quark;
+ GstFormat value;
+ const gchar *nick;
+ const gchar *description;
+ GQuark quark;
};
const gchar* gst_format_get_name (GstFormat format);
gint pid;
GstClockTime elapsed;
gchar *obj = NULL;
- gboolean free_obj = TRUE;
gboolean is_colored;
if (level > gst_debug_category_get_threshold (category))
if (object) {
obj = gst_debug_print_object (object);
} else {
- obj = "\0";
- free_obj = FALSE;
+ obj = g_strdup ("");
}
if (is_colored) {
#ifndef G_OS_WIN32
/* colors, non-windows */
gchar *color = NULL;
- gchar *clear;
+ const gchar *clear;
gchar pidcolor[10];
const gchar *levelcolor;
#undef PRINT_FMT
}
- if (free_obj)
- g_free (obj);
+ g_free (obj);
}
/**
gst_value_mini_object_free,
gst_value_mini_object_copy,
gst_value_mini_object_peek_pointer,
- "p",
+ (char *) "p",
gst_value_mini_object_collect,
- "p",
+ (char *) "p",
gst_value_mini_object_lcopy
};
GTypeInfo mini_object_info = {
{
GstObject *gst_object, *parent, *old_parent;
guint i;
- gchar *name, *debug_name;
+ gchar *name;
+ const gchar *debug_name;
/* do the standard dispatching */
parent_class->dispatch_properties_changed (object, n_pspecs, pspecs);
gchar *prevpath, *path;
const gchar *typename;
gchar *component;
- gchar *separator;
+ const gchar *separator;
/* ref object before adding to list */
gst_object_ref (object);
struct _GstObjectClass {
GObjectClass parent_class;
- gchar *path_string_separator;
+ const gchar *path_string_separator;
GObject *signal_object;
/* FIXME-0.11: remove this, plus the above GST_CLASS_*_LOCK macros */
const GstPluginDesc * desc, gpointer user_data);
static void gst_plugin_desc_copy (GstPluginDesc * dest,
const GstPluginDesc * src);
-static void gst_plugin_desc_free (GstPluginDesc * desc);
static void gst_plugin_ext_dep_free (GstPluginDep * dep);
}
g_free (plugin->filename);
g_free (plugin->basename);
- gst_plugin_desc_free (&plugin->desc);
g_list_foreach (plugin->priv->deps, (GFunc) gst_plugin_ext_dep_free, NULL);
g_list_free (plugin->priv->deps);
*/
gboolean
gst_plugin_register_static (gint major_version, gint minor_version,
- const gchar * name, gchar * description, GstPluginInitFunc init_func,
+ const gchar * name, const gchar * description, GstPluginInitFunc init_func,
const gchar * version, const gchar * license, const gchar * source,
const gchar * package, const gchar * origin)
{
*/
gboolean
gst_plugin_register_static_full (gint major_version, gint minor_version,
- const gchar * name, gchar * description,
+ const gchar * name, const gchar * description,
GstPluginInitFullFunc init_full_func, const gchar * version,
const gchar * license, const gchar * source, const gchar * package,
const gchar * origin, gpointer user_data)
CHECK_PLUGIN_DESC_FIELD (plugin->orig_desc, source, filename);
CHECK_PLUGIN_DESC_FIELD (plugin->orig_desc, package, filename);
CHECK_PLUGIN_DESC_FIELD (plugin->orig_desc, origin, filename);
- } else {
- /* this is overwritten by gst_plugin_register_func() */
- g_free (plugin->desc.description);
}
GST_LOG ("Plugin %p for file \"%s\" prepared, calling entry function...",
dest->major_version = src->major_version;
dest->minor_version = src->minor_version;
dest->name = g_intern_string (src->name);
- /* maybe intern the description too, just for convenience? */
- dest->description = g_strdup (src->description);
+ dest->description = g_intern_string (src->description);
dest->plugin_init = src->plugin_init;
dest->version = g_intern_string (src->version);
dest->license = g_intern_string (src->license);
dest->origin = g_intern_string (src->origin);
}
-/* unused */
-static void
-gst_plugin_desc_free (GstPluginDesc * desc)
-{
- g_free (desc->description);
- memset (desc, 0, sizeof (GstPluginDesc));
-}
-
/**
* gst_plugin_get_name:
* @plugin: plugin to get the name of
gint major_version;
gint minor_version;
const gchar *name;
- gchar *description;
+ const gchar *description;
GstPluginInitFunc plugin_init;
const gchar *version;
const gchar *license;
gboolean gst_plugin_register_static (gint major_version,
gint minor_version,
const gchar *name,
- gchar *description,
+ const gchar *description,
GstPluginInitFunc init_func,
const gchar *version,
const gchar *license,
gboolean gst_plugin_register_static_full (gint major_version,
gint minor_version,
const gchar *name,
- gchar *description,
+ const gchar *description,
GstPluginInitFullFunc init_full_func,
const gchar *version,
const gchar *license,
static gboolean
gst_plugin_loader_try_helper (GstPluginLoader * loader, gchar * location)
{
- char *argv[] = { location, "-l", NULL };
+ char *argv[] = { location, (char *) "-l", NULL };
GST_LOG ("Trying to spawn gst-plugin-scanner helper at %s", location);
if (!g_spawn_async_with_pipes (NULL, argv, NULL,
while (standards->nick) {
standards->quark = g_quark_from_static_string (standards->nick);
- g_hash_table_insert (_nick_to_query, standards->nick, standards);
+ g_hash_table_insert (_nick_to_query, (gpointer) standards->nick, standards);
g_hash_table_insert (_query_type_to_nick,
GINT_TO_POINTER (standards->value), standards);
query->quark = g_quark_from_static_string (query->nick);
g_static_mutex_lock (&mutex);
- g_hash_table_insert (_nick_to_query, query->nick, query);
+ g_hash_table_insert (_nick_to_query, (gpointer) query->nick, query);
g_hash_table_insert (_query_type_to_nick, GINT_TO_POINTER (query->value),
query);
_gst_queries = g_list_append (_gst_queries, query);
struct _GstQueryTypeDefinition
{
GstQueryType value;
- gchar *nick;
- gchar *description;
+ const gchar *nick;
+ const gchar *description;
GQuark quark;
};
typedef struct _GstStructureAbbreviation
{
- gchar *type_name;
+ const gchar *type_name;
GType type;
}
GstStructureAbbreviation;
* Returns: a new #GstTrace.
*/
GstTrace *
-gst_trace_new (gchar * filename, gint size)
+gst_trace_new (const gchar * filename, gint size)
{
GstTrace *trace = g_malloc (sizeof (GstTrace));
gchar message[112];
};
-GstTrace* gst_trace_new (gchar *filename, gint size);
+GstTrace* gst_trace_new (const gchar *filename, gint size);
void gst_trace_destroy (GstTrace *trace);
void gst_trace_flush (GstTrace *trace);
NULL,
gst_value_copy_fourcc,
NULL,
- "i",
+ (char *) "i",
gst_value_collect_fourcc,
- "p",
+ (char *) "p",
gst_value_lcopy_fourcc
};
NULL,
gst_value_copy_int_range,
NULL,
- "ii",
+ (char *) "ii",
gst_value_collect_int_range,
- "pp",
+ (char *) "pp",
gst_value_lcopy_int_range
};
NULL,
gst_value_copy_double_range,
NULL,
- "dd",
+ (char *) "dd",
gst_value_collect_double_range,
- "pp",
+ (char *) "pp",
gst_value_lcopy_double_range
};
gst_value_free_fraction_range,
gst_value_copy_fraction_range,
NULL,
- "iiii",
+ (char *) "iiii",
gst_value_collect_fraction_range,
- "pppp",
+ (char *) "pppp",
gst_value_lcopy_fraction_range
};
gst_value_free_list_or_array,
gst_value_copy_list_or_array,
gst_value_list_or_array_peek_pointer,
- "p",
+ (char *) "p",
gst_value_collect_list_or_array,
- "p",
+ (char *) "p",
gst_value_lcopy_list_or_array
};
gst_value_free_list_or_array,
gst_value_copy_list_or_array,
gst_value_list_or_array_peek_pointer,
- "p",
+ (char *) "p",
gst_value_collect_list_or_array,
- "p",
+ (char *) "p",
gst_value_lcopy_list_or_array
};
NULL,
gst_value_copy_fraction,
NULL,
- "ii",
+ (char *) "ii",
gst_value_collect_fraction,
- "pp",
+ (char *) "pp",
gst_value_lcopy_fraction
};
GstPad *
gst_check_setup_src_pad_by_name (GstElement * element,
- GstStaticPadTemplate * template, gchar * name)
+ GstStaticPadTemplate * template, const gchar * name)
{
GstPad *srcpad, *sinkpad;
}
void
-gst_check_teardown_pad_by_name (GstElement * element, gchar * name)
+gst_check_teardown_pad_by_name (GstElement * element, const gchar * name)
{
GstPad *pad_peer, *pad_element;
GstPad *
gst_check_setup_sink_pad_by_name (GstElement * element,
- GstStaticPadTemplate * template, gchar * name)
+ GstStaticPadTemplate * template, const gchar * name)
{
GstPad *srcpad, *sinkpad;
typedef struct
{
- char *name;
+ const char *name;
int size;
int abi_size;
}
GstPad *gst_check_setup_src_pad (GstElement * element,
GstStaticPadTemplate * template, GstCaps * caps);
GstPad * gst_check_setup_src_pad_by_name (GstElement * element,
- GstStaticPadTemplate * template, gchar *name);
+ GstStaticPadTemplate * template, const gchar *name);
GstPad * gst_check_setup_sink_pad_by_name (GstElement * element,
- GstStaticPadTemplate * template, gchar *name);
-void gst_check_teardown_pad_by_name (GstElement * element, gchar *name);
+ GstStaticPadTemplate * template, const gchar *name);
+void gst_check_teardown_pad_by_name (GstElement * element, const gchar *name);
void gst_check_teardown_src_pad (GstElement * element);
void gst_check_drop_buffers ();
void gst_check_caps_equal (GstCaps * caps1, GstCaps * caps2);
*/
static GstController *
gst_controller_add_property (GstController * self, GObject * object,
- gchar * name, gboolean * ref_existing)
+ const gchar * name, gboolean * ref_existing)
{
/* test if this property isn't yet controlled */
if (!self || !gst_controller_find_controlled_property (self, name)) {
void
gst_controller_set_property_disabled (GstController * self,
- gchar * property_name, gboolean disabled)
+ const gchar * property_name, gboolean disabled)
{
GstControlledProperty *prop;
* Since: 0.10.14
*/
gboolean
-gst_controller_set_control_source (GstController * self, gchar * property_name,
- GstControlSource * csource)
+gst_controller_set_control_source (GstController * self,
+ const gchar * property_name, GstControlSource * csource)
{
GstControlledProperty *prop;
gboolean ret = FALSE;
* Since: 0.10.14
*/
GstControlSource *
-gst_controller_get_control_source (GstController * self, gchar * property_name)
+gst_controller_get_control_source (GstController * self,
+ const gchar * property_name)
{
GstControlledProperty *prop;
GstControlSource *ret = NULL;
* property isn't handled by the controller
*/
GValue *
-gst_controller_get (GstController * self, gchar * property_name,
+gst_controller_get (GstController * self, const gchar * property_name,
GstClockTime timestamp)
{
GstControlledProperty *prop;
*/
#ifndef GST_REMOVE_DEPRECATED
gboolean
-gst_controller_set (GstController * self, gchar * property_name,
+gst_controller_set (GstController * self, const gchar * property_name,
GstClockTime timestamp, GValue * value)
{
gboolean res = FALSE;
*/
#ifndef GST_REMOVE_DEPRECATED
gboolean
-gst_controller_set_from_list (GstController * self, gchar * property_name,
+gst_controller_set_from_list (GstController * self, const gchar * property_name,
GSList * timedvalues)
{
gboolean res = FALSE;
*/
#ifndef GST_REMOVE_DEPRECATED
gboolean
-gst_controller_unset (GstController * self, gchar * property_name,
+gst_controller_unset (GstController * self, const gchar * property_name,
GstClockTime timestamp)
{
gboolean res = FALSE;
*/
#ifndef GST_REMOVE_DEPRECATED
gboolean
-gst_controller_unset_all (GstController * self, gchar * property_name)
+gst_controller_unset_all (GstController * self, const gchar * property_name)
{
GstControlledProperty *prop;
*/
#ifndef GST_REMOVE_DEPRECATED
const GList *
-gst_controller_get_all (GstController * self, gchar * property_name)
+gst_controller_get_all (GstController * self, const gchar * property_name)
{
const GList *res = NULL;
GstControlledProperty *prop;
#ifndef GST_REMOVE_DEPRECATED
gboolean
gst_controller_set_interpolation_mode (GstController * self,
- gchar * property_name, GstInterpolateMode mode)
+ const gchar * property_name, GstInterpolateMode mode)
{
gboolean res = FALSE;
GstControlledProperty *prop;
gboolean gst_controller_remove_properties (GstController * self, ...) G_GNUC_NULL_TERMINATED;
void gst_controller_set_disabled (GstController *self, gboolean disabled);
-void gst_controller_set_property_disabled (GstController *self, gchar * property_name, gboolean disabled);
-gboolean gst_controller_set_control_source (GstController *self, gchar * property_name, GstControlSource *csource);
-GstControlSource * gst_controller_get_control_source (GstController *self, gchar * property_name);
+void gst_controller_set_property_disabled (GstController *self, const gchar * property_name, gboolean disabled);
+gboolean gst_controller_set_control_source (GstController *self, const gchar * property_name, GstControlSource *csource);
+GstControlSource * gst_controller_get_control_source (GstController *self, const gchar * property_name);
GstClockTime gst_controller_suggest_next_sync (GstController *self);
gboolean gst_controller_sync_values (GstController * self,
GstClockTime timestamp);
-GValue *gst_controller_get (GstController * self, gchar * property_name,
+GValue *gst_controller_get (GstController * self, const gchar * property_name,
GstClockTime timestamp);
gboolean gst_controller_get_value_arrays (GstController * self,
GstClockTime timestamp, GSList * value_arrays);
GstClockTime gst_object_suggest_next_sync (GObject * object);
gboolean gst_object_sync_values (GObject * object, GstClockTime timestamp);
-gboolean gst_object_set_control_source (GObject *object, gchar * property_name, GstControlSource *csource);
-GstControlSource * gst_object_get_control_source (GObject *object, gchar * property_name);
+gboolean gst_object_set_control_source (GObject *object, const gchar * property_name, GstControlSource *csource);
+GstControlSource * gst_object_get_control_source (GObject *object, const gchar * property_name);
gboolean gst_object_get_value_arrays (GObject * object,
GstClockTime timestamp, GSList * value_arrays);
/* FIXME: deprecated functions */
#ifndef GST_DISABLE_DEPRECATED
-gboolean gst_controller_set (GstController * self, gchar * property_name,
+gboolean gst_controller_set (GstController * self, const gchar * property_name,
GstClockTime timestamp, GValue * value);
gboolean gst_controller_set_from_list (GstController * self,
- gchar * property_name, GSList * timedvalues);
+ const gchar * property_name, GSList * timedvalues);
-gboolean gst_controller_unset (GstController * self, gchar * property_name,
+gboolean gst_controller_unset (GstController * self, const gchar * property_name,
GstClockTime timestamp);
-gboolean gst_controller_unset_all (GstController * self, gchar * property_name);
+gboolean gst_controller_unset_all (GstController * self, const gchar * property_name);
const GList *gst_controller_get_all (GstController * self,
- gchar * property_name);
+ const gchar * property_name);
gboolean gst_controller_set_interpolation_mode (GstController * self,
- gchar * property_name, GstInterpolateMode mode);
+ const gchar * property_name, GstInterpolateMode mode);
#endif /* GST_DISABLE_DEPRECATED */
G_END_DECLS
* Since: 0.10.14
*/
gboolean
-gst_object_set_control_source (GObject * object, gchar * property_name,
+gst_object_set_control_source (GObject * object, const gchar * property_name,
GstControlSource * csource)
{
GstController *ctrl = NULL;
* Since: 0.10.14
*/
GstControlSource *
-gst_object_get_control_source (GObject * object, gchar * property_name)
+gst_object_get_control_source (GObject * object, const gchar * property_name)
{
GstController *ctrl = NULL;
my_argc = 2;
my_argv = g_malloc (my_argc * sizeof (char *));
my_argv[0] = argv[0];
- my_argv[1] = "--gst-disable-registry-update";
+ my_argv[1] = (char *) "--gst-disable-registry-update";
#ifndef GST_DISABLE_REGISTRY
_gst_disable_registry_cache = TRUE;
static gchar **
gst_fd_sink_uri_get_protocols (void)
{
- static gchar *protocols[] = { "fd", NULL };
+ static gchar *protocols[] = { (char *) "fd", NULL };
return protocols;
}
static gchar **
gst_fd_src_uri_get_protocols (void)
{
- static gchar *protocols[] = { "fd", NULL };
+ static gchar *protocols[] = { (char *) "fd", NULL };
return protocols;
}
static gchar **
gst_file_sink_uri_get_protocols (void)
{
- static gchar *protocols[] = { "file", NULL };
+ static gchar *protocols[] = { (char *) "file", NULL };
return protocols;
}
static gchar **
gst_file_src_uri_get_protocols (void)
{
- static gchar *protocols[] = { "file", NULL };
+ static gchar *protocols[] = { (char *) "file", NULL };
return protocols;
}
{
GstClockTime sample_duration =
gst_util_uint64_scale_int (1, GST_SECOND, 44100);
- GstValueArray va = { "freq",
+ GstValueArray va = { (char *) "freq",
BLOCK_SIZE * NUM_CP,
sample_duration,
NULL
GstElement *pipeline, *src, *sink, *current, *last;
guint i, buffers = BUFFER_COUNT, identities = IDENTITY_COUNT;
GstClockTime start, end;
- gchar *src_name = SRC_ELEMENT, *sink_name = SINK_ELEMENT;
+ const gchar *src_name = SRC_ELEMENT, *sink_name = SINK_ELEMENT;
gst_init (&argc, &argv);
{
GstElement *pipeline;
GstElement *tee;
- gchar *desc;
+ const gchar *desc;
GstBus *bus;
GstMessage *msg;
gint i;
}
static GstBuffer *
-buffer_from_string (gchar * str)
+buffer_from_string (const gchar * str)
{
guint size;
GstBuffer *buf;
gst_buffer_list_iterator_do (it,
(GstBufferListDoFunction) gst_buffer_ref, NULL)));
fail_unless (buf == NULL);
- data = "data";
+ data = (char *) "data";
ASSERT_CRITICAL ((buf = gst_buffer_list_iterator_do (it, do_data_func,
data)));
fail_unless (buf == NULL);
GST_END_TEST;
static GstBuffer *
-buffer_from_string (gchar * str)
+buffer_from_string (const gchar * str)
{
guint size;
GstBuffer *buf;
static void
gst_preset_test_base_init (GstPresetTestClass * klass)
{
- static const GstElementDetails details = {
- "Element for unit tests",
- "Testing",
- "Use in unit tests",
- "Stefan Kost <stefan.kost@nokia.com>"
- };
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
- gst_element_class_set_details (element_class, &details);
+ gst_element_class_set_details_simple (element_class,
+ "Element for unit tests",
+ "Testing", "Use in unit tests", "Stefan Kost <stefan.kost@nokia.com>");
}
static GType
GST_START_TEST (test_structure_nested_from_and_to_string)
{
GstStructure *s;
- gchar *str1, *str2, *end = NULL;
+ const gchar *str1;
+ gchar *str2, *end = NULL;
str1 = "main"
", main-sub1=(structure)\"type-b\\,\\ machine-type\\=\\(int\\)0\\;\""
/* checks that a tag contains the given values and not more values */
static void
-check_tags (const GstTagList * list, const gchar * tag, gchar * value, ...)
+check_tags (const GstTagList * list, const gchar * tag, const gchar * value,
+ ...)
{
va_list args;
gchar *str;
GST_START_TEST (test_string)
{
- gchar *try[] = {
+ const gchar *try[] = {
"Dude",
"Hi, I'm a string",
"tüüüt!",
{
struct
{
- gchar *from;
- gchar *to;
+ const gchar *from;
+ const gchar *to;
} tests[] = {
{
"", ""}, /* empty strings */
static void
gst_test_mono_source_base_init (GstTestMonoSourceClass * klass)
{
- static const GstElementDetails details = {
- "Monophonic source for unit tests",
- "Source/Audio/MonoSource",
- "Use in unit tests",
- "Stefan Kost <ensonic@users.sf.net>"
- };
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
- gst_element_class_set_details (element_class, &details);
+ gst_element_class_set_details_simple (element_class,
+ "Monophonic source for unit tests",
+ "Source/Audio/MonoSource",
+ "Use in unit tests", "Stefan Kost <ensonic@users.sf.net>");
}
static GType
fail_unless (res, NULL);
/* now pull in values for some timestamps */
- values.property_name = "ulong";
+ values.property_name = (char *) "ulong";
values.nbsamples = 3;
values.sample_interval = GST_SECOND;
values.values = (gpointer) g_new (gulong, 3);
/* that property should exist and should be controllable */
elem = gst_element_factory_make ("testmonosource", "test_source");
- list = g_list_append (NULL, "ulong");
+ list = g_list_append (NULL, (char *) "ulong");
ctrl = gst_controller_new_list (G_OBJECT (elem), list);
fail_unless (ctrl != NULL, NULL);
GST_INFO ("controller->ref_count=%d", G_OBJECT (ctrl)->ref_count);
/* try the same property twice, make sure the refcount is still 1 */
elem = gst_element_factory_make ("testmonosource", "test_source");
- list = g_list_append (NULL, "ulong");
- list = g_list_append (list, "ulong");
+ list = g_list_append (NULL, (char *) "ulong");
+ list = g_list_append (list, (char *) "ulong");
ctrl = gst_controller_new_list (G_OBJECT (elem), list);
fail_unless (ctrl != NULL, NULL);
GST_INFO ("controller->ref_count=%d", G_OBJECT (ctrl)->ref_count);
/* try two properties, make sure the refcount is still 1 */
elem = gst_element_factory_make ("testmonosource", "test_source");
- list = g_list_append (NULL, "ulong");
- list = g_list_append (list, "boolean");
+ list = g_list_append (NULL, (char *) "ulong");
+ list = g_list_append (list, (char *) "boolean");
ctrl = gst_controller_new_list (G_OBJECT (elem), list);
fail_unless (ctrl != NULL, NULL);
GST_INFO ("controller->ref_count=%d", G_OBJECT (ctrl)->ref_count);
ctrl = gst_controller_new (G_OBJECT (elem), "ulong", NULL);
fail_unless (ctrl != NULL, NULL);
GST_INFO ("controller->ref_count=%d", G_OBJECT (ctrl)->ref_count);
- list = g_list_append (NULL, "ulong");
+ list = g_list_append (NULL, (char *) "ulong");
ctrl2 = gst_controller_new_list (G_OBJECT (elem), list);
fail_unless (ctrl2 != NULL, NULL);
fail_unless (ctrl == ctrl2, NULL);
/* try _new_list first and then _new */
elem = gst_element_factory_make ("testmonosource", "test_source");
- list = g_list_append (NULL, "ulong");
+ list = g_list_append (NULL, (char *) "ulong");
ctrl = gst_controller_new_list (G_OBJECT (elem), list);
fail_unless (ctrl != NULL, NULL);
GST_INFO ("controller->ref_count=%d", G_OBJECT (ctrl)->ref_count);
/* make sure the entire data in the buffer is available for peeking */
GST_START_TEST (test_buffer_range)
{
- static gchar *foobar_exts[] = { "foobar", NULL };
+ static const gchar *foobar_exts[] = { "foobar", NULL };
GstStructure *s;
GstBuffer *buf;
static GstElement *
-setup_pipeline (gchar * pipe_descr)
+setup_pipeline (const gchar * pipe_descr)
{
GstElement *pipeline;
the poll call will time out after half a second.
*/
static void
-run_pipeline (GstElement * pipeline, gchar * descr,
+run_pipeline (GstElement * pipeline, const gchar * descr,
GstMessageType events, GstMessageType tevent)
{
GstBus *bus;
GST_START_TEST (test_pipeline_unref)
{
- gchar *s;
+ const gchar *s;
GstElement *pipeline, *src, *sink;
s = "fakesrc name=src num-buffers=20 ! fakesink name=sink";
gst_parse_test_element_base_init (gpointer g_class)
{
static const GstElementDetails cdfoo_details =
- GST_ELEMENT_DETAILS ("Test element for parse launch tests",
- "Source",
- "Test element for parse launch tests in core",
- "GStreamer Devel <gstreamer-devel@lists.sf.net>");
+ GST_ELEMENT_DETAILS ((char *) "Test element for parse launch tests",
+ (char *) "Source",
+ (char *) "Test element for parse launch tests in core",
+ (char *) "GStreamer Devel <gstreamer-devel@lists.sf.net>");
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_set_details (element_class, &cdfoo_details);
static GstElement *
-setup_pipeline (gchar * pipe_descr)
+setup_pipeline (const gchar * pipe_descr)
{
GstElement *pipeline;
* the poll call will time out after half a second.
*/
static void
-run_pipeline (GstElement * pipeline, gchar * descr,
+run_pipeline (GstElement * pipeline, const gchar * descr,
GstMessageType message_types, GstMessageType tmessage)
{
GstBus *bus;
GST_START_TEST (test_2_elements)
{
- gchar *s;
+ const gchar *s;
s = "fakesrc can-activate-push=false ! fakesink can-activate-pull=true";
run_pipeline (setup_pipeline (s), s,
GST_START_TEST (test_state_change_returns)
{
- gchar *s;
+ const gchar *s;
GstElement *pipeline;
s = "fakesrc can-activate-pull=false ! fakesink";
G_GNUC_UNUSED
GST_START_TEST (test_tee)
{
- gchar *s;
+ const gchar *s;
s = "fakesrc can-activate-push=true ! tee ! fakesink can-activate-push=true";
run_pipeline (setup_pipeline (s), s,
}
#endif
-static char *
+static const char *
get_rank_name (gint rank)
{
switch (rank) {