*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
*/
#ifdef HAVE_CONFIG_H
/**
* SECTION:gstbitreader
+ * @title: GstBitReader
* @short_description: Reads any number of bits from a memory buffer
*
* #GstBitReader provides a bit reader that can read any number of bits
*/
/**
- * gst_bit_reader_new:
- * @data: Data from which the #GstBitReader should read
+ * gst_bit_reader_new: (skip)
+ * @data: (array length=size): Data from which the #GstBitReader
+ * should read
* @size: Size of @data in bytes
*
* Create a new #GstBitReader instance, which will read from @data.
* Free-function: gst_bit_reader_free
*
* Returns: (transfer full): a new #GstBitReader instance
- *
- * Since: 0.10.22
*/
GstBitReader *
gst_bit_reader_new (const guint8 * data, guint size)
}
/**
- * gst_bit_reader_new_from_buffer:
- * @buffer: Buffer from which the #GstBitReader should read
- *
- * Create a new #GstBitReader instance, which will read from the
- * #GstBuffer @buffer.
- *
- * Free-function: gst_bit_reader_free
- *
- * Returns: (transfer full): a new #GstBitReader instance
- *
- * Since: 0.10.22
- */
-GstBitReader *
-gst_bit_reader_new_from_buffer (const GstBuffer * buffer)
-{
- g_return_val_if_fail (GST_IS_BUFFER (buffer), NULL);
-
- return gst_bit_reader_new (GST_BUFFER_DATA (buffer),
- GST_BUFFER_SIZE (buffer));
-}
-
-/**
* gst_bit_reader_free:
* @reader: (in) (transfer full): a #GstBitReader instance
*
* Frees a #GstBitReader instance, which was previously allocated by
- * gst_bit_reader_new() or gst_bit_reader_new_from_buffer().
- *
- * Since: 0.10.22
+ * gst_bit_reader_new().
*/
void
gst_bit_reader_free (GstBitReader * reader)
*
* Initializes a #GstBitReader instance to read from @data. This function
* can be called on already initialized instances.
- *
- * Since: 0.10.22
*/
void
gst_bit_reader_init (GstBitReader * reader, const guint8 * data, guint size)
}
/**
- * gst_bit_reader_init_from_buffer:
- * @reader: a #GstBitReader instance
- * @buffer: (transfer none): Buffer from which the #GstBitReader should read
- *
- * Initializes a #GstBitReader instance to read from @buffer. This function
- * can be called on already initialized instances.
- *
- * Since: 0.10.22
- */
-void
-gst_bit_reader_init_from_buffer (GstBitReader * reader,
- const GstBuffer * buffer)
-{
- g_return_if_fail (GST_IS_BUFFER (buffer));
-
- gst_bit_reader_init (reader, GST_BUFFER_DATA (buffer),
- GST_BUFFER_SIZE (buffer));
-}
-
-/**
* gst_bit_reader_set_pos:
* @reader: a #GstBitReader instance
* @pos: The new position in bits
*
* Returns: %TRUE if the position could be set successfully, %FALSE
* otherwise.
- *
- * Since: 0.10.22
*/
gboolean
gst_bit_reader_set_pos (GstBitReader * reader, guint pos)
* Returns the current position of a #GstBitReader instance in bits.
*
* Returns: The current position of @reader in bits.
- *
- * Since: 0.10.22
*/
guint
gst_bit_reader_get_pos (const GstBitReader * reader)
* Returns the remaining number of bits of a #GstBitReader instance.
*
* Returns: The remaining number of bits of @reader instance.
- *
- * Since: 0.10.22
*/
guint
gst_bit_reader_get_remaining (const GstBitReader * reader)
* Returns the total number of bits of a #GstBitReader instance.
*
* Returns: The total number of bits of @reader instance.
- *
- * Since: 0.10.26
*/
guint
gst_bit_reader_get_size (const GstBitReader * reader)
* Skips @nbits bits of the #GstBitReader instance.
*
* Returns: %TRUE if @nbits bits could be skipped, %FALSE otherwise.
- *
- * Since: 0.10.22
*/
gboolean
gst_bit_reader_skip (GstBitReader * reader, guint nbits)
* Skips until the next byte.
*
* Returns: %TRUE if successful, %FALSE otherwise.
- *
- * Since: 0.10.22
*/
gboolean
gst_bit_reader_skip_to_byte (GstBitReader * reader)
* Read @nbits bits into @val and update the current position.
*
* Returns: %TRUE if successful, %FALSE otherwise.
- *
- * Since: 0.10.22
*/
/**
* Read @nbits bits into @val and update the current position.
*
* Returns: %TRUE if successful, %FALSE otherwise.
- *
- * Since: 0.10.22
*/
/**
* Read @nbits bits into @val and update the current position.
*
* Returns: %TRUE if successful, %FALSE otherwise.
- *
- * Since: 0.10.22
*/
/**
* Read @nbits bits into @val and update the current position.
*
* Returns: %TRUE if successful, %FALSE otherwise.
- *
- * Since: 0.10.22
*/
/**
* Read @nbits bits into @val but keep the current position.
*
* Returns: %TRUE if successful, %FALSE otherwise.
- *
- * Since: 0.10.22
*/
/**
* Read @nbits bits into @val but keep the current position.
*
* Returns: %TRUE if successful, %FALSE otherwise.
- *
- * Since: 0.10.22
*/
/**
* Read @nbits bits into @val but keep the current position.
*
* Returns: %TRUE if successful, %FALSE otherwise.
- *
- * Since: 0.10.22
*/
/**
* Read @nbits bits into @val but keep the current position.
*
* Returns: %TRUE if successful, %FALSE otherwise.
- *
- * Since: 0.10.22
*/
#define GST_BIT_READER_READ_BITS(bits) \