Merge branch 'work'

This commit is contained in:
Benjamin Otte 2010-03-10 20:52:06 +01:00
commit 7022923326
74 changed files with 196 additions and 317 deletions

View file

@ -578,7 +578,7 @@ GST_PKG_DEPS="glib-2.0, gobject-2.0, gmodule-no-export-2.0, gthread-2.0"
AC_SUBST(GST_PKG_DEPS) AC_SUBST(GST_PKG_DEPS)
dnl define an ERROR_CFLAGS Makefile variable dnl define an ERROR_CFLAGS Makefile variable
AG_GST_SET_ERROR_CFLAGS($GST_GIT) AG_GST_SET_ERROR_CFLAGS($GST_GIT, [-Wredundant-decls -Wundef -Wwrite-strings])
dnl define correct level for debugging messages dnl define correct level for debugging messages
AG_GST_SET_LEVEL_DEFAULT($GST_GIT) AG_GST_SET_LEVEL_DEFAULT($GST_GIT)
@ -613,7 +613,7 @@ AC_SUBST(DEPRECATED_CFLAGS)
dnl every flag in GST_OPTION_CFLAGS can be overridden at make time via e.g. dnl every flag in GST_OPTION_CFLAGS can be overridden at make time via e.g.
dnl make DEPRECATED_CFLAGS='' dnl make DEPRECATED_CFLAGS=''
GST_OPTION_CFLAGS="\$(ERROR_CFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)" GST_OPTION_CFLAGS="\$(WARNING_CFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
AC_SUBST(GST_OPTION_CFLAGS) AC_SUBST(GST_OPTION_CFLAGS)
dnl GST_ALL_* dnl GST_ALL_*
@ -624,7 +624,7 @@ dnl - src and build dirs need to be added because every piece that gets built
dnl will need the GStreamer source and generated headers dnl will need the GStreamer source and generated headers
dnl LIBS: XML doesn't need to be added because we don't explicitly use symbols dnl LIBS: XML doesn't need to be added because we don't explicitly use symbols
dnl from LibXML except for in the core library dnl from LibXML except for in the core library
GST_ALL_CFLAGS="-I\$(top_srcdir)/libs -I\$(top_srcdir) -I\$(top_builddir)/libs -I\$(top_builddir) $GLIB_CFLAGS $XML_CFLAGS \$(GST_OPTION_CFLAGS) -DG_THREADS_MANDATORY" GST_ALL_CFLAGS="-I\$(top_srcdir)/libs -I\$(top_srcdir) -I\$(top_builddir)/libs -I\$(top_builddir) $GLIB_CFLAGS $XML_CFLAGS \$(GST_OPTION_CFLAGS) \$(ERROR_CFLAGS) -DG_THREADS_MANDATORY"
dnl FIXME: check if LTLIBINTL is needed everywhere dnl FIXME: check if LTLIBINTL is needed everywhere
dnl I presume it is given that it contains the symbols that _() stuff maps to dnl I presume it is given that it contains the symbols that _() stuff maps to

View file

@ -1962,8 +1962,6 @@ gst_registry_find_feature
gst_registry_lookup_feature gst_registry_lookup_feature
gst_registry_add_path gst_registry_add_path
gst_registry_scan_path gst_registry_scan_path
gst_registry_binary_read_cache
gst_registry_binary_write_cache
gst_registry_lookup gst_registry_lookup
gst_registry_remove_feature gst_registry_remove_feature
gst_registry_add_feature gst_registry_add_feature

View file

@ -528,7 +528,7 @@ prepare_for_load_plugin_func (gpointer data, gpointer user_data)
#ifndef GST_DISABLE_OPTION_PARSING #ifndef GST_DISABLE_OPTION_PARSING
static void static void
split_and_iterate (const gchar * stringlist, gchar * separator, split_and_iterate (const gchar * stringlist, const gchar * separator,
GFunc iterator, gpointer user_data) GFunc iterator, gpointer user_data)
{ {
gchar **strings; gchar **strings;
@ -957,7 +957,7 @@ parse_goption_arg (const gchar * opt,
{ {
static const struct static const struct
{ {
gchar *opt; const gchar *opt;
int val; int val;
} options[] = { } options[] = {
{ {
@ -1148,7 +1148,7 @@ gst_version (guint * major, guint * minor, guint * micro, guint * nano)
*/ */
gchar * gchar *
gst_version_string () gst_version_string (void)
{ {
guint major, minor, micro, nano; guint major, minor, micro, nano;

View file

@ -119,6 +119,7 @@
#include "gstinfo.h" #include "gstinfo.h"
#include "gstutils.h" #include "gstutils.h"
#include "gstminiobject.h" #include "gstminiobject.h"
#include "gstversion.h"
static void gst_buffer_finalize (GstBuffer * buffer); static void gst_buffer_finalize (GstBuffer * buffer);
static GstBuffer *_gst_buffer_copy (GstBuffer * buffer); static GstBuffer *_gst_buffer_copy (GstBuffer * buffer);

View file

@ -128,7 +128,7 @@
#define GST_CAT_DEFAULT GST_CAT_BUFFER_LIST #define GST_CAT_DEFAULT GST_CAT_BUFFER_LIST
#define GROUP_START NULL #define GROUP_START NULL
static const gpointer STOLEN = ""; static gconstpointer STOLEN = "";
/** /**
* GstBufferList: * GstBufferList:
@ -736,7 +736,7 @@ gst_buffer_list_iterator_steal (GstBufferListIterator * it)
g_assert (it->last_returned->data != GROUP_START); g_assert (it->last_returned->data != GROUP_START);
buffer = it->last_returned->data; buffer = it->last_returned->data;
it->last_returned->data = STOLEN; it->last_returned->data = (gpointer) STOLEN;
return buffer; return buffer;
} }

View file

@ -88,8 +88,6 @@ enum
LAST_SIGNAL LAST_SIGNAL
}; };
static void gst_bus_class_init (GstBusClass * klass);
static void gst_bus_init (GstBus * bus);
static void gst_bus_dispose (GObject * object); static void gst_bus_dispose (GObject * object);
static void gst_bus_set_main_context (GstBus * bus, GMainContext * ctx); static void gst_bus_set_main_context (GstBus * bus, GMainContext * ctx);

View file

@ -167,8 +167,6 @@ G_STMT_START { \
GST_OBJECT_UNLOCK (clock); \ GST_OBJECT_UNLOCK (clock); \
} G_STMT_END; } G_STMT_END;
static void gst_clock_class_init (GstClockClass * klass);
static void gst_clock_init (GstClock * clock);
static void gst_clock_dispose (GObject * object); static void gst_clock_dispose (GObject * object);
static void gst_clock_finalize (GObject * object); static void gst_clock_finalize (GObject * object);

View file

@ -136,12 +136,14 @@ debug_dump_get_element_params (GstElement * element)
} }
static void static void
debug_dump_pad (GstPad * pad, gchar * color_name, gchar * element_name, debug_dump_pad (GstPad * pad, const gchar * color_name,
GstDebugGraphDetails details, FILE * out, const gint indent) const gchar * element_name, GstDebugGraphDetails details, FILE * out,
const gint indent)
{ {
GstPadTemplate *pad_templ; GstPadTemplate *pad_templ;
GstPadPresence presence; 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)]; const gchar *spc = &spaces[MAX (sizeof (spaces) - (1 + indent * 2), 0)];
pad_name = debug_dump_make_object_name (GST_OBJECT (pad)); pad_name = debug_dump_make_object_name (GST_OBJECT (pad));
@ -191,7 +193,7 @@ debug_dump_element_pad (GstPad * pad, GstElement * element,
GstPadDirection dir; GstPadDirection dir;
gchar *element_name; gchar *element_name;
gchar *target_element_name; gchar *target_element_name;
gchar *color_name; const gchar *color_name;
dir = gst_pad_get_direction (pad); dir = gst_pad_get_direction (pad);
element_name = debug_dump_make_object_name (GST_OBJECT (element)); element_name = debug_dump_make_object_name (GST_OBJECT (element));
@ -206,14 +208,13 @@ debug_dump_element_pad (GstPad * pad, GstElement * element,
target_element_name = target_element_name =
debug_dump_make_object_name (GST_OBJECT (target_element)); debug_dump_make_object_name (GST_OBJECT (target_element));
} else { } else {
target_element_name = ""; target_element_name = g_strdup ("");
} }
debug_dump_pad (target_pad, color_name, target_element_name, details, debug_dump_pad (target_pad, color_name, target_element_name, details,
out, indent); 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_element);
}
gst_object_unref (target_pad); gst_object_unref (target_pad);
} }
gst_object_unref (tmp_pad); gst_object_unref (tmp_pad);
@ -265,8 +266,7 @@ string_append_field (GQuark field, const GValue * value, gpointer ptr)
} }
static gchar * static gchar *
debug_dump_describe_caps (GstCaps * caps, GstDebugGraphDetails details, debug_dump_describe_caps (GstCaps * caps, GstDebugGraphDetails details)
gboolean * need_free)
{ {
gchar *media = NULL; gchar *media = NULL;
@ -274,7 +274,6 @@ debug_dump_describe_caps (GstCaps * caps, GstDebugGraphDetails details,
if (gst_caps_is_any (caps) || gst_caps_is_empty (caps)) { if (gst_caps_is_any (caps) || gst_caps_is_empty (caps)) {
media = gst_caps_to_string (caps); media = gst_caps_to_string (caps);
*need_free = TRUE;
} else { } else {
GString *str = NULL; GString *str = NULL;
@ -297,16 +296,14 @@ debug_dump_describe_caps (GstCaps * caps, GstDebugGraphDetails details,
} }
media = g_string_free (str, FALSE); media = g_string_free (str, FALSE);
*need_free = TRUE;
} }
} else { } else {
if (GST_CAPS_IS_SIMPLE (caps)) if (GST_CAPS_IS_SIMPLE (caps))
media = 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 else
media = "*"; media = g_strdup ("*");
*need_free = FALSE;
} }
return media; return media;
} }
@ -318,8 +315,6 @@ debug_dump_element_pad_link (GstPad * pad, GstElement * element,
GstElement *peer_element, *target_element; GstElement *peer_element, *target_element;
GstPad *peer_pad, *target_pad, *tmp_pad; GstPad *peer_pad, *target_pad, *tmp_pad;
GstCaps *caps, *peer_caps; GstCaps *caps, *peer_caps;
gboolean free_caps, free_peer_caps;
gboolean free_media, free_media_src, free_media_sink;
gchar *media = NULL; gchar *media = NULL;
gchar *media_src = NULL, *media_sink = NULL; gchar *media_src = NULL, *media_sink = NULL;
gchar *pad_name, *element_name; gchar *pad_name, *element_name;
@ -328,69 +323,47 @@ debug_dump_element_pad_link (GstPad * pad, GstElement * element,
const gchar *spc = &spaces[MAX (sizeof (spaces) - (1 + indent * 2), 0)]; const gchar *spc = &spaces[MAX (sizeof (spaces) - (1 + indent * 2), 0)];
if ((peer_pad = gst_pad_get_peer (pad))) { 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) || if ((details & GST_DEBUG_GRAPH_SHOW_MEDIA_TYPE) ||
(details & GST_DEBUG_GRAPH_SHOW_CAPS_DETAILS) (details & GST_DEBUG_GRAPH_SHOW_CAPS_DETAILS)
) { ) {
if ((caps = gst_pad_get_negotiated_caps (pad))) { caps = gst_pad_get_negotiated_caps (pad);
free_caps = TRUE; if (!caps)
} else { caps = gst_caps_copy (gst_pad_get_pad_template_caps (pad));
free_caps = FALSE; peer_caps = gst_pad_get_negotiated_caps (peer_pad);
if (!(caps = (GstCaps *) if (!peer_caps)
gst_pad_get_pad_template_caps (pad))) { peer_caps = gst_caps_copy (gst_pad_get_pad_template_caps (peer_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); media = debug_dump_describe_caps (caps, details);
if (gst_pad_get_direction (pad) == GST_PAD_SRC) { /* check if peer caps are different */
media_src = media; if (peer_caps && !gst_caps_is_equal (caps, peer_caps)) {
free_media_src = free_media; gchar *tmp;
media_sink = tmp;
free_media_sink = free_tmp; tmp = debug_dump_describe_caps (peer_caps, details);
} else { if (gst_pad_get_direction (pad) == GST_PAD_SRC) {
media_src = tmp; media_src = media;
free_media_src = free_tmp; media_sink = tmp;
media_sink = media; } else {
free_media_sink = free_media; media_src = tmp;
} media_sink = media;
media = NULL;
free_media = FALSE;
}
if (free_caps) {
gst_caps_unref (caps);
} }
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)); pad_name = debug_dump_make_object_name (GST_OBJECT (pad));
if (element) { if (element) {
element_name = debug_dump_make_object_name (GST_OBJECT (element)); element_name = debug_dump_make_object_name (GST_OBJECT (element));
} else { } else {
element_name = ""; element_name = g_strdup ("");
} }
peer_pad_name = debug_dump_make_object_name (GST_OBJECT (peer_pad)); peer_pad_name = debug_dump_make_object_name (GST_OBJECT (peer_pad));
if ((peer_element = gst_pad_get_parent_element (peer_pad))) { if ((peer_element = gst_pad_get_parent_element (peer_pad))) {
peer_element_name = peer_element_name =
debug_dump_make_object_name (GST_OBJECT (peer_element)); debug_dump_make_object_name (GST_OBJECT (peer_element));
} else { } else {
peer_element_name = ""; peer_element_name = g_strdup ("");
} }
if (GST_IS_GHOST_PAD (pad)) { if (GST_IS_GHOST_PAD (pad)) {
@ -402,17 +375,16 @@ debug_dump_element_pad_link (GstPad * pad, GstElement * element,
target_element_name = target_element_name =
debug_dump_make_object_name (GST_OBJECT (target_element)); debug_dump_make_object_name (GST_OBJECT (target_element));
} else { } else {
target_element_name = ""; target_element_name = g_strdup ("");
} }
/* src ghostpad relationship */ /* src ghostpad relationship */
fprintf (out, "%s%s_%s -> %s_%s [style=dashed, minlen=0]\n", spc, fprintf (out, "%s%s_%s -> %s_%s [style=dashed, minlen=0]\n", spc,
target_element_name, target_pad_name, element_name, pad_name); target_element_name, target_pad_name, element_name, pad_name);
g_free (target_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_element);
}
gst_object_unref (target_pad); gst_object_unref (target_pad);
} }
gst_object_unref (tmp_pad); gst_object_unref (tmp_pad);
@ -427,7 +399,7 @@ debug_dump_element_pad_link (GstPad * pad, GstElement * element,
target_element_name = target_element_name =
debug_dump_make_object_name (GST_OBJECT (target_element)); debug_dump_make_object_name (GST_OBJECT (target_element));
} else { } else {
target_element_name = ""; target_element_name = g_strdup ("");
} }
/* sink ghostpad relationship */ /* sink ghostpad relationship */
fprintf (out, "%s%s_%s -> %s_%s [style=dashed, minlen=0]\n", spc, fprintf (out, "%s%s_%s -> %s_%s [style=dashed, minlen=0]\n", spc,
@ -442,10 +414,9 @@ debug_dump_element_pad_link (GstPad * pad, GstElement * element,
debug_dump_element_pad_link (target_pad, target_element, details, out, debug_dump_element_pad_link (target_pad, target_element, details, out,
indent); indent);
g_free (target_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_element);
}
gst_object_unref (target_pad); gst_object_unref (target_pad);
} }
gst_object_unref (tmp_pad); gst_object_unref (tmp_pad);
@ -456,9 +427,7 @@ debug_dump_element_pad_link (GstPad * pad, GstElement * element,
if (media) { if (media) {
fprintf (out, "%s%s_%s -> %s_%s [label=\"%s\"]\n", spc, fprintf (out, "%s%s_%s -> %s_%s [label=\"%s\"]\n", spc,
element_name, pad_name, peer_element_name, peer_pad_name, media); 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) { } else if (media_src && media_sink) {
/* dot has some issues with placement of head and taillabels, /* dot has some issues with placement of head and taillabels,
* we need an empty label to make space */ * we need an empty label to make space */
@ -467,24 +436,19 @@ debug_dump_element_pad_link (GstPad * pad, GstElement * element,
"headlabel=\"%s\", taillabel=\"%s\"]\n", "headlabel=\"%s\", taillabel=\"%s\"]\n",
spc, element_name, pad_name, peer_element_name, peer_pad_name, spc, element_name, pad_name, peer_element_name, peer_pad_name,
media_src, media_sink); media_src, media_sink);
if (free_media_src) g_free (media_src);
g_free (media_src); g_free (media_sink);
if (free_media_sink)
g_free (media_sink);
} else { } else {
fprintf (out, "%s%s_%s -> %s_%s\n", spc, fprintf (out, "%s%s_%s -> %s_%s\n", spc,
element_name, pad_name, peer_element_name, peer_pad_name); element_name, pad_name, peer_element_name, peer_pad_name);
} }
g_free (pad_name); g_free (pad_name);
if (element) { g_free (element_name);
g_free (element_name);
}
g_free (peer_pad_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_element);
}
gst_object_unref (peer_pad); gst_object_unref (peer_pad);
} }
} }

View file

@ -69,8 +69,6 @@
GST_DEBUG_CATEGORY_STATIC (element_factory_debug); GST_DEBUG_CATEGORY_STATIC (element_factory_debug);
#define GST_CAT_DEFAULT element_factory_debug #define GST_CAT_DEFAULT element_factory_debug
static void gst_element_factory_class_init (GstElementFactoryClass * klass);
static void gst_element_factory_init (GstElementFactory * factory);
static void gst_element_factory_finalize (GObject * object); static void gst_element_factory_finalize (GObject * object);
void __gst_element_details_clear (GstElementDetails * dp); void __gst_element_details_clear (GstElementDetails * dp);
static void gst_element_factory_cleanup (GstElementFactory * factory); static void gst_element_factory_cleanup (GstElementFactory * factory);

View file

@ -65,7 +65,8 @@ _gst_format_initialize (void)
while (standards->nick) { while (standards->nick) {
standards->quark = g_quark_from_static_string (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), g_hash_table_insert (_format_to_nick, GINT_TO_POINTER (standards->value),
standards); standards);
@ -157,7 +158,7 @@ gst_format_register (const gchar * nick, const gchar * description)
format->description = g_strdup (description); format->description = g_strdup (description);
format->quark = g_quark_from_static_string (format->nick); 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), g_hash_table_insert (_format_to_nick, GINT_TO_POINTER (format->value),
format); format);
_gst_formats = g_list_append (_gst_formats, format); _gst_formats = g_list_append (_gst_formats, format);

View file

@ -86,10 +86,10 @@ typedef struct _GstFormatDefinition GstFormatDefinition;
*/ */
struct _GstFormatDefinition struct _GstFormatDefinition
{ {
GstFormat value; GstFormat value;
gchar *nick; const gchar *nick;
gchar *description; const gchar *description;
GQuark quark; GQuark quark;
}; };
const gchar* gst_format_get_name (GstFormat format); const gchar* gst_format_get_name (GstFormat format);

View file

