From fcfe7085b9b2506b6a969c0c9a41cdb2ff75a598 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Sat, 14 Dec 2013 18:38:41 +0000 Subject: [PATCH] bytereader: add inline variant of gst_byte_reader_init() --- libs/gst/base/gstbytereader.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/libs/gst/base/gstbytereader.h b/libs/gst/base/gstbytereader.h index 6ed0296..8745ef6 100644 --- a/libs/gst/base/gstbytereader.h +++ b/libs/gst/base/gstbytereader.h @@ -333,6 +333,9 @@ __GST_BYTE_READER_GET_PEEK_BITS_INLINE(64,gdouble,float64_be) #ifndef GST_BYTE_READER_DISABLE_INLINES +#define gst_byte_reader_init(reader,data,size) \ + _gst_byte_reader_init_inline(reader,data,size) + #define gst_byte_reader_get_remaining(reader) \ _gst_byte_reader_get_remaining_inline(reader) @@ -436,6 +439,16 @@ __GST_BYTE_READER_GET_PEEK_BITS_INLINE(64,gdouble,float64_be) #endif /* GST_BYTE_READER_DISABLE_INLINES */ +static inline void +_gst_byte_reader_init_inline (GstByteReader * reader, const guint8 * data, guint size) +{ + g_return_if_fail (reader != NULL); + + reader->data = data; + reader->size = size; + reader->byte = 0; +} + static inline gboolean _gst_byte_reader_dup_data_inline (GstByteReader * reader, guint size, guint8 ** val) { -- 2.7.4