aboutsummaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2013-08-30 12:35:14 +0200
committerSebastian Dröge <slomo@circular-chaos.org>2013-08-30 12:35:14 +0200
commit63f38155df9cb281e4d48dbc14389e66446436f2 (patch)
treec1e9bdd098a86c3c46af4828367a262bdebfaaaa /gst
parentab458c2ee68b132b62e498fcf293c2ec44477faf (diff)
Imported Upstream version 1.1.4upstream/1.1.4
Diffstat (limited to 'gst')
-rw-r--r--gst/Makefile.in21
-rw-r--r--gst/gst.c11
-rw-r--r--gst/gstallocator.c9
-rw-r--r--gst/gstbuffer.c5
-rw-r--r--gst/gstclock.c45
-rw-r--r--gst/gstcompat.h7
-rw-r--r--gst/gstinfo.c8
-rw-r--r--gst/gstinfo.h2
-rw-r--r--gst/gstparse.h5
-rw-r--r--gst/gstpipeline.c2
-rw-r--r--gst/gstpluginloader.c3
-rw-r--r--gst/gstquark.c2
-rw-r--r--gst/gstquark.h3
-rw-r--r--gst/gstquery.c71
-rw-r--r--gst/gstquery.h2
-rw-r--r--gst/gstsample.c4
-rw-r--r--gst/gstsample.h22
-rw-r--r--gst/gsttaglist.c9
-rw-r--r--gst/gsttaglist.h17
-rw-r--r--gst/gstutils.c51
-rw-r--r--gst/parse/Makefile.in21
-rw-r--r--gst/parse/grammar.tab.h2
-rw-r--r--gst/parse/grammar.y8
-rw-r--r--gst/printf/Makefile.in21
24 files changed, 254 insertions, 97 deletions
diff --git a/gst/Makefile.in b/gst/Makefile.in
index f82da8d..ed53fff 100644
--- a/gst/Makefile.in
+++ b/gst/Makefile.in
@@ -483,7 +483,6 @@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
GTKDOC_MKPDF = @GTKDOC_MKPDF@
GTKDOC_REBASE = @GTKDOC_REBASE@
-HAVE_DOCBOOK2HTML = @HAVE_DOCBOOK2HTML@
HAVE_DOCBOOK2PS = @HAVE_DOCBOOK2PS@
HAVE_DVIPS = @HAVE_DVIPS@
HAVE_EPSTOPDF = @HAVE_EPSTOPDF@
@@ -494,6 +493,7 @@ HAVE_PNGTOPNM = @HAVE_PNGTOPNM@
HAVE_PNMTOPS = @HAVE_PNMTOPS@
HAVE_PS2PDF = @HAVE_PS2PDF@
HAVE_XMLLINT = @HAVE_XMLLINT@
+HAVE_XSLTPROC = @HAVE_XSLTPROC@
HOST_CPU = @HOST_CPU@
HTML_DIR = @HTML_DIR@
INSTALL = @INSTALL@
@@ -1019,22 +1019,25 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstreamer_@GST_API_VERSION@_la-gstvalue.Plo@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
diff --git a/gst/gst.c b/gst/gst.c
index dfed6d9..fd676a3 100644
--- a/gst/gst.c
+++ b/gst/gst.c
@@ -585,6 +585,7 @@ init_post (GOptionContext * context, GOptionGroup * group, gpointer data,
g_type_class_ref (gst_bus_get_type ());
g_type_class_ref (gst_task_get_type ());
g_type_class_ref (gst_clock_get_type ());
+ g_type_class_ref (gst_debug_color_mode_get_type ());
gst_uri_handler_get_type ();
@@ -931,6 +932,7 @@ parse_goption_arg (const gchar * opt,
void
gst_deinit (void)
{
+ GstBinClass *bin_class;
GstClock *clock;
GST_INFO ("deinitializing GStreamer");
@@ -940,6 +942,13 @@ gst_deinit (void)
return;
}
+ bin_class = GST_BIN_CLASS (g_type_class_peek (gst_bin_get_type ()));
+ if (bin_class->pool != NULL) {
+ g_thread_pool_free (bin_class->pool, FALSE, TRUE);
+ bin_class->pool = NULL;
+ }
+ gst_task_cleanup_all ();
+
g_slist_foreach (_priv_gst_preload_plugins, (GFunc) g_free, NULL);
g_slist_free (_priv_gst_preload_plugins);
_priv_gst_preload_plugins = NULL;
@@ -1052,7 +1061,7 @@ gst_deinit (void)
g_type_class_unref (g_type_class_peek (gst_lock_flags_get_type ()));
g_type_class_unref (g_type_class_peek (gst_allocator_flags_get_type ()));
g_type_class_unref (g_type_class_peek (gst_stream_flags_get_type ()));
-
+ g_type_class_unref (g_type_class_peek (gst_debug_color_mode_get_type ()));
gst_deinitialized = TRUE;
GST_INFO ("deinitialized GStreamer");
diff --git a/gst/gstallocator.c b/gst/gstallocator.c
index 63b44bc..f117d98 100644
--- a/gst/gstallocator.c
+++ b/gst/gstallocator.c
@@ -458,13 +458,10 @@ _sysmem_copy (GstMemorySystem * mem, gssize offset, gsize size)
if (size == -1)
size = mem->mem.size > offset ? mem->mem.size - offset : 0;
- copy =
- _sysmem_new_block (0, mem->mem.maxsize, mem->mem.align,
- mem->mem.offset + offset, size);
+ copy = _sysmem_new_block (0, size, mem->mem.align, 0, size);
GST_CAT_DEBUG (GST_CAT_PERFORMANCE,
- "memcpy %" G_GSIZE_FORMAT " memory %p -> %p", mem->mem.maxsize, mem,
- copy);
- memcpy (copy->data, mem->data, mem->mem.maxsize);
+ "memcpy %" G_GSIZE_FORMAT " memory %p -> %p", size, mem, copy);
+ memcpy (copy->data, mem->data + mem->mem.offset + offset, size);
return copy;
}
diff --git a/gst/gstbuffer.c b/gst/gstbuffer.c
index 00358f3..406e90b 100644
--- a/gst/gstbuffer.c
+++ b/gst/gstbuffer.c
@@ -1685,6 +1685,9 @@ gst_buffer_memcmp (GstBuffer * buffer, gsize offset, gconstpointer mem,
"buffer %p, offset %" G_GSIZE_FORMAT ", size %" G_GSIZE_FORMAT, buffer,
offset, size);
+ if (G_UNLIKELY (gst_buffer_get_size (buffer) < offset + size))
+ return -1;
+
len = GST_BUFFER_MEM_LEN (buffer);
for (i = 0; i < len && size > 0 && res == 0; i++) {
@@ -2096,7 +2099,7 @@ gst_buffer_foreach_meta (GstBuffer * buffer, GstBufferForeachMetaFunc func,
* Extracts a copy of at most @size bytes the data at @offset into a #GBytes.
* @dest must be freed using g_free() when done.
*
- * Since: 1.2
+ * Since: 1.0.10
*/
void
diff --git a/gst/gstclock.c b/gst/gstclock.c
index f7ef07d..4666b84 100644
--- a/gst/gstclock.c
+++ b/gst/gstclock.c
@@ -193,35 +193,34 @@ G_STMT_START { \
GST_OBJECT_UNLOCK (clock); \
} G_STMT_END;
-typedef struct
-{
- const gint ret;
- const gchar *name;
- GQuark quark;
-} GstClockQuarks;
-
-static GstClockQuarks clock_quarks[] = {
- {GST_CLOCK_OK, "ok", 0},
- {GST_CLOCK_EARLY, "early", 0},
- {GST_CLOCK_UNSCHEDULED, "unscheduled", 0},
- {GST_CLOCK_BUSY, "busy", 0},
- {GST_CLOCK_BADTIME, "bad-time", 0},
- {GST_CLOCK_ERROR, "error", 0},
- {GST_CLOCK_UNSUPPORTED, "unsupported", 0},
- {GST_CLOCK_DONE, "done", 0}
-};
-
+#ifndef GST_DISABLE_GST_DEBUG
static const gchar *
gst_clock_return_get_name (GstClockReturn ret)
{
- gint i;
-
- for (i = 0; i < G_N_ELEMENTS (clock_quarks); i++) {
- if (ret == clock_quarks[i].ret)
- return clock_quarks[i].name;
+ switch (ret) {
+ case GST_CLOCK_OK:
+ return "ok";
+ case GST_CLOCK_EARLY:
+ return "early";
+ case GST_CLOCK_UNSCHEDULED:
+ return "unscheduled";
+ case GST_CLOCK_BUSY:
+ return "busy";
+ case GST_CLOCK_BADTIME:
+ return "bad-time";
+ case GST_CLOCK_ERROR:
+ return "error";
+ case GST_CLOCK_UNSUPPORTED:
+ return "unsupported";
+ case GST_CLOCK_DONE:
+ return "done";
+ default:
+ break;
}
+
return "unknown";
}
+#endif /* GST_DISABLE_GST_DEBUG */
static void gst_clock_dispose (GObject * object);
static void gst_clock_finalize (GObject * object);
diff --git a/gst/gstcompat.h b/gst/gstcompat.h
index 3f4a682..67f5168 100644
--- a/gst/gstcompat.h
+++ b/gst/gstcompat.h
@@ -19,6 +19,10 @@
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
+
+/* API compatibility stuff */
+#ifndef __GSTCOMPAT_H__
+#define __GSTCOMPAT_H__
/**
* SECTION:gstcompat
* @short_description: Deprecated API entries
@@ -28,9 +32,6 @@
* This can be done in CFLAGS for compiling old code.
*/
-/* API compatibility stuff */
-#ifndef __GSTCOMPAT_H__
-#define __GSTCOMPAT_H__
G_BEGIN_DECLS
diff --git a/gst/gstinfo.c b/gst/gstinfo.c
index 4419817..ea2876d 100644
--- a/gst/gstinfo.c
+++ b/gst/gstinfo.c
@@ -1293,13 +1293,13 @@ gst_debug_set_color_mode (GstDebugColorMode mode)
* Since: 1.2
*/
void
-gst_debug_set_color_mode_from_string (const gchar * str)
+gst_debug_set_color_mode_from_string (const gchar * mode)
{
- if ((strcmp (str, "on") == 0) || (strcmp (str, "auto") == 0))
+ if ((strcmp (mode, "on") == 0) || (strcmp (mode, "auto") == 0))
gst_debug_set_color_mode (GST_DEBUG_COLOR_MODE_ON);
- else if ((strcmp (str, "off") == 0) || (strcmp (str, "disable") == 0))
+ else if ((strcmp (mode, "off") == 0) || (strcmp (mode, "disable") == 0))
gst_debug_set_color_mode (GST_DEBUG_COLOR_MODE_OFF);
- else if (strcmp (str, "unix") == 0)
+ else if (strcmp (mode, "unix") == 0)
gst_debug_set_color_mode (GST_DEBUG_COLOR_MODE_UNIX);
}
diff --git a/gst/gstinfo.h b/gst/gstinfo.h
index 46a81f0..4f9baa6 100644
--- a/gst/gstinfo.h
+++ b/gst/gstinfo.h
@@ -354,7 +354,7 @@ gboolean gst_debug_is_active (void);
void gst_debug_set_colored (gboolean colored);
void gst_debug_set_color_mode (GstDebugColorMode mode);
-void gst_debug_set_color_mode_from_string (const gchar * str);
+void gst_debug_set_color_mode_from_string (const gchar * mode);
gboolean gst_debug_is_colored (void);
GstDebugColorMode gst_debug_get_color_mode (void);
diff --git a/gst/gstparse.h b/gst/gstparse.h
index 09013d9..de437b1 100644
--- a/gst/gstparse.h
+++ b/gst/gstparse.h
@@ -64,13 +64,16 @@ typedef enum
* @GST_PARSE_FLAG_FATAL_ERRORS: Always return NULL when an error occurs
* (default behaviour is to return partially constructed bins or elements
* in some cases)
+ * @GST_PARSE_FLAG_NO_SINGLE_ELEMENT_BINS: If a bin only has a single element,
+ * just return the element.
*
* Parsing options.
*/
typedef enum
{
GST_PARSE_FLAG_NONE = 0,
- GST_PARSE_FLAG_FATAL_ERRORS = (1 << 0)
+ GST_PARSE_FLAG_FATAL_ERRORS = (1 << 0),
+ GST_PARSE_FLAG_NO_SINGLE_ELEMENT_BINS = (1 << 1)
} GstParseFlags;
#define GST_TYPE_PARSE_CONTEXT (gst_parse_context_get_type())
diff --git a/gst/gstpipeline.c b/gst/gstpipeline.c
index 51226a4..5d1d4ae 100644
--- a/gst/gstpipeline.c
+++ b/gst/gstpipeline.c
@@ -648,7 +648,7 @@ gst_pipeline_get_clock (GstPipeline * pipeline)
/**
* gst_pipeline_use_clock:
* @pipeline: a #GstPipeline
- * @clock: (transfer none): the clock to use
+ * @clock: (transfer none) (allow-none): the clock to use
*
* Force @pipeline to use the given @clock. The pipeline will
* always use the given clock even if new clock providers are added
diff --git a/gst/gstpluginloader.c b/gst/gstpluginloader.c
index 3a98943..b1bdcea 100644
--- a/gst/gstpluginloader.c
+++ b/gst/gstpluginloader.c
@@ -586,7 +586,8 @@ put_packet (GstPluginLoader * l, guint type, guint32 tag,
/* 4 bytes packet length */
GST_WRITE_UINT32_BE (out + 4, payload_len);
/* payload */
- memcpy (out + HEADER_SIZE, payload, payload_len);
+ if (payload && payload_len)
+ memcpy (out + HEADER_SIZE, payload, payload_len);
/* Write magic into the header */
GST_WRITE_UINT32_BE (out + 8, HEADER_MAGIC);
diff --git a/gst/gstquark.c b/gst/gstquark.c
index b3b6214..2f818d2 100644
--- a/gst/gstquark.c
+++ b/gst/gstquark.c
@@ -68,7 +68,7 @@ static const gchar *_quark_strings[] = {
"GstEventSegmentDone",
"GstEventStreamStart", "stream-id", "GstEventContext", "GstQueryContext",
"GstMessageNeedContext", "GstMessageHaveContext", "context", "context-types",
- "GstMessageStreamStart", "group-id"
+ "GstMessageStreamStart", "group-id", "uri-redirection"
};
GQuark _priv_gst_quark_table[GST_QUARK_MAX];
diff --git a/gst/gstquark.h b/gst/gstquark.h
index cfa7e3f..e8667e7 100644
--- a/gst/gstquark.h
+++ b/gst/gstquark.h
@@ -196,7 +196,8 @@ typedef enum _GstQuarkId
GST_QUARK_CONTEXT_TYPES = 167,
GST_QUARK_MESSAGE_STREAM_START = 168,
GST_QUARK_GROUP_ID = 169,
- GST_QUARK_MAX = 170
+ GST_QUARK_URI_REDIRECTION = 170,
+ GST_QUARK_MAX = 171
} GstQuarkId;
extern GQuark _priv_gst_quark_table[GST_QUARK_MAX];
diff --git a/gst/gstquery.c b/gst/gstquery.c
index 31be0dc..3b9eddc 100644
--- a/gst/gstquery.c
+++ b/gst/gstquery.c
@@ -1174,7 +1174,8 @@ gst_query_parse_buffering_stats (GstQuery * query,
* @format: the format to set for the @start and @stop values
* @start: the start to set
* @stop: the stop to set
- * @estimated_total: estimated total amount of download time
+ * @estimated_total: estimated total amount of download time remaining in
+ * miliseconds
*
* Set the available query result fields in @query.
*/
@@ -1203,7 +1204,7 @@ gst_query_set_buffering_range (GstQuery * query, GstFormat format,
* @start: (out) (allow-none): the start to set, or NULL
* @stop: (out) (allow-none): the stop to set, or NULL
* @estimated_total: (out) (allow-none): estimated total amount of download
- * time, or NULL
+ * time remaining in miliseconds, or NULL
*
* Parse an available query, writing the format into @format, and
* other results into the passed parameters, if the respective parameters
@@ -1397,7 +1398,7 @@ gst_query_set_uri (GstQuery * query, const gchar * uri)
/**
* gst_query_parse_uri:
* @query: a #GstQuery
- * @uri: (out callee-allocates) (allow-none): the storage for the current URI
+ * @uri: (out) (transfer full) (allow-none): the storage for the current URI
* (may be NULL)
*
* Parse an URI query, writing the URI into @uri as a newly
@@ -1418,6 +1419,56 @@ gst_query_parse_uri (GstQuery * query, gchar ** uri)
}
/**
+ * gst_query_set_uri_redirection:
+ * @query: a #GstQuery with query type GST_QUERY_URI
+ * @uri: the URI to set
+ *
+ * Answer a URI query by setting the requested URI redirection.
+ *
+ * Since: 1.2
+ */
+void
+gst_query_set_uri_redirection (GstQuery * query, const gchar * uri)
+{
+ GstStructure *structure;
+
+ g_return_if_fail (GST_QUERY_TYPE (query) == GST_QUERY_URI);
+ g_return_if_fail (gst_query_is_writable (query));
+ g_return_if_fail (gst_uri_is_valid (uri));
+
+ structure = GST_QUERY_STRUCTURE (query);
+ gst_structure_id_set (structure, GST_QUARK (URI_REDIRECTION),
+ G_TYPE_STRING, uri, NULL);
+}
+
+/**
+ * gst_query_parse_uri_redirection:
+ * @query: a #GstQuery
+ * @uri: (out) (transfer full) (allow-none): the storage for the redirect URI
+ * (may be NULL)
+ *
+ * Parse an URI query, writing the URI into @uri as a newly
+ * allocated string, if the respective parameters are non-NULL.
+ * Free the string with g_free() after usage.
+ *
+ * Since: 1.2
+ */
+void
+gst_query_parse_uri_redirection (GstQuery * query, gchar ** uri)
+{
+ GstStructure *structure;
+
+ g_return_if_fail (GST_QUERY_TYPE (query) == GST_QUERY_URI);
+
+ structure = GST_QUERY_STRUCTURE (query);
+ if (uri) {
+ if (!gst_structure_id_get (structure, GST_QUARK (URI_REDIRECTION),
+ G_TYPE_STRING, uri, NULL))
+ *uri = NULL;
+ }
+}
+
+/**
* gst_query_new_allocation:
* @caps: the negotiated caps
* @need_pool: return a pool
@@ -1724,7 +1775,7 @@ gst_query_get_n_allocation_metas (GstQuery * query)
* gst_query_parse_nth_allocation_meta:
* @query: a GST_QUERY_ALLOCATION type query #GstQuery
* @index: position in the metadata API array to read
- * @params: (out) (allow-none): API specific flags
+ * @params: (out) (transfer none) (allow-none): API specific flags
*
* Parse an available query and get the metadata API
* at @index of the metadata API array.
@@ -1785,7 +1836,7 @@ gst_query_remove_nth_allocation_meta (GstQuery * query, guint index)
* gst_query_find_allocation_meta:
* @query: a GST_QUERY_ALLOCATION type query #GstQuery
* @api: the metadata API
- * @index: (out) (allow-none): the index
+ * @index: (out) (transfer none) (allow-none): the index
*
* Check if @query has metadata @api set. When this function returns TRUE,
* @index will contain the index where the requested API and the flags can be
@@ -2242,7 +2293,7 @@ gst_query_new_accept_caps (GstCaps * caps)
/**
* gst_query_parse_accept_caps:
* @query: The query to parse
- * @caps: (out): A pointer to the caps
+ * @caps: (out) (transfer none): A pointer to the caps
*
* Get the caps from @query. The caps remains valid as long as @query remains
* valid.
@@ -2343,7 +2394,7 @@ gst_query_new_caps (GstCaps * filter)
/**
* gst_query_parse_caps:
* @query: The query to parse
- * @filter: (out): A pointer to the caps filter
+ * @filter: (out) (transfer none): A pointer to the caps filter
*
* Get the filter from the caps @query. The caps remains valid as long as
* @query remains valid.
@@ -2383,7 +2434,7 @@ gst_query_set_caps_result (GstQuery * query, GstCaps * caps)
/**
* gst_query_parse_caps_result:
* @query: The query to parse
- * @caps: (out): A pointer to the caps
+ * @caps: (out) (transfer none): A pointer to the caps
*
* Get the caps result from @query. The caps remains valid as long as
* @query remains valid.
@@ -2484,7 +2535,7 @@ gst_query_set_context (GstQuery * query, GstContext * context)
/**
* gst_query_parse_context:
* @query: The query to parse
- * @context: (out): A pointer to store the #GstContext
+ * @context: (out) (transfer none): A pointer to store the #GstContext
*
* Get the context from the context @query. The context remains valid as long as
* @query remains valid.
@@ -2571,7 +2622,7 @@ gst_query_get_n_context_types (GstQuery * query)
/**
* gst_query_parse_nth_context_type:
* @query: a GST_QUERY_CONTEXT type query
- * @context_type: (out) (allow-none): the context type, or NULL
+ * @context_type: (out) (transfer none) (allow-none): the context type, or NULL
*
* Parse a context type from an existing GST_QUERY_CONTEXT query
* from @index.
diff --git a/gst/gstquery.h b/gst/gstquery.h
index 97234d1..7b8d582 100644
--- a/gst/gstquery.h
+++ b/gst/gstquery.h
@@ -397,6 +397,8 @@ gboolean gst_query_parse_nth_buffering_range (GstQuery *query,
GstQuery * gst_query_new_uri (void) G_GNUC_MALLOC;
void gst_query_parse_uri (GstQuery *query, gchar **uri);
void gst_query_set_uri (GstQuery *query, const gchar *uri);
+void gst_query_parse_uri_redirection (GstQuery *query, gchar **uri);
+void gst_query_set_uri_redirection (GstQuery *query, const gchar *uri);
/* allocation query */
GstQuery * gst_query_new_allocation (GstCaps *caps, gboolean need_pool) G_GNUC_MALLOC;
diff --git a/gst/gstsample.c b/gst/gstsample.c
index f6f0ead..9517af0 100644
--- a/gst/gstsample.c
+++ b/gst/gstsample.c
@@ -147,6 +147,8 @@ had_parent:
*
* Returns: (transfer none): the buffer of @sample or NULL when there
* is no buffer. The buffer remains valid as long as @sample is valid.
+ * If you need to hold on to it for longer than that, take a ref to
+ * the buffer with gst_buffer_ref().
*/
GstBuffer *
gst_sample_get_buffer (GstSample * sample)
@@ -164,6 +166,8 @@ gst_sample_get_buffer (GstSample * sample)
*
* Returns: (transfer none): the caps of @sample or NULL when there
* is no caps. The caps remain valid as long as @sample is valid.
+ * If you need to hold on to the caps for longer than that, take a ref to
+ * the caps with gst_caps_ref().
*/
GstCaps *
gst_sample_get_caps (GstSample * sample)
diff --git a/gst/gstsample.h b/gst/gstsample.h
index 379690c..d05ff1e 100644
--- a/gst/gstsample.h
+++ b/gst/gstsample.h
@@ -96,6 +96,28 @@ gst_sample_unref (GstSample * sample)
gst_mini_object_unref (GST_MINI_OBJECT_CAST (sample));
}
+/* copy sample */
+/**
+ * gst_sample_copy:
+ * @buf: a #GstSample.
+ *
+ * Create a copy of the given sample. This will also make a newly allocated
+ * copy of the data the source sample contains.
+ *
+ * Returns: (transfer full): a new copy of @buf.
+ *
+ * Since: 1.2
+ */
+#ifdef _FOOL_GTK_DOC_
+G_INLINE_FUNC GstSample * gst_sample_copy (const GstSample * buf);
+#endif
+
+static inline GstSample *
+gst_sample_copy (const GstSample * buf)
+{
+ return GST_SAMPLE_CAST (gst_mini_object_copy (GST_MINI_OBJECT_CONST_CAST (buf)));
+}
+
/**
* gst_value_set_sample:
* @v: a #GValue to receive the data
diff --git a/gst/gsttaglist.c b/gst/gsttaglist.c
index 5f4a5a1..5cff28d 100644
--- a/gst/gsttaglist.c
+++ b/gst/gsttaglist.c
@@ -387,6 +387,15 @@ _priv_gst_tag_initialize (void)
gst_tag_register_static (GST_TAG_IMAGE_ORIENTATION, GST_TAG_FLAG_META,
G_TYPE_STRING, _("image orientation"),
_("How the image should be rotated or flipped before display"), NULL);
+ gst_tag_register_static (GST_TAG_PUBLISHER, GST_TAG_FLAG_META,
+ G_TYPE_STRING,
+ _("publisher"),
+ _("Name of the label or publisher"), gst_tag_merge_strings_with_comma);
+ gst_tag_register_static (GST_TAG_INTERPRETED_BY, GST_TAG_FLAG_META,
+ G_TYPE_STRING,
+ _("interpreted-by"),
+ _("Information about the people behind a remix and similar "
+ "interpretations"), gst_tag_merge_strings_with_comma);
}
/**
diff --git a/gst/gsttaglist.h b/gst/gsttaglist.h
index c66e216..b5e683e 100644
--- a/gst/gsttaglist.h
+++ b/gst/gsttaglist.h
@@ -1043,6 +1043,23 @@ gst_tag_list_copy (const GstTagList * taglist)
* 'flip' means an horizontal mirroring.
*/
#define GST_TAG_IMAGE_ORIENTATION "image-orientation"
+/**
+ * GST_TAG_PUBLISHER:
+ *
+ * Name of the label or publisher (string)
+ *
+ * Since: 1.2
+ */
+#define GST_TAG_PUBLISHER "publisher"
+/**
+ * GST_TAG_INTERPRETED_BY:
+ *
+ * Information about the people behind a remix and similar
+ * interpretations of another existing piece (string)
+ *
+ * Since: 1.2
+ */
+#define GST_TAG_INTERPRETED_BY "interpreted-by"
G_END_DECLS
diff --git a/gst/gstutils.c b/gst/gstutils.c
index ece5abe..33f518c 100644
--- a/gst/gstutils.c
+++ b/gst/gstutils.c
@@ -2136,8 +2136,15 @@ gst_element_unlink (GstElement * src, GstElement * dest)
* @cur: (out) (allow-none): a location in which to store the current
* position, or NULL.
*
- * Queries an element for the stream position. If one repeatedly calls this
- * function one can also create and reuse it in gst_element_query().
+ * Queries an element (usually top-level pipeline or playbin element) for the
+ * stream position in nanoseconds. This will be a value between 0 and the
+ * stream duration (if the stream duration is known). This query will usually
+ * only work once the pipeline is prerolled (i.e. reached PAUSED or PLAYING
+ * state). The application will receive an ASYNC_DONE message on the pipeline
+ * bus when that is the case.
+ *
+ * If one repeatedly calls this function one can also create a query and reuse
+ * it in gst_element_query().
*
* Returns: TRUE if the query could be performed.
*/
@@ -2168,7 +2175,14 @@ gst_element_query_position (GstElement * element, GstFormat format,
* @format: the #GstFormat requested
* @duration: (out) (allow-none): A location in which to store the total duration, or NULL.
*
- * Queries an element for the total stream duration.
+ * Queries an element (usually top-level pipeline or playbin element) for the
+ * total stream duration in nanoseconds. This query will only work once the
+ * pipeline is prerolled (i.e. reached PAUSED or PLAYING state). The application
+ * will receive an ASYNC_DONE message on the pipeline bus when that is the case.
+ *
+ * If the duration changes for some reason, you will get a DURATION_CHANGED
+ * message on the pipeline bus, in which case you should re-query the duration
+ * using this function.
*
* Returns: TRUE if the query could be performed.
*/
@@ -3030,8 +3044,9 @@ gst_parse_bin_from_description (const gchar * bin_description,
* and want them all ghosted, you will have to create the ghost pads
* yourself).
*
- * Returns: (transfer full) (type Gst.Bin): a newly-created bin, or
- * %NULL if an error occurred.
+ * Returns: (transfer full) (type Gst.Element): a newly-created element, which
+ * is guaranteed to be a bin unless GST_FLAG_NO_SINGLE_ELEMENT_BINS was
+ * passed, or %NULL if an error occurred.
*/
GstElement *
gst_parse_bin_from_description_full (const gchar * bin_description,
@@ -3040,6 +3055,7 @@ gst_parse_bin_from_description_full (const gchar * bin_description,
{
#ifndef GST_DISABLE_PARSE
GstPad *pad = NULL;
+ GstElement *element;
GstBin *bin;
gchar *desc;
@@ -3049,16 +3065,26 @@ gst_parse_bin_from_description_full (const gchar * bin_description,
GST_DEBUG ("Making bin from description '%s'", bin_description);
/* parse the pipeline to a bin */
- desc = g_strdup_printf ("bin.( %s )", bin_description);
- bin = (GstBin *) gst_parse_launch_full (desc, context, flags, err);
- g_free (desc);
+ if (flags & GST_PARSE_FLAG_NO_SINGLE_ELEMENT_BINS) {
+ element = gst_parse_launch_full (bin_description, context, flags, err);
+ } else {
+ desc = g_strdup_printf ("bin.( %s )", bin_description);
+ element = gst_parse_launch_full (desc, context, flags, err);
+ g_free (desc);
+ }
- if (bin == NULL || (err && *err != NULL)) {
- if (bin)
- gst_object_unref (bin);
+ if (element == NULL || (err && *err != NULL)) {
+ if (element)
+ gst_object_unref (element);
return NULL;
}
+ if (GST_IS_BIN (element)) {
+ bin = GST_BIN (element);
+ } else {
+ return element;
+ }
+
/* find pads and ghost them if necessary */
if (ghost_unlinked_pads) {
if ((pad = gst_bin_find_unlinked_pad (bin, GST_PAD_SRC))) {
@@ -3762,7 +3788,8 @@ gst_pad_get_stream_id (GstPad * pad)
* stream-start event.
*
* Returns: A constantly incrementing unsigned integer, which might
- * overflow back to 0 at some point. */
+ * overflow back to 0 at some point.
+ */
guint
gst_util_group_id_next (void)
{
diff --git a/gst/parse/Makefile.in b/gst/parse/Makefile.in
index 6be215a..82ee195 100644
--- a/gst/parse/Makefile.in
+++ b/gst/parse/Makefile.in
@@ -315,7 +315,6 @@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
GTKDOC_MKPDF = @GTKDOC_MKPDF@
GTKDOC_REBASE = @GTKDOC_REBASE@
-HAVE_DOCBOOK2HTML = @HAVE_DOCBOOK2HTML@
HAVE_DOCBOOK2PS = @HAVE_DOCBOOK2PS@
HAVE_DVIPS = @HAVE_DVIPS@
HAVE_EPSTOPDF = @HAVE_EPSTOPDF@
@@ -326,6 +325,7 @@ HAVE_PNGTOPNM = @HAVE_PNGTOPNM@
HAVE_PNMTOPS = @HAVE_PNMTOPS@
HAVE_PS2PDF = @HAVE_PS2PDF@
HAVE_XMLLINT = @HAVE_XMLLINT@
+HAVE_XSLTPROC = @HAVE_XSLTPROC@
HOST_CPU = @HOST_CPU@
HTML_DIR = @HTML_DIR@
INSTALL = @INSTALL@
@@ -561,22 +561,25 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstparse_la-lex.priv_gst_parse_yy.Plo@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
diff --git a/gst/parse/grammar.tab.h b/gst/parse/grammar.tab.h
index 1d4e16a..7ebd60b 100644
--- a/gst/parse/grammar.tab.h
+++ b/gst/parse/grammar.tab.h
@@ -61,7 +61,7 @@ extern int priv_gst_parse_yydebug;
typedef union YYSTYPE
{
/* Line 2053 of yacc.c */
-#line 632 "./grammar.y"
+#line 633 "./grammar.y"
gchar *s;
chain_t *c;
diff --git a/gst/parse/grammar.y b/gst/parse/grammar.y
index cd26a2a..f533389 100644
--- a/gst/parse/grammar.y
+++ b/gst/parse/grammar.y
@@ -26,7 +26,6 @@
*/
#define YYERROR_VERBOSE 1
-#define YYLEX_PARAM scanner
#define YYENABLE_NLS 0
@@ -352,7 +351,8 @@ gst_parse_new_child(GstChildProxy *child_proxy, GObject *object,
else if (g_type_is_a (value_type, GST_TYPE_ELEMENT)) {
GstElement *bin;
- bin = gst_parse_bin_from_description (set->value_str, TRUE, NULL);
+ bin = gst_parse_bin_from_description_full (set->value_str, TRUE, NULL,
+ GST_PARSE_FLAG_NO_SINGLE_ELEMENT_BINS, NULL);
if (bin) {
g_value_set_object (&v, bin);
got_value = TRUE;
@@ -447,7 +447,8 @@ gst_parse_element_set (gchar *value, GstElement *element, graph_t *graph)
else if (g_type_is_a (value_type, GST_TYPE_ELEMENT)) {
GstElement *bin;
- bin = gst_parse_bin_from_description (pos, TRUE, NULL);
+ bin = gst_parse_bin_from_description_full (pos, TRUE, NULL,
+ GST_PARSE_FLAG_NO_SINGLE_ELEMENT_BINS, NULL);
if (bin) {
g_value_set_object (&v, bin);
got_value = TRUE;
@@ -657,6 +658,7 @@ static int yyerror (void *scanner, graph_t *graph, const char *s);
%right '.'
%left '!' '='
+%lex-param { void *scanner }
%parse-param { void *scanner }
%parse-param { graph_t *graph }
%pure-parser
diff --git a/gst/printf/Makefile.in b/gst/printf/Makefile.in
index 2d03d34..1295058 100644
--- a/gst/printf/Makefile.in
+++ b/gst/printf/Makefile.in
@@ -313,7 +313,6 @@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
GTKDOC_MKPDF = @GTKDOC_MKPDF@
GTKDOC_REBASE = @GTKDOC_REBASE@
-HAVE_DOCBOOK2HTML = @HAVE_DOCBOOK2HTML@
HAVE_DOCBOOK2PS = @HAVE_DOCBOOK2PS@
HAVE_DVIPS = @HAVE_DVIPS@
HAVE_EPSTOPDF = @HAVE_EPSTOPDF@
@@ -324,6 +323,7 @@ HAVE_PNGTOPNM = @HAVE_PNGTOPNM@
HAVE_PNMTOPS = @HAVE_PNMTOPS@
HAVE_PS2PDF = @HAVE_PS2PDF@
HAVE_XMLLINT = @HAVE_XMLLINT@
+HAVE_XSLTPROC = @HAVE_XSLTPROC@
HOST_CPU = @HOST_CPU@
HTML_DIR = @HTML_DIR@
INSTALL = @INSTALL@
@@ -569,22 +569,25 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstprintf_la-vasnprintf.Plo@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<