upipe/ubuf_block_stream.h header reference

Upipe streams of block buffers More

Header inclusion  

Members  

Type  

Functions  

Macros  

Description  

Upipe streams of block buffers

Members detail  

#define _UPIPE_UBUF_BLOCK_STREAM_H_  

This macro is declared in upipe/ubuf_block_stream.h source file, line 31.

struct ubuf_block_stream  

This struct is declared in upipe/ubuf_block_stream.h source file, line 47.

This struct is a helper allowing to read streams from a block ubuf.

FieldDescription
struct ubuf * ubuf;pointer to ubuf
const uint8_t * buffer;next buffer position
const uint8_t * end;end of block section
int offset;offset of the block section
int size;size of the block section
uint32_t bits;bits cache
uint32_t available;number of cached bits
bool overflow;true if the bit stream cache overflows

int ubuf_block_stream_clean(struct ubuf_block_stream *s)  

This function is declared in upipe/ubuf_block_stream.h source file, line 117.

This function cleans up the helper structure for octet stream.

Parameter list:

  • s: helper structure

The return value is an error code

#define ubuf_block_stream_fill_bits(s, nb)  

This macro is declared in upipe/ubuf_block_stream.h source file, line 182.

This macro fills the bit stream cache with at least the given number of bits.

Parameter list:

  • s: helper structure
  • nb: number of bits to ensure

#define ubuf_block_stream_fill_bits_inner(s, get_octet, nb)  

This macro is declared in upipe/ubuf_block_stream.h source file, line 165.

This macro fills the bit stream cache with at least the given number of bits, with a custom function to pop octets.

Parameter list:

  • s: helper structure
  • get_octet: function to get extra octets
  • nb: number of bits to ensure

int ubuf_block_stream_get(struct ubuf_block_stream *s, uint8_t *octet_p)  

This function is declared in upipe/ubuf_block_stream.h source file, line 141.

This function gets the next octet in the ubuf.

Parameter list:

  • s: helper structure
  • octet_t: filled in with the read octet

The return value is an error code

int ubuf_block_stream_init(struct ubuf_block_stream *s, struct ubuf *ubuf, int offset)  

This function is declared in upipe/ubuf_block_stream.h source file, line 76.

This function initializes the helper structure for octet stream using a ubuf.

Parameter list:

  • s: helper structure
  • ubuf: pointer to block ubuf
  • offset: start offset in octets

The return value is an error code

int ubuf_block_stream_init_bits(struct ubuf_block_stream *s, struct ubuf *ubuf, int offset)  

This function is declared in upipe/ubuf_block_stream.h source file, line 217.

This function initializes the helper structure for octet stream using a ubuf, with an offset in bits

Parameter list:

  • s: helper structure
  • ubuf: pointer to block ubuf
  • offset: start offset in bits

The return value is an error code

void ubuf_block_stream_init_from_opaque(struct ubuf_block_stream *s, const uint8_t *buffer, size_t size)  

This function is declared in upipe/ubuf_block_stream.h source file, line 99.

This function initializes the helper structure for octet stream using an opaque. Note that the opaque must remain allocated until ubuf_block_stream_clean is called.

Parameter list:

  • s: helper structure
  • buffer: pointer to opaque buffer
  • size: size of the opaque buffer

int ubuf_block_stream_position(struct ubuf_block_stream *s)  

This function is declared in upipe/ubuf_block_stream.h source file, line 129.

This function computes the position (in bits) since the beginning of the ubuf.

Parameter list:

  • s: helper structure

The return value is position in bits

#define ubuf_block_stream_show_bits(s, nb)  

This macro is declared in upipe/ubuf_block_stream.h source file, line 191.

This macro returns the given number of bits from the cache.

Parameter list:

  • s: helper structure
  • nb: number of bits to return

The return value is bits from the cache

#define ubuf_block_stream_skip_bits(s, nb)  

This macro is declared in upipe/ubuf_block_stream.h source file, line 199.

This macro discards the given number of bits from the cache.

Parameter list:

  • s: helper structure
  • nb: number of bits to discard

Valid XHTML 1.0 StrictGenerated by cmassiot on Fri Feb 2 23:57:19 2018 using MkDoc