Lines Matching refs:bitwriter
110 gst_bit_writer_init (GstBitWriter * bitwriter) in gst_bit_writer_init() argument
112 g_return_if_fail (bitwriter != NULL); in gst_bit_writer_init()
114 memset (bitwriter, 0, sizeof (GstBitWriter)); in gst_bit_writer_init()
115 bitwriter->owned = TRUE; in gst_bit_writer_init()
116 bitwriter->auto_grow = TRUE; in gst_bit_writer_init()
129 gst_bit_writer_init_with_size (GstBitWriter * bitwriter, guint size, in gst_bit_writer_init_with_size() argument
132 g_return_if_fail (bitwriter != NULL); in gst_bit_writer_init_with_size()
134 gst_bit_writer_init (bitwriter); in gst_bit_writer_init_with_size()
136 _gst_bit_writer_check_remaining (bitwriter, size << 3); in gst_bit_writer_init_with_size()
138 bitwriter->auto_grow = !fixed; in gst_bit_writer_init_with_size()
153 gst_bit_writer_init_with_data (GstBitWriter * bitwriter, guint8 * data, in gst_bit_writer_init_with_data() argument
156 g_return_if_fail (bitwriter != NULL); in gst_bit_writer_init_with_data()
158 gst_bit_writer_init (bitwriter); in gst_bit_writer_init_with_data()
160 bitwriter->data = data; in gst_bit_writer_init_with_data()
161 bitwriter->bit_capacity = size * 8; in gst_bit_writer_init_with_data()
162 bitwriter->bit_size = (initialized) ? size << 3 : 0; in gst_bit_writer_init_with_data()
163 bitwriter->auto_grow = FALSE; in gst_bit_writer_init_with_data()
164 bitwriter->owned = FALSE; in gst_bit_writer_init_with_data()
174 gst_bit_writer_reset (GstBitWriter * bitwriter) in gst_bit_writer_reset() argument
176 g_return_if_fail (bitwriter != NULL); in gst_bit_writer_reset()
178 if (bitwriter->owned) in gst_bit_writer_reset()
179 g_free (bitwriter->data); in gst_bit_writer_reset()
180 memset (bitwriter, 0, sizeof (GstBitWriter)); in gst_bit_writer_reset()
195 gst_bit_writer_reset_and_get_data (GstBitWriter * bitwriter) in gst_bit_writer_reset_and_get_data() argument
199 g_return_val_if_fail (bitwriter != NULL, NULL); in gst_bit_writer_reset_and_get_data()
201 data = bitwriter->data; in gst_bit_writer_reset_and_get_data()
202 if (bitwriter->owned) in gst_bit_writer_reset_and_get_data()
203 data = g_memdup (data, bitwriter->bit_size >> 3); in gst_bit_writer_reset_and_get_data()
204 gst_bit_writer_reset (bitwriter); in gst_bit_writer_reset_and_get_data()
221 gst_bit_writer_reset_and_get_buffer (GstBitWriter * bitwriter) in gst_bit_writer_reset_and_get_buffer() argument
227 g_return_val_if_fail (bitwriter != NULL, NULL); in gst_bit_writer_reset_and_get_buffer()
229 size = bitwriter->bit_size >> 3; in gst_bit_writer_reset_and_get_buffer()
230 data = gst_bit_writer_reset_and_get_data (bitwriter); in gst_bit_writer_reset_and_get_buffer()
234 if (data && !bitwriter->owned) in gst_bit_writer_reset_and_get_buffer()
253 gst_bit_writer_free (GstBitWriter * bitwriter) in gst_bit_writer_free() argument
255 g_return_if_fail (bitwriter != NULL); in gst_bit_writer_free()
257 gst_bit_writer_reset (bitwriter); in gst_bit_writer_free()
258 g_slice_free (GstBitWriter, bitwriter); in gst_bit_writer_free()
274 gst_bit_writer_free_and_get_data (GstBitWriter * bitwriter) in gst_bit_writer_free_and_get_data() argument
278 g_return_val_if_fail (bitwriter != NULL, NULL); in gst_bit_writer_free_and_get_data()
280 data = gst_bit_writer_reset_and_get_data (bitwriter); in gst_bit_writer_free_and_get_data()
281 g_slice_free (GstBitWriter, bitwriter); in gst_bit_writer_free_and_get_data()
299 gst_bit_writer_free_and_get_buffer (GstBitWriter * bitwriter) in gst_bit_writer_free_and_get_buffer() argument
303 g_return_val_if_fail (bitwriter != NULL, NULL); in gst_bit_writer_free_and_get_buffer()
305 buffer = gst_bit_writer_reset_and_get_buffer (bitwriter); in gst_bit_writer_free_and_get_buffer()
306 g_slice_free (GstBitWriter, bitwriter); in gst_bit_writer_free_and_get_buffer()
320 gst_bit_writer_get_size (const GstBitWriter * bitwriter) in gst_bit_writer_get_size() argument
322 return _gst_bit_writer_get_size_inline (bitwriter); in gst_bit_writer_get_size()
334 gst_bit_writer_get_data (const GstBitWriter * bitwriter) in gst_bit_writer_get_data() argument
336 return _gst_bit_writer_get_data_inline (bitwriter); in gst_bit_writer_get_data()
349 gst_bit_writer_set_pos (GstBitWriter * bitwriter, guint pos) in gst_bit_writer_set_pos() argument
351 return _gst_bit_writer_set_pos_inline (bitwriter, pos); in gst_bit_writer_set_pos()
401 gst_bit_writer_put_bits_uint##bits (GstBitWriter *bitwriter, guint##bits value, guint nbits) \
403 return _gst_bit_writer_put_bits_uint##bits##_inline (bitwriter, value, nbits); \
424 gst_bit_writer_put_bytes (GstBitWriter * bitwriter, const guint8 * data, in gst_bit_writer_put_bytes() argument
427 return _gst_bit_writer_put_bytes_inline (bitwriter, data, nbytes); in gst_bit_writer_put_bytes()
441 gst_bit_writer_align_bytes (GstBitWriter * bitwriter, guint8 trailing_bit) in gst_bit_writer_align_bytes() argument
443 return _gst_bit_writer_align_bytes_inline (bitwriter, trailing_bit); in gst_bit_writer_align_bytes()