GstEvent * event);
GstCaps * (*get_sink_caps) (GstBaseParse * parse,
- GstCaps * filter);
+ GstCaps * filter);
GstFlowReturn (*detect) (GstBaseParse * parse,
GstBuffer * buffer);
/*< private >*/
- gpointer _gst_reserved[GST_PADDING_LARGE - 2];
+ gpointer _gst_reserved[GST_PADDING_LARGE];
};
GType gst_base_parse_get_type (void);
*
* Skips until the next byte without checking if there are enough bits
* available in the bit reader.
- *
+ *
* Since: 0.10.31
*/
void gst_bit_reader_skip_to_byte_unchecked (GstBitReader * reader);
* checking if there are enough bits available in the bit reader.
*
* Returns: unsigned 8 bit integer with the bits.
- *
+ *
* Since: 0.10.31
*/
guint8 gst_bit_reader_peek_bits_uint8_unchecked (const GstBitReader *reader, guint nbits);
* checking if there are enough bits available in the bit reader
*
* Returns: unsigned 8 bit integer with the bits.
- *
+ *
* Since: 0.10.31
*/
guint8 gst_bit_reader_get_bits_uint8_unchecked (GstBitReader *reader, guint nbits);
* checking if there are enough bits available in the bit reader.
*
* Returns: unsigned 16 bit integer with the bits.
- *
+ *
* Since: 0.10.31
*/
guint16 gst_bit_reader_peek_bits_uint16_unchecked (const GstBitReader *reader, guint nbits);
* checking if there are enough bits available in the bit reader
*
* Returns: unsigned 16 bit integer with the bits.
- *
+ *
* Since: 0.10.31
*/
guint16 gst_bit_reader_get_bits_uint16_unchecked (GstBitReader *reader, guint nbits);
* checking if there are enough bits available in the bit reader.
*
* Returns: unsigned 32 bit integer with the bits.
- *
+ *
* Since: 0.10.31
*/
guint32 gst_bit_reader_peek_bits_uint32_unchecked (const GstBitReader *reader, guint nbits);
* checking if there are enough bits available in the bit reader
*
* Returns: unsigned 32 bit integer with the bits.
- *
+ *
* Since: 0.10.31
*/
guint32 gst_bit_reader_get_bits_uint32_unchecked (GstBitReader *reader, guint nbits);
* checking if there are enough bits available in the bit reader.
*
* Returns: unsigned 64 bit integer with the bits.
- *
+ *
* Since: 0.10.31
*/
guint64 gst_bit_reader_peek_bits_uint64_unchecked (const GstBitReader *reader, guint nbits);
* checking if there are enough bits available in the bit reader
*
* Returns: unsigned 64 bit integer with the bits.
- *
+ *
* Since: 0.10.31
*/
guint64 gst_bit_reader_get_bits_uint64_unchecked (GstBitReader *reader, guint nbits);
gpointer _gst_reserved[GST_PADDING];
} GstBitReader;
-GstBitReader * gst_bit_reader_new (const guint8 *data, guint size);
-void gst_bit_reader_free (GstBitReader *reader);
+GstBitReader * gst_bit_reader_new (const guint8 *data, guint size);
+void gst_bit_reader_free (GstBitReader *reader);
-void gst_bit_reader_init (GstBitReader *reader, const guint8 *data, guint size);
+void gst_bit_reader_init (GstBitReader *reader, const guint8 *data, guint size);
-gboolean gst_bit_reader_set_pos (GstBitReader *reader, guint pos);
+gboolean gst_bit_reader_set_pos (GstBitReader *reader, guint pos);
+guint gst_bit_reader_get_pos (const GstBitReader *reader);
-guint gst_bit_reader_get_pos (const GstBitReader *reader);
-guint gst_bit_reader_get_remaining (const GstBitReader *reader);
+guint gst_bit_reader_get_remaining (const GstBitReader *reader);
-guint gst_bit_reader_get_size (const GstBitReader *reader);
+guint gst_bit_reader_get_size (const GstBitReader *reader);
-gboolean gst_bit_reader_skip (GstBitReader *reader, guint nbits);
-gboolean gst_bit_reader_skip_to_byte (GstBitReader *reader);
+gboolean gst_bit_reader_skip (GstBitReader *reader, guint nbits);
+gboolean gst_bit_reader_skip_to_byte (GstBitReader *reader);
-gboolean gst_bit_reader_get_bits_uint8 (GstBitReader *reader, guint8 *val, guint nbits);
-gboolean gst_bit_reader_get_bits_uint16 (GstBitReader *reader, guint16 *val, guint nbits);
-gboolean gst_bit_reader_get_bits_uint32 (GstBitReader *reader, guint32 *val, guint nbits);
-gboolean gst_bit_reader_get_bits_uint64 (GstBitReader *reader, guint64 *val, guint nbits);
+gboolean gst_bit_reader_get_bits_uint8 (GstBitReader *reader, guint8 *val, guint nbits);
+gboolean gst_bit_reader_get_bits_uint16 (GstBitReader *reader, guint16 *val, guint nbits);
+gboolean gst_bit_reader_get_bits_uint32 (GstBitReader *reader, guint32 *val, guint nbits);
+gboolean gst_bit_reader_get_bits_uint64 (GstBitReader *reader, guint64 *val, guint nbits);
-gboolean gst_bit_reader_peek_bits_uint8 (const GstBitReader *reader, guint8 *val, guint nbits);
-gboolean gst_bit_reader_peek_bits_uint16 (const GstBitReader *reader, guint16 *val, guint nbits);
-gboolean gst_bit_reader_peek_bits_uint32 (const GstBitReader *reader, guint32 *val, guint nbits);
-gboolean gst_bit_reader_peek_bits_uint64 (const GstBitReader *reader, guint64 *val, guint nbits);
+gboolean gst_bit_reader_peek_bits_uint8 (const GstBitReader *reader, guint8 *val, guint nbits);
+gboolean gst_bit_reader_peek_bits_uint16 (const GstBitReader *reader, guint16 *val, guint nbits);
+gboolean gst_bit_reader_peek_bits_uint32 (const GstBitReader *reader, guint32 *val, guint nbits);
+gboolean gst_bit_reader_peek_bits_uint64 (const GstBitReader *reader, guint64 *val, guint nbits);
/**
* GST_BIT_READER_INIT:
*
* Since: 0.10.25
*/
-guint8 gst_byte_reader_get_uint8_unchecked (GstByteReader * reader);
-guint8 gst_byte_reader_peek_uint8_unchecked (GstByteReader * reader);
-gint8 gst_byte_reader_get_int8_unchecked (GstByteReader * reader);
-gint8 gst_byte_reader_peek_int8_unchecked (GstByteReader * reader);
+guint8 gst_byte_reader_get_uint8_unchecked (GstByteReader * reader);
+guint8 gst_byte_reader_peek_uint8_unchecked (GstByteReader * reader);
+gint8 gst_byte_reader_get_int8_unchecked (GstByteReader * reader);
+gint8 gst_byte_reader_peek_int8_unchecked (GstByteReader * reader);
/**
* gst_byte_reader_get_uint16_le_unchecked:
*
* Since: 0.10.25
*/
-guint16 gst_byte_reader_get_uint16_le_unchecked (GstByteReader * reader);
-guint16 gst_byte_reader_get_uint16_be_unchecked (GstByteReader * reader);
+guint16 gst_byte_reader_get_uint16_le_unchecked (GstByteReader * reader);
+guint16 gst_byte_reader_get_uint16_be_unchecked (GstByteReader * reader);
guint16 gst_byte_reader_peek_uint16_le_unchecked (GstByteReader * reader);
guint16 gst_byte_reader_peek_uint16_be_unchecked (GstByteReader * reader);
-gint16 gst_byte_reader_get_int16_le_unchecked (GstByteReader * reader);
-gint16 gst_byte_reader_get_int16_be_unchecked (GstByteReader * reader);
-gint16 gst_byte_reader_peek_int16_le_unchecked (GstByteReader * reader);
-gint16 gst_byte_reader_peek_int16_be_unchecked (GstByteReader * reader);
+gint16 gst_byte_reader_get_int16_le_unchecked (GstByteReader * reader);
+gint16 gst_byte_reader_get_int16_be_unchecked (GstByteReader * reader);
+gint16 gst_byte_reader_peek_int16_le_unchecked (GstByteReader * reader);
+gint16 gst_byte_reader_peek_int16_be_unchecked (GstByteReader * reader);
/**
* gst_byte_reader_get_uint24_le_unchecked:
*
* Since: 0.10.25
*/
-guint32 gst_byte_reader_get_uint24_le_unchecked (GstByteReader * reader);
-guint32 gst_byte_reader_get_uint24_be_unchecked (GstByteReader * reader);
+guint32 gst_byte_reader_get_uint24_le_unchecked (GstByteReader * reader);
+guint32 gst_byte_reader_get_uint24_be_unchecked (GstByteReader * reader);
guint32 gst_byte_reader_peek_uint24_le_unchecked (GstByteReader * reader);
guint32 gst_byte_reader_peek_uint24_be_unchecked (GstByteReader * reader);
-gint32 gst_byte_reader_get_int24_le_unchecked (GstByteReader * reader);
-gint32 gst_byte_reader_get_int24_be_unchecked (GstByteReader * reader);
-gint32 gst_byte_reader_peek_int24_le_unchecked (GstByteReader * reader);
-gint32 gst_byte_reader_peek_int24_be_unchecked (GstByteReader * reader);
+gint32 gst_byte_reader_get_int24_le_unchecked (GstByteReader * reader);
+gint32 gst_byte_reader_get_int24_be_unchecked (GstByteReader * reader);
+gint32 gst_byte_reader_peek_int24_le_unchecked (GstByteReader * reader);
+gint32 gst_byte_reader_peek_int24_be_unchecked (GstByteReader * reader);
/**
* gst_byte_reader_get_uint32_le_unchecked:
*
* Since: 0.10.25
*/
-guint32 gst_byte_reader_get_uint32_le_unchecked (GstByteReader * reader);
-guint32 gst_byte_reader_get_uint32_be_unchecked (GstByteReader * reader);
+guint32 gst_byte_reader_get_uint32_le_unchecked (GstByteReader * reader);
+guint32 gst_byte_reader_get_uint32_be_unchecked (GstByteReader * reader);
guint32 gst_byte_reader_peek_uint32_le_unchecked (GstByteReader * reader);
guint32 gst_byte_reader_peek_uint32_be_unchecked (GstByteReader * reader);
-gint32 gst_byte_reader_get_int32_le_unchecked (GstByteReader * reader);
-gint32 gst_byte_reader_get_int32_be_unchecked (GstByteReader * reader);
-gint32 gst_byte_reader_peek_int32_le_unchecked (GstByteReader * reader);
-gint32 gst_byte_reader_peek_int32_be_unchecked (GstByteReader * reader);
+gint32 gst_byte_reader_get_int32_le_unchecked (GstByteReader * reader);
+gint32 gst_byte_reader_get_int32_be_unchecked (GstByteReader * reader);
+gint32 gst_byte_reader_peek_int32_le_unchecked (GstByteReader * reader);
+gint32 gst_byte_reader_peek_int32_be_unchecked (GstByteReader * reader);
/**
* gst_byte_reader_get_uint64_le_unchecked:
*
* Since: 0.10.25
*/
-guint64 gst_byte_reader_get_uint64_le_unchecked (GstByteReader * reader);
-guint64 gst_byte_reader_get_uint64_be_unchecked (GstByteReader * reader);
+guint64 gst_byte_reader_get_uint64_le_unchecked (GstByteReader * reader);
+guint64 gst_byte_reader_get_uint64_be_unchecked (GstByteReader * reader);
guint64 gst_byte_reader_peek_uint64_le_unchecked (GstByteReader * reader);
guint64 gst_byte_reader_peek_uint64_be_unchecked (GstByteReader * reader);
-gint64 gst_byte_reader_get_int64_le_unchecked (GstByteReader * reader);
-gint64 gst_byte_reader_get_int64_be_unchecked (GstByteReader * reader);
-gint64 gst_byte_reader_peek_int64_le_unchecked (GstByteReader * reader);
-gint64 gst_byte_reader_peek_int64_be_unchecked (GstByteReader * reader);
+gint64 gst_byte_reader_get_int64_le_unchecked (GstByteReader * reader);
+gint64 gst_byte_reader_get_int64_be_unchecked (GstByteReader * reader);
+gint64 gst_byte_reader_peek_int64_le_unchecked (GstByteReader * reader);
+gint64 gst_byte_reader_peek_int64_be_unchecked (GstByteReader * reader);
/**
* gst_byte_reader_get_float32_le_unchecked:
* Since: 0.10.25
*/
-gfloat gst_byte_reader_get_float32_le_unchecked (GstByteReader * reader);
-gfloat gst_byte_reader_get_float32_be_unchecked (GstByteReader * reader);
-gdouble gst_byte_reader_get_float64_le_unchecked (GstByteReader * reader);
-gdouble gst_byte_reader_get_float64_be_unchecked (GstByteReader * reader);
+gfloat gst_byte_reader_get_float32_le_unchecked (GstByteReader * reader);
+gfloat gst_byte_reader_get_float32_be_unchecked (GstByteReader * reader);
+gdouble gst_byte_reader_get_float64_le_unchecked (GstByteReader * reader);
+gdouble gst_byte_reader_get_float64_be_unchecked (GstByteReader * reader);
gfloat gst_byte_reader_peek_float32_le_unchecked (GstByteReader * reader);
gfloat gst_byte_reader_peek_float32_be_unchecked (GstByteReader * reader);
gpointer _gst_reserved[GST_PADDING];
} GstByteReader;
-GstByteReader * gst_byte_reader_new (const guint8 *data, guint size);
-void gst_byte_reader_free (GstByteReader *reader);
-
-void gst_byte_reader_init (GstByteReader *reader, const guint8 *data, guint size);
-
-gboolean gst_byte_reader_set_pos (GstByteReader *reader, guint pos);
-
-guint gst_byte_reader_get_pos (const GstByteReader *reader);
-guint gst_byte_reader_get_remaining (const GstByteReader *reader);
-
-guint gst_byte_reader_get_size (const GstByteReader *reader);
-
-gboolean gst_byte_reader_skip (GstByteReader *reader, guint nbytes);
-
-gboolean gst_byte_reader_get_uint8 (GstByteReader *reader, guint8 *val);
-gboolean gst_byte_reader_get_int8 (GstByteReader *reader, gint8 *val);
-gboolean gst_byte_reader_get_uint16_le (GstByteReader *reader, guint16 *val);
-gboolean gst_byte_reader_get_int16_le (GstByteReader *reader, gint16 *val);
-gboolean gst_byte_reader_get_uint16_be (GstByteReader *reader, guint16 *val);
-gboolean gst_byte_reader_get_int16_be (GstByteReader *reader, gint16 *val);
-gboolean gst_byte_reader_get_uint24_le (GstByteReader *reader, guint32 *val);
-gboolean gst_byte_reader_get_int24_le (GstByteReader *reader, gint32 *val);
-gboolean gst_byte_reader_get_uint24_be (GstByteReader *reader, guint32 *val);
-gboolean gst_byte_reader_get_int24_be (GstByteReader *reader, gint32 *val);
-gboolean gst_byte_reader_get_uint32_le (GstByteReader *reader, guint32 *val);
-gboolean gst_byte_reader_get_int32_le (GstByteReader *reader, gint32 *val);
-gboolean gst_byte_reader_get_uint32_be (GstByteReader *reader, guint32 *val);
-gboolean gst_byte_reader_get_int32_be (GstByteReader *reader, gint32 *val);
-gboolean gst_byte_reader_get_uint64_le (GstByteReader *reader, guint64 *val);
-gboolean gst_byte_reader_get_int64_le (GstByteReader *reader, gint64 *val);
-gboolean gst_byte_reader_get_uint64_be (GstByteReader *reader, guint64 *val);
-gboolean gst_byte_reader_get_int64_be (GstByteReader *reader, gint64 *val);
-
-gboolean gst_byte_reader_peek_uint8 (const GstByteReader *reader, guint8 *val);
-gboolean gst_byte_reader_peek_int8 (const GstByteReader *reader, gint8 *val);
-gboolean gst_byte_reader_peek_uint16_le (const GstByteReader *reader, guint16 *val);
-gboolean gst_byte_reader_peek_int16_le (const GstByteReader *reader, gint16 *val);
-gboolean gst_byte_reader_peek_uint16_be (const GstByteReader *reader, guint16 *val);
-gboolean gst_byte_reader_peek_int16_be (const GstByteReader *reader, gint16 *val);
-gboolean gst_byte_reader_peek_uint24_le (const GstByteReader *reader, guint32 *val);
-gboolean gst_byte_reader_peek_int24_le (const GstByteReader *reader, gint32 *val);
-gboolean gst_byte_reader_peek_uint24_be (const GstByteReader *reader, guint32 *val);
-gboolean gst_byte_reader_peek_int24_be (const GstByteReader *reader, gint32 *val);
-gboolean gst_byte_reader_peek_uint32_le (const GstByteReader *reader, guint32 *val);
-gboolean gst_byte_reader_peek_int32_le (const GstByteReader *reader, gint32 *val);
-gboolean gst_byte_reader_peek_uint32_be (const GstByteReader *reader, guint32 *val);
-gboolean gst_byte_reader_peek_int32_be (const GstByteReader *reader, gint32 *val);
-gboolean gst_byte_reader_peek_uint64_le (const GstByteReader *reader, guint64 *val);
-gboolean gst_byte_reader_peek_int64_le (const GstByteReader *reader, gint64 *val);
-gboolean gst_byte_reader_peek_uint64_be (const GstByteReader *reader, guint64 *val);
-gboolean gst_byte_reader_peek_int64_be (const GstByteReader *reader, gint64 *val);
-
-gboolean gst_byte_reader_get_float32_le (GstByteReader *reader, gfloat *val);
-gboolean gst_byte_reader_get_float32_be (GstByteReader *reader, gfloat *val);
-gboolean gst_byte_reader_get_float64_le (GstByteReader *reader, gdouble *val);
-gboolean gst_byte_reader_get_float64_be (GstByteReader *reader, gdouble *val);
-
-gboolean gst_byte_reader_peek_float32_le (const GstByteReader *reader, gfloat *val);
-gboolean gst_byte_reader_peek_float32_be (const GstByteReader *reader, gfloat *val);
-gboolean gst_byte_reader_peek_float64_le (const GstByteReader *reader, gdouble *val);
-gboolean gst_byte_reader_peek_float64_be (const GstByteReader *reader, gdouble *val);
-
-gboolean gst_byte_reader_dup_data (GstByteReader * reader, guint size, guint8 ** val);
-gboolean gst_byte_reader_get_data (GstByteReader * reader, guint size, const guint8 ** val);
-gboolean gst_byte_reader_peek_data (const GstByteReader * reader, guint size, const guint8 ** val);
+GstByteReader * gst_byte_reader_new (const guint8 *data, guint size);
+void gst_byte_reader_free (GstByteReader *reader);
+
+void gst_byte_reader_init (GstByteReader *reader, const guint8 *data, guint size);
+
+gboolean gst_byte_reader_set_pos (GstByteReader *reader, guint pos);
+guint gst_byte_reader_get_pos (const GstByteReader *reader);
+
+guint gst_byte_reader_get_remaining (const GstByteReader *reader);
+
+guint gst_byte_reader_get_size (const GstByteReader *reader);
+
+gboolean gst_byte_reader_skip (GstByteReader *reader, guint nbytes);
+
+gboolean gst_byte_reader_get_uint8 (GstByteReader *reader, guint8 *val);
+gboolean gst_byte_reader_get_int8 (GstByteReader *reader, gint8 *val);
+gboolean gst_byte_reader_get_uint16_le (GstByteReader *reader, guint16 *val);
+gboolean gst_byte_reader_get_int16_le (GstByteReader *reader, gint16 *val);
+gboolean gst_byte_reader_get_uint16_be (GstByteReader *reader, guint16 *val);
+gboolean gst_byte_reader_get_int16_be (GstByteReader *reader, gint16 *val);
+gboolean gst_byte_reader_get_uint24_le (GstByteReader *reader, guint32 *val);
+gboolean gst_byte_reader_get_int24_le (GstByteReader *reader, gint32 *val);
+gboolean gst_byte_reader_get_uint24_be (GstByteReader *reader, guint32 *val);
+gboolean gst_byte_reader_get_int24_be (GstByteReader *reader, gint32 *val);
+gboolean gst_byte_reader_get_uint32_le (GstByteReader *reader, guint32 *val);
+gboolean gst_byte_reader_get_int32_le (GstByteReader *reader, gint32 *val);
+gboolean gst_byte_reader_get_uint32_be (GstByteReader *reader, guint32 *val);
+gboolean gst_byte_reader_get_int32_be (GstByteReader *reader, gint32 *val);
+gboolean gst_byte_reader_get_uint64_le (GstByteReader *reader, guint64 *val);
+gboolean gst_byte_reader_get_int64_le (GstByteReader *reader, gint64 *val);
+gboolean gst_byte_reader_get_uint64_be (GstByteReader *reader, guint64 *val);
+gboolean gst_byte_reader_get_int64_be (GstByteReader *reader, gint64 *val);
+
+gboolean gst_byte_reader_peek_uint8 (const GstByteReader *reader, guint8 *val);
+gboolean gst_byte_reader_peek_int8 (const GstByteReader *reader, gint8 *val);
+gboolean gst_byte_reader_peek_uint16_le (const GstByteReader *reader, guint16 *val);
+gboolean gst_byte_reader_peek_int16_le (const GstByteReader *reader, gint16 *val);
+gboolean gst_byte_reader_peek_uint16_be (const GstByteReader *reader, guint16 *val);
+gboolean gst_byte_reader_peek_int16_be (const GstByteReader *reader, gint16 *val);
+gboolean gst_byte_reader_peek_uint24_le (const GstByteReader *reader, guint32 *val);
+gboolean gst_byte_reader_peek_int24_le (const GstByteReader *reader, gint32 *val);
+gboolean gst_byte_reader_peek_uint24_be (const GstByteReader *reader, guint32 *val);
+gboolean gst_byte_reader_peek_int24_be (const GstByteReader *reader, gint32 *val);
+gboolean gst_byte_reader_peek_uint32_le (const GstByteReader *reader, guint32 *val);
+gboolean gst_byte_reader_peek_int32_le (const GstByteReader *reader, gint32 *val);
+gboolean gst_byte_reader_peek_uint32_be (const GstByteReader *reader, guint32 *val);
+gboolean gst_byte_reader_peek_int32_be (const GstByteReader *reader, gint32 *val);
+gboolean gst_byte_reader_peek_uint64_le (const GstByteReader *reader, guint64 *val);
+gboolean gst_byte_reader_peek_int64_le (const GstByteReader *reader, gint64 *val);
+gboolean gst_byte_reader_peek_uint64_be (const GstByteReader *reader, guint64 *val);
+gboolean gst_byte_reader_peek_int64_be (const GstByteReader *reader, gint64 *val);
+
+gboolean gst_byte_reader_get_float32_le (GstByteReader *reader, gfloat *val);
+gboolean gst_byte_reader_get_float32_be (GstByteReader *reader, gfloat *val);
+gboolean gst_byte_reader_get_float64_le (GstByteReader *reader, gdouble *val);
+gboolean gst_byte_reader_get_float64_be (GstByteReader *reader, gdouble *val);
+
+gboolean gst_byte_reader_peek_float32_le (const GstByteReader *reader, gfloat *val);
+gboolean gst_byte_reader_peek_float32_be (const GstByteReader *reader, gfloat *val);
+gboolean gst_byte_reader_peek_float64_le (const GstByteReader *reader, gdouble *val);
+gboolean gst_byte_reader_peek_float64_be (const GstByteReader *reader, gdouble *val);
+
+gboolean gst_byte_reader_dup_data (GstByteReader * reader, guint size, guint8 ** val);
+gboolean gst_byte_reader_get_data (GstByteReader * reader, guint size, const guint8 ** val);
+gboolean gst_byte_reader_peek_data (const GstByteReader * reader, guint size, const guint8 ** val);
#define gst_byte_reader_dup_string(reader,str) \
gst_byte_reader_dup_string_utf8(reader,str)
-gboolean gst_byte_reader_dup_string_utf8 (GstByteReader * reader, gchar ** str);
-gboolean gst_byte_reader_dup_string_utf16 (GstByteReader * reader, guint16 ** str);
-gboolean gst_byte_reader_dup_string_utf32 (GstByteReader * reader, guint32 ** str);
+gboolean gst_byte_reader_dup_string_utf8 (GstByteReader * reader, gchar ** str);
+gboolean gst_byte_reader_dup_string_utf16 (GstByteReader * reader, guint16 ** str);
+gboolean gst_byte_reader_dup_string_utf32 (GstByteReader * reader, guint32 ** str);
#define gst_byte_reader_skip_string(reader) \
gst_byte_reader_skip_string_utf8(reader)
-gboolean gst_byte_reader_skip_string_utf8 (GstByteReader * reader);
-gboolean gst_byte_reader_skip_string_utf16 (GstByteReader * reader);
-gboolean gst_byte_reader_skip_string_utf32 (GstByteReader * reader);
+gboolean gst_byte_reader_skip_string_utf8 (GstByteReader * reader);
+gboolean gst_byte_reader_skip_string_utf16 (GstByteReader * reader);
+gboolean gst_byte_reader_skip_string_utf32 (GstByteReader * reader);
#define gst_byte_reader_get_string(reader,str) \
gst_byte_reader_get_string_utf8(reader,str)
#define gst_byte_reader_peek_string(reader,str) \
gst_byte_reader_peek_string_utf8(reader,str)
-gboolean gst_byte_reader_get_string_utf8 (GstByteReader * reader, const gchar ** str);
-gboolean gst_byte_reader_peek_string_utf8 (const GstByteReader * reader, const gchar ** str);
+gboolean gst_byte_reader_get_string_utf8 (GstByteReader * reader, const gchar ** str);
+gboolean gst_byte_reader_peek_string_utf8 (const GstByteReader * reader, const gchar ** str);
-guint gst_byte_reader_masked_scan_uint32 (const GstByteReader * reader,
- guint32 mask,
- guint32 pattern,
- guint offset,
- guint size);
+guint gst_byte_reader_masked_scan_uint32 (const GstByteReader * reader,
+ guint32 mask,
+ guint32 pattern,
+ guint offset,
+ guint size);
/**
* GST_BYTE_READER_INIT:
gpointer _gst_reserved[GST_PADDING];
} GstByteWriter;
-GstByteWriter * gst_byte_writer_new (void);
-GstByteWriter * gst_byte_writer_new_with_size (guint size, gboolean fixed);
-GstByteWriter * gst_byte_writer_new_with_data (guint8 *data, guint size, gboolean initialized);
+GstByteWriter * gst_byte_writer_new (void);
+GstByteWriter * gst_byte_writer_new_with_size (guint size, gboolean fixed);
+GstByteWriter * gst_byte_writer_new_with_data (guint8 *data, guint size, gboolean initialized);
-void gst_byte_writer_init (GstByteWriter *writer);
-void gst_byte_writer_init_with_size (GstByteWriter *writer, guint size, gboolean fixed);
-void gst_byte_writer_init_with_data (GstByteWriter *writer, guint8 *data, guint size, gboolean initialized);
+void gst_byte_writer_init (GstByteWriter *writer);
+void gst_byte_writer_init_with_size (GstByteWriter *writer, guint size, gboolean fixed);
+void gst_byte_writer_init_with_data (GstByteWriter *writer, guint8 *data,
+ guint size, gboolean initialized);
-void gst_byte_writer_free (GstByteWriter *writer);
-guint8 * gst_byte_writer_free_and_get_data (GstByteWriter *writer);
-GstBuffer *gst_byte_writer_free_and_get_buffer (GstByteWriter *writer);
+void gst_byte_writer_free (GstByteWriter *writer);
+guint8 * gst_byte_writer_free_and_get_data (GstByteWriter *writer);
+GstBuffer * gst_byte_writer_free_and_get_buffer (GstByteWriter *writer);
-void gst_byte_writer_reset (GstByteWriter *writer);
-guint8 * gst_byte_writer_reset_and_get_data (GstByteWriter *writer);
-GstBuffer *gst_byte_writer_reset_and_get_buffer (GstByteWriter *writer);
+void gst_byte_writer_reset (GstByteWriter *writer);
+guint8 * gst_byte_writer_reset_and_get_data (GstByteWriter *writer);
+GstBuffer * gst_byte_writer_reset_and_get_buffer (GstByteWriter *writer);
/**
* gst_byte_writer_get_pos:
* Since: 0.10.26
*/
#ifdef _FOOL_GTK_DOC_
-G_INLINE_FUNC guint gst_byte_writer_get_pos (const GstByteWriter *writer);
-G_INLINE_FUNC gboolean gst_byte_writer_set_pos (GstByteWriter *writer, guint pos);
-G_INLINE_FUNC guint gst_byte_writer_get_size (const GstByteWriter *writer);
+G_INLINE_FUNC guint gst_byte_writer_get_pos (const GstByteWriter *writer);
+G_INLINE_FUNC gboolean gst_byte_writer_set_pos (GstByteWriter *writer, guint pos);
+G_INLINE_FUNC guint gst_byte_writer_get_size (const GstByteWriter *writer);
#else
static inline guint
gst_byte_writer_get_pos (const GstByteWriter *writer)
}
#endif
-guint gst_byte_writer_get_remaining (const GstByteWriter *writer);
-gboolean gst_byte_writer_ensure_free_space (GstByteWriter *writer, guint size);
-
-gboolean gst_byte_writer_put_uint8 (GstByteWriter *writer, guint8 val);
-gboolean gst_byte_writer_put_int8 (GstByteWriter *writer, gint8 val);
-gboolean gst_byte_writer_put_uint16_be (GstByteWriter *writer, guint16 val);
-gboolean gst_byte_writer_put_uint16_le (GstByteWriter *writer, guint16 val);
-gboolean gst_byte_writer_put_int16_be (GstByteWriter *writer, gint16 val);
-gboolean gst_byte_writer_put_int16_le (GstByteWriter *writer, gint16 val);
-gboolean gst_byte_writer_put_uint24_be (GstByteWriter *writer, guint32 val);
-gboolean gst_byte_writer_put_uint24_le (GstByteWriter *writer, guint32 val);
-gboolean gst_byte_writer_put_int24_be (GstByteWriter *writer, gint32 val);
-gboolean gst_byte_writer_put_int24_le (GstByteWriter *writer, gint32 val);
-gboolean gst_byte_writer_put_uint32_be (GstByteWriter *writer, guint32 val);
-gboolean gst_byte_writer_put_uint32_le (GstByteWriter *writer, guint32 val);
-gboolean gst_byte_writer_put_int32_be (GstByteWriter *writer, gint32 val);
-gboolean gst_byte_writer_put_int32_le (GstByteWriter *writer, gint32 val);
-gboolean gst_byte_writer_put_uint64_be (GstByteWriter *writer, guint64 val);
-gboolean gst_byte_writer_put_uint64_le (GstByteWriter *writer, guint64 val);
-gboolean gst_byte_writer_put_int64_be (GstByteWriter *writer, gint64 val);
-gboolean gst_byte_writer_put_int64_le (GstByteWriter *writer, gint64 val);
-
-gboolean gst_byte_writer_put_float32_be (GstByteWriter *writer, gfloat val);
-gboolean gst_byte_writer_put_float32_le (GstByteWriter *writer, gfloat val);
-gboolean gst_byte_writer_put_float64_be (GstByteWriter *writer, gdouble val);
-gboolean gst_byte_writer_put_float64_le (GstByteWriter *writer, gdouble val);
-
-gboolean gst_byte_writer_put_data (GstByteWriter *writer, const guint8 *data, guint size);
-gboolean gst_byte_writer_fill (GstByteWriter *writer, guint8 value, guint size);
-gboolean gst_byte_writer_put_string_utf8 (GstByteWriter *writer, const gchar *data);
-gboolean gst_byte_writer_put_string_utf16 (GstByteWriter *writer, const guint16 *data);
-gboolean gst_byte_writer_put_string_utf32 (GstByteWriter *writer, const guint32 *data);
+guint gst_byte_writer_get_remaining (const GstByteWriter *writer);
+gboolean gst_byte_writer_ensure_free_space (GstByteWriter *writer, guint size);
+
+gboolean gst_byte_writer_put_uint8 (GstByteWriter *writer, guint8 val);
+gboolean gst_byte_writer_put_int8 (GstByteWriter *writer, gint8 val);
+gboolean gst_byte_writer_put_uint16_be (GstByteWriter *writer, guint16 val);
+gboolean gst_byte_writer_put_uint16_le (GstByteWriter *writer, guint16 val);
+gboolean gst_byte_writer_put_int16_be (GstByteWriter *writer, gint16 val);
+gboolean gst_byte_writer_put_int16_le (GstByteWriter *writer, gint16 val);
+gboolean gst_byte_writer_put_uint24_be (GstByteWriter *writer, guint32 val);
+gboolean gst_byte_writer_put_uint24_le (GstByteWriter *writer, guint32 val);
+gboolean gst_byte_writer_put_int24_be (GstByteWriter *writer, gint32 val);
+gboolean gst_byte_writer_put_int24_le (GstByteWriter *writer, gint32 val);
+gboolean gst_byte_writer_put_uint32_be (GstByteWriter *writer, guint32 val);
+gboolean gst_byte_writer_put_uint32_le (GstByteWriter *writer, guint32 val);
+gboolean gst_byte_writer_put_int32_be (GstByteWriter *writer, gint32 val);
+gboolean gst_byte_writer_put_int32_le (GstByteWriter *writer, gint32 val);
+gboolean gst_byte_writer_put_uint64_be (GstByteWriter *writer, guint64 val);
+gboolean gst_byte_writer_put_uint64_le (GstByteWriter *writer, guint64 val);
+gboolean gst_byte_writer_put_int64_be (GstByteWriter *writer, gint64 val);
+gboolean gst_byte_writer_put_int64_le (GstByteWriter *writer, gint64 val);
+
+gboolean gst_byte_writer_put_float32_be (GstByteWriter *writer, gfloat val);
+gboolean gst_byte_writer_put_float32_le (GstByteWriter *writer, gfloat val);
+gboolean gst_byte_writer_put_float64_be (GstByteWriter *writer, gdouble val);
+gboolean gst_byte_writer_put_float64_le (GstByteWriter *writer, gdouble val);
+
+gboolean gst_byte_writer_put_data (GstByteWriter *writer, const guint8 *data, guint size);
+gboolean gst_byte_writer_fill (GstByteWriter *writer, guint8 value, guint size);
+gboolean gst_byte_writer_put_string_utf8 (GstByteWriter *writer, const gchar *data);
+gboolean gst_byte_writer_put_string_utf16 (GstByteWriter *writer, const guint16 *data);
+gboolean gst_byte_writer_put_string_utf32 (GstByteWriter *writer, const guint32 *data);
/**
* gst_byte_writer_put_string:
/**
* GstCollectPadsClipFunction:
- * @pads: a #GstCollectPads
- * @data: a #GstCollectData
- * @buffer: a #GstBuffer
- * @user_data: user data
+ * @pads: a #GstCollectPads
+ * @data: a #GstCollectData
+ * @buffer: a #GstBuffer
+ * @user_data: user data
*
* A function that will be called when @buffer is received on the pad managed
* by @data in the collecpad object @pads.
*
* The function should use the segment of @data and the negotiated media type on
- * the pad to perform clipping of @buffer.
+ * the pad to perform clipping of @buffer.
*
* This function takes ownership of @buffer.
*
gint refcount;
} ABI;
/* adding + 0 to mark ABI change to be undone later */
- gpointer _gst_reserved[GST_PADDING + 0];
+ gpointer _gst_reserved[GST_PADDING];
} abidata;
};
GstCollectPadsPrivate *priv;
} ABI;
/* adding + 0 to mark ABI change to be undone later */
- gpointer _gst_reserved[GST_PADDING + 0];
+ gpointer _gst_reserved[GST_PADDING];
} abidata;
};
G_BEGIN_DECLS
-#define GST_TYPE_COLLECT_PADS2 (gst_collect_pads2_get_type())
-#define GST_COLLECT_PADS2(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_COLLECT_PADS2,GstCollectPads2))
-#define GST_COLLECT_PADS2_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_COLLECT_PADS2,GstCollectPads2Class))
+#define GST_TYPE_COLLECT_PADS2 (gst_collect_pads2_get_type())
+#define GST_COLLECT_PADS2(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_COLLECT_PADS2,GstCollectPads2))
+#define GST_COLLECT_PADS2_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_COLLECT_PADS2,GstCollectPads2Class))
#define GST_COLLECT_PADS2_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),GST_TYPE_COLLECT_PADS2,GstCollectPads2Class))
-#define GST_IS_COLLECT_PADS2(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_COLLECT_PADS2))
+#define GST_IS_COLLECT_PADS2(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_COLLECT_PADS2))
#define GST_IS_COLLECT_PADS2_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_COLLECT_PADS2))
typedef struct _GstCollectData2 GstCollectData2;
struct _GstCollectData2
{
/* with STREAM_LOCK of @collect */
- GstCollectPads2 *collect;
- GstPad *pad;
- GstBuffer *buffer;
- guint pos;
+ GstCollectPads2 *collect;
+ GstPad *pad;
+ GstBuffer *buffer;
+ guint pos;
GstSegment segment;
/*< private >*/
* Since: 0.10.36
*/
typedef GstFlowReturn (*GstCollectPads2BufferFunction) (GstCollectPads2 *pads, GstCollectData2 *data,
- GstBuffer *buffer, gpointer user_data);
+ GstBuffer *buffer, gpointer user_data);
/**
* GstCollectPads2CompareFunction:
* Since: 0.10.36
*/
typedef gint (*GstCollectPads2CompareFunction) (GstCollectPads2 *pads,
- GstCollectData2 * data1, GstClockTime timestamp1,
- GstCollectData2 * data2, GstClockTime timestamp2,
- gpointer user_data);
+ GstCollectData2 * data1, GstClockTime timestamp1,
+ GstCollectData2 * data2, GstClockTime timestamp2,
+ gpointer user_data);
/**
* GstCollectPads2EventFunction:
*
* Since: 0.10.36
*/
-typedef gboolean (*GstCollectPads2EventFunction) (GstCollectPads2 *pads, GstCollectData2 * pad,
- GstEvent * event, gpointer user_data);
+typedef gboolean (*GstCollectPads2EventFunction) (GstCollectPads2 *pads, GstCollectData2 * pad,
+ GstEvent * event, gpointer user_data);
/**
* GstCollectPads2ClipFunction:
- * @pads: a #GstCollectPads2
+ * @pads: a #GstCollectPads2
* @data: a #GstCollectData2
- * @inbuffer: the input #GstBuffer
+ * @inbuffer: the input #GstBuffer
* @outbuffer: the output #GstBuffer
- * @user_data: user data
+ * @user_data: user data
*
* A function that will be called when @inbuffer is received on the pad managed
* by @data in the collecpad object @pads.
*
* The function should use the segment of @data and the negotiated media type on
- * the pad to perform clipping of @inbuffer.
+ * the pad to perform clipping of @inbuffer.
*
* This function takes ownership of @inbuffer and should output a buffer in
* @outbuffer or return %NULL in @outbuffer if the buffer should be dropped.
GstObject object;
/*< public >*/ /* with LOCK and/or STREAM_LOCK */
- GSList *data; /* list of CollectData items */
+ GSList *data; /* list of CollectData items */
/*< private >*/
- GStaticRecMutex stream_lock; /* used to serialize collection among several streams */
+ GStaticRecMutex stream_lock; /* used to serialize collection among several streams */
/* with LOCK and/or STREAM_LOCK*/
- gboolean started;
+ gboolean started;
/* with STREAM_LOCK */
- guint32 cookie; /* @data list cookie */
- guint numpads; /* number of pads in @data */
- guint queuedpads; /* number of pads with a buffer */
- guint eospads; /* number of pads that are EOS */
- GstClockTime earliest_time; /* Current earliest time */
- GstCollectData2 *earliest_data; /* Pad data for current earliest time */
+ guint32 cookie; /* @data list cookie */
+ guint numpads; /* number of pads in @data */
+ guint queuedpads; /* number of pads with a buffer */
+ guint eospads; /* number of pads that are EOS */
+ GstClockTime earliest_time; /* Current earliest time */
+ GstCollectData2 *earliest_data; /* Pad data for current earliest time */
/* with LOCK */
GSList *pad_list; /* updated pad list */
- guint32 pad_cookie; /* updated cookie */
+ guint32 pad_cookie; /* updated cookie */
- GstCollectPads2Function func; /* function and user_data for callback */
- gpointer user_data;
- GstCollectPads2BufferFunction buffer_func; /* function and user_data for buffer callback */
+ GstCollectPads2Function func; /* function and user_data for callback */
+ gpointer user_data;
+ GstCollectPads2BufferFunction buffer_func; /* function and user_data for buffer callback */
gpointer buffer_user_data;
GstCollectPads2CompareFunction compare_func;
gpointer compare_user_data;
gpointer clip_user_data;
/* no other lock needed */
- GMutex *evt_lock; /* these make up sort of poor man's event signaling */
+ GMutex *evt_lock; /* these make up sort of poor man's event signaling */
GCond *evt_cond;
guint32 evt_cookie;
- gpointer _gst_reserved[GST_PADDING + 0];
-
+ gpointer _gst_reserved[GST_PADDING];
};
struct _GstCollectPads2Class {
GType gst_collect_pads2_get_type(void);
/* creating the object */
-GstCollectPads2* gst_collect_pads2_new (void);
+GstCollectPads2* gst_collect_pads2_new (void);
/* set the callbacks */
-void gst_collect_pads2_set_function (GstCollectPads2 *pads, GstCollectPads2Function func,
- gpointer user_data);
-void gst_collect_pads2_set_buffer_function (GstCollectPads2 *pads,
- GstCollectPads2BufferFunction func, gpointer user_data);
-void gst_collect_pads2_set_event_function (GstCollectPads2 *pads,
- GstCollectPads2EventFunction func, gpointer user_data);
-void gst_collect_pads2_set_compare_function (GstCollectPads2 *pads,
- GstCollectPads2CompareFunction func, gpointer user_data);
-void gst_collect_pads2_set_clip_function (GstCollectPads2 *pads, GstCollectPads2ClipFunction clipfunc,
- gpointer user_data);
+void gst_collect_pads2_set_function (GstCollectPads2 *pads,
+ GstCollectPads2Function func,
+ gpointer user_data);
+void gst_collect_pads2_set_buffer_function (GstCollectPads2 *pads,
+ GstCollectPads2BufferFunction func,
+ gpointer user_data);
+void gst_collect_pads2_set_event_function (GstCollectPads2 *pads,
+ GstCollectPads2EventFunction func,
+ gpointer user_data);
+void gst_collect_pads2_set_compare_function (GstCollectPads2 *pads,
+ GstCollectPads2CompareFunction func,
+ gpointer user_data);
+void gst_collect_pads2_set_clip_function (GstCollectPads2 *pads,
+ GstCollectPads2ClipFunction clipfunc,
+ gpointer user_data);
/* pad management */
-GstCollectData2* gst_collect_pads2_add_pad (GstCollectPads2 *pads, GstPad *pad, guint size);
-GstCollectData2* gst_collect_pads2_add_pad_full (GstCollectPads2 *pads, GstPad *pad, guint size, GstCollectData2DestroyNotify destroy_notify,
- gboolean lock);
-gboolean gst_collect_pads2_remove_pad (GstCollectPads2 *pads, GstPad *pad);
-gboolean gst_collect_pads2_is_active (GstCollectPads2 *pads, GstPad *pad);
+GstCollectData2* gst_collect_pads2_add_pad (GstCollectPads2 *pads, GstPad *pad, guint size);
+GstCollectData2* gst_collect_pads2_add_pad_full (GstCollectPads2 *pads, GstPad *pad, guint size,
+ GstCollectData2DestroyNotify destroy_notify,
+ gboolean lock);
+gboolean gst_collect_pads2_remove_pad (GstCollectPads2 *pads, GstPad *pad);
+gboolean gst_collect_pads2_is_active (GstCollectPads2 *pads, GstPad *pad);
/* start/stop collection */
-GstFlowReturn gst_collect_pads2_collect (GstCollectPads2 *pads);
-GstFlowReturn gst_collect_pads2_collect_range (GstCollectPads2 *pads, guint64 offset, guint length);
+GstFlowReturn gst_collect_pads2_collect (GstCollectPads2 *pads);
+GstFlowReturn gst_collect_pads2_collect_range (GstCollectPads2 *pads, guint64 offset, guint length);
-void gst_collect_pads2_start (GstCollectPads2 *pads);
-void gst_collect_pads2_stop (GstCollectPads2 *pads);
-void gst_collect_pads2_set_flushing (GstCollectPads2 *pads, gboolean flushing);
+void gst_collect_pads2_start (GstCollectPads2 *pads);
+void gst_collect_pads2_stop (GstCollectPads2 *pads);
+void gst_collect_pads2_set_flushing (GstCollectPads2 *pads, gboolean flushing);
/* get collected buffers */
-GstBuffer* gst_collect_pads2_peek (GstCollectPads2 *pads, GstCollectData2 *data);
-GstBuffer* gst_collect_pads2_pop (GstCollectPads2 *pads, GstCollectData2 *data);
+GstBuffer* gst_collect_pads2_peek (GstCollectPads2 *pads, GstCollectData2 *data);
+GstBuffer* gst_collect_pads2_pop (GstCollectPads2 *pads, GstCollectData2 *data);
/* get collected bytes */
-guint gst_collect_pads2_available (GstCollectPads2 *pads);
-guint gst_collect_pads2_flush (GstCollectPads2 *pads, GstCollectData2 *data,
- guint size);
-GstBuffer* gst_collect_pads2_read_buffer (GstCollectPads2 * pads, GstCollectData2 * data,
- guint size);
-GstBuffer* gst_collect_pads2_take_buffer (GstCollectPads2 * pads, GstCollectData2 * data,
- guint size);
+guint gst_collect_pads2_available (GstCollectPads2 *pads);
+guint gst_collect_pads2_flush (GstCollectPads2 *pads, GstCollectData2 *data,
+ guint size);
+GstBuffer* gst_collect_pads2_read_buffer (GstCollectPads2 * pads, GstCollectData2 * data,
+ guint size);
+GstBuffer* gst_collect_pads2_take_buffer (GstCollectPads2 * pads, GstCollectData2 * data,
+ guint size);
/* setting and unsetting waiting mode */
-void gst_collect_pads2_set_waiting (GstCollectPads2 *pads, GstCollectData2 *data,
- gboolean waiting);
+void gst_collect_pads2_set_waiting (GstCollectPads2 *pads, GstCollectData2 *data,
+ gboolean waiting);
G_END_DECLS
G_BEGIN_DECLS
-void gst_buffer_straw_start_pipeline (GstElement * bin, GstPad * pad);
-GstBuffer *gst_buffer_straw_get_buffer (GstElement * bin, GstPad * pad);
-void gst_buffer_straw_stop_pipeline (GstElement * bin, GstPad * pad);
+void gst_buffer_straw_start_pipeline (GstElement * bin, GstPad * pad);
+GstBuffer * gst_buffer_straw_get_buffer (GstElement * bin, GstPad * pad);
+void gst_buffer_straw_stop_pipeline (GstElement * bin, GstPad * pad);
G_END_DECLS
gint gst_check_run_suite (Suite * suite, const gchar * name,
const gchar * fname);
-#define fail_unless_message_error(msg, domain, code) \
-gst_check_message_error (msg, GST_MESSAGE_ERROR, \
+#define fail_unless_message_error(msg, domain, code) \
+gst_check_message_error (msg, GST_MESSAGE_ERROR, \
GST_ ## domain ## _ERROR, GST_ ## domain ## _ERROR_ ## code)
#define assert_message_error(m, d, c) fail_unless_message_error(m, d, c)
* case, printing both expressions and the values they evaluated to. This
* macro is for use in unit tests.
*/
-#define fail_unless_equals_int(a, b) \
-G_STMT_START { \
- int first = a; \
- int second = b; \
- fail_unless(first == second, \
- "'" #a "' (%d) is not equal to '" #b"' (%d)", first, second); \
+#define fail_unless_equals_int(a, b) \
+G_STMT_START { \
+ int first = a; \
+ int second = b; \
+ fail_unless(first == second, \
+ "'" #a "' (%d) is not equal to '" #b"' (%d)", first, second); \
} G_STMT_END;
/**
* assert_equals_int:
* case, printing both expressions and the values they evaluated to. This
* macro is for use in unit tests.
*/
-#define fail_unless_equals_int64(a, b) \
-G_STMT_START { \
- gint64 first = a; \
- gint64 second = b; \
- fail_unless(first == second, \
- "'" #a "' (%" G_GINT64_FORMAT") is not equal to '" #b"' (%" \
- G_GINT64_FORMAT")", first, second); \
+#define fail_unless_equals_int64(a, b) \
+G_STMT_START { \
+ gint64 first = a; \
+ gint64 second = b; \
+ fail_unless(first == second, \
+ "'" #a "' (%" G_GINT64_FORMAT") is not equal to '" #b"' (%" \
+ G_GINT64_FORMAT")", first, second); \
} G_STMT_END;
/**
* assert_equals_int64:
* case, printing both expressions and the values they evaluated to. This
* macro is for use in unit tests.
*/
-#define fail_unless_equals_uint64(a, b) \
-G_STMT_START { \
- guint64 first = a; \
- guint64 second = b; \
- fail_unless(first == second, \
- "'" #a "' (%" G_GUINT64_FORMAT ") is not equal to '" #b"' (%" \
- G_GUINT64_FORMAT ")", first, second); \
+#define fail_unless_equals_uint64(a, b) \
+G_STMT_START { \
+ guint64 first = a; \
+ guint64 second = b; \
+ fail_unless(first == second, \
+ "'" #a "' (%" G_GUINT64_FORMAT ") is not equal to '" #b"' (%" \
+ G_GUINT64_FORMAT ")", first, second); \
} G_STMT_END;
/**
* assert_equals_uint64:
*/
extern GList *thread_list;
extern GMutex *mutex;
-extern GCond *start_cond; /* used to notify main thread of thread startups */
-extern GCond *sync_cond; /* used to synchronize all threads and main thread */
+extern GCond *start_cond; /* used to notify main thread of thread startups */
+extern GCond *sync_cond; /* used to synchronize all threads and main thread */
-#define MAIN_START_THREADS(count, function, data) \
-MAIN_INIT(); \
-MAIN_START_THREAD_FUNCTIONS(count, function, data); \
+#define MAIN_START_THREADS(count, function, data) \
+MAIN_INIT(); \
+MAIN_START_THREAD_FUNCTIONS(count, function, data); \
MAIN_SYNCHRONIZE();
-#define MAIN_INIT() \
-G_STMT_START { \
- _gst_check_threads_running = TRUE; \
- \
- if (mutex == NULL) { \
- mutex = g_mutex_new (); \
- start_cond = g_cond_new (); \
- sync_cond = g_cond_new (); \
- } \
+#define MAIN_INIT() \
+G_STMT_START { \
+ _gst_check_threads_running = TRUE; \
+ \
+ if (mutex == NULL) { \
+ mutex = g_mutex_new (); \
+ start_cond = g_cond_new (); \
+ sync_cond = g_cond_new (); \
+ } \
} G_STMT_END;
-#define MAIN_START_THREAD_FUNCTIONS(count, function, data) \
-G_STMT_START { \
- int i; \
- for (i = 0; i < count; ++i) { \
- MAIN_START_THREAD_FUNCTION (i, function, data); \
- } \
+#define MAIN_START_THREAD_FUNCTIONS(count, function, data) \
+G_STMT_START { \
+ int i; \
+ for (i = 0; i < count; ++i) { \
+ MAIN_START_THREAD_FUNCTION (i, function, data); \
+ } \
} G_STMT_END;
-#define MAIN_START_THREAD_FUNCTION(i, function, data) \
-G_STMT_START { \
- GThread *thread = NULL; \
- GST_DEBUG ("MAIN: creating thread %d", i); \
- g_mutex_lock (mutex); \
- thread = g_thread_create ((GThreadFunc) function, data, \
- TRUE, NULL); \
- /* wait for thread to signal us that it's ready */ \
- GST_DEBUG ("MAIN: waiting for thread %d", i); \
- g_cond_wait (start_cond, mutex); \
- g_mutex_unlock (mutex); \
- \
- thread_list = g_list_append (thread_list, thread); \
+#define MAIN_START_THREAD_FUNCTION(i, function, data) \
+G_STMT_START { \
+ GThread *thread = NULL; \
+ GST_DEBUG ("MAIN: creating thread %d", i); \
+ g_mutex_lock (mutex); \
+ thread = g_thread_create ((GThreadFunc) function, data, \
+ TRUE, NULL); \
+ /* wait for thread to signal us that it's ready */ \
+ GST_DEBUG ("MAIN: waiting for thread %d", i); \
+ g_cond_wait (start_cond, mutex); \
+ g_mutex_unlock (mutex); \
+ \
+ thread_list = g_list_append (thread_list, thread); \
} G_STMT_END;
-#define MAIN_SYNCHRONIZE() \
-G_STMT_START { \
- GST_DEBUG ("MAIN: synchronizing"); \
- g_cond_broadcast (sync_cond); \
- GST_DEBUG ("MAIN: synchronized"); \
+#define MAIN_SYNCHRONIZE() \
+G_STMT_START { \
+ GST_DEBUG ("MAIN: synchronizing"); \
+ g_cond_broadcast (sync_cond); \
+ GST_DEBUG ("MAIN: synchronized"); \
} G_STMT_END;
-#define MAIN_STOP_THREADS() \
-G_STMT_START { \
- _gst_check_threads_running = FALSE; \
- \
- /* join all threads */ \
- GST_DEBUG ("MAIN: joining"); \
- g_list_foreach (thread_list, (GFunc) g_thread_join, NULL); \
- g_list_free (thread_list); \
- thread_list = NULL; \
- GST_DEBUG ("MAIN: joined"); \
+#define MAIN_STOP_THREADS() \
+G_STMT_START { \
+ _gst_check_threads_running = FALSE; \
+ \
+ /* join all threads */ \
+ GST_DEBUG ("MAIN: joining"); \
+ g_list_foreach (thread_list, (GFunc) g_thread_join, NULL); \
+ g_list_free (thread_list); \
+ thread_list = NULL; \
+ GST_DEBUG ("MAIN: joined"); \
} G_STMT_END;
-#define THREAD_START() \
-THREAD_STARTED(); \
+#define THREAD_START() \
+THREAD_STARTED(); \
THREAD_SYNCHRONIZE();
-#define THREAD_STARTED() \
-G_STMT_START { \
- /* signal main thread that we started */ \
- GST_DEBUG ("THREAD %p: started", g_thread_self ()); \
- g_mutex_lock (mutex); \
- g_cond_signal (start_cond); \
+#define THREAD_STARTED() \
+G_STMT_START { \
+ /* signal main thread that we started */ \
+ GST_DEBUG ("THREAD %p: started", g_thread_self ()); \
+ g_mutex_lock (mutex); \
+ g_cond_signal (start_cond); \
} G_STMT_END;
-#define THREAD_SYNCHRONIZE() \
-G_STMT_START { \
- /* synchronize everyone */ \
- GST_DEBUG ("THREAD %p: syncing", g_thread_self ()); \
- g_cond_wait (sync_cond, mutex); \
- GST_DEBUG ("THREAD %p: synced", g_thread_self ()); \
- g_mutex_unlock (mutex); \
+#define THREAD_SYNCHRONIZE() \
+G_STMT_START { \
+ /* synchronize everyone */ \
+ GST_DEBUG ("THREAD %p: syncing", g_thread_self ()); \
+ g_cond_wait (sync_cond, mutex); \
+ GST_DEBUG ("THREAD %p: synced", g_thread_self ()); \
+ g_mutex_unlock (mutex); \
} G_STMT_END;
-#define THREAD_SWITCH() \
-G_STMT_START { \
- /* a minimal sleep is a context switch */ \
- g_usleep (1); \
+#define THREAD_SWITCH() \
+G_STMT_START { \
+ /* a minimal sleep is a context switch */ \
+ g_usleep (1); \
} G_STMT_END;
-#define THREAD_TEST_RUNNING() (_gst_check_threads_running == TRUE)
+#define THREAD_TEST_RUNNING() (_gst_check_threads_running == TRUE)
/* additional assertions */
-#define ASSERT_CRITICAL(code) \
-G_STMT_START { \
- _gst_check_expecting_log = TRUE; \
- _gst_check_raised_critical = FALSE; \
- code; \
+#define ASSERT_CRITICAL(code) \
+G_STMT_START { \
+ _gst_check_expecting_log = TRUE; \
+ _gst_check_raised_critical = FALSE; \
+ code; \
_fail_unless (_gst_check_raised_critical, __FILE__, __LINE__, \
"Expected g_critical, got nothing", NULL); \
- _gst_check_expecting_log = FALSE; \
+ _gst_check_expecting_log = FALSE; \
} G_STMT_END
-#define ASSERT_WARNING(code) \
-G_STMT_START { \
- _gst_check_expecting_log = TRUE; \
- _gst_check_raised_warning = FALSE; \
- code; \
+#define ASSERT_WARNING(code) \
+G_STMT_START { \
+ _gst_check_expecting_log = TRUE; \
+ _gst_check_raised_warning = FALSE; \
+ code; \
_fail_unless (_gst_check_raised_warning, __FILE__, __LINE__, \
"Expected g_warning, got nothing", NULL); \
- _gst_check_expecting_log = FALSE; \
+ _gst_check_expecting_log = FALSE; \
} G_STMT_END
-#define ASSERT_OBJECT_REFCOUNT(object, name, value) \
-G_STMT_START { \
- int rc; \
- rc = GST_OBJECT_REFCOUNT_VALUE (object); \
- fail_unless (rc == value, \
- "%s (%p) refcount is %d instead of %d", \
- name, object, rc, value); \
+#define ASSERT_OBJECT_REFCOUNT(object, name, value) \
+G_STMT_START { \
+ int rc; \
+ rc = GST_OBJECT_REFCOUNT_VALUE (object); \
+ fail_unless (rc == value, \
+ "%s (%p) refcount is %d instead of %d", \
+ name, object, rc, value); \
} G_STMT_END
-#define ASSERT_OBJECT_REFCOUNT_BETWEEN(object, name, lower, upper) \
-G_STMT_START { \
- int rc = GST_OBJECT_REFCOUNT_VALUE (object); \
- int lo = lower; \
- int hi = upper; \
- \
- fail_unless (rc >= lo, \
- "%s (%p) refcount %d is smaller than %d", \
- name, object, rc, lo); \
- fail_unless (rc <= hi, \
- "%s (%p) refcount %d is bigger than %d", \
- name, object, rc, hi); \
+#define ASSERT_OBJECT_REFCOUNT_BETWEEN(object, name, lower, upper) \
+G_STMT_START { \
+ int rc = GST_OBJECT_REFCOUNT_VALUE (object); \
+ int lo = lower; \
+ int hi = upper; \
+ \
+ fail_unless (rc >= lo, \
+ "%s (%p) refcount %d is smaller than %d", \
+ name, object, rc, lo); \
+ fail_unless (rc <= hi, \
+ "%s (%p) refcount %d is bigger than %d", \
+ name, object, rc, hi); \
} G_STMT_END
-#define ASSERT_CAPS_REFCOUNT(caps, name, value) \
- ASSERT_MINI_OBJECT_REFCOUNT(caps, name, value)
+#define ASSERT_CAPS_REFCOUNT(caps, name, value) \
+ ASSERT_MINI_OBJECT_REFCOUNT(caps, name, value)
-#define ASSERT_BUFFER_REFCOUNT(buffer, name, value) \
- ASSERT_MINI_OBJECT_REFCOUNT(buffer, name, value)
+#define ASSERT_BUFFER_REFCOUNT(buffer, name, value) \
+ ASSERT_MINI_OBJECT_REFCOUNT(buffer, name, value)
-#define ASSERT_MINI_OBJECT_REFCOUNT(miniobj, name, value) \
-G_STMT_START { \
- int rc; \
- rc = GST_MINI_OBJECT_REFCOUNT_VALUE (miniobj); \
- fail_unless (rc == value, \
+#define ASSERT_MINI_OBJECT_REFCOUNT(miniobj, name, value) \
+G_STMT_START { \
+ int rc; \
+ rc = GST_MINI_OBJECT_REFCOUNT_VALUE (miniobj); \
+ fail_unless (rc == value, \
name " (%p) refcount is %d instead of %d", miniobj, rc, value); \
} G_STMT_END
-#define ASSERT_SET_STATE(element, state, ret) \
-fail_unless (gst_element_set_state (element, \
- state) == ret, \
+#define ASSERT_SET_STATE(element, state, ret) \
+fail_unless (gst_element_set_state (element, \
+ state) == ret, \
"could not change state to " #state);
-#define GST_CHECK_MAIN(name) \
-int main (int argc, char **argv) \
-{ \
+#define GST_CHECK_MAIN(name) \
+int main (int argc, char **argv) \
+{ \
Suite *s; \
- gst_check_init (&argc, &argv); \
- s = name ## _suite (); \
- return gst_check_run_suite (s, # name, __FILE__); \
+ gst_check_init (&argc, &argv); \
+ s = name ## _suite (); \
+ return gst_check_run_suite (s, # name, __FILE__); \
}
/* Hack to allow run-time selection of unit tests to run via the
/* <private> */
GMutex *lock;
GstInterpolationControlSourcePrivate *priv;
+
gpointer _gst_reserved[GST_PADDING];
};
struct _GstInterpolationControlSourceClass {
GstControlSourceClass parent_class;
-
+
/*< private >*/
gpointer _gst_reserved[GST_PADDING];
};
/* Functions */
-GstInterpolationControlSource *gst_interpolation_control_source_new (void);
-gboolean gst_interpolation_control_source_set_interpolation_mode (GstInterpolationControlSource *self, GstInterpolateMode mode);
-gboolean gst_interpolation_control_source_set (GstInterpolationControlSource * self, GstClockTime timestamp, const GValue * value);
-gboolean gst_interpolation_control_source_set_from_list (GstInterpolationControlSource * self, const GSList * timedvalues);
-gboolean gst_interpolation_control_source_unset (GstInterpolationControlSource * self, GstClockTime timestamp);
-void gst_interpolation_control_source_unset_all (GstInterpolationControlSource *self);
-GList *gst_interpolation_control_source_get_all (GstInterpolationControlSource * self);
-gint gst_interpolation_control_source_get_count (GstInterpolationControlSource * self);
+GstInterpolationControlSource *
+ gst_interpolation_control_source_new (void);
+gboolean gst_interpolation_control_source_set_interpolation_mode
+ (GstInterpolationControlSource *self,
+ GstInterpolateMode mode);
+gboolean gst_interpolation_control_source_set (GstInterpolationControlSource * self,
+ GstClockTime timestamp,
+ const GValue * value);
+gboolean gst_interpolation_control_source_set_from_list (GstInterpolationControlSource * self,
+ const GSList * timedvalues);
+gboolean gst_interpolation_control_source_unset (GstInterpolationControlSource * self,
+ GstClockTime timestamp);
+void gst_interpolation_control_source_unset_all (GstInterpolationControlSource *self);
+GList * gst_interpolation_control_source_get_all (GstInterpolationControlSource * self);
+gint gst_interpolation_control_source_get_count (GstInterpolationControlSource * self);
G_END_DECLS
GValue minimum_value; /* min value for the handled property */
GValue maximum_value; /* max value for the handled property */
GstInterpolateMode interpolation_mode;
-
+
GSequence *values; /* List of GstControlPoint */
gint nvalues; /* Number of control points */
gboolean valid_cache;
struct _GstLFOControlSourceClass {
GstControlSourceClass parent_class;
-
+
/*< private >*/
gpointer _gst_reserved[GST_PADDING];
};
GstClockTime period;
GstClockTime timeshift;
GValue amplitude;
- GValue offset;
+ GValue offset;
};
#endif /* __GST_LFO_CONTROL_SOURCE_PRIVATE_H__ */
} GstDPPayloadType;
typedef gboolean (*GstDPHeaderFromBufferFunction) (const GstBuffer * buffer,
- GstDPHeaderFlag flags,
- guint * length,
- guint8 ** header);
-typedef gboolean (*GstDPPacketFromCapsFunction) (const GstCaps * caps,
- GstDPHeaderFlag flags,
- guint * length,
- guint8 ** header,
- guint8 ** payload);
-typedef gboolean (*GstDPPacketFromEventFunction) (const GstEvent * event,
- GstDPHeaderFlag flags,
- guint * length,
- guint8 ** header,
- guint8 ** payload);
+ GstDPHeaderFlag flags,
+ guint * length,
+ guint8 ** header);
+typedef gboolean (*GstDPPacketFromCapsFunction) (const GstCaps * caps,
+ GstDPHeaderFlag flags,
+ guint * length,
+ guint8 ** header,
+ guint8 ** payload);
+typedef gboolean (*GstDPPacketFromEventFunction) (const GstEvent * event,
+ GstDPHeaderFlag flags,
+ guint * length,
+ guint8 ** header,
+ guint8 ** payload);
/**
* GstDPPacketizer:
} GstDPPacketizer;
-void gst_dp_init (void);
+void gst_dp_init (void);
/* packetizer */
GstDPPacketizer *
guint length);
/* payload information from header */
-guint32 gst_dp_header_payload_length (const guint8 * header);
+guint32 gst_dp_header_payload_length (const guint8 * header);
GstDPPayloadType
- gst_dp_header_payload_type (const guint8 * header);
+ gst_dp_header_payload_type (const guint8 * header);
/* converting to GstBuffer/GstEvent/GstCaps */
-GstBuffer * gst_dp_buffer_from_header (guint header_length,
- const guint8 * header);
-GstCaps * gst_dp_caps_from_packet (guint header_length,
- const guint8 * header,
- const guint8 * payload);
-GstEvent * gst_dp_event_from_packet (guint header_length,
- const guint8 * header,
- const guint8 * payload);
+GstBuffer * gst_dp_buffer_from_header (guint header_length,
+ const guint8 * header);
+GstCaps * gst_dp_caps_from_packet (guint header_length,
+ const guint8 * header,
+ const guint8 * payload);
+GstEvent * gst_dp_event_from_packet (guint header_length,
+ const guint8 * header,
+ const guint8 * payload);
/* validation */
-gboolean gst_dp_validate_header (guint header_length,
- const guint8 * header);
-gboolean gst_dp_validate_payload (guint header_length,
- const guint8 * header,
- const guint8 * payload);
-gboolean gst_dp_validate_packet (guint header_length,
- const guint8 * header,
- const guint8 * payload);
+gboolean gst_dp_validate_header (guint header_length,
+ const guint8 * header);
+gboolean gst_dp_validate_payload (guint header_length,
+ const guint8 * header,
+ const guint8 * payload);
+gboolean gst_dp_validate_packet (guint header_length,
+ const guint8 * header,
+ const guint8 * payload);
G_END_DECLS
guint8 address[16], guint16 port);
GstNetType gst_net_address_get_net_type (const GstNetAddress *naddr);
-gboolean gst_net_address_get_ip4_address (const GstNetAddress *naddr, guint32 *address, guint16 *port);
-gboolean gst_net_address_get_ip6_address (const GstNetAddress *naddr, guint8 address[16], guint16 *port);
-gint gst_net_address_get_address_bytes (const GstNetAddress *naddr, guint8 address[16], guint16 *port);
+gboolean gst_net_address_get_ip4_address (const GstNetAddress *naddr,
+ guint32 *address, guint16 *port);
+gboolean gst_net_address_get_ip6_address (const GstNetAddress *naddr,
+ guint8 address[16], guint16 *port);
+gint gst_net_address_get_address_bytes (const GstNetAddress *naddr,
+ guint8 address[16], guint16 *port);
gboolean gst_net_address_equal (const GstNetAddress *naddr1,
const GstNetAddress *naddr2);
-gint gst_net_address_to_string (const GstNetAddress *naddr, gchar *dest, gsize len);
+gint gst_net_address_to_string (const GstNetAddress *naddr,
+ gchar *dest, gsize len);
G_END_DECLS
/*< private >*/
GstNetClientClockPrivate *priv;
- gpointer _gst_reserved[GST_PADDING - 1];
+ gpointer _gst_reserved[GST_PADDING];
};
struct _GstNetClientClockClass {
GstClockTime remote_time;
};
-GstNetTimePacket* gst_net_time_packet_new (const guint8 *buffer);
-guint8* gst_net_time_packet_serialize (const GstNetTimePacket *packet);
+GstNetTimePacket* gst_net_time_packet_new (const guint8 *buffer);
+guint8* gst_net_time_packet_serialize (const GstNetTimePacket *packet);
-GstNetTimePacket* gst_net_time_packet_receive (gint fd, struct sockaddr *addr,
+GstNetTimePacket* gst_net_time_packet_receive (gint fd, struct sockaddr *addr,
socklen_t *len);
-gint gst_net_time_packet_send (const GstNetTimePacket *packet,
+gint gst_net_time_packet_send (const GstNetTimePacket *packet,
gint fd, struct sockaddr *addr,
socklen_t len);
typedef struct _GstNetTimeProviderClass GstNetTimeProviderClass;
typedef struct _GstNetTimeProviderPrivate GstNetTimeProviderPrivate;
-
/**
* GstNetTimeProvider:
*
struct _GstNetTimeProviderClass {
GstObjectClass parent_class;
+
+ gpointer _gst_reserved[GST_PADDING];
};
-GType gst_net_time_provider_get_type (void);
-GstNetTimeProvider* gst_net_time_provider_new (GstClock *clock,
+GType gst_net_time_provider_get_type (void);
+GstNetTimeProvider* gst_net_time_provider_new (GstClock *clock,
const gchar *address,
gint port);