mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-26 17:18:15 +00:00
docs/libs/gstreamer-libs-sections.txt: Add new function:
Original commit message from CVS: * docs/libs/gstreamer-libs-sections.txt: Add new function: API: GstBaseTransform::gst_base_transform_suggest() * libs/gst/base/gstbasetransform.c: (gst_base_transform_finalize), (gst_base_transform_init), (gst_base_transform_transform_caps), (gst_base_transform_transform_size), (gst_base_transform_configure_caps), (gst_base_transform_can_transform), (gst_base_transform_find_transform), (gst_base_transform_setcaps), (gst_base_transform_prepare_output_buffer), (gst_base_transform_buffer_alloc), (gst_base_transform_handle_buffer), (gst_base_transform_getrange), (gst_base_transform_chain), (gst_base_transform_activate), (gst_base_transform_set_passthrough), (gst_base_transform_is_passthrough), (gst_base_transform_set_in_place), (gst_base_transform_is_in_place), (gst_base_transform_update_qos), (gst_base_transform_set_qos_enabled), (gst_base_transform_is_qos_enabled), (gst_base_transform_set_gap_aware), (gst_base_transform_suggest), (gst_base_transform_reconfigure): * libs/gst/base/gstbasetransform.h: Rewrite of basetransform to perform negotiation outside of the buffer_alloc functions. Fixes #545853. * tests/check/libs/transform1.c: (GST_START_TEST), (buffer_alloc_ct2): Update unit test.
This commit is contained in:
parent
864a45ee13
commit
30f8603645
5 changed files with 716 additions and 413 deletions
32
ChangeLog
32
ChangeLog
|
@ -1,3 +1,35 @@
|
|||
2008-08-05 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||
|
||||
* docs/libs/gstreamer-libs-sections.txt:
|
||||
Add new function:
|
||||
API: GstBaseTransform::gst_base_transform_suggest()
|
||||
|
||||
* libs/gst/base/gstbasetransform.c: (gst_base_transform_finalize),
|
||||
(gst_base_transform_init), (gst_base_transform_transform_caps),
|
||||
(gst_base_transform_transform_size),
|
||||
(gst_base_transform_configure_caps),
|
||||
(gst_base_transform_can_transform),
|
||||
(gst_base_transform_find_transform), (gst_base_transform_setcaps),
|
||||
(gst_base_transform_prepare_output_buffer),
|
||||
(gst_base_transform_buffer_alloc),
|
||||
(gst_base_transform_handle_buffer), (gst_base_transform_getrange),
|
||||
(gst_base_transform_chain), (gst_base_transform_activate),
|
||||
(gst_base_transform_set_passthrough),
|
||||
(gst_base_transform_is_passthrough),
|
||||
(gst_base_transform_set_in_place),
|
||||
(gst_base_transform_is_in_place), (gst_base_transform_update_qos),
|
||||
(gst_base_transform_set_qos_enabled),
|
||||
(gst_base_transform_is_qos_enabled),
|
||||
(gst_base_transform_set_gap_aware), (gst_base_transform_suggest),
|
||||
(gst_base_transform_reconfigure):
|
||||
* libs/gst/base/gstbasetransform.h:
|
||||
Rewrite of basetransform to perform negotiation outside of the
|
||||
buffer_alloc functions. Fixes #545853.
|
||||
|
||||
* tests/check/libs/transform1.c: (GST_START_TEST),
|
||||
(buffer_alloc_ct2):
|
||||
Update unit test.
|
||||
|
||||
2008-08-05 Stefan Kost <ensonic@users.sf.net>
|
||||
|
||||
* tests/check/gst/gstpreset.c:
|
||||
|
|
|
@ -305,6 +305,7 @@ gst_base_transform_is_qos_enabled
|
|||
gst_base_transform_set_qos_enabled
|
||||
gst_base_transform_update_qos
|
||||
gst_base_transform_set_gap_aware
|
||||
gst_base_transform_suggest
|
||||
|
||||
GST_BASE_TRANSFORM_SINK_NAME
|
||||
GST_BASE_TRANSFORM_SRC_NAME
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -256,6 +256,8 @@ gboolean gst_base_transform_is_qos_enabled (GstBaseTransform *trans);
|
|||
void gst_base_transform_set_gap_aware (GstBaseTransform *trans,
|
||||
gboolean gap_aware);
|
||||
|
||||
void gst_base_transform_suggest (GstBaseTransform *trans,
|
||||
GstCaps *caps, guint size);
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_BASE_TRANSFORM_H__ */
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include <gst/check/gstcheck.h>
|
||||
#include <gst/base/gstbasetransform.h>
|
||||
|
||||
#undef FAILING_TESTS
|
||||
#define FAILING_TESTS
|
||||
|
||||
#include "test_transform.c"
|
||||
|
||||
|
@ -203,7 +203,11 @@ GST_START_TEST (basetransform_chain_pt2)
|
|||
buffer = gst_test_trans_pop (trans);
|
||||
fail_unless (buffer != NULL);
|
||||
fail_unless (GST_BUFFER_SIZE (buffer) == 20);
|
||||
#if OPTIMIZED
|
||||
fail_unless (GST_BUFFER_CAPS (buffer) == caps);
|
||||
#else
|
||||
fail_unless (gst_caps_is_equal (GST_BUFFER_CAPS (buffer), caps));
|
||||
#endif
|
||||
|
||||
gst_buffer_unref (buffer);
|
||||
|
||||
|
@ -241,7 +245,11 @@ GST_START_TEST (basetransform_chain_pt2)
|
|||
buffer = gst_test_trans_pop (trans);
|
||||
fail_unless (buffer != NULL);
|
||||
fail_unless (GST_BUFFER_SIZE (buffer) == 10);
|
||||
#if OPTIMIZED
|
||||
fail_unless (GST_BUFFER_CAPS (buffer) == caps);
|
||||
#else
|
||||
fail_unless (gst_caps_is_equal (GST_BUFFER_CAPS (buffer), caps));
|
||||
#endif
|
||||
|
||||
gst_buffer_unref (buffer);
|
||||
|
||||
|
@ -468,7 +476,11 @@ GST_START_TEST (basetransform_chain_ip2)
|
|||
buffer = gst_test_trans_pop (trans);
|
||||
fail_unless (buffer != NULL);
|
||||
fail_unless (GST_BUFFER_SIZE (buffer) == 20);
|
||||
#if OPTIMIZED
|
||||
fail_unless (GST_BUFFER_CAPS (buffer) == caps);
|
||||
#else
|
||||
fail_unless (gst_caps_is_equal (GST_BUFFER_CAPS (buffer), caps));
|
||||
#endif
|
||||
gst_buffer_unref (buffer);
|
||||
|
||||
/* with caps buffer */
|
||||
|
@ -503,7 +515,11 @@ GST_START_TEST (basetransform_chain_ip2)
|
|||
buffer = gst_test_trans_pop (trans);
|
||||
fail_unless (buffer != NULL);
|
||||
fail_unless (GST_BUFFER_SIZE (buffer) == 20);
|
||||
#if OPTIMIZED
|
||||
fail_unless (GST_BUFFER_CAPS (buffer) == caps);
|
||||
#else
|
||||
fail_unless (gst_caps_is_equal (GST_BUFFER_CAPS (buffer), caps));
|
||||
#endif
|
||||
|
||||
/* output buffer has refcount 1 */
|
||||
fail_unless (GST_MINI_OBJECT_REFCOUNT_VALUE (buffer) == 1);
|
||||
|
@ -886,6 +902,7 @@ buffer_alloc_ct2 (GstPad * pad, guint64 offset, guint size, GstCaps * caps,
|
|||
} else
|
||||
outcaps = gst_caps_ref (incaps);
|
||||
}
|
||||
GST_DEBUG_OBJECT (pad, "expect %" GST_PTR_FORMAT, incaps);
|
||||
|
||||
fail_unless (gst_caps_is_equal (caps, incaps));
|
||||
|
||||
|
@ -943,6 +960,7 @@ GST_START_TEST (basetransform_chain_ct2)
|
|||
res = gst_pad_alloc_buffer (trans->srcpad, 0, 20, incaps, &buffer);
|
||||
fail_unless (res == GST_FLOW_OK);
|
||||
fail_unless (buffer_alloc_ct2_called == TRUE);
|
||||
gst_buffer_unref (buffer);
|
||||
|
||||
/* with caps buffer */
|
||||
GST_DEBUG_OBJECT (trans, "alloc size 20, with wrong caps %" GST_PTR_FORMAT,
|
||||
|
@ -1099,6 +1117,7 @@ GST_START_TEST (basetransform_chain_ct3)
|
|||
res = gst_pad_alloc_buffer (trans->srcpad, 0, 20, incaps, &buffer);
|
||||
fail_unless (res == GST_FLOW_OK);
|
||||
fail_unless (buffer_alloc_ct2_called == TRUE);
|
||||
gst_buffer_unref (buffer);
|
||||
|
||||
/* with caps buffer */
|
||||
GST_DEBUG_OBJECT (trans, "alloc size 20, with wrong caps %" GST_PTR_FORMAT,
|
||||
|
@ -1216,11 +1235,13 @@ GST_START_TEST (basetransform_chain_ct3)
|
|||
gst_buffer_set_caps (buffer, incaps);
|
||||
|
||||
/* don't suggest anything else */
|
||||
buffer_alloc_ct2_case = 1;
|
||||
set_caps_ct2_case = 2;
|
||||
transform_ct2_called = FALSE;;
|
||||
buffer_alloc_ct2_called = FALSE;
|
||||
res = gst_test_trans_push (trans, buffer);
|
||||
fail_unless (res == GST_FLOW_OK);
|
||||
fail_unless (transform_ct2_called == FALSE);
|
||||
fail_unless (transform_ct2_called == TRUE);
|
||||
#ifdef FAILING_TESTS
|
||||
/* FIXME, pad alloc must be called to get the new caps, because we don't call
|
||||
* pad alloc */
|
||||
|
@ -1231,9 +1252,11 @@ GST_START_TEST (basetransform_chain_ct3)
|
|||
fail_unless (buffer != NULL);
|
||||
#ifdef FAILING_TESTS
|
||||
/* FIXME changing src caps should produce converted buffer */
|
||||
GST_DEBUG_OBJECT (trans, "received caps %" GST_PTR_FORMAT,
|
||||
GST_BUFFER_CAPS (buffer));
|
||||
fail_unless (gst_caps_is_equal (GST_BUFFER_CAPS (buffer), outcaps));
|
||||
fail_unless (GST_BUFFER_SIZE (buffer) == 20);
|
||||
#endif
|
||||
fail_unless (GST_BUFFER_SIZE (buffer) == 10);
|
||||
|
||||
/* output buffer has refcount 1 */
|
||||
fail_unless (GST_MINI_OBJECT_REFCOUNT_VALUE (buffer) == 1);
|
||||
|
@ -1266,11 +1289,8 @@ GST_START_TEST (basetransform_chain_ct3)
|
|||
gst_buffer_set_caps (buffer, incaps);
|
||||
|
||||
/* don't suggest anything else */
|
||||
#ifndef FAILING_TESTS
|
||||
/* FIXME, above alloc reconfigured the transform */
|
||||
buffer_alloc_ct2_suggest = FALSE;
|
||||
buffer_alloc_ct2_case = 0;
|
||||
#endif
|
||||
transform_ct2_called = FALSE;;
|
||||
buffer_alloc_ct2_called = FALSE;
|
||||
res = gst_test_trans_push (trans, buffer);
|
||||
|
|
Loading…
Reference in a new issue