@ -58,8 +58,6 @@ enum
GST_DEBUG_CATEGORY_STATIC (index_debug); GST_DEBUG_CATEGORY_STATIC (index_debug);
#define GST_CAT_DEFAULT index_debug #define GST_CAT_DEFAULT index_debug
static void gst_index_class_init (GstIndexClass * klass);
static void gst_index_init (GstIndex * index);
static void gst_index_finalize (GObject * object); static void gst_index_finalize (GObject * object);
static void gst_index_set_property (GObject * object, guint prop_id, static void gst_index_set_property (GObject * object, guint prop_id,

View file

@ -37,7 +37,6 @@
#include "gstmarshal.h" #include "gstmarshal.h"
#include "gstregistry.h" #include "gstregistry.h"
static void gst_index_factory_class_init (GstIndexFactoryClass * klass);
static void gst_index_factory_finalize (GObject * object); static void gst_index_factory_finalize (GObject * object);
static GstPluginFeatureClass *factory_parent_class = NULL; static GstPluginFeatureClass *factory_parent_class = NULL;

View file

@ -866,7 +866,6 @@ gst_debug_log_default (GstDebugCategory * category, GstDebugLevel level,
gint pid; gint pid;
GstClockTime elapsed; GstClockTime elapsed;
gchar *obj = NULL; gchar *obj = NULL;
gboolean free_obj = TRUE;
gboolean is_colored; gboolean is_colored;
if (level > gst_debug_category_get_threshold (category)) if (level > gst_debug_category_get_threshold (category))
@ -881,15 +880,14 @@ gst_debug_log_default (GstDebugCategory * category, GstDebugLevel level,
if (object) { if (object) {
obj = gst_debug_print_object (object); obj = gst_debug_print_object (object);
} else { } else {
obj = "\0"; obj = g_strdup ("");
free_obj = FALSE;
} }
if (is_colored) { if (is_colored) {
#ifndef G_OS_WIN32 #ifndef G_OS_WIN32
/* colors, non-windows */ /* colors, non-windows */
gchar *color = NULL; gchar *color = NULL;
gchar *clear; const gchar *clear;
gchar pidcolor[10]; gchar pidcolor[10];
const gchar *levelcolor; const gchar *levelcolor;
@ -947,8 +945,7 @@ gst_debug_log_default (GstDebugCategory * category, GstDebugLevel level,
#undef PRINT_FMT #undef PRINT_FMT
} }
if (free_obj) g_free (obj);
g_free (obj);
} }
/** /**
@ -1493,12 +1490,9 @@ _gst_debug_get_category (const gchar * name)
static GHashTable *__gst_function_pointers; /* NULL */ static GHashTable *__gst_function_pointers; /* NULL */
static GStaticMutex __dbg_functions_mutex = G_STATIC_MUTEX_INIT; static GStaticMutex __dbg_functions_mutex = G_STATIC_MUTEX_INIT;
const gchar *
_gst_debug_nameof_funcptr (GstDebugFuncPtr ptr)
G_GNUC_NO_INSTRUMENT;
/* This function MUST NOT return NULL */ /* This function MUST NOT return NULL */
const gchar *_gst_debug_nameof_funcptr (GstDebugFuncPtr func) const gchar *
_gst_debug_nameof_funcptr (GstDebugFuncPtr func)
{ {
gchar *ptrname; gchar *ptrname;

View file

@ -1098,7 +1098,7 @@ typedef void (* GstDebugFuncPtr) (void);
void _gst_debug_register_funcptr (GstDebugFuncPtr func, void _gst_debug_register_funcptr (GstDebugFuncPtr func,
const gchar * ptrname); const gchar * ptrname);
G_CONST_RETURN gchar * G_CONST_RETURN gchar *
_gst_debug_nameof_funcptr (GstDebugFuncPtr func); _gst_debug_nameof_funcptr (GstDebugFuncPtr func) G_GNUC_NO_INSTRUMENT;
/** /**
* GST_DEBUG_REGISTER_FUNCPTR: * GST_DEBUG_REGISTER_FUNCPTR:

View file

@ -76,9 +76,9 @@ gst_mini_object_get_type (void)
gst_value_mini_object_free, gst_value_mini_object_free,
gst_value_mini_object_copy, gst_value_mini_object_copy,
gst_value_mini_object_peek_pointer, gst_value_mini_object_peek_pointer,
"p", (char *) "p",
gst_value_mini_object_collect, gst_value_mini_object_collect,
"p", (char *) "p",
gst_value_mini_object_lcopy gst_value_mini_object_lcopy
}; };
GTypeInfo mini_object_info = { GTypeInfo mini_object_info = {

View file

@ -133,8 +133,6 @@ typedef struct _GstSignalObject GstSignalObject;
typedef struct _GstSignalObjectClass GstSignalObjectClass; typedef struct _GstSignalObjectClass GstSignalObjectClass;
static GType gst_signal_object_get_type (void); static GType gst_signal_object_get_type (void);
static void gst_signal_object_class_init (GstSignalObjectClass * klass);
static void gst_signal_object_init (GstSignalObject * object);
#ifndef GST_DISABLE_LOADSAVE #ifndef GST_DISABLE_LOADSAVE
static guint gst_signal_object_signals[SO_LAST_SIGNAL] = { 0 }; static guint gst_signal_object_signals[SO_LAST_SIGNAL] = { 0 };
@ -503,7 +501,8 @@ gst_object_dispatch_properties_changed (GObject * object,
{ {
GstObject *gst_object, *parent, *old_parent; GstObject *gst_object, *parent, *old_parent;
guint i; guint i;
gchar *name, *debug_name; gchar *name;
const gchar *debug_name;
/* do the standard dispatching */ /* do the standard dispatching */
parent_class->dispatch_properties_changed (object, n_pspecs, pspecs); parent_class->dispatch_properties_changed (object, n_pspecs, pspecs);
@ -1077,7 +1076,7 @@ gst_object_get_path_string (GstObject * object)
gchar *prevpath, *path; gchar *prevpath, *path;
const gchar *typename; const gchar *typename;
gchar *component; gchar *component;
gchar *separator; const gchar *separator;
/* ref object before adding to list */ /* ref object before adding to list */
gst_object_ref (object); gst_object_ref (object);

View file

@ -257,7 +257,7 @@ struct _GstObject {
struct _GstObjectClass { struct _GstObjectClass {
GObjectClass parent_class; GObjectClass parent_class;
gchar *path_string_separator; const gchar *path_string_separator;
GObject *signal_object; GObject *signal_object;
/* FIXME-0.11: remove this, plus the above GST_CLASS_*_LOCK macros */ /* FIXME-0.11: remove this, plus the above GST_CLASS_*_LOCK macros */

View file

@ -125,8 +125,6 @@ struct _GstPipelinePrivate
}; };
static void gst_pipeline_base_init (gpointer g_class);
static void gst_pipeline_dispose (GObject * object); static void gst_pipeline_dispose (GObject * object);
static void gst_pipeline_set_property (GObject * object, guint prop_id, static void gst_pipeline_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec); const GValue * value, GParamSpec * pspec);

View file

@ -105,7 +105,6 @@ static GstPlugin *gst_plugin_register_func (GstPlugin * plugin,
const GstPluginDesc * desc, gpointer user_data); const GstPluginDesc * desc, gpointer user_data);
static void gst_plugin_desc_copy (GstPluginDesc * dest, static void gst_plugin_desc_copy (GstPluginDesc * dest,
const GstPluginDesc * src); const GstPluginDesc * src);
static void gst_plugin_desc_free (GstPluginDesc * desc);
static void gst_plugin_ext_dep_free (GstPluginDep * dep); static void gst_plugin_ext_dep_free (GstPluginDep * dep);
@ -133,7 +132,6 @@ gst_plugin_finalize (GObject * object)
} }
g_free (plugin->filename); g_free (plugin->filename);
g_free (plugin->basename); 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_foreach (plugin->priv->deps, (GFunc) gst_plugin_ext_dep_free, NULL);
g_list_free (plugin->priv->deps); g_list_free (plugin->priv->deps);
@ -224,7 +222,7 @@ _gst_plugin_register_static (GstPluginDesc * desc)
*/ */
gboolean gboolean
gst_plugin_register_static (gint major_version, gint minor_version, 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 * version, const gchar * license, const gchar * source,
const gchar * package, const gchar * origin) const gchar * package, const gchar * origin)
{ {
@ -291,7 +289,7 @@ gst_plugin_register_static (gint major_version, gint minor_version,
*/ */
gboolean gboolean
gst_plugin_register_static_full (gint major_version, gint minor_version, 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, GstPluginInitFullFunc init_full_func, const gchar * version,
const gchar * license, const gchar * source, const gchar * package, const gchar * license, const gchar * source, const gchar * package,
const gchar * origin, gpointer user_data) const gchar * origin, gpointer user_data)
@ -513,8 +511,6 @@ _gst_plugin_fault_handler_setup (void)
} }
#endif /* HAVE_SIGACTION */ #endif /* HAVE_SIGACTION */
static void _gst_plugin_fault_handler_setup ();
static GStaticMutex gst_plugin_loading_mutex = G_STATIC_MUTEX_INIT; static GStaticMutex gst_plugin_loading_mutex = G_STATIC_MUTEX_INIT;
#define CHECK_PLUGIN_DESC_FIELD(desc,field,fn) \ #define CHECK_PLUGIN_DESC_FIELD(desc,field,fn) \
@ -625,9 +621,6 @@ gst_plugin_load_file (const gchar * filename, GError ** error)
CHECK_PLUGIN_DESC_FIELD (plugin->orig_desc, source, filename); 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, package, filename);
CHECK_PLUGIN_DESC_FIELD (plugin->orig_desc, origin, 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...", GST_LOG ("Plugin %p for file \"%s\" prepared, calling entry function...",
@ -682,8 +675,7 @@ gst_plugin_desc_copy (GstPluginDesc * dest, const GstPluginDesc * src)
dest->major_version = src->major_version; dest->major_version = src->major_version;
dest->minor_version = src->minor_version; dest->minor_version = src->minor_version;
dest->name = g_intern_string (src->name); dest->name = g_intern_string (src->name);
/* maybe intern the description too, just for convenience? */ dest->description = g_intern_string (src->description);
dest->description = g_strdup (src->description);
dest->plugin_init = src->plugin_init; dest->plugin_init = src->plugin_init;
dest->version = g_intern_string (src->version); dest->version = g_intern_string (src->version);
dest->license = g_intern_string (src->license); dest->license = g_intern_string (src->license);
@ -692,14 +684,6 @@ gst_plugin_desc_copy (GstPluginDesc * dest, const GstPluginDesc * src)
dest->origin = g_intern_string (src->origin); 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: * gst_plugin_get_name:
* @plugin: plugin to get the name of * @plugin: plugin to get the name of

View file

@ -160,7 +160,7 @@ struct _GstPluginDesc {
gint major_version; gint major_version;
gint minor_version; gint minor_version;
const gchar *name; const gchar *name;
gchar *description; const gchar *description;
GstPluginInitFunc plugin_init; GstPluginInitFunc plugin_init;
const gchar *version; const gchar *version;
const gchar *license; const gchar *license;
@ -329,7 +329,7 @@ void _gst_plugin_register_static (GstPluginDesc *desc);
gboolean gst_plugin_register_static (gint major_version, gboolean gst_plugin_register_static (gint major_version,
gint minor_version, gint minor_version,
const gchar *name, const gchar *name,
gchar *description, const gchar *description,
GstPluginInitFunc init_func, GstPluginInitFunc init_func,
const gchar *version, const gchar *version,
const gchar *license, const gchar *license,
@ -340,7 +340,7 @@ gboolean gst_plugin_register_static (gint major_version,
gboolean gst_plugin_register_static_full (gint major_version, gboolean gst_plugin_register_static_full (gint major_version,
gint minor_version, gint minor_version,
const gchar *name, const gchar *name,
gchar *description, const gchar *description,
GstPluginInitFullFunc init_full_func, GstPluginInitFullFunc init_full_func,
const gchar *version, const gchar *version,
const gchar *license, const gchar *license,

View file

@ -348,7 +348,7 @@ plugin_loader_create_blacklist_plugin (GstPluginLoader * l,
static gboolean static gboolean
gst_plugin_loader_try_helper (GstPluginLoader * loader, gchar * location) 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); GST_LOG ("Trying to spawn gst-plugin-scanner helper at %s", location);
if (!g_spawn_async_with_pipes (NULL, argv, NULL, if (!g_spawn_async_with_pipes (NULL, argv, NULL,
@ -432,7 +432,7 @@ plugin_loader_cleanup_child (GstPluginLoader * l)
} }
gboolean gboolean
_gst_plugin_loader_client_run () _gst_plugin_loader_client_run (void)
{ {
GstPluginLoader *l; GstPluginLoader *l;

View file

@ -114,7 +114,7 @@ _gst_query_initialize (void)
while (standards->nick) { while (standards->nick) {
standards->quark = g_quark_from_static_string (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, g_hash_table_insert (_query_type_to_nick,
GINT_TO_POINTER (standards->value), standards); GINT_TO_POINTER (standards->value), standards);
@ -245,7 +245,7 @@ gst_query_type_register (const gchar * nick, const gchar * description)
query->quark = g_quark_from_static_string (query->nick); query->quark = g_quark_from_static_string (query->nick);
g_static_mutex_lock (&mutex); 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), g_hash_table_insert (_query_type_to_nick, GINT_TO_POINTER (query->value),
query); query);
_gst_queries = g_list_append (_gst_queries, query); _gst_queries = g_list_append (_gst_queries, query);

View file

@ -104,8 +104,8 @@ typedef struct _GstQueryClass GstQueryClass;
struct _GstQueryTypeDefinition struct _GstQueryTypeDefinition
{ {
GstQueryType value; GstQueryType value;
gchar *nick; const gchar *nick;
gchar *description; const gchar *description;
GQuark quark; GQuark quark;
}; };

View file

@ -114,11 +114,7 @@
#include "gst-i18n-lib.h" #include "gst-i18n-lib.h"
/* needed for fast retrieval of element and typefind factory lists */ #include "gst.h"
extern GType gst_type_find_factory_get_type (void);
#define GST_TYPE_TYPE_FIND_FACTORY (gst_type_find_factory_get_type())
extern GType gst_element_factory_get_type (void);
#define GST_TYPE_ELEMENT_FACTORY (gst_element_factory_get_type())
#ifdef G_OS_WIN32 #ifdef G_OS_WIN32
#include <windows.h> #include <windows.h>
@ -1260,7 +1256,7 @@ gst_registry_get_feature_list_by_plugin (GstRegistry * registry,
/* Unref and delete the default registry */ /* Unref and delete the default registry */
void void
_priv_gst_registry_cleanup () _priv_gst_registry_cleanup (void)
{ {
GstRegistry *registry; GstRegistry *registry;

View file

@ -70,10 +70,6 @@ typedef struct _GstBinaryRegistryMagic
gchar version[GST_MAGIC_BINARY_VERSION_LEN]; gchar version[GST_MAGIC_BINARY_VERSION_LEN];
} GstBinaryRegistryMagic; } GstBinaryRegistryMagic;
/* Function prototypes */
gboolean gst_registry_binary_write_cache(GstRegistry *registry, const char *location);
gboolean gst_registry_binary_read_cache(GstRegistry *registry, const char *location);
G_END_DECLS G_END_DECLS
#endif /* !__GST_REGISTRYBINARY_H__ */ #endif /* !__GST_REGISTRYBINARY_H__ */

View file

@ -1488,7 +1488,7 @@ gst_structure_get_fraction (const GstStructure * structure,
typedef struct _GstStructureAbbreviation typedef struct _GstStructureAbbreviation
{ {
gchar *type_name; const gchar *type_name;
GType type; GType type;
} }
GstStructureAbbreviation; GstStructureAbbreviation;

View file

@ -93,8 +93,6 @@ enum
/* the one instance of the systemclock */ /* the one instance of the systemclock */
static GstClock *_the_system_clock = NULL; static GstClock *_the_system_clock = NULL;
static void gst_system_clock_class_init (GstSystemClockClass * klass);
static void gst_system_clock_init (GstSystemClock * clock);
static void gst_system_clock_dispose (GObject * object); static void gst_system_clock_dispose (GObject * object);
static void gst_system_clock_set_property (GObject * object, guint prop_id, static void gst_system_clock_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec); const GValue * value, GParamSpec * pspec);

View file

@ -92,8 +92,6 @@ struct _GstTaskPrivate
GstTaskPool *pool_id; GstTaskPool *pool_id;
}; };
static void gst_task_class_init (GstTaskClass * klass);
static void gst_task_init (GstTask * task);
static void gst_task_finalize (GObject * object); static void gst_task_finalize (GObject * object);
static void gst_task_func (GstTask * task); static void gst_task_func (GstTask * task);

View file

@ -40,8 +40,6 @@
GST_DEBUG_CATEGORY_STATIC (taskpool_debug); GST_DEBUG_CATEGORY_STATIC (taskpool_debug);
#define GST_CAT_DEFAULT (taskpool_debug) #define GST_CAT_DEFAULT (taskpool_debug)
static void gst_task_pool_class_init (GstTaskPoolClass * klass);
static void gst_task_pool_init (GstTaskPool * pool);
static void gst_task_pool_finalize (GObject * object); static void gst_task_pool_finalize (GObject * object);
#define _do_init \ #define _do_init \

View file

@ -111,7 +111,7 @@ gint _gst_trace_on = 1;
* Returns: a new #GstTrace. * Returns: a new #GstTrace.
*/ */
GstTrace * GstTrace *
gst_trace_new (gchar * filename, gint size) gst_trace_new (const gchar * filename, gint size)
{ {
GstTrace *trace = g_malloc (sizeof (GstTrace)); GstTrace *trace = g_malloc (sizeof (GstTrace));

View file

@ -88,7 +88,7 @@ struct _GstTraceEntry {
gchar message[112]; 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_destroy (GstTrace *trace);
void gst_trace_flush (GstTrace *trace); void gst_trace_flush (GstTrace *trace);

View file

@ -131,8 +131,6 @@ type_as_function ## _class_init_trampoline (gpointer g_class, \
type_as_function ## _class_init ((type ## Class *)g_class); \ type_as_function ## _class_init ((type ## Class *)g_class); \
} \ } \
\ \
GType type_as_function ## _get_type (void); \
\
GType \ GType \
type_as_function ## _get_type (void) \ type_as_function ## _get_type (void) \
{ \ { \

View file

@ -3986,9 +3986,9 @@ static const GTypeValueTable _gst_fourcc_value_table = {
NULL, NULL,
gst_value_copy_fourcc, gst_value_copy_fourcc,
NULL, NULL,
"i", (char *) "i",
gst_value_collect_fourcc, gst_value_collect_fourcc,
"p", (char *) "p",
gst_value_lcopy_fourcc gst_value_lcopy_fourcc
}; };
@ -3999,9 +3999,9 @@ static const GTypeValueTable _gst_int_range_value_table = {
NULL, NULL,
gst_value_copy_int_range, gst_value_copy_int_range,
NULL, NULL,
"ii", (char *) "ii",
gst_value_collect_int_range, gst_value_collect_int_range,
"pp", (char *) "pp",
gst_value_lcopy_int_range gst_value_lcopy_int_range
}; };
@ -4012,9 +4012,9 @@ static const GTypeValueTable _gst_double_range_value_table = {
NULL, NULL,
gst_value_copy_double_range, gst_value_copy_double_range,
NULL, NULL,
"dd", (char *) "dd",
gst_value_collect_double_range, gst_value_collect_double_range,
"pp", (char *) "pp",
gst_value_lcopy_double_range gst_value_lcopy_double_range
}; };
@ -4025,9 +4025,9 @@ static const GTypeValueTable _gst_fraction_range_value_table = {
gst_value_free_fraction_range, gst_value_free_fraction_range,
gst_value_copy_fraction_range, gst_value_copy_fraction_range,
NULL, NULL,
"iiii", (char *) "iiii",
gst_value_collect_fraction_range, gst_value_collect_fraction_range,
"pppp", (char *) "pppp",
gst_value_lcopy_fraction_range gst_value_lcopy_fraction_range
}; };
@ -4038,9 +4038,9 @@ static const GTypeValueTable _gst_value_list_value_table = {
gst_value_free_list_or_array, gst_value_free_list_or_array,
gst_value_copy_list_or_array, gst_value_copy_list_or_array,
gst_value_list_or_array_peek_pointer, gst_value_list_or_array_peek_pointer,
"p", (char *) "p",
gst_value_collect_list_or_array, gst_value_collect_list_or_array,
"p", (char *) "p",
gst_value_lcopy_list_or_array gst_value_lcopy_list_or_array
}; };
@ -4051,9 +4051,9 @@ static const GTypeValueTable _gst_value_array_value_table = {
gst_value_free_list_or_array, gst_value_free_list_or_array,
gst_value_copy_list_or_array, gst_value_copy_list_or_array,
gst_value_list_or_array_peek_pointer, gst_value_list_or_array_peek_pointer,
"p", (char *) "p",
gst_value_collect_list_or_array, gst_value_collect_list_or_array,
"p", (char *) "p",
gst_value_lcopy_list_or_array gst_value_lcopy_list_or_array
}; };
@ -4064,9 +4064,9 @@ static const GTypeValueTable _gst_fraction_value_table = {
NULL, NULL,
gst_value_copy_fraction, gst_value_copy_fraction,
NULL, NULL,
"ii", (char *) "ii",
gst_value_collect_fraction, gst_value_collect_fraction,
"pp", (char *) "pp",
gst_value_lcopy_fraction gst_value_lcopy_fraction
}; };

View file

@ -47,8 +47,6 @@ enum
LAST_SIGNAL LAST_SIGNAL
}; };
static void gst_xml_class_init (GstXMLClass * klass);
static void gst_xml_init (GstXML * xml);
static void gst_xml_dispose (GObject * object); static void gst_xml_dispose (GObject * object);
static void gst_xml_object_loaded (GstObject * private, GstObject * object, static void gst_xml_object_loaded (GstObject * private, GstObject * object,

View file

@ -14,7 +14,8 @@ EXTRA_DIST = \
nodist_libgstparse_la_SOURCES = lex._gst_parse_yy.c grammar.tab.c nodist_libgstparse_la_SOURCES = lex._gst_parse_yy.c grammar.tab.c
CLEANFILES += grammar.tab.c lex._gst_parse_yy.c CLEANFILES += grammar.tab.c lex._gst_parse_yy.c
libgstparse_la_CFLAGS = $(GST_ALL_CFLAGS) # can't use GST_ALL_CFLAGS here because that'd pull in -Werror
libgstparse_la_CFLAGS = $(GLIB_CFLAGS) $(XML_CFLAGS) $(GST_OPTION_CFLAGS)
libgstparse_la_LIBADD = $(GST_ALL_LIBS) libgstparse_la_LIBADD = $(GST_ALL_LIBS)
noinst_HEADERS = grammar.tab.h types.h noinst_HEADERS = grammar.tab.h types.h

View file

@ -37,7 +37,6 @@ struct yy_buffer_state * _gst_parse_yy_scan_string (char* , yyscan_t);
void _gst_parse_yypush_buffer_state (void * new_buffer ,yyscan_t yyscanner ); void _gst_parse_yypush_buffer_state (void * new_buffer ,yyscan_t yyscanner );
void _gst_parse_yypop_buffer_state (yyscan_t yyscanner ); void _gst_parse_yypop_buffer_state (yyscan_t yyscanner );
#ifdef __GST_PARSE_TRACE #ifdef __GST_PARSE_TRACE
static guint __strings; static guint __strings;
static guint __links; static guint __links;

View file

@ -93,8 +93,6 @@ static void gst_collect_pads_clear (GstCollectPads * pads,
static GstFlowReturn gst_collect_pads_chain (GstPad * pad, GstBuffer * buffer); static GstFlowReturn gst_collect_pads_chain (GstPad * pad, GstBuffer * buffer);
static gboolean gst_collect_pads_event (GstPad * pad, GstEvent * event); static gboolean gst_collect_pads_event (GstPad * pad, GstEvent * event);
static void gst_collect_pads_finalize (GObject * object); static void gst_collect_pads_finalize (GObject * object);
static void gst_collect_pads_init (GstCollectPads * pads,
GstCollectPadsClass * g_class);
static void ref_data (GstCollectData * data); static void ref_data (GstCollectData * data);
static void unref_data (GstCollectData * data); static void unref_data (GstCollectData * data);
static void gst_collect_pads_check_pads_unlocked (GstCollectPads * pads); static void gst_collect_pads_check_pads_unlocked (GstCollectPads * pads);

View file

@ -182,7 +182,7 @@ gst_check_setup_src_pad (GstElement * element,
GstPad * GstPad *
gst_check_setup_src_pad_by_name (GstElement * element, gst_check_setup_src_pad_by_name (GstElement * element,
GstStaticPadTemplate * template, gchar * name) GstStaticPadTemplate * template, const gchar * name)
{ {
GstPad *srcpad, *sinkpad; GstPad *srcpad, *sinkpad;
@ -207,7 +207,7 @@ gst_check_setup_src_pad_by_name (GstElement * element,
} }
void 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 *pad_peer, *pad_element;
@ -261,7 +261,7 @@ gst_check_setup_sink_pad (GstElement * element, GstStaticPadTemplate * template,
GstPad * GstPad *
gst_check_setup_sink_pad_by_name (GstElement * element, gst_check_setup_sink_pad_by_name (GstElement * element,
GstStaticPadTemplate * template, gchar * name) GstStaticPadTemplate * template, const gchar * name)
{ {
GstPad *srcpad, *sinkpad; GstPad *srcpad, *sinkpad;

View file

@ -56,7 +56,7 @@ extern GCond *check_cond;
typedef struct typedef struct
{ {
char *name; const char *name;
int size; int size;
int abi_size; int abi_size;
} }
@ -74,10 +74,10 @@ void gst_check_teardown_element (GstElement * element);
GstPad *gst_check_setup_src_pad (GstElement * element, GstPad *gst_check_setup_src_pad (GstElement * element,
GstStaticPadTemplate * template, GstCaps * caps); GstStaticPadTemplate * template, GstCaps * caps);
GstPad * gst_check_setup_src_pad_by_name (GstElement * element, 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, GstPad * gst_check_setup_sink_pad_by_name (GstElement * element,
GstStaticPadTemplate * template, gchar *name); GstStaticPadTemplate * template, const gchar *name);
void gst_check_teardown_pad_by_name (GstElement * element, 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_teardown_src_pad (GstElement * element);
void gst_check_drop_buffers (); void gst_check_drop_buffers ();
void gst_check_caps_equal (GstCaps * caps1, GstCaps * caps2); void gst_check_caps_equal (GstCaps * caps1, GstCaps * caps2);

View file

@ -217,7 +217,7 @@ gst_controller_find_controlled_property (GstController * self,
*/ */
static GstController * static GstController *
gst_controller_add_property (GstController * self, GObject * object, 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 */ /* test if this property isn't yet controlled */
if (!self || !gst_controller_find_controlled_property (self, name)) { if (!self || !gst_controller_find_controlled_property (self, name)) {
@ -454,7 +454,7 @@ gst_controller_remove_properties (GstController * self, ...)
void void
gst_controller_set_property_disabled (GstController * self, gst_controller_set_property_disabled (GstController * self,
gchar * property_name, gboolean disabled) const gchar * property_name, gboolean disabled)
{ {
GstControlledProperty *prop; GstControlledProperty *prop;
@ -512,8 +512,8 @@ gst_controller_set_disabled (GstController * self, gboolean disabled)
* Since: 0.10.14 * Since: 0.10.14
*/ */
gboolean gboolean
gst_controller_set_control_source (GstController * self, gchar * property_name, gst_controller_set_control_source (GstController * self,
GstControlSource * csource) const gchar * property_name, GstControlSource * csource)
{ {
GstControlledProperty *prop; GstControlledProperty *prop;
gboolean ret = FALSE; gboolean ret = FALSE;
@ -552,7 +552,8 @@ gst_controller_set_control_source (GstController * self, gchar * property_name,
* Since: 0.10.14 * Since: 0.10.14
*/ */
GstControlSource * GstControlSource *
gst_controller_get_control_source (GstController * self, gchar * property_name) gst_controller_get_control_source (GstController * self,
const gchar * property_name)
{ {
GstControlledProperty *prop; GstControlledProperty *prop;
GstControlSource *ret = NULL; GstControlSource *ret = NULL;
@ -585,7 +586,7 @@ gst_controller_get_control_source (GstController * self, gchar * property_name)
* property isn't handled by the controller * property isn't handled by the controller
*/ */
GValue * GValue *
gst_controller_get (GstController * self, gchar * property_name, gst_controller_get (GstController * self, const gchar * property_name,
GstClockTime timestamp) GstClockTime timestamp)
{ {
GstControlledProperty *prop; GstControlledProperty *prop;
@ -1021,7 +1022,7 @@ gst_controlled_property_set_interpolation_mode (GstControlledProperty * self,
*/ */
#ifndef GST_REMOVE_DEPRECATED #ifndef GST_REMOVE_DEPRECATED
gboolean gboolean
gst_controller_set (GstController * self, gchar * property_name, gst_controller_set (GstController * self, const gchar * property_name,
GstClockTime timestamp, GValue * value) GstClockTime timestamp, GValue * value)
{ {
gboolean res = FALSE; gboolean res = FALSE;
@ -1065,7 +1066,7 @@ out:
*/ */
#ifndef GST_REMOVE_DEPRECATED #ifndef GST_REMOVE_DEPRECATED
gboolean gboolean
gst_controller_set_from_list (GstController * self, gchar * property_name, gst_controller_set_from_list (GstController * self, const gchar * property_name,
GSList * timedvalues) GSList * timedvalues)
{ {
gboolean res = FALSE; gboolean res = FALSE;
@ -1111,7 +1112,7 @@ out:
*/ */
#ifndef GST_REMOVE_DEPRECATED #ifndef GST_REMOVE_DEPRECATED
gboolean gboolean
gst_controller_unset (GstController * self, gchar * property_name, gst_controller_unset (GstController * self, const gchar * property_name,
GstClockTime timestamp) GstClockTime timestamp)
{ {
gboolean res = FALSE; gboolean res = FALSE;
@ -1154,7 +1155,7 @@ out:
*/ */
#ifndef GST_REMOVE_DEPRECATED #ifndef GST_REMOVE_DEPRECATED
gboolean gboolean
gst_controller_unset_all (GstController * self, gchar * property_name) gst_controller_unset_all (GstController * self, const gchar * property_name)
{ {
GstControlledProperty *prop; GstControlledProperty *prop;
@ -1194,7 +1195,7 @@ out:
*/ */
#ifndef GST_REMOVE_DEPRECATED #ifndef GST_REMOVE_DEPRECATED
const GList * 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; const GList *res = NULL;
GstControlledProperty *prop; GstControlledProperty *prop;
@ -1238,7 +1239,7 @@ out:
#ifndef GST_REMOVE_DEPRECATED #ifndef GST_REMOVE_DEPRECATED
gboolean gboolean
gst_controller_set_interpolation_mode (GstController * self, gst_controller_set_interpolation_mode (GstController * self,
gchar * property_name, GstInterpolateMode mode) const gchar * property_name, GstInterpolateMode mode)
{ {
gboolean res = FALSE; gboolean res = FALSE;
GstControlledProperty *prop; GstControlledProperty *prop;

View file

@ -90,15 +90,15 @@ gboolean gst_controller_remove_properties_list (GstController * self,
gboolean gst_controller_remove_properties (GstController * self, ...) G_GNUC_NULL_TERMINATED; gboolean gst_controller_remove_properties (GstController * self, ...) G_GNUC_NULL_TERMINATED;
void gst_controller_set_disabled (GstController *self, gboolean disabled); void gst_controller_set_disabled (GstController *self, gboolean disabled);
void gst_controller_set_property_disabled (GstController *self, gchar * property_name, gboolean disabled); void gst_controller_set_property_disabled (GstController *self, const gchar * property_name, gboolean disabled);
gboolean gst_controller_set_control_source (GstController *self, gchar * property_name, GstControlSource *csource); gboolean gst_controller_set_control_source (GstController *self, const gchar * property_name, GstControlSource *csource);
GstControlSource * gst_controller_get_control_source (GstController *self, gchar * property_name); GstControlSource * gst_controller_get_control_source (GstController *self, const gchar * property_name);
GstClockTime gst_controller_suggest_next_sync (GstController *self); GstClockTime gst_controller_suggest_next_sync (GstController *self);
gboolean gst_controller_sync_values (GstController * self, gboolean gst_controller_sync_values (GstController * self,
GstClockTime timestamp); GstClockTime timestamp);
GValue *gst_controller_get (GstController * self, gchar * property_name, GValue *gst_controller_get (GstController * self, const gchar * property_name,
GstClockTime timestamp); GstClockTime timestamp);
gboolean gst_controller_get_value_arrays (GstController * self, gboolean gst_controller_get_value_arrays (GstController * self,
GstClockTime timestamp, GSList * value_arrays); GstClockTime timestamp, GSList * value_arrays);
@ -116,8 +116,8 @@ gboolean gst_object_set_controller (GObject * object, GstController * controller
GstClockTime gst_object_suggest_next_sync (GObject * object); GstClockTime gst_object_suggest_next_sync (GObject * object);
gboolean gst_object_sync_values (GObject * object, GstClockTime timestamp); gboolean gst_object_sync_values (GObject * object, GstClockTime timestamp);
gboolean gst_object_set_control_source (GObject *object, gchar * property_name, GstControlSource *csource); gboolean gst_object_set_control_source (GObject *object, const gchar * property_name, GstControlSource *csource);
GstControlSource * gst_object_get_control_source (GObject *object, gchar * property_name); GstControlSource * gst_object_get_control_source (GObject *object, const gchar * property_name);
gboolean gst_object_get_value_arrays (GObject * object, gboolean gst_object_get_value_arrays (GObject * object,
GstClockTime timestamp, GSList * value_arrays); GstClockTime timestamp, GSList * value_arrays);
@ -134,20 +134,20 @@ gboolean gst_controller_init (int * argc, char ***argv);
/* FIXME: deprecated functions */ /* FIXME: deprecated functions */
#ifndef GST_DISABLE_DEPRECATED #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); GstClockTime timestamp, GValue * value);
gboolean gst_controller_set_from_list (GstController * self, 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); 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, const GList *gst_controller_get_all (GstController * self,
gchar * property_name); const gchar * property_name);
gboolean gst_controller_set_interpolation_mode (GstController * self, gboolean gst_controller_set_interpolation_mode (GstController * self,
gchar * property_name, GstInterpolateMode mode); const gchar * property_name, GstInterpolateMode mode);
#endif /* GST_DISABLE_DEPRECATED */ #endif /* GST_DISABLE_DEPRECATED */
G_END_DECLS G_END_DECLS

View file

@ -49,9 +49,6 @@
#define GST_CAT_DEFAULT controller_debug #define GST_CAT_DEFAULT controller_debug
GST_DEBUG_CATEGORY_EXTERN (GST_CAT_DEFAULT); GST_DEBUG_CATEGORY_EXTERN (GST_CAT_DEFAULT);
static void gst_control_source_class_init (GstControlSourceClass * klass);
static void gst_control_source_init (GstControlSource * self);
G_DEFINE_ABSTRACT_TYPE (GstControlSource, gst_control_source, G_TYPE_OBJECT); G_DEFINE_ABSTRACT_TYPE (GstControlSource, gst_control_source, G_TYPE_OBJECT);
static GObjectClass *parent_class = NULL; static GObjectClass *parent_class = NULL;

View file

@ -206,7 +206,7 @@ gst_object_sync_values (GObject * object, GstClockTime timestamp)
* Since: 0.10.14 * Since: 0.10.14
*/ */
gboolean gboolean
gst_object_set_control_source (GObject * object, gchar * property_name, gst_object_set_control_source (GObject * object, const gchar * property_name,
GstControlSource * csource) GstControlSource * csource)
{ {
GstController *ctrl = NULL; GstController *ctrl = NULL;
@ -234,7 +234,7 @@ gst_object_set_control_source (GObject * object, gchar * property_name,
* Since: 0.10.14 * Since: 0.10.14
*/ */
GstControlSource * 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; GstController *ctrl = NULL;

View file

@ -47,12 +47,6 @@
#define GST_CAT_DEFAULT controller_debug #define GST_CAT_DEFAULT controller_debug
GST_DEBUG_CATEGORY_EXTERN (GST_CAT_DEFAULT); GST_DEBUG_CATEGORY_EXTERN (GST_CAT_DEFAULT);
static void gst_interpolation_control_source_init (GstInterpolationControlSource
* self);
static void
gst_interpolation_control_source_class_init (GstInterpolationControlSourceClass
* klass);
G_DEFINE_TYPE (GstInterpolationControlSource, gst_interpolation_control_source, G_DEFINE_TYPE (GstInterpolationControlSource, gst_interpolation_control_source,
GST_TYPE_CONTROL_SOURCE); GST_TYPE_CONTROL_SOURCE);

View file

@ -602,10 +602,6 @@ gst_lfo_waveform_get_type (void)
return gtype; return gtype;
} }
static void gst_lfo_control_source_init (GstLFOControlSource * self);
static void
gst_lfo_control_source_class_init (GstLFOControlSourceClass * klass);
G_DEFINE_TYPE (GstLFOControlSource, gst_lfo_control_source, G_DEFINE_TYPE (GstLFOControlSource, gst_lfo_control_source,
GST_TYPE_CONTROL_SOURCE); GST_TYPE_CONTROL_SOURCE);

View file

@ -44,7 +44,6 @@ G_BEGIN_DECLS
#define GST_DP_HEADER_CRC_HEADER(x) GST_READ_UINT16_BE (x + 58) #define GST_DP_HEADER_CRC_HEADER(x) GST_READ_UINT16_BE (x + 58)
#define GST_DP_HEADER_CRC_PAYLOAD(x) GST_READ_UINT16_BE (x + 60) #define GST_DP_HEADER_CRC_PAYLOAD(x) GST_READ_UINT16_BE (x + 60)
void gst_dp_init (void);
void gst_dp_dump_byte_array (guint8 *array, guint length); void gst_dp_dump_byte_array (guint8 *array, guint length);
G_END_DECLS G_END_DECLS

View file

@ -47,7 +47,7 @@ main (int argc, char *argv[])
my_argc = 2; my_argc = 2;
my_argv = g_malloc (my_argc * sizeof (char *)); my_argv = g_malloc (my_argc * sizeof (char *));
my_argv[0] = argv[0]; my_argv[0] = argv[0];
my_argv[1] = "--gst-disable-registry-update"; my_argv[1] = (char *) "--gst-disable-registry-update";
#ifndef GST_DISABLE_REGISTRY #ifndef GST_DISABLE_REGISTRY
_gst_disable_registry_cache = TRUE; _gst_disable_registry_cache = TRUE;

View file

@ -601,7 +601,7 @@ gst_fd_sink_uri_get_type (void)
static gchar ** static gchar **
gst_fd_sink_uri_get_protocols (void) gst_fd_sink_uri_get_protocols (void)
{ {
static gchar *protocols[] = { "fd", NULL }; static gchar *protocols[] = { (char *) "fd", NULL };
return protocols; return protocols;
} }

View file

@ -604,7 +604,7 @@ gst_fd_src_uri_get_type (void)
static gchar ** static gchar **
gst_fd_src_uri_get_protocols (void) gst_fd_src_uri_get_protocols (void)
{ {
static gchar *protocols[] = { "fd", NULL }; static gchar *protocols[] = { (char *) "fd", NULL };
return protocols; return protocols;
} }

View file

@ -693,7 +693,7 @@ gst_file_sink_uri_get_type (void)
static gchar ** static gchar **
gst_file_sink_uri_get_protocols (void) gst_file_sink_uri_get_protocols (void)
{ {
static gchar *protocols[] = { "file", NULL }; static gchar *protocols[] = { (char *) "file", NULL };
return protocols; return protocols;
} }

View file

@ -1117,7 +1117,7 @@ gst_file_src_uri_get_type (void)
static gchar ** static gchar **
gst_file_src_uri_get_protocols (void) gst_file_src_uri_get_protocols (void)
{ {
static gchar *protocols[] = { "file", NULL }; static gchar *protocols[] = { (char *) "file", NULL };
return protocols; return protocols;
} }

View file

@ -150,7 +150,7 @@ main (gint argc, gchar * argv[])
{ {
GstClockTime sample_duration = GstClockTime sample_duration =
gst_util_uint64_scale_int (1, GST_SECOND, 44100); gst_util_uint64_scale_int (1, GST_SECOND, 44100);
GstValueArray va = { "freq", GstValueArray va = { (char *) "freq",
BLOCK_SIZE * NUM_CP, BLOCK_SIZE * NUM_CP,
sample_duration, sample_duration,
NULL NULL

View file

@ -132,7 +132,6 @@ run_test (void *threadid)
} }
} }
g_thread_exit (NULL);
return NULL; return NULL;
} }

View file

@ -42,7 +42,7 @@ main (gint argc, gchar * argv[])
GstElement *pipeline, *src, *sink, *current, *last; GstElement *pipeline, *src, *sink, *current, *last;
guint i, buffers = BUFFER_COUNT, identities = IDENTITY_COUNT; guint i, buffers = BUFFER_COUNT, identities = IDENTITY_COUNT;
GstClockTime start, end; 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); gst_init (&argc, &argv);

View file

@ -864,6 +864,7 @@ GST_END_TEST;
typedef GstPushSrc OOBSource; typedef GstPushSrc OOBSource;
typedef GstPushSrcClass OOBSourceClass; typedef GstPushSrcClass OOBSourceClass;
GType oob_source_get_type (void);
GST_BOILERPLATE (OOBSource, oob_source, GstPushSrc, GST_TYPE_PUSH_SRC); GST_BOILERPLATE (OOBSource, oob_source, GstPushSrc, GST_TYPE_PUSH_SRC);
static void static void

View file

@ -116,7 +116,7 @@ GST_START_TEST (test_stress)
{ {
GstElement *pipeline; GstElement *pipeline;
GstElement *tee; GstElement *tee;
gchar *desc; const gchar *desc;
GstBus *bus; GstBus *bus;
GstMessage *msg; GstMessage *msg;
gint i; gint i;

View file

@ -45,7 +45,7 @@ cleanup (void)
} }
static GstBuffer * static GstBuffer *
buffer_from_string (gchar * str) buffer_from_string (const gchar * str)
{ {
guint size; guint size;
GstBuffer *buf; GstBuffer *buf;
@ -472,7 +472,7 @@ GST_START_TEST (test_do)
gst_buffer_list_iterator_do (it, gst_buffer_list_iterator_do (it,
(GstBufferListDoFunction) gst_buffer_ref, NULL))); (GstBufferListDoFunction) gst_buffer_ref, NULL)));
fail_unless (buf == NULL); fail_unless (buf == NULL);
data = "data"; data = (char *) "data";
ASSERT_CRITICAL ((buf = gst_buffer_list_iterator_do (it, do_data_func, ASSERT_CRITICAL ((buf = gst_buffer_list_iterator_do (it, do_data_func,
data))); data)));
fail_unless (buf == NULL); fail_unless (buf == NULL);

View file

@ -400,7 +400,7 @@ GST_START_TEST (test_push_linked)
GST_END_TEST; GST_END_TEST;
static GstBuffer * static GstBuffer *
buffer_from_string (gchar * str) buffer_from_string (const gchar * str)
{ {
guint size; guint size;
GstBuffer *buf; GstBuffer *buf;

View file

@ -32,6 +32,7 @@ typedef struct
typedef GstElementClass GstDummyObjClass; typedef GstElementClass GstDummyObjClass;
GType gst_dummy_obj_get_type (void);
GST_BOILERPLATE (GstDummyObj, gst_dummy_obj, GstElement, GST_TYPE_ELEMENT); GST_BOILERPLATE (GstDummyObj, gst_dummy_obj, GstElement, GST_TYPE_ELEMENT);
static void static void

View file

@ -102,15 +102,11 @@ gst_preset_test_class_init (GObjectClass * klass)
static void static void
gst_preset_test_base_init (GstPresetTestClass * klass) 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); 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 static GType

View file

@ -424,7 +424,8 @@ GST_END_TEST;
GST_START_TEST (test_structure_nested_from_and_to_string) GST_START_TEST (test_structure_nested_from_and_to_string)
{ {
GstStructure *s; GstStructure *s;
gchar *str1, *str2, *end = NULL; const gchar *str1;
gchar *str2, *end = NULL;
str1 = "main" str1 = "main"
", main-sub1=(structure)\"type-b\\,\\ machine-type\\=\\(int\\)0\\;\"" ", main-sub1=(structure)\"type-b\\,\\ machine-type\\=\\(int\\)0\\;\""

View file

@ -37,7 +37,8 @@
/* checks that a tag contains the given values and not more values */ /* checks that a tag contains the given values and not more values */
static void 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; va_list args;
gchar *str; gchar *str;

View file

@ -29,6 +29,7 @@ typedef GstElementClass GstDummyEncClass;
static void gst_dummy_enc_add_interfaces (GType enc_type); static void gst_dummy_enc_add_interfaces (GType enc_type);
GType gst_dummy_enc_get_type (void);
GST_BOILERPLATE_FULL (GstDummyEnc, gst_dummy_enc, GstElement, GST_BOILERPLATE_FULL (GstDummyEnc, gst_dummy_enc, GstElement,
GST_TYPE_ELEMENT, gst_dummy_enc_add_interfaces); GST_TYPE_ELEMENT, gst_dummy_enc_add_interfaces);
@ -221,6 +222,7 @@ GST_START_TEST (test_merge_modes_skip_empty)
} }
} }
} }
GST_END_TEST static Suite * GST_END_TEST static Suite *
gst_tag_setter_suite (void) gst_tag_setter_suite (void)
{ {

View file

@ -425,7 +425,7 @@ GST_END_TEST;
GST_START_TEST (test_string) GST_START_TEST (test_string)
{ {
gchar *try[] = { const gchar *try[] = {
"Dude", "Dude",
"Hi, I'm a string", "Hi, I'm a string",
"tüüüt!", "tüüüt!",
@ -460,8 +460,8 @@ GST_START_TEST (test_deserialize_string)
{ {
struct struct
{ {
gchar *from; const gchar *from;
gchar *to; const gchar *to;
} tests[] = { } tests[] = {
{ {
"", ""}, /* empty strings */ "", ""}, /* empty strings */

View file

@ -180,15 +180,12 @@ gst_test_mono_source_class_init (GstTestMonoSourceClass * klass)
static void static void
gst_test_mono_source_base_init (GstTestMonoSourceClass * klass) 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); 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 static GType
@ -1079,7 +1076,7 @@ GST_START_TEST (controller_interpolation_linear_value_array)
fail_unless (res, NULL); fail_unless (res, NULL);
/* now pull in values for some timestamps */ /* now pull in values for some timestamps */
values.property_name = "ulong"; values.property_name = (char *) "ulong";
values.nbsamples = 3; values.nbsamples = 3;
values.sample_interval = GST_SECOND; values.sample_interval = GST_SECOND;
values.values = (gpointer) g_new (gulong, 3); values.values = (gpointer) g_new (gulong, 3);
@ -1987,7 +1984,7 @@ GST_START_TEST (controller_refcount_new_list)
/* that property should exist and should be controllable */ /* that property should exist and should be controllable */
elem = gst_element_factory_make ("testmonosource", "test_source"); 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); ctrl = gst_controller_new_list (G_OBJECT (elem), list);
fail_unless (ctrl != NULL, NULL); fail_unless (ctrl != NULL, NULL);
GST_INFO ("controller->ref_count=%d", G_OBJECT (ctrl)->ref_count); GST_INFO ("controller->ref_count=%d", G_OBJECT (ctrl)->ref_count);
@ -1998,8 +1995,8 @@ GST_START_TEST (controller_refcount_new_list)
/* try the same property twice, make sure the refcount is still 1 */ /* try the same property twice, make sure the refcount is still 1 */
elem = gst_element_factory_make ("testmonosource", "test_source"); elem = gst_element_factory_make ("testmonosource", "test_source");
list = g_list_append (NULL, "ulong"); list = g_list_append (NULL, (char *) "ulong");
list = g_list_append (list, "ulong"); list = g_list_append (list, (char *) "ulong");
ctrl = gst_controller_new_list (G_OBJECT (elem), list); ctrl = gst_controller_new_list (G_OBJECT (elem), list);
fail_unless (ctrl != NULL, NULL); fail_unless (ctrl != NULL, NULL);
GST_INFO ("controller->ref_count=%d", G_OBJECT (ctrl)->ref_count); GST_INFO ("controller->ref_count=%d", G_OBJECT (ctrl)->ref_count);
@ -2010,8 +2007,8 @@ GST_START_TEST (controller_refcount_new_list)
/* try two properties, make sure the refcount is still 1 */ /* try two properties, make sure the refcount is still 1 */
elem = gst_element_factory_make ("testmonosource", "test_source"); elem = gst_element_factory_make ("testmonosource", "test_source");
list = g_list_append (NULL, "ulong"); list = g_list_append (NULL, (char *) "ulong");
list = g_list_append (list, "boolean"); list = g_list_append (list, (char *) "boolean");
ctrl = gst_controller_new_list (G_OBJECT (elem), list); ctrl = gst_controller_new_list (G_OBJECT (elem), list);
fail_unless (ctrl != NULL, NULL); fail_unless (ctrl != NULL, NULL);
GST_INFO ("controller->ref_count=%d", G_OBJECT (ctrl)->ref_count); GST_INFO ("controller->ref_count=%d", G_OBJECT (ctrl)->ref_count);
@ -2025,7 +2022,7 @@ GST_START_TEST (controller_refcount_new_list)
ctrl = gst_controller_new (G_OBJECT (elem), "ulong", NULL); ctrl = gst_controller_new (G_OBJECT (elem), "ulong", NULL);
fail_unless (ctrl != NULL, NULL); fail_unless (ctrl != NULL, NULL);
GST_INFO ("controller->ref_count=%d", G_OBJECT (ctrl)->ref_count); 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); ctrl2 = gst_controller_new_list (G_OBJECT (elem), list);
fail_unless (ctrl2 != NULL, NULL); fail_unless (ctrl2 != NULL, NULL);
fail_unless (ctrl == ctrl2, NULL); fail_unless (ctrl == ctrl2, NULL);
@ -2038,7 +2035,7 @@ GST_START_TEST (controller_refcount_new_list)
/* try _new_list first and then _new */ /* try _new_list first and then _new */
elem = gst_element_factory_make ("testmonosource", "test_source"); 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); ctrl = gst_controller_new_list (G_OBJECT (elem), list);
fail_unless (ctrl != NULL, NULL); fail_unless (ctrl != NULL, NULL);
GST_INFO ("controller->ref_count=%d", G_OBJECT (ctrl)->ref_count); GST_INFO ("controller->ref_count=%d", G_OBJECT (ctrl)->ref_count);

View file

@ -55,6 +55,8 @@ struct _GstTestTransClass
GstBaseTransformClass parent_class; GstBaseTransformClass parent_class;
}; };
GType gst_test_trans_get_type (void);
GST_BOILERPLATE (GstTestTrans, gst_test_trans, GstBaseTransform, GST_BOILERPLATE (GstTestTrans, gst_test_trans, GstBaseTransform,
GST_TYPE_BASE_TRANSFORM); GST_TYPE_BASE_TRANSFORM);

View file

@ -195,11 +195,7 @@ GST_START_TEST (basetransform_chain_pt2)
buffer = gst_test_trans_pop (trans); buffer = gst_test_trans_pop (trans);
fail_unless (buffer != NULL); fail_unless (buffer != NULL);
fail_unless (GST_BUFFER_SIZE (buffer) == 20); fail_unless (GST_BUFFER_SIZE (buffer) == 20);
#if OPTIMIZED
fail_unless (GST_BUFFER_CAPS (buffer) == caps);
#else
fail_unless (gst_caps_is_equal (GST_BUFFER_CAPS (buffer), caps)); fail_unless (gst_caps_is_equal (GST_BUFFER_CAPS (buffer), caps));
#endif
gst_buffer_unref (buffer); gst_buffer_unref (buffer);
@ -235,11 +231,7 @@ GST_START_TEST (basetransform_chain_pt2)
buffer = gst_test_trans_pop (trans); buffer = gst_test_trans_pop (trans);
fail_unless (buffer != NULL); fail_unless (buffer != NULL);
fail_unless (GST_BUFFER_SIZE (buffer) == 10); fail_unless (GST_BUFFER_SIZE (buffer) == 10);
#if OPTIMIZED
fail_unless (GST_BUFFER_CAPS (buffer) == caps);
#else
fail_unless (gst_caps_is_equal (GST_BUFFER_CAPS (buffer), caps)); fail_unless (gst_caps_is_equal (GST_BUFFER_CAPS (buffer), caps));
#endif
gst_buffer_unref (buffer); gst_buffer_unref (buffer);
@ -462,11 +454,7 @@ GST_START_TEST (basetransform_chain_ip2)
buffer = gst_test_trans_pop (trans); buffer = gst_test_trans_pop (trans);
fail_unless (buffer != NULL); fail_unless (buffer != NULL);
fail_unless (GST_BUFFER_SIZE (buffer) == 20); fail_unless (GST_BUFFER_SIZE (buffer) == 20);
#if OPTIMIZED
fail_unless (GST_BUFFER_CAPS (buffer) == caps);
#else
fail_unless (gst_caps_is_equal (GST_BUFFER_CAPS (buffer), caps)); fail_unless (gst_caps_is_equal (GST_BUFFER_CAPS (buffer), caps));
#endif
gst_buffer_unref (buffer); gst_buffer_unref (buffer);
/* with caps buffer */ /* with caps buffer */
@ -501,11 +489,7 @@ GST_START_TEST (basetransform_chain_ip2)
buffer = gst_test_trans_pop (trans); buffer = gst_test_trans_pop (trans);
fail_unless (buffer != NULL); fail_unless (buffer != NULL);
fail_unless (GST_BUFFER_SIZE (buffer) == 20); fail_unless (GST_BUFFER_SIZE (buffer) == 20);
#if OPTIMIZED
fail_unless (GST_BUFFER_CAPS (buffer) == caps);
#else
fail_unless (gst_caps_is_equal (GST_BUFFER_CAPS (buffer), caps)); fail_unless (gst_caps_is_equal (GST_BUFFER_CAPS (buffer), caps));
#endif
/* output buffer has refcount 1 */ /* output buffer has refcount 1 */
fail_unless (GST_MINI_OBJECT_REFCOUNT_VALUE (buffer) == 1); fail_unless (GST_MINI_OBJECT_REFCOUNT_VALUE (buffer) == 1);

View file

@ -42,7 +42,7 @@ static GstStaticCaps foobar_caps = GST_STATIC_CAPS ("foo/x-bar");
/* make sure the entire data in the buffer is available for peeking */ /* make sure the entire data in the buffer is available for peeking */
GST_START_TEST (test_buffer_range) GST_START_TEST (test_buffer_range)
{ {
static gchar *foobar_exts[] = { "foobar", NULL }; static const gchar *foobar_exts[] = { "foobar", NULL };
GstStructure *s; GstStructure *s;
GstBuffer *buf; GstBuffer *buf;

View file

@ -24,7 +24,7 @@
static GstElement * static GstElement *
setup_pipeline (gchar * pipe_descr) setup_pipeline (const gchar * pipe_descr)
{ {
GstElement *pipeline; GstElement *pipeline;
@ -37,7 +37,7 @@ setup_pipeline (gchar * pipe_descr)
the poll call will time out after half a second. the poll call will time out after half a second.
*/ */
static void static void
run_pipeline (GstElement * pipeline, gchar * descr, run_pipeline (GstElement * pipeline, const gchar * descr,
GstMessageType events, GstMessageType tevent) GstMessageType events, GstMessageType tevent)
{ {
GstBus *bus; GstBus *bus;
@ -78,7 +78,7 @@ run_pipeline (GstElement * pipeline, gchar * descr,
GST_START_TEST (test_pipeline_unref) GST_START_TEST (test_pipeline_unref)
{ {
gchar *s; const gchar *s;
GstElement *pipeline, *src, *sink; GstElement *pipeline, *src, *sink;
s = "fakesrc name=src num-buffers=20 ! fakesink name=sink"; s = "fakesrc name=src num-buffers=20 ! fakesink name=sink";

View file

@ -478,10 +478,10 @@ static void
gst_parse_test_element_base_init (gpointer g_class) gst_parse_test_element_base_init (gpointer g_class)
{ {
static const GstElementDetails cdfoo_details = static const GstElementDetails cdfoo_details =
GST_ELEMENT_DETAILS ("Test element for parse launch tests", GST_ELEMENT_DETAILS ((char *) "Test element for parse launch tests",
"Source", (char *) "Source",
"Test element for parse launch tests in core", (char *) "Test element for parse launch tests in core",
"GStreamer Devel <gstreamer-devel@lists.sf.net>"); (char *) "GStreamer Devel <gstreamer-devel@lists.sf.net>");
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_set_details (element_class, &cdfoo_details); gst_element_class_set_details (element_class, &cdfoo_details);

View file

@ -24,7 +24,7 @@
static GstElement * static GstElement *
setup_pipeline (gchar * pipe_descr) setup_pipeline (const gchar * pipe_descr)
{ {
GstElement *pipeline; GstElement *pipeline;
@ -43,7 +43,7 @@ setup_pipeline (gchar * pipe_descr)
* the poll call will time out after half a second. * the poll call will time out after half a second.
*/ */
static void static void
run_pipeline (GstElement * pipeline, gchar * descr, run_pipeline (GstElement * pipeline, const gchar * descr,
GstMessageType message_types, GstMessageType tmessage) GstMessageType message_types, GstMessageType tmessage)
{ {
GstBus *bus; GstBus *bus;
@ -97,7 +97,7 @@ done:
GST_START_TEST (test_2_elements) GST_START_TEST (test_2_elements)
{ {
gchar *s; const gchar *s;
s = "fakesrc can-activate-push=false ! fakesink can-activate-pull=true"; s = "fakesrc can-activate-push=false ! fakesink can-activate-pull=true";
run_pipeline (setup_pipeline (s), s, run_pipeline (setup_pipeline (s), s,
@ -147,7 +147,7 @@ check_state_change_return (GstElement * pipeline, GstState state,
GST_START_TEST (test_state_change_returns) GST_START_TEST (test_state_change_returns)
{ {
gchar *s; const gchar *s;
GstElement *pipeline; GstElement *pipeline;
s = "fakesrc can-activate-pull=false ! fakesink"; s = "fakesrc can-activate-pull=false ! fakesink";
@ -188,7 +188,7 @@ GST_END_TEST;
G_GNUC_UNUSED G_GNUC_UNUSED
GST_START_TEST (test_tee) GST_START_TEST (test_tee)
{ {
gchar *s; const gchar *s;
s = "fakesrc can-activate-push=true ! tee ! fakesink can-activate-push=true"; s = "fakesrc can-activate-push=true ! tee ! fakesink can-activate-push=true";
run_pipeline (setup_pipeline (s), s, run_pipeline (setup_pipeline (s), s,

View file

@ -21,8 +21,6 @@
#include "testrtpool.h" #include "testrtpool.h"
static void test_rt_pool_class_init (TestRTPoolClass * klass);
static void test_rt_pool_init (TestRTPool * pool);
static void test_rt_pool_finalize (GObject * object); static void test_rt_pool_finalize (GObject * object);
typedef struct typedef struct

View file

@ -171,7 +171,7 @@ print_event_masks (const GstEventMask * masks)
} }
#endif #endif
static char * static const char *
get_rank_name (gint rank) get_rank_name (gint rank)
{ {
switch (rank) { switch (rank) {
@ -942,7 +942,7 @@ print_children_info (GstElement * element)
} }
static void static void
print_blacklist () print_blacklist (void)
{ {
GList *plugins, *cur; GList *plugins, *cur;
gint count = 0; gint count = 0;