aboutsummaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2012-10-25 13:21:13 +0200
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2012-10-25 13:21:13 +0200
commit8421cfdca94795cdb6513d3d6c38abd3a416373b (patch)
treeb259bfa95d54a3dbc09033dc5040c6e27a0f1036 /gst
parentf4e033e836d36ee95103886032932bf823db5e3f (diff)
Imported Upstream version 1.0.2upstream/1.0.2
Diffstat (limited to 'gst')
-rw-r--r--gst/Makefile.in6
-rw-r--r--gst/gst.c3
-rw-r--r--gst/gstallocator.c1
-rw-r--r--gst/gstbin.c2
-rw-r--r--gst/gstelement.c50
-rw-r--r--gst/gstelement.h6
-rw-r--r--gst/gstevent.c1
-rw-r--r--gst/gstinfo.c30
-rw-r--r--gst/gstpad.c2
-rw-r--r--gst/gstpad.h3
-rw-r--r--gst/gstpipeline.c2
-rw-r--r--gst/gstpoll.c4
-rw-r--r--gst/gstpreset.c1
-rw-r--r--gst/gstquery.c5
-rw-r--r--gst/gstsample.c2
-rw-r--r--gst/parse/Makefile.in6
-rw-r--r--gst/parse/grammar.tab.h37
17 files changed, 110 insertions, 51 deletions
diff --git a/gst/Makefile.in b/gst/Makefile.in
index bd3a622..0c96219 100644
--- a/gst/Makefile.in
+++ b/gst/Makefile.in
@@ -86,7 +86,7 @@ am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \
$(top_srcdir)/common/m4/gst.m4 \
$(top_srcdir)/common/m4/gtk-doc.m4 \
$(top_srcdir)/common/m4/introspection.m4 \
- $(top_srcdir)/common/m4/pkg.m4 \
+ $(top_srcdir)/common/m4/pkg.m4 $(top_srcdir)/m4/ax_pthread.m4 \
$(top_srcdir)/m4/check-checks.m4 $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
@@ -496,6 +496,9 @@ PKG_CONFIG = @PKG_CONFIG@
PLUGINDIR = @PLUGINDIR@
POSUB = @POSUB@
PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
PYTHON = @PYTHON@
PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
PYTHON_PLATFORM = @PYTHON_PLATFORM@
@@ -532,6 +535,7 @@ am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
diff --git a/gst/gst.c b/gst/gst.c
index 1be9773..c58e101 100644
--- a/gst/gst.c
+++ b/gst/gst.c
@@ -545,8 +545,9 @@ init_pre (GOptionContext * context, GOptionGroup * group, gpointer data,
GST_DEBUG ("already initialized");
return TRUE;
}
-
+#if !GLIB_CHECK_VERSION(2, 35, 0)
g_type_init ();
+#endif
#ifndef GST_DISABLE_GST_DEBUG
_priv_gst_debug_init ();
diff --git a/gst/gstallocator.c b/gst/gstallocator.c
index df5b04f..a80b9a1 100644
--- a/gst/gstallocator.c
+++ b/gst/gstallocator.c
@@ -106,6 +106,7 @@ _fallback_mem_copy (GstMemory * mem, gssize offset, gssize size)
copy = gst_allocator_alloc (mem->allocator, size, &params);
if (!gst_memory_map (copy, &dinfo, GST_MAP_WRITE)) {
GST_CAT_WARNING (GST_CAT_MEMORY, "could not write map memory %p", copy);
+ gst_allocator_free (mem->allocator, copy);
gst_memory_unmap (mem, &sinfo);
return NULL;
}
diff --git a/gst/gstbin.c b/gst/gstbin.c
index cc39027..550b7d6 100644
--- a/gst/gstbin.c
+++ b/gst/gstbin.c
@@ -441,7 +441,7 @@ gst_bin_class_init (GstBinClass * klass)
gobject_class->dispose = gst_bin_dispose;
- gst_element_class_set_metadata (gstelement_class, "Generic bin",
+ gst_element_class_set_static_metadata (gstelement_class, "Generic bin",
"Generic/Bin",
"Simple container object",
"Erik Walthinsen <omega@cse.ogi.edu>,"
diff --git a/gst/gstelement.c b/gst/gstelement.c
index c8205df..b4b87f4 100644
--- a/gst/gstelement.c
+++ b/gst/gstelement.c
@@ -130,6 +130,9 @@ static GstStateChangeReturn gst_element_set_state_func (GstElement * element,
static gboolean gst_element_set_clock_func (GstElement * element,
GstClock * clock);
static void gst_element_set_bus_func (GstElement * element, GstBus * bus);
+static gboolean gst_element_post_message_default (GstElement * element,
+ GstMessage * message);
+
static gboolean gst_element_default_send_event (GstElement * element,
GstEvent * event);
@@ -235,6 +238,7 @@ gst_element_class_init (GstElementClass * klass)
klass->query = GST_DEBUG_FUNCPTR (gst_element_default_query);
klass->send_event = GST_DEBUG_FUNCPTR (gst_element_default_send_event);
klass->numpadtemplates = 0;
+ klass->post_message = GST_DEBUG_FUNCPTR (gst_element_post_message_default);
klass->elementfactory = NULL;
}
@@ -1662,22 +1666,8 @@ gst_element_query (GstElement * element, GstQuery * query)
return result;
}
-/**
- * gst_element_post_message:
- * @element: a #GstElement posting the message
- * @message: (transfer full): a #GstMessage to post
- *
- * Post a message on the element's #GstBus. This function takes ownership of the
- * message; if you want to access the message after this call, you should add an
- * additional reference before calling.
- *
- * Returns: %TRUE if the message was successfully posted. The function returns
- * %FALSE if the element did not have a bus.
- *
- * MT safe.
- */
-gboolean
-gst_element_post_message (GstElement * element, GstMessage * message)
+static gboolean
+gst_element_post_message_default (GstElement * element, GstMessage * message)
{
GstBus *bus;
gboolean result = FALSE;
@@ -1713,6 +1703,34 @@ no_bus:
}
/**
+ * gst_element_post_message:
+ * @element: a #GstElement posting the message
+ * @message: (transfer full): a #GstMessage to post
+ *
+ * Post a message on the element's #GstBus. This function takes ownership of the
+ * message; if you want to access the message after this call, you should add an
+ * additional reference before calling.
+ *
+ * Returns: %TRUE if the message was successfully posted. The function returns
+ * %FALSE if the element did not have a bus.
+ *
+ * MT safe.
+ */
+gboolean
+gst_element_post_message (GstElement * element, GstMessage * message)
+{
+ GstElementClass *klass;
+
+ g_return_val_if_fail (GST_IS_ELEMENT (element), FALSE);
+
+ klass = GST_ELEMENT_GET_CLASS (element);
+ if (klass->post_message)
+ return klass->post_message (element, message);
+
+ return FALSE;
+}
+
+/**
* _gst_element_error_printf:
* @format: the printf-like format to use, or %NULL
*
diff --git a/gst/gstelement.h b/gst/gstelement.h
index 725dc34..df71720 100644
--- a/gst/gstelement.h
+++ b/gst/gstelement.h
@@ -591,6 +591,8 @@ struct _GstElement
* @send_event: send a #GstEvent to the element
* @query: perform a #GstQuery on the element
* @state_changed: called immediately after a new state was set.
+ * @post_message: called when a message is posted on the element. Chain up to
+ * the parent class' handler to have it posted on the bus.
*
* GStreamer element class. Override the vmethods to implement the element
* functionality.
@@ -645,8 +647,10 @@ struct _GstElementClass
gboolean (*query) (GstElement *element, GstQuery *query);
+ gboolean (*post_message) (GstElement *element, GstMessage *message);
+
/*< private >*/
- gpointer _gst_reserved[GST_PADDING_LARGE];
+ gpointer _gst_reserved[GST_PADDING_LARGE-1];
};
/* element class pad templates */
diff --git a/gst/gstevent.c b/gst/gstevent.c
index 188325d..87d4acb 100644
--- a/gst/gstevent.c
+++ b/gst/gstevent.c
@@ -568,7 +568,6 @@ gst_event_new_gap (GstClockTime timestamp, GstClockTime duration)
GstEvent *event;
g_return_val_if_fail (GST_CLOCK_TIME_IS_VALID (timestamp), NULL);
- g_return_val_if_fail (GST_CLOCK_TIME_IS_VALID (duration), NULL);
GST_CAT_TRACE (GST_CAT_EVENT, "creating gap %" GST_TIME_FORMAT " - "
"%" GST_TIME_FORMAT " (duration: %" GST_TIME_FORMAT ")",
diff --git a/gst/gstinfo.c b/gst/gstinfo.c
index eadb5e0..5929d10 100644
--- a/gst/gstinfo.c
+++ b/gst/gstinfo.c
@@ -129,6 +129,8 @@
#endif /* !GST_DISABLE_GST_DEBUG */
+extern gboolean gst_is_initialized (void);
+
/* we want these symbols exported even if debug is disabled, to maintain
* ABI compatibility. Unless GST_REMOVE_DISABLED is defined. */
#if !defined(GST_DISABLE_GST_DEBUG) || !defined(GST_REMOVE_DISABLED)
@@ -1104,8 +1106,9 @@ gst_debug_add_log_function (GstLogFunction func, gpointer user_data,
__log_functions = g_slist_prepend (list, entry);
g_mutex_unlock (&__log_func_mutex);
- GST_DEBUG ("prepended log function %p (user data %p) to log functions",
- func, user_data);
+ if (gst_is_initialized ())
+ GST_DEBUG ("prepended log function %p (user data %p) to log functions",
+ func, user_data);
}
static gint
@@ -1180,8 +1183,9 @@ gst_debug_remove_log_function (GstLogFunction func)
removals =
gst_debug_remove_with_compare_func
(gst_debug_compare_log_function_by_func, (gpointer) func);
- GST_DEBUG ("removed log function %p %d times from log function list", func,
- removals);
+ if (gst_is_initialized ())
+ GST_DEBUG ("removed log function %p %d times from log function list", func,
+ removals);
return removals;
}
@@ -1202,9 +1206,11 @@ gst_debug_remove_log_function_by_data (gpointer data)
removals =
gst_debug_remove_with_compare_func
(gst_debug_compare_log_function_by_data, data);
- GST_DEBUG
- ("removed %d log functions with user data %p from log function list",
- removals, data);
+
+ if (gst_is_initialized ())
+ GST_DEBUG
+ ("removed %d log functions with user data %p from log function list",
+ removals, data);
return removals;
}
@@ -1311,8 +1317,9 @@ gst_debug_reset_threshold (gpointer category, gpointer unused)
walk = g_slist_next (walk);
if (g_pattern_match_string (entry->pat, cat->name)) {
- GST_LOG ("category %s matches pattern %p - gets set to level %d",
- cat->name, entry->pat, entry->level);
+ if (gst_is_initialized ())
+ GST_LOG ("category %s matches pattern %p - gets set to level %d",
+ cat->name, entry->pat, entry->level);
gst_debug_category_set_threshold (cat, entry->level);
goto exit;
}
@@ -1338,8 +1345,9 @@ for_each_threshold_by_entry (gpointer data, gpointer user_data)
LevelNameEntry *entry = (LevelNameEntry *) user_data;
if (g_pattern_match_string (entry->pat, cat->name)) {
- GST_LOG ("category %s matches pattern %p - gets set to level %d",
- cat->name, entry->pat, entry->level);
+ if (gst_is_initialized ())
+ GST_LOG ("category %s matches pattern %p - gets set to level %d",
+ cat->name, entry->pat, entry->level);
gst_debug_category_set_threshold (cat, entry->level);
}
}
diff --git a/gst/gstpad.c b/gst/gstpad.c
index 92891fa..e609fe2 100644
--- a/gst/gstpad.c
+++ b/gst/gstpad.c
@@ -3579,7 +3579,7 @@ sticky_failed:
}
no_peer:
{
- GST_WARNING_OBJECT (pad, "pad has no peer");
+ GST_INFO_OBJECT (pad, "pad has no peer");
GST_OBJECT_UNLOCK (pad);
return FALSE;
}
diff --git a/gst/gstpad.h b/gst/gstpad.h
index 676cd69..0378b5a 100644
--- a/gst/gstpad.h
+++ b/gst/gstpad.h
@@ -154,7 +154,6 @@ typedef enum {
* Note that the custom return values should not be exposed outside of the
* element scope.
*/
-/* FIXME 0.11: remove custom flow returns */
typedef enum {
/* custom success starts here */
GST_FLOW_CUSTOM_SUCCESS_2 = 102,
@@ -563,6 +562,8 @@ GstBufferList* gst_pad_probe_info_get_buffer_list (GstPadProbeInfo * info);
* blocking type.
*
* The callback is allowed to modify the data pointer in @info.
+ *
+ * Returns: a #GstPadProbeReturn
*/
typedef GstPadProbeReturn (*GstPadProbeCallback) (GstPad *pad, GstPadProbeInfo *info,
gpointer user_data);
diff --git a/gst/gstpipeline.c b/gst/gstpipeline.c
index c15f003..f92b5c3 100644
--- a/gst/gstpipeline.c
+++ b/gst/gstpipeline.c
@@ -182,7 +182,7 @@ gst_pipeline_class_init (GstPipelineClass * klass)
gobject_class->dispose = gst_pipeline_dispose;
- gst_element_class_set_metadata (gstelement_class, "Pipeline object",
+ gst_element_class_set_static_metadata (gstelement_class, "Pipeline object",
"Generic/Bin",
"Complete pipeline object",
"Erik Walthinsen <omega@cse.ogi.edu>, Wim Taymans <wim@fluendo.com>");
diff --git a/gst/gstpoll.c b/gst/gstpoll.c
index 5a0a886..d790b31 100644
--- a/gst/gstpoll.c
+++ b/gst/gstpoll.c
@@ -271,7 +271,7 @@ find_index (GArray * array, GstPollFD * fd)
#if !defined(HAVE_PPOLL) && defined(HAVE_POLL)
/* check if all file descriptors will fit in an fd_set */
static gboolean
-selectable_fds (const GstPoll * set)
+selectable_fds (GstPoll * set)
{
guint i;
@@ -311,7 +311,7 @@ pollable_timeout (GstClockTime timeout)
#endif
static GstPollMode
-choose_mode (const GstPoll * set, GstClockTime timeout)
+choose_mode (GstPoll * set, GstClockTime timeout)
{
GstPollMode mode;
diff --git a/gst/gstpreset.c b/gst/gstpreset.c
index 4a97276..68a657c 100644
--- a/gst/gstpreset.c
+++ b/gst/gstpreset.c
@@ -390,7 +390,6 @@ preset_get_keyfile (GstPreset * preset)
if (presets)
g_key_file_free (presets);
presets = in_user;
- version = version_user;
}
}
diff --git a/gst/gstquery.c b/gst/gstquery.c
index 008cf55..25a4f38 100644
--- a/gst/gstquery.c
+++ b/gst/gstquery.c
@@ -1109,7 +1109,7 @@ gst_query_parse_buffering_percent (GstQuery * query, gboolean * busy,
* @mode: a buffering mode
* @avg_in: the average input rate
* @avg_out: the average output rate
- * @buffering_left: amount of buffering time left
+ * @buffering_left: amount of buffering time left in milliseconds
*
* Configures the buffering stats values in @query.
*/
@@ -1136,7 +1136,8 @@ gst_query_set_buffering_stats (GstQuery * query, GstBufferingMode mode,
* @mode: (out) (allow-none): a buffering mode, or NULL
* @avg_in: (out) (allow-none): the average input rate, or NULL
* @avg_out: (out) (allow-none): the average output rat, or NULLe
- * @buffering_left: (out) (allow-none): amount of buffering time left, or NULL
+ * @buffering_left: (out) (allow-none): amount of buffering time left in
+ * milliseconds, or NULL
*
* Extracts the buffering stats values from @query.
*/
diff --git a/gst/gstsample.c b/gst/gstsample.c
index 93cb0b0..adfe6ba 100644
--- a/gst/gstsample.c
+++ b/gst/gstsample.c
@@ -84,7 +84,7 @@ _gst_sample_free (GstSample * sample)
* gst_sample_new:
* @buffer: (transfer none) (allow-none): a #GstBuffer, or NULL
* @caps: (transfer none) (allow-none): a #GstCaps, or NULL
- * @segment: transfer none) (allow-none): a #GstSegment, or NULL
+ * @segment: (transfer none) (allow-none): a #GstSegment, or NULL
* @info: (transfer full) (allow-none): a #GstStructure, or NULL
*
* Create a new #GstSample with the provided details.
diff --git a/gst/parse/Makefile.in b/gst/parse/Makefile.in
index b578d9e..78c7949 100644
--- a/gst/parse/Makefile.in
+++ b/gst/parse/Makefile.in
@@ -83,7 +83,7 @@ am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \
$(top_srcdir)/common/m4/gst.m4 \
$(top_srcdir)/common/m4/gtk-doc.m4 \
$(top_srcdir)/common/m4/introspection.m4 \
- $(top_srcdir)/common/m4/pkg.m4 \
+ $(top_srcdir)/common/m4/pkg.m4 $(top_srcdir)/m4/ax_pthread.m4 \
$(top_srcdir)/m4/check-checks.m4 $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
@@ -339,6 +339,9 @@ PKG_CONFIG = @PKG_CONFIG@
PLUGINDIR = @PLUGINDIR@
POSUB = @POSUB@
PROFILE_CFLAGS = @PROFILE_CFLAGS@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
PYTHON = @PYTHON@
PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
PYTHON_PLATFORM = @PYTHON_PLATFORM@
@@ -375,6 +378,7 @@ am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
diff --git a/gst/parse/grammar.tab.h b/gst/parse/grammar.tab.h
index 164198f..51454ce 100644
--- a/gst/parse/grammar.tab.h
+++ b/gst/parse/grammar.tab.h
@@ -1,8 +1,8 @@
-/* A Bison parser, made by GNU Bison 2.5. */
+/* A Bison parser, made by GNU Bison 2.6.2. */
/* Bison interface for Yacc-like parsers in C
- Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -30,6 +30,15 @@
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
+#ifndef PRIV_GST_PARSE_YY_GRAMMAR_TAB_H
+# define PRIV_GST_PARSE_YY_GRAMMAR_TAB_H
+/* Enabling traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+#if YYDEBUG
+extern int priv_gst_parse_yydebug;
+#endif
/* Tokens. */
#ifndef YYTOKENTYPE
@@ -48,12 +57,10 @@
#endif
-
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
{
-
-/* Line 2068 of yacc.c */
+/* Line 2049 of yacc.c */
#line 632 "./grammar.y"
gchar *s;
@@ -64,9 +71,8 @@ typedef union YYSTYPE
graph_t *g;
-
-/* Line 2068 of yacc.c */
-#line 70 "grammar.tab.h"
+/* Line 2049 of yacc.c */
+#line 76 "grammar.tab.h"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
@@ -74,5 +80,18 @@ typedef union YYSTYPE
#endif
+#ifdef YYPARSE_PARAM
+#if defined __STDC__ || defined __cplusplus
+int priv_gst_parse_yyparse (void *YYPARSE_PARAM);
+#else
+int priv_gst_parse_yyparse ();
+#endif
+#else /* ! YYPARSE_PARAM */
+#if defined __STDC__ || defined __cplusplus
+int priv_gst_parse_yyparse (void *scanner, graph_t *graph);
+#else
+int priv_gst_parse_yyparse ();
+#endif
+#endif /* ! YYPARSE_PARAM */
-
+#endif /* !PRIV_GST_PARSE_YY_GRAMMAR_TAB_H */