diff options
Diffstat (limited to 'gst')
-rw-r--r-- | gst/Makefile.am | 2 | ||||
-rw-r--r-- | gst/Makefile.in | 10 | ||||
-rw-r--r-- | gst/gstbin.c | 24 | ||||
-rw-r--r-- | gst/gstcontrolbinding.c | 7 | ||||
-rw-r--r-- | gst/gstcontrolbinding.h | 9 | ||||
-rw-r--r-- | gst/gstcontrolsource.c | 22 | ||||
-rw-r--r-- | gst/gstdebugutils.c | 2 | ||||
-rw-r--r-- | gst/gstmessage.c | 66 | ||||
-rw-r--r-- | gst/gstpad.c | 5 | ||||
-rw-r--r-- | gst/gstpipeline.c | 7 | ||||
-rw-r--r-- | gst/gstvalue.c | 3 |
11 files changed, 50 insertions, 107 deletions
diff --git a/gst/Makefile.am b/gst/Makefile.am index 714f69e..be1d494 100644 --- a/gst/Makefile.am +++ b/gst/Makefile.am @@ -260,7 +260,9 @@ if HAVE_INTROSPECTION BUILT_GIRSOURCES = Gst-@GST_API_VERSION@.gir gir_headers=$(patsubst %,$(srcdir)/%, $(libgstreamer_@GST_API_VERSION@include_HEADERS)) +gir_headers+=$(patsubst %,$(builddir)/%, $(built_header_make)) gir_sources=$(patsubst %,$(srcdir)/%, $(libgstreamer_@GST_API_VERSION@_la_SOURCES)) +gir_sources+=$(patsubst %,$(builddir)/%, $(built_source_make)) Gst-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstreamer-@GST_API_VERSION@.la $(AM_V_GEN)GST_PLUGIN_SYSTEM_PATH="" GST_PLUGIN_PATH="" GST_REGISTRY_UPDATE=no \ diff --git a/gst/Makefile.in b/gst/Makefile.in index 0c96219..5bee414 100644 --- a/gst/Makefile.in +++ b/gst/Makefile.in @@ -785,8 +785,14 @@ noinst_HEADERS = \ gst_private.h @HAVE_INTROSPECTION_TRUE@BUILT_GIRSOURCES = Gst-@GST_API_VERSION@.gir -@HAVE_INTROSPECTION_TRUE@gir_headers = $(patsubst %,$(srcdir)/%, $(libgstreamer_@GST_API_VERSION@include_HEADERS)) -@HAVE_INTROSPECTION_TRUE@gir_sources = $(patsubst %,$(srcdir)/%, $(libgstreamer_@GST_API_VERSION@_la_SOURCES)) +@HAVE_INTROSPECTION_TRUE@gir_headers = $(patsubst %,$(srcdir)/%, \ +@HAVE_INTROSPECTION_TRUE@ $(libgstreamer_@GST_API_VERSION@include_HEADERS)) \ +@HAVE_INTROSPECTION_TRUE@ $(patsubst %,$(builddir)/%, \ +@HAVE_INTROSPECTION_TRUE@ $(built_header_make)) +@HAVE_INTROSPECTION_TRUE@gir_sources = $(patsubst %,$(srcdir)/%, \ +@HAVE_INTROSPECTION_TRUE@ $(libgstreamer_@GST_API_VERSION@_la_SOURCES)) \ +@HAVE_INTROSPECTION_TRUE@ $(patsubst %,$(builddir)/%, \ +@HAVE_INTROSPECTION_TRUE@ $(built_source_make)) # INTROSPECTION_GIRDIR/INTROSPECTION_TYPELIBDIR aren't the right place to # install anything - we need to install inside our prefix. diff --git a/gst/gstbin.c b/gst/gstbin.c index d53232c..ad3d2a0 100644 --- a/gst/gstbin.c +++ b/gst/gstbin.c @@ -1600,9 +1600,6 @@ no_function: * * Gets an iterator for the elements in this bin. * - * Each element yielded by the iterator will have its refcount increased, so - * unref after use. - * * MT safe. Caller owns returned value. * * Returns: (transfer full): a #GstIterator of #GstElement, or NULL @@ -1643,9 +1640,6 @@ iterate_child_recurse (GstIterator * it, const GValue * item) * Gets an iterator for the elements in this bin. * This iterator recurses into GstBin children. * - * Each element yielded by the iterator will have its refcount increased, so - * unref after use. - * * MT safe. Caller owns returned value. * * Returns: (transfer full): a #GstIterator of #GstElement, or NULL @@ -1703,9 +1697,6 @@ sink_iterator_filter (const GValue * vchild, GValue * vbin) * Gets an iterator for all elements in the bin that have the * #GST_ELEMENT_FLAG_SINK flag set. * - * Each element yielded by the iterator will have its refcount increased, so - * unref after use. - * * MT safe. Caller owns returned value. * * Returns: (transfer full): a #GstIterator of #GstElement, or NULL @@ -1766,9 +1757,6 @@ src_iterator_filter (const GValue * vchild, GValue * vbin) * Gets an iterator for all elements in the bin that have the * #GST_ELEMENT_FLAG_SOURCE flag set. * - * Each element yielded by the iterator will have its refcount increased, so - * unref after use. - * * MT safe. Caller owns returned value. * * Returns: (transfer full): a #GstIterator of #GstElement, or NULL @@ -2032,8 +2020,7 @@ find_element (GstElement * element, GstBinSortIterator * bit) } } -/* get next element in iterator. the returned element has the - * refcount increased */ +/* get next element in iterator. */ static GstIteratorResult gst_bin_sort_iterator_next (GstBinSortIterator * bit, GValue * result) { @@ -2146,9 +2133,6 @@ gst_bin_sort_iterator_new (GstBin * bin) * This function is used internally to perform the state changes * of the bin elements and for clock selection. * - * Each element yielded by the iterator will have its refcount increased, so - * unref after use. - * * MT safe. Caller owns returned value. * * Returns: (transfer full): a #GstIterator of #GstElement, or NULL @@ -2792,8 +2776,11 @@ gst_bin_send_event (GstElement * element, GstEvent * event) gst_event_ref (event); res &= gst_element_send_event (child, event); + GST_LOG_OBJECT (child, "After handling %s event: %d", GST_EVENT_TYPE_NAME (event), res); + + g_value_reset (&data); break; } case GST_ITERATOR_RESYNC: @@ -4031,9 +4018,6 @@ gst_bin_get_by_interface (GstBin * bin, GType iface) * The function recurses inside child bins. The iterator will yield a series * of #GstElement that should be unreffed after use. * - * Each element yielded by the iterator will have its refcount increased, so - * unref after use. - * * MT safe. Caller owns returned value. * * Returns: (transfer full): a #GstIterator of #GstElement for all elements diff --git a/gst/gstcontrolbinding.c b/gst/gstcontrolbinding.c index e1da8c2..2f4d85e 100644 --- a/gst/gstcontrolbinding.c +++ b/gst/gstcontrolbinding.c @@ -23,7 +23,10 @@ * SECTION:gstcontrolbinding * @short_description: attachment for control source sources * - * A value mapping object that attaches control sources to gobject properties. + * A base class for value mapping objects that attaches control sources to gobject + * properties. Such an object is taking one or more #GstControlSource instances, + * combines them and maps the resulting value to the type and value range of the + * bound property. */ /* FIXME(ensonic): should we make gst_object_add_control_binding() internal * - we create the control_binding for a certain object anyway @@ -291,7 +294,7 @@ gst_control_binding_get_value (GstControlBinding * binding, * * The values are unboxed and ready to be used. The similar function * gst_control_binding_get_g_value_array() returns the array as #GValues and is - * better suites for bindings. + * more suitable for bindings. * * Returns: %TRUE if the given array could be filled, %FALSE otherwise */ diff --git a/gst/gstcontrolbinding.h b/gst/gstcontrolbinding.h index a37be1d..fdb90dc 100644 --- a/gst/gstcontrolbinding.h +++ b/gst/gstcontrolbinding.h @@ -47,14 +47,7 @@ G_BEGIN_DECLS typedef struct _GstControlBinding GstControlBinding; typedef struct _GstControlBindingClass GstControlBindingClass; -/** - * GstControlBindingConvert: - * @binding: the #GstControlBinding instance - * @src_value: the value returned by the cotnrol source - * @dest_value: the target GValue - * - * Function to map a control-value to the target GValue. - */ +/* FIXME(2.0): remove, this is unused */ typedef void (* GstControlBindingConvert) (GstControlBinding *binding, gdouble src_value, GValue *dest_value); /** diff --git a/gst/gstcontrolsource.c b/gst/gstcontrolsource.c index 53484ad..68132bf 100644 --- a/gst/gstcontrolsource.c +++ b/gst/gstcontrolsource.c @@ -25,20 +25,18 @@ * @short_description: base class for control source sources * * The #GstControlSource is a base class for control value sources that could - * be used by #GstController to get timestamp-value pairs. + * be used by #GstController to get timestamp-value pairs. A control source + * essentially is a function over time, returning gloat values between 0.0 and 1.0. * - * A #GstControlSource is used by first getting an instance, binding it to a - * #GParamSpec (for example by using gst_controller_set_control_source()) and - * then by having it used by the #GstController or calling - * gst_control_source_get_value() or gst_control_source_get_value_array(). - * - * For implementing a new #GstControlSource one has to implement a - * #GstControlSourceBind method, which will depending on the #GParamSpec set up - * the control source for use and sets the #GstControlSourceGetValue and - * #GstControlSourceGetValueArray functions. These are then used by - * gst_control_source_get_value() or gst_control_source_get_value_array() - * to get values for specific timestamps. + * A #GstControlSource is used by first getting an instance of a specific + * control-source, creating a binding for the control-source to the target property + * of the element and then adding the binding to the element. The binding will + * convert the data types and value range to fit to the bound property. * + * For implementing a new #GstControlSource one has to implement + * #GstControlSourceGetValue and #GstControlSourceGetValueArray functions. + * These are then used by gst_control_source_get_value() and + * gst_control_source_get_value_array() to get values for specific timestamps. */ #include "gst_private.h" diff --git a/gst/gstdebugutils.c b/gst/gstdebugutils.c index e67a77c..a39e279 100644 --- a/gst/gstdebugutils.c +++ b/gst/gstdebugutils.c @@ -399,7 +399,7 @@ debug_dump_element_pad_link (GstPad * pad, GstElement * element, * we need an empty label to make space */ fprintf (out, "%s%s_%s -> %s_%s [labeldistance=\"10\", labelangle=\"0\", " "label=\" \", " - "headlabel=\"%s\", taillabel=\"%s\"]\n", + "taillabel=\"%s\", headlabel=\"%s\"]\n", spc, element_name, pad_name, peer_element_name, peer_pad_name, media_src, media_sink); g_free (media_src); diff --git a/gst/gstmessage.c b/gst/gstmessage.c index feb135a..de79a46 100644 --- a/gst/gstmessage.c +++ b/gst/gstmessage.c @@ -1314,28 +1314,12 @@ gst_message_parse_structure_change (GstMessage * message, void gst_message_parse_error (GstMessage * message, GError ** gerror, gchar ** debug) { - const GValue *error_gvalue; - GError *error_val; - GstStructure *structure; - g_return_if_fail (GST_IS_MESSAGE (message)); g_return_if_fail (GST_MESSAGE_TYPE (message) == GST_MESSAGE_ERROR); - structure = GST_MESSAGE_STRUCTURE (message); - error_gvalue = gst_structure_id_get_value (structure, GST_QUARK (GERROR)); - g_return_if_fail (error_gvalue != NULL); - g_return_if_fail (G_VALUE_TYPE (error_gvalue) == G_TYPE_ERROR); - - error_val = (GError *) g_value_get_boxed (error_gvalue); - if (error_val) - *gerror = g_error_copy (error_val); - else - *gerror = NULL; - - if (debug) - *debug = - g_value_dup_string (gst_structure_id_get_value (structure, - GST_QUARK (DEBUG))); + gst_structure_id_get (GST_MESSAGE_STRUCTURE (message), + GST_QUARK (GERROR), G_TYPE_ERROR, gerror, + GST_QUARK (DEBUG), G_TYPE_STRING, debug, NULL); } /** @@ -1354,28 +1338,12 @@ void gst_message_parse_warning (GstMessage * message, GError ** gerror, gchar ** debug) { - const GValue *error_gvalue; - GError *error_val; - GstStructure *structure; - g_return_if_fail (GST_IS_MESSAGE (message)); g_return_if_fail (GST_MESSAGE_TYPE (message) == GST_MESSAGE_WARNING); - structure = GST_MESSAGE_STRUCTURE (message); - error_gvalue = gst_structure_id_get_value (structure, GST_QUARK (GERROR)); - g_return_if_fail (error_gvalue != NULL); - g_return_if_fail (G_VALUE_TYPE (error_gvalue) == G_TYPE_ERROR); - - error_val = (GError *) g_value_get_boxed (error_gvalue); - if (error_val) - *gerror = g_error_copy (error_val); - else - *gerror = NULL; - - if (debug) - *debug = - g_value_dup_string (gst_structure_id_get_value (structure, - GST_QUARK (DEBUG))); + gst_structure_id_get (GST_MESSAGE_STRUCTURE (message), + GST_QUARK (GERROR), G_TYPE_ERROR, gerror, + GST_QUARK (DEBUG), G_TYPE_STRING, debug, NULL); } /** @@ -1393,28 +1361,12 @@ gst_message_parse_warning (GstMessage * message, GError ** gerror, void gst_message_parse_info (GstMessage * message, GError ** gerror, gchar ** debug) { - const GValue *error_gvalue; - GError *error_val; - GstStructure *structure; - g_return_if_fail (GST_IS_MESSAGE (message)); g_return_if_fail (GST_MESSAGE_TYPE (message) == GST_MESSAGE_INFO); - structure = GST_MESSAGE_STRUCTURE (message); - error_gvalue = gst_structure_id_get_value (structure, GST_QUARK (GERROR)); - g_return_if_fail (error_gvalue != NULL); - g_return_if_fail (G_VALUE_TYPE (error_gvalue) == G_TYPE_ERROR); - - error_val = (GError *) g_value_get_boxed (error_gvalue); - if (error_val) - *gerror = g_error_copy (error_val); - else - *gerror = NULL; - - if (debug) - *debug = - g_value_dup_string (gst_structure_id_get_value (structure, - GST_QUARK (DEBUG))); + gst_structure_id_get (GST_MESSAGE_STRUCTURE (message), + GST_QUARK (GERROR), G_TYPE_ERROR, gerror, + GST_QUARK (DEBUG), G_TYPE_STRING, debug, NULL); } /** diff --git a/gst/gstpad.c b/gst/gstpad.c index e609fe2..3c81659 100644 --- a/gst/gstpad.c +++ b/gst/gstpad.c @@ -1407,9 +1407,10 @@ gst_pad_check_reconfigure (GstPad * pad) GST_OBJECT_LOCK (pad); reconfigure = GST_PAD_NEEDS_RECONFIGURE (pad); - if (reconfigure) + if (reconfigure) { GST_DEBUG_OBJECT (pad, "remove RECONFIGURE flag"); - GST_OBJECT_FLAG_UNSET (pad, GST_PAD_FLAG_NEED_RECONFIGURE); + GST_OBJECT_FLAG_UNSET (pad, GST_PAD_FLAG_NEED_RECONFIGURE); + } GST_OBJECT_UNLOCK (pad); return reconfigure; diff --git a/gst/gstpipeline.c b/gst/gstpipeline.c index f92b5c3..16d2606 100644 --- a/gst/gstpipeline.c +++ b/gst/gstpipeline.c @@ -290,7 +290,7 @@ reset_start_time (GstPipeline * pipeline, GstClockTime start_time) /** * gst_pipeline_new: - * @name: name of new pipeline + * @name: (allow-none): name of new pipeline * * Create a new pipeline with the given name. * @@ -405,7 +405,10 @@ gst_pipeline_change_state (GstElement * element, GstStateChange transition) } else { GST_DEBUG_OBJECT (pipeline, "Don't need to update clock, using old clock."); - clock = gst_object_ref (cur_clock); + /* only try to ref if cur_clock is not NULL */ + if (cur_clock) + gst_object_ref (cur_clock); + clock = cur_clock; } if (clock) { diff --git a/gst/gstvalue.c b/gst/gstvalue.c index de9fa06..557f728 100644 --- a/gst/gstvalue.c +++ b/gst/gstvalue.c @@ -1845,13 +1845,13 @@ gst_value_serialize_segment_internal (const GValue * value, gboolean escape) gchar *t, *res; GstStructure *s; - /* FIXME: serialize segment offset as well ? */ s = gst_structure_new ("GstSegment", "flags", GST_TYPE_SEGMENT_FLAGS, seg->flags, "rate", G_TYPE_DOUBLE, seg->rate, "applied-rate", G_TYPE_DOUBLE, seg->applied_rate, "format", GST_TYPE_FORMAT, seg->format, "base", G_TYPE_UINT64, seg->base, + "offset", G_TYPE_UINT64, seg->offset, "start", G_TYPE_UINT64, seg->start, "stop", G_TYPE_UINT64, seg->stop, "time", G_TYPE_UINT64, seg->time, @@ -1892,6 +1892,7 @@ gst_value_deserialize_segment (GValue * dest, const gchar * s) "applied-rate", G_TYPE_DOUBLE, &seg.applied_rate, "format", GST_TYPE_FORMAT, &seg.format, "base", G_TYPE_UINT64, &seg.base, + "offset", G_TYPE_UINT64, &seg.offset, "start", G_TYPE_UINT64, &seg.start, "stop", G_TYPE_UINT64, &seg.stop, "time", G_TYPE_UINT64, &seg.time, |