mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
Merge branch 'master' into 0.11
Conflicts: gst/gstelement.h gst/gstghostpad.c gst/gstminiobject.c
This commit is contained in:
commit
9c0d8ca718
10 changed files with 110 additions and 28 deletions
|
@ -1020,7 +1020,7 @@ gst_caps_is_subset (const GstCaps * subset, const GstCaps * superset)
|
|||
*
|
||||
* 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,
|
||||
|
|
|
@ -598,7 +598,7 @@ struct _GstElement
|
|||
* @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.
|
||||
|
|
|
@ -75,7 +75,7 @@ static GstPad *gst_proxy_pad_get_target (GstPad * pad);
|
|||
* 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 @@ no_target:
|
|||
*
|
||||
* 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 @@ gst_proxy_pad_event_default (GstPad * pad, GstEvent * event)
|
|||
*
|
||||
* 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 @@ no_target:
|
|||
* 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 @@ gst_proxy_pad_iterate_internal_links_default (GstPad * pad)
|
|||
*
|
||||
* 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 @@ gst_proxy_pad_chain_default (GstPad * pad, GstBuffer * buffer)
|
|||
*
|
||||
* 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 @@ gst_proxy_pad_chain_list_default (GstPad * pad, GstBufferList * list)
|
|||
*
|
||||
* 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 @@ gst_proxy_pad_getrange_default (GstPad * pad, guint64 offset, guint size,
|
|||
*
|
||||
* 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 @@ done:
|
|||
*
|
||||
* 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 @@ gst_proxy_pad_acceptcaps_default (GstPad * pad, GstCaps * caps)
|
|||
*
|
||||
* 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 @@ gst_proxy_pad_get_target (GstPad * pad)
|
|||
* 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 @@ gst_proxy_pad_get_internal (GstProxyPad * pad)
|
|||
*
|
||||
* 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 @@ static void gst_ghost_pad_dispose (GObject * object);
|
|||
*
|
||||
* 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 @@ gst_ghost_pad_internal_activate_push_default (GstPad * pad, gboolean active)
|
|||
*
|
||||
* 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 @@ gst_ghost_pad_internal_activate_pull_default (GstPad * pad, gboolean active)
|
|||
*
|
||||
* 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 @@ gst_ghost_pad_activate_push_default (GstPad * pad, gboolean active)
|
|||
*
|
||||
* 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 @@ gst_ghost_pad_activate_pull_default (GstPad * pad, gboolean active)
|
|||
*
|
||||
* 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 @@ gst_ghost_pad_link_default (GstPad * pad, GstPad * peer)
|
|||
*
|
||||
* 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)
|
||||
|
|
|
@ -2955,7 +2955,7 @@ gst_structure_is_equal_foreach (GQuark field_id, const GValue * val2,
|
|||
*
|
||||
* 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 @@ gst_structure_intersect_field2 (GQuark id, const GValue * val1, gpointer data)
|
|||
*
|
||||
* 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 @@ gst_caps_structure_can_intersect_field (GQuark id, const GValue * val1,
|
|||
*
|
||||
* 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 @@ gst_caps_structure_is_subset_field (GQuark field_id, const GValue * value,
|
|||
*
|
||||
* 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,
|
||||
|
|
|
@ -3229,7 +3229,7 @@ gst_base_parse_set_passthrough (GstBaseParse * parse, gboolean passthrough)
|
|||
* 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,
|
||||
|
|
|
@ -587,7 +587,7 @@ gst_base_src_set_format (GstBaseSrc * src, GstFormat format)
|
|||
* 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)
|
||||
|
|
|
@ -859,7 +859,7 @@ gst_input_selector_class_init (GstInputSelectorClass * klass)
|
|||
* 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",
|
||||
|
|
|
@ -397,7 +397,7 @@ gst_multi_queue_class_init (GstMultiQueueClass * klass)
|
|||
* 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",
|
||||
|
|
|
@ -426,6 +426,86 @@ GST_START_TEST (test_push_linked)
|
|||
|
||||
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 @@ gst_pad_suite (void)
|
|||
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);
|
||||
|
|
|
@ -190,6 +190,7 @@ EXPORTS
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue