Merge branch 'master' into 0.11
Conflicts:
gst/gstelement.h
gst/gstghostpad.c
gst/gstminiobject.c
diff --git a/gst/gstcaps.c b/gst/gstcaps.c
index 8e7e7b5..2f99a93 100644
--- a/gst/gstcaps.c
+++ b/gst/gstcaps.c
@@ -1020,7 +1020,7 @@
*
* Returns: %TRUE if @structure is a subset of @caps
*
- * Since: 0.10.35
+ * Since: 0.10.36
*/
gboolean
gst_caps_is_subset_structure (const GstCaps * caps,
diff --git a/gst/gstelement.h b/gst/gstelement.h
index 9cc30ed..55714d8 100644
--- a/gst/gstelement.h
+++ b/gst/gstelement.h
@@ -598,7 +598,7 @@
* @send_event: send a #GstEvent to the element
* @get_query_types: get the supported #GstQueryType of this element
* @query: perform a #GstQuery on the element
- * @state_changed: called immediately after a new state was set. Since: 0.10.35.
+ * @state_changed: called immediately after a new state was set.
*
* GStreamer element class. Override the vmethods to implement the element
* functionality.
diff --git a/gst/gstghostpad.c b/gst/gstghostpad.c
index f96fbd8..2f52c61 100644
--- a/gst/gstghostpad.c
+++ b/gst/gstghostpad.c
@@ -75,7 +75,7 @@
* Returns: (transfer none) (array zero-terminated=1): a zero-terminated array
* of #GstQueryType.
*
- * Since: 0.10.35
+ * Since: 0.10.36
*/
const GstQueryType *
gst_proxy_pad_query_type_default (GstPad * pad)
@@ -110,7 +110,7 @@
*
* Returns: TRUE if the event was handled.
*
- * Since: 0.10.35
+ * Since: 0.10.36
*/
gboolean
gst_proxy_pad_event_default (GstPad * pad, GstEvent * event)
@@ -136,7 +136,7 @@
*
* Returns: TRUE if the query could be performed.
*
- * Since: 0.10.35
+ * Since: 0.10.36
*/
gboolean
gst_proxy_pad_query_default (GstPad * pad, GstQuery * query)
@@ -172,7 +172,7 @@
* Returns: a #GstIterator of #GstPad, or NULL if @pad has no parent. Unref each
* returned pad with gst_object_unref().
*
- * Since: 0.10.35
+ * Since: 0.10.36
*/
GstIterator *
gst_proxy_pad_iterate_internal_links_default (GstPad * pad)
@@ -202,7 +202,7 @@
*
* Returns: a #GstFlowReturn from the pad.
*
- * Since: 0.10.35
+ * Since: 0.10.36
*/
GstFlowReturn
gst_proxy_pad_chain_default (GstPad * pad, GstBuffer * buffer)
@@ -229,7 +229,7 @@
*
* Returns: a #GstFlowReturn from the pad.
*
- * Since: 0.10.35
+ * Since: 0.10.36
*/
GstFlowReturn
gst_proxy_pad_chain_list_default (GstPad * pad, GstBufferList * list)
@@ -258,7 +258,7 @@
*
* Returns: a #GstFlowReturn from the pad.
*
- * Since: 0.10.35
+ * Since: 0.10.36
*/
GstFlowReturn
gst_proxy_pad_getrange_default (GstPad * pad, guint64 offset, guint size,
@@ -285,7 +285,7 @@
*
* Returns: (transfer full): the caps of the pad with incremented ref-count
*
- * Since: 0.10.35
+ * Since: 0.10.36
*/
GstCaps *
gst_proxy_pad_getcaps_default (GstPad * pad, GstCaps * filter)
@@ -364,7 +364,7 @@
*
* Returns: TRUE if the pad can accept the caps.
*
- * Since: 0.10.35
+ * Since: 0.10.36
*/
gboolean
gst_proxy_pad_acceptcaps_default (GstPad * pad, GstCaps * caps)
@@ -396,7 +396,7 @@
*
* Invoke the default fixatecaps function of the proxy pad.
*
- * Since: 0.10.35
+ * Since: 0.10.36
*/
void
gst_proxy_pad_fixatecaps_default (GstPad * pad, GstCaps * caps)
@@ -448,7 +448,7 @@
* Returns: (transfer full): the target #GstProxyPad, can be NULL.
* Unref target pad after usage.
*
- * Since: 0.10.35
+ * Since: 0.10.36
*/
GstProxyPad *
gst_proxy_pad_get_internal (GstProxyPad * pad)
@@ -472,7 +472,7 @@
*
* Invoke the default unlink function of the proxy pad.
*
- * Since: 0.10.35
+ * Since: 0.10.36
*/
void
gst_proxy_pad_unlink_default (GstPad * pad)
@@ -548,7 +548,7 @@
*
* Returns: %TRUE if the operation was successful.
*
- * Since: 0.10.35
+ * Since: 0.10.36
*/
gboolean
gst_ghost_pad_internal_activate_push_default (GstPad * pad, gboolean active)
@@ -579,7 +579,7 @@
*
* Returns: %TRUE if the operation was successful.
*
- * Since: 0.10.35
+ * Since: 0.10.36
*/
gboolean
gst_ghost_pad_internal_activate_pull_default (GstPad * pad, gboolean active)
@@ -625,7 +625,7 @@
*
* Returns: %TRUE if the operation was successful.
*
- * Since: 0.10.35
+ * Since: 0.10.36
*/
gboolean
gst_ghost_pad_activate_push_default (GstPad * pad, gboolean active)
@@ -654,7 +654,7 @@
*
* Returns: %TRUE if the operation was successful.
*
- * Since: 0.10.35
+ * Since: 0.10.36
*/
gboolean
gst_ghost_pad_activate_pull_default (GstPad * pad, gboolean active)
@@ -698,7 +698,7 @@
*
* Returns: #GstPadLinkReturn of the operation
*
- * Since: 0.10.35
+ * Since: 0.10.36
*/
GstPadLinkReturn
gst_ghost_pad_link_default (GstPad * pad, GstPad * peer)
@@ -729,7 +729,7 @@
*
* Invoke the default unlink function of a ghost pad.
*
- * Since: 0.10.35
+ * Since: 0.10.36
*/
void
gst_ghost_pad_unlink_default (GstPad * pad)
diff --git a/gst/gststructure.c b/gst/gststructure.c
index 33e75a6..2e3c9c7 100644
--- a/gst/gststructure.c
+++ b/gst/gststructure.c
@@ -2955,7 +2955,7 @@
*
* Returns: TRUE if the two structures have the same name and field.
*
- * Since: 0.10.35
+ * Since: 0.10.36
**/
gboolean
gst_structure_is_equal (const GstStructure * structure1,
@@ -3028,7 +3028,7 @@
*
* Returns: Intersection of @struct1 and @struct2
*
- * Since: 0.10.35
+ * Since: 0.10.36
*/
GstStructure *
gst_structure_intersect (const GstStructure * struct1,
@@ -3099,7 +3099,7 @@
*
* Returns: %TRUE if intersection would not be empty
*
- * Since: 0.10.35
+ * Since: 0.10.36
*/
gboolean
gst_structure_can_intersect (const GstStructure * struct1,
@@ -3177,7 +3177,7 @@
*
* Returns: %TRUE if @subset is a subset of @superset
*
- * Since: 0.10.35
+ * Since: 0.10.36
*/
gboolean
gst_structure_is_subset (const GstStructure * subset,
diff --git a/libs/gst/base/gstbaseparse.c b/libs/gst/base/gstbaseparse.c
index aefe5fb..6dcadcb 100644
--- a/libs/gst/base/gstbaseparse.c
+++ b/libs/gst/base/gstbaseparse.c
@@ -3229,7 +3229,7 @@
* by the parsing process. If there is such a latency, which depends on the
* particular parsing of the format, it typically corresponds to 1 frame duration.
*
- * Since: 0.10.34
+ * Since: 0.10.36
*/
void
gst_base_parse_set_latency (GstBaseParse * parse, GstClockTime min_latency,
diff --git a/libs/gst/base/gstbasesrc.c b/libs/gst/base/gstbasesrc.c
index a20783d..e861445 100644
--- a/libs/gst/base/gstbasesrc.c
+++ b/libs/gst/base/gstbasesrc.c
@@ -587,7 +587,7 @@
* read past current tracked size. Otherwise, size is checked for upon each
* read.
*
- * Since: 0.10.35
+ * Since: 0.10.36
*/
void
gst_base_src_set_dynamic_size (GstBaseSrc * src, gboolean dynamic)
diff --git a/plugins/elements/gstinputselector.c b/plugins/elements/gstinputselector.c
index f5036d3..b9ece33 100644
--- a/plugins/elements/gstinputselector.c
+++ b/plugins/elements/gstinputselector.c
@@ -859,7 +859,7 @@
* buffers are dropped by input-selector that might be needed
* when switching the active pad.
*
- * Since: 0.10.35
+ * Since: 0.10.36
*/
g_object_class_install_property (gobject_class, PROP_SYNC_STREAMS,
g_param_spec_boolean ("sync-streams", "Sync Streams",
diff --git a/plugins/elements/gstmultiqueue.c b/plugins/elements/gstmultiqueue.c
index e7842ca..ed5cc70 100644
--- a/plugins/elements/gstmultiqueue.c
+++ b/plugins/elements/gstmultiqueue.c
@@ -397,7 +397,7 @@
* streams by keeping the order in which buffers and events arrived compared
* to active and linked streams.
*
- * Since: 0.10.35
+ * Since: 0.10.36
*/
g_object_class_install_property (gobject_class, PROP_SYNC_BY_RUNNING_TIME,
g_param_spec_boolean ("sync-by-running-time", "Sync By Running Time",
diff --git a/tests/check/gst/gstpad.c b/tests/check/gst/gstpad.c
index 29190a2..5b4ea49 100644
--- a/tests/check/gst/gstpad.c
+++ b/tests/check/gst/gstpad.c
@@ -426,6 +426,86 @@
GST_END_TEST;
+GST_START_TEST (test_push_linked_flushing)
+{
+ GstPad *src, *sink;
+ GstCaps *caps;
+ GstPadLinkReturn plr;
+ GstBuffer *buffer;
+ gulong id;
+
+ /* setup */
+ src = gst_pad_new ("src", GST_PAD_SRC);
+ fail_if (src == NULL);
+ sink = gst_pad_new ("sink", GST_PAD_SINK);
+ fail_if (sink == NULL);
+ gst_pad_set_chain_function (sink, gst_check_chain_func);
+
+ caps = gst_pad_get_allowed_caps (src);
+ fail_unless (caps == NULL);
+ caps = gst_pad_get_allowed_caps (sink);
+ fail_unless (caps == NULL);
+
+ caps = gst_caps_from_string ("foo/bar");
+ /* one for me */
+ ASSERT_CAPS_REFCOUNT (caps, "caps", 1);
+
+ gst_pad_set_caps (src, caps);
+ gst_pad_set_caps (sink, caps);
+ /* one for me and one for each set_caps */
+ ASSERT_CAPS_REFCOUNT (caps, "caps", 3);
+
+ plr = gst_pad_link (src, sink);
+ fail_unless (GST_PAD_LINK_SUCCESSFUL (plr));
+ ASSERT_CAPS_REFCOUNT (caps, "caps", 3);
+
+ /* not activating the pads here, which keeps them flushing */
+
+ /* pushing on a flushing pad will drop the buffer */
+ buffer = gst_buffer_new ();
+ gst_buffer_ref (buffer);
+ fail_unless (gst_pad_push (src, buffer) == GST_FLOW_WRONG_STATE);
+ ASSERT_MINI_OBJECT_REFCOUNT (buffer, "buffer", 1);
+ fail_unless_equals_int (g_list_length (buffers), 0);
+ gst_buffer_unref (buffer);
+
+ /* adding a probe that returns FALSE will drop the buffer without trying
+ * to chain */
+ id = gst_pad_add_buffer_probe (src, (GCallback) _probe_handler,
+ GINT_TO_POINTER (0));
+ buffer = gst_buffer_new ();
+ gst_buffer_ref (buffer);
+ fail_unless (gst_pad_push (src, buffer) == GST_FLOW_OK);
+ ASSERT_MINI_OBJECT_REFCOUNT (buffer, "buffer", 1);
+ fail_unless_equals_int (g_list_length (buffers), 0);
+ gst_buffer_unref (buffer);
+ gst_pad_remove_buffer_probe (src, id);
+
+ /* adding a probe that returns TRUE will still chain the buffer,
+ * and hence drop because pad is flushing */
+ id = gst_pad_add_buffer_probe (src, (GCallback) _probe_handler,
+ GINT_TO_POINTER (1));
+ buffer = gst_buffer_new ();
+ gst_buffer_ref (buffer);
+ fail_unless (gst_pad_push (src, buffer) == GST_FLOW_WRONG_STATE);
+ ASSERT_MINI_OBJECT_REFCOUNT (buffer, "buffer", 1);
+ fail_unless_equals_int (g_list_length (buffers), 0);
+ gst_buffer_unref (buffer);
+ gst_pad_remove_buffer_probe (src, id);
+
+
+ /* cleanup */
+ ASSERT_CAPS_REFCOUNT (caps, "caps", 3);
+ ASSERT_OBJECT_REFCOUNT (src, "src", 1);
+ gst_pad_link (src, sink);
+ gst_object_unref (src);
+ gst_object_unref (sink);
+ ASSERT_CAPS_REFCOUNT (caps, "caps", 1);
+ gst_caps_unref (caps);
+}
+
+GST_END_TEST;
+
static GstBuffer *
buffer_from_string (const gchar * str)
{
@@ -992,6 +1072,7 @@
tcase_add_test (tc_chain, test_name_is_valid);
tcase_add_test (tc_chain, test_push_unlinked);
tcase_add_test (tc_chain, test_push_linked);
+ tcase_add_test (tc_chain, test_push_linked_flushing);
tcase_add_test (tc_chain, test_push_buffer_list_compat);
tcase_add_test (tc_chain, test_flowreturn);
tcase_add_test (tc_chain, test_push_negotiation);
diff --git a/win32/common/libgstreamer.def b/win32/common/libgstreamer.def
index 995a25f..21d6888 100644
--- a/win32/common/libgstreamer.def
+++ b/win32/common/libgstreamer.def
@@ -190,6 +190,7 @@
gst_caps_is_equal
gst_caps_is_equal_fixed
gst_caps_is_fixed
+ gst_caps_is_strictly_equal
gst_caps_is_subset
gst_caps_is_subset_structure
gst_caps_merge