API: GstAggregatorPad.skip_buffer virtual method
[platform/upstream/gstreamer.git] / libs / gst / base / gstbitreader.c
index 6eccb63..9df36d1 100644 (file)
@@ -14,8 +14,8 @@
  *
  * 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
@@ -29,6 +29,7 @@
 
 /**
  * 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
@@ -37,8 +38,9 @@
  */
 
 /**
- * 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.
@@ -46,8 +48,6 @@
  * 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)
@@ -61,35 +61,11 @@ 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)
@@ -107,8 +83,6 @@ 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)
@@ -121,26 +95,6 @@ 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
@@ -149,8 +103,6 @@ gst_bit_reader_init_from_buffer (GstBitReader * reader,
  *
  * 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)
@@ -173,8 +125,6 @@ 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)
@@ -189,8 +139,6 @@ 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)
@@ -205,8 +153,6 @@ 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)
@@ -222,8 +168,6 @@ 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)
@@ -238,8 +182,6 @@ 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)
@@ -256,8 +198,6 @@ 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
  */
 
 /**
@@ -269,8 +209,6 @@ 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
  */
 
 /**
@@ -282,8 +220,6 @@ 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
  */
 
 /**
@@ -295,8 +231,6 @@ 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
  */
 
 /**
@@ -308,8 +242,6 @@ gst_bit_reader_skip_to_byte (GstBitReader * reader)
  * Read @nbits bits into @val but keep the current position.
  *
  * Returns: %TRUE if successful, %FALSE otherwise.
- * 
- * Since: 0.10.22
  */
 
 /**
@@ -321,8 +253,6 @@ gst_bit_reader_skip_to_byte (GstBitReader * reader)
  * Read @nbits bits into @val but keep the current position.
  *
  * Returns: %TRUE if successful, %FALSE otherwise.
- * 
- * Since: 0.10.22
  */
 
 /**
@@ -334,8 +264,6 @@ gst_bit_reader_skip_to_byte (GstBitReader * reader)
  * Read @nbits bits into @val but keep the current position.
  *
  * Returns: %TRUE if successful, %FALSE otherwise.
- * 
- * Since: 0.10.22
  */
 
 /**
@@ -347,8 +275,6 @@ gst_bit_reader_skip_to_byte (GstBitReader * reader)
  * 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) \