Commit graph

6 commits

Author SHA1 Message Date
Wim Taymans
54fd50bfe1 buffer: add index to _take_memory()
Add an index to gst_buffer_take_memory() so that we can also insert memory at a
certain offset. This is mostly interesting to prepend a header memory block to
the buffer.
2011-06-13 16:31:53 +02:00
Wim Taymans
38ffe30745 memory: more work on implementing buffer memory 2011-03-28 20:08:46 +02:00
Wim Taymans
1af328e785 memory: more work on porting the unit tests 2011-03-28 20:08:46 +02:00
Sebastian Dröge
f17efc49c6 bitreader: Fix uninitialized variable compiler warnings
gcc doesn't notice that the check assertion macros will abort
further execution of the tests.
2010-10-03 23:41:26 +02:00
Sebastian Dröge
dd762eb49f bitreader: Add inlined and unchecked versions of the important functions
API: gst_bit_reader_skip_unchecked
API: gst_bit_reader_skip_to_byte_unchecked
API: gst_bit_reader_get_bits_uint16_unchecked
API: gst_bit_reader_get_bits_uint32_unchecked
API: gst_bit_reader_get_bits_uint64_unchecked
API: gst_bit_reader_get_bits_uint8_unchecked
API: gst_bit_reader_peek_bits_uint16_unchecked
API: gst_bit_reader_peek_bits_uint32_unchecked
API: gst_bit_reader_peek_bits_uint64_unchecked
API: gst_bit_reader_peek_bits_uint8_unchecked

This alone makes flacparse about 3 times faster.
2010-10-03 15:32:41 +02:00
Sebastian Dröge
b377c58e43 Add bit reader and byte reader classes, including documentation and an extensive unit test suite. Fixes bug #553554.
Original commit message from CVS:
* docs/libs/gstreamer-libs-docs.sgml:
* docs/libs/gstreamer-libs-sections.txt:
* libs/gst/base/Makefile.am:
* libs/gst/base/gstbitreader.c: (gst_bit_reader_new),
(gst_bit_reader_new_from_buffer), (gst_bit_reader_free),
(gst_bit_reader_init), (gst_bit_reader_init_from_buffer),
(gst_bit_reader_set_pos), (gst_bit_reader_get_pos),
(gst_bit_reader_get_remaining), (gst_bit_reader_skip),
(gst_bit_reader_skip_to_byte):
* libs/gst/base/gstbitreader.h:
* libs/gst/base/gstbytereader.c: (GDOUBLE_SWAP_LE_BE),
(GFLOAT_SWAP_LE_BE), (gst_byte_reader_new),
(gst_byte_reader_new_from_buffer), (gst_byte_reader_free),
(gst_byte_reader_init), (gst_byte_reader_init_from_buffer),
(gst_byte_reader_set_pos), (gst_byte_reader_get_pos),
(gst_byte_reader_get_remaining), (gst_byte_reader_skip),
(gst_byte_reader_get_uint8), (gst_byte_reader_get_int8),
(gst_byte_reader_peek_uint8), (gst_byte_reader_peek_int8),
(gst_byte_reader_get_uint24_le), (gst_byte_reader_get_uint24_be),
(gst_byte_reader_get_int24_le), (gst_byte_reader_get_int24_be),
(gst_byte_reader_peek_uint24_le), (gst_byte_reader_peek_uint24_be),
(gst_byte_reader_peek_int24_le), (gst_byte_reader_peek_int24_be):
* libs/gst/base/gstbytereader.h:
* tests/check/Makefile.am:
* tests/check/libs/bitreader.c: (GST_START_TEST),
(gst_bit_reader_suite):
* tests/check/libs/bytereader.c: (GST_START_TEST),
(gst_byte_reader_suite):
Add bit reader and byte reader classes, including documentation
and an extensive unit test suite. Fixes bug #553554.
2008-10-06 12:41:53 +00:00