upipe/ubuf_block_stream.h header reference
Upipe streams of block buffers More
Header inclusion
Members
Type
- struct ubuf_block_stream
Functions
- int ubuf_block_stream_clean(struct ubuf_block_stream *s)
- int ubuf_block_stream_get(struct ubuf_block_stream *s, uint8_t *octet_p)
- int ubuf_block_stream_init(struct ubuf_block_stream *s, struct ubuf *ubuf, int offset)
Macros
Description
Members detail
This macro is declared in upipe/ubuf_block_stream.h source file, line 31.
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.
Field | Description |
---|---|
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
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
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
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
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