Do some optimisation work in GstAdapter to avoid copies in more cases.
authorJan Schmidt <thaytan@mad.scientist.com>
Thu, 9 Nov 2006 14:37:38 +0000 (14:37 +0000)
committerJan Schmidt <thaytan@mad.scientist.com>
Thu, 9 Nov 2006 14:37:38 +0000 (14:37 +0000)
commit6f363cd89b123d191fd46dba7aa472262f184c3f
treeed7f97c292de55d821f211aa5728e249dc726b43
parent556694624153a9c6e542b322086a085fd6a51dcd
Do some optimisation work in GstAdapter to avoid copies in more cases.

Original commit message from CVS:
* Makefile.am:
* configure.ac:
* libs/gst/base/gstadapter.c: (gst_adapter_clear),
(gst_adapter_push), (gst_adapter_peek_into), (gst_adapter_peek),
(gst_adapter_flush), (gst_adapter_take), (gst_adapter_take_buffer):
* libs/gst/base/gstadapter.h:
* tests/check/libs/adapter.c: (create_and_fill_adapter),
(GST_START_TEST), (gst_adapter_suite):
* tests/examples/Makefile.am:
Do some optimisation work in GstAdapter to avoid copies in more cases.
It could still do slightly better by merging buffers when
gst_buffer_is_span_fast is true, but is already faster.
Also, avoid traversing a single-linked list to append each incoming
buffer inside the adapter.
Add simple test app that times the adapter behaviour in different
situations, and extend the unit test to check that bytes enter and
exit the adapter in their original order.
ChangeLog
Makefile.am
configure.ac
libs/gst/base/gstadapter.c
libs/gst/base/gstadapter.h
tests/check/libs/adapter.c
tests/examples/Makefile.am