mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
libs/gst/base/gstbytereader.c: Use new GST_READ_UINT24_(LE|BE) macros.
Original commit message from CVS: * libs/gst/base/gstbytereader.c: (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): Use new GST_READ_UINT24_(LE|BE) macros.
This commit is contained in:
parent
22dd04f7e0
commit
2ba1f3a6a2
2 changed files with 17 additions and 26 deletions
|
@ -1,3 +1,12 @@
|
|||
2008-10-07 Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
||||
|
||||
* libs/gst/base/gstbytereader.c: (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):
|
||||
Use new GST_READ_UINT24_(LE|BE) macros.
|
||||
|
||||
2008-10-07 Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
||||
|
||||
* docs/gst/gstreamer-sections.txt:
|
||||
|
|
|
@ -916,9 +916,7 @@ gst_byte_reader_get_uint24_le (GstByteReader * reader, guint32 * val)
|
|||
if (reader->byte + 3 > reader->size)
|
||||
return FALSE;
|
||||
|
||||
*val =
|
||||
(reader->data[reader->byte] | (reader->data[reader->byte +
|
||||
1] << 8) | (reader->data[reader->byte + 2] << 16));
|
||||
*val = GST_READ_UINT24_LE (&reader->data[reader->byte]);
|
||||
reader->byte += 3;
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -932,9 +930,7 @@ gst_byte_reader_get_uint24_be (GstByteReader * reader, guint32 * val)
|
|||
if (reader->byte + 3 > reader->size)
|
||||
return FALSE;
|
||||
|
||||
*val =
|
||||
(reader->data[reader->byte + 2] | (reader->data[reader->byte +
|
||||
1] << 8) | (reader->data[reader->byte] << 16));
|
||||
*val = GST_READ_UINT24_BE (&reader->data[reader->byte]);
|
||||
reader->byte += 3;
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -950,10 +946,7 @@ gst_byte_reader_get_int24_le (GstByteReader * reader, gint32 * val)
|
|||
if (reader->byte + 3 > reader->size)
|
||||
return FALSE;
|
||||
|
||||
ret =
|
||||
(reader->data[reader->byte] | (reader->data[reader->byte +
|
||||
1] << 8) | (reader->data[reader->byte + 2] << 16));
|
||||
|
||||
ret = GST_READ_UINT24_LE (&reader->data[reader->byte]);
|
||||
if (ret & 0x00800000)
|
||||
ret |= 0xff000000;
|
||||
|
||||
|
@ -974,9 +967,7 @@ gst_byte_reader_get_int24_be (GstByteReader * reader, gint32 * val)
|
|||
if (reader->byte + 3 > reader->size)
|
||||
return FALSE;
|
||||
|
||||
ret =
|
||||
(reader->data[reader->byte + 2] | (reader->data[reader->byte +
|
||||
1] << 8) | (reader->data[reader->byte] << 16));
|
||||
ret = GST_READ_UINT24_BE (&reader->data[reader->byte]);
|
||||
if (ret & 0x00800000)
|
||||
ret |= 0xff000000;
|
||||
|
||||
|
@ -995,9 +986,7 @@ gst_byte_reader_peek_uint24_le (GstByteReader * reader, guint32 * val)
|
|||
if (reader->byte + 3 > reader->size)
|
||||
return FALSE;
|
||||
|
||||
*val =
|
||||
(reader->data[reader->byte] | (reader->data[reader->byte +
|
||||
1] << 8) | (reader->data[reader->byte + 2] << 16));
|
||||
*val = GST_READ_UINT24_LE (&reader->data[reader->byte]);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -1010,9 +999,7 @@ gst_byte_reader_peek_uint24_be (GstByteReader * reader, guint32 * val)
|
|||
if (reader->byte + 3 > reader->size)
|
||||
return FALSE;
|
||||
|
||||
*val =
|
||||
(reader->data[reader->byte + 2] | (reader->data[reader->byte +
|
||||
1] << 8) | (reader->data[reader->byte] << 16));
|
||||
*val = GST_READ_UINT24_BE (&reader->data[reader->byte]);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -1027,10 +1014,7 @@ gst_byte_reader_peek_int24_le (GstByteReader * reader, gint32 * val)
|
|||
if (reader->byte + 3 > reader->size)
|
||||
return FALSE;
|
||||
|
||||
ret =
|
||||
(reader->data[reader->byte] | (reader->data[reader->byte +
|
||||
1] << 8) | (reader->data[reader->byte + 2] << 16));
|
||||
|
||||
ret = GST_READ_UINT24_LE (&reader->data[reader->byte]);
|
||||
if (ret & 0x00800000)
|
||||
ret |= 0xff000000;
|
||||
|
||||
|
@ -1049,9 +1033,7 @@ gst_byte_reader_peek_int24_be (GstByteReader * reader, gint32 * val)
|
|||
if (reader->byte + 3 > reader->size)
|
||||
return FALSE;
|
||||
|
||||
ret =
|
||||
(reader->data[reader->byte + 2] | (reader->data[reader->byte +
|
||||
1] << 8) | (reader->data[reader->byte] << 16));
|
||||
ret = GST_READ_UINT24_BE (&reader->data[reader->byte]);
|
||||
if (ret & 0x00800000)
|
||||
ret |= 0xff000000;
|
||||
|
||||
|
|
Loading…
Reference in a new issue