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 95.

This function cleans up the helper structure for octet stream.

Parameters 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 150.

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

Parameters 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 133.

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

Parameters 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 109.

This function gets the next octet in the ubuf.

Parameters 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.

Parameters list:

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

The return value is an error code

#define ubuf_block_stream_show_bits(s, nb)  

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

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

Parameters 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 167.

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

Parameters list:

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

Valid XHTML 1.0 StrictGenerated by cmassiot on Thu Nov 6 12:15:32 2014 using MkDoc