GPAC
Open Source Multimedia Framework. For more information, check out http://gpac.wp.mines-telecom.fr
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups
bitstream.c File Reference
#include <gpac/bitstream.h>
+ Include dependency graph for bitstream.c:

Data Structures

struct  GF_BitStream
 

Macros

#define BS_MEM_BLOCK_ALLOC_SIZE   4096
 
#define NO_OPTS
 

Enumerations

enum  { GF_BITSTREAM_FILE_READ = GF_BITSTREAM_WRITE + 1, GF_BITSTREAM_FILE_WRITE, GF_BITSTREAM_WRITE_DYN }
 

Functions

GF_BitStream * gf_bs_new (const char *buffer, u64 BufferSize, u32 mode)
 bitstream constructor More...
 
GF_BitStream * gf_bs_from_file (FILE *f, u32 mode)
 bitstream constructor from file handle More...
 
static void bs_flush_cache (GF_BitStream *bs)
 
GF_Err gf_bs_set_output_buffering (GF_BitStream *bs, u32 size)
 sets bitstream write cache size More...
 
u32 gf_bs_get_output_buffering (GF_BitStream *bs)
 gets bitstream write cache size More...
 
void gf_bs_del (GF_BitStream *bs)
 bitstream constructor from file handle More...
 
static Bool BS_IsAlign (GF_BitStream *bs)
 
static u8 BS_ReadByte (GF_BitStream *bs)
 
u8 gf_bs_read_bit (GF_BitStream *bs)
 
u32 gf_bs_read_int (GF_BitStream *bs, u32 nBits)
 integer reading More...
 
u32 gf_bs_read_u8 (GF_BitStream *bs)
 align char reading More...
 
u32 gf_bs_read_u8_until_delimiter (GF_BitStream *bs, u8 delimiter, u8 *out, u32 max_length)
 align char reading until reaching the given value More...
 
u32 gf_bs_read_u16 (GF_BitStream *bs)
 align short reading More...
 
u32 gf_bs_read_u24 (GF_BitStream *bs)
 align 24-bit integer reading More...
 
u32 gf_bs_read_u32 (GF_BitStream *bs)
 align integer reading More...
 
u64 gf_bs_read_u64 (GF_BitStream *bs)
 align large integer reading More...
 
u64 gf_bs_read_long_int (GF_BitStream *bs, u32 nBits)
 large integer reading More...
 
Float gf_bs_read_float (GF_BitStream *bs)
 float reading More...
 
Double gf_bs_read_double (GF_BitStream *bs)
 double reading More...
 
u32 gf_bs_read_data (GF_BitStream *bs, char *data, u32 nbBytes)
 data reading More...
 
static void BS_WriteByte (GF_BitStream *bs, u8 val)
 
static void BS_WriteBit (GF_BitStream *bs, u32 bit)
 
void gf_bs_write_int (GF_BitStream *bs, s32 value, s32 nBits)
 integer writing More...
 
void gf_bs_write_long_int (GF_BitStream *bs, s64 value, s32 nBits)
 large integer writing More...
 
void gf_bs_write_u8 (GF_BitStream *bs, u32 value)
 align char writing More...
 
void gf_bs_write_u16 (GF_BitStream *bs, u32 value)
 align short writing More...
 
void gf_bs_write_u24 (GF_BitStream *bs, u32 value)
 align 24-bits integer writing More...
 
void gf_bs_write_u32 (GF_BitStream *bs, u32 value)
 align integer writing More...
 
void gf_bs_write_u64 (GF_BitStream *bs, u64 value)
 align large integer writing More...
 
u32 gf_bs_write_byte (GF_BitStream *bs, u8 byte, u32 repeat_count)
 write byte multiple times More...
 
void gf_bs_write_float (GF_BitStream *bs, Float value)
 float writing More...
 
void gf_bs_write_double (GF_BitStream *bs, Double value)
 double writing More...
 
u32 gf_bs_write_data (GF_BitStream *bs, const char *data, u32 nbBytes)
 data writing More...
 
u8 gf_bs_align (GF_BitStream *bs)
 bitstream alignment More...
 
u64 gf_bs_available (GF_BitStream *bs)
 capacity query More...
 
static s32 BS_CutBuffer (GF_BitStream *bs)
 
void gf_bs_get_content (GF_BitStream *bs, char **output, u32 *outSize)
 buffer fetching More...
 
void gf_bs_skip_bytes (GF_BitStream *bs, u64 nbBytes)
 byte skipping More...
 
void gf_bs_rewind_bits (GF_BitStream *bs, u64 nbBits)
 
static GF_Err BS_SeekIntern (GF_BitStream *bs, u64 offset)
 
GF_Err gf_bs_seek (GF_BitStream *bs, u64 offset)
 bitstream seeking More...
 
u32 gf_bs_peek_bits (GF_BitStream *bs, u32 numBits, u32 byte_offset)
 bit peeking More...
 
u64 gf_bs_get_refreshed_size (GF_BitStream *bs)
 file-based size query More...
 
u64 gf_bs_get_size (GF_BitStream *bs)
 size query More...
 
u64 gf_bs_get_position (GF_BitStream *bs)
 position query More...
 
u8 gf_bs_bits_available (GF_BitStream *bs)
 bit reservoir query More...
 
void gf_bs_set_eos_callback (GF_BitStream *bs, void(*EndOfStream)(void *par), void *par)
 end of bitstream management More...
 
u32 gf_bs_read_u32_le (GF_BitStream *bs)
 little endian integer reading More...
 
u16 gf_bs_read_u16_le (GF_BitStream *bs)
 little endian integer reading More...
 
void gf_bs_write_u32_le (GF_BitStream *bs, u32 val)
 little endian integer writing More...
 
void gf_bs_write_u16_le (GF_BitStream *bs, u32 val)
 little endian short writing More...
 
u32 gf_bs_get_bit_offset (GF_BitStream *bs)
 bit position More...
 
u32 gf_bs_get_bit_position (GF_BitStream *bs)
 current bit position More...
 
u32 gf_bs_read_vluimsbf5 (GF_BitStream *bs)
 variable length integer reading More...
 
void gf_bs_truncate (GF_BitStream *bs)
 bitstream truncation More...
 
GF_Err gf_bs_transfer (GF_BitStream *dst, GF_BitStream *src)
 transfer content from source bitstream to destination bitstream More...
 
void gf_bs_flush (GF_BitStream *bs)
 Flushes bitstream contet to disk. More...
 
void gf_bs_reassign (GF_BitStream *bs, FILE *stream)
 Reassigns FILE object for stream-based bitstreams. More...
 

Macro Definition Documentation

#define BS_MEM_BLOCK_ALLOC_SIZE   4096
#define NO_OPTS

Enumeration Type Documentation

anonymous enum
Enumerator
GF_BITSTREAM_FILE_READ 
GF_BITSTREAM_FILE_WRITE 
GF_BITSTREAM_WRITE_DYN 

Function Documentation

static void bs_flush_cache ( GF_BitStream *  bs)
static

+ Here is the caller graph for this function:

static Bool BS_IsAlign ( GF_BitStream *  bs)
static

+ Here is the caller graph for this function:

static u8 BS_ReadByte ( GF_BitStream *  bs)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8 gf_bs_read_bit ( GF_BitStream *  bs)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void BS_WriteByte ( GF_BitStream *  bs,
u8  val 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void BS_WriteBit ( GF_BitStream *  bs,
u32  bit 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static s32 BS_CutBuffer ( GF_BitStream *  bs)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void gf_bs_rewind_bits ( GF_BitStream *  bs,
u64  nbBits 
)

+ Here is the call graph for this function:

static GF_Err BS_SeekIntern ( GF_BitStream *  bs,
u64  offset 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function: