VLC  4.0.0-dev
Data Structures | Macros | Typedefs | Functions
vlc_boxes.h File Reference

This file defines functions, structures for handling boxes/atoms in vlc. More...

Include dependency graph for vlc_boxes.h:

Go to the source code of this file.

Data Structures

struct  bo_t
 

Macros

#define BO_SET_DECL_S(func, handler, type)
 
#define BO_ADD_DECL_S(func, handler, type)
 
#define BO_FUNC_DECL(suffix, handler, type)
 
#define bo_add_fourcc(p_bo, fcc)   bo_add_mem(p_bo, 4, fcc)
 

Typedefs

typedef struct bo_t bo_t
 

Functions

static bool bo_init (bo_t *p_bo, int i_size)
 
static void bo_deinit (bo_t *p_bo)
 
static void bo_free (bo_t *p_bo)
 
static int bo_extend (bo_t *p_bo, size_t i_total)
 
static bool bo_set_8 (bo_t *p_bo, size_t i_offset, uint8_t i)
 
static bool bo_add_8 (bo_t *p_bo, uint8_t i)
 
static bool bo_set_16be (bo_t *p_bo, size_t i_offset, uint16_t val)
 
static bool bo_set_16le (bo_t *p_bo, size_t i_offset, uint16_t val)
 
static bool bo_add_16be (bo_t *p_bo, uint16_t val)
 
static bool bo_add_16le (bo_t *p_bo, uint16_t val)
 
static bool bo_set_32be (bo_t *p_bo, size_t i_offset, uint32_t val)
 
static bool bo_set_32le (bo_t *p_bo, size_t i_offset, uint32_t val)
 
static bool bo_add_32be (bo_t *p_bo, uint32_t val)
 
static bool bo_add_32le (bo_t *p_bo, uint32_t val)
 
static bool bo_set_64be (bo_t *p_bo, size_t i_offset, uint64_t val)
 
static bool bo_set_64le (bo_t *p_bo, size_t i_offset, uint64_t val)
 
static bool bo_add_64be (bo_t *p_bo, uint64_t val)
 
static bool bo_add_64le (bo_t *p_bo, uint64_t val)
 
static bool bo_add_24be (bo_t *p_bo, uint32_t i)
 
static void bo_swap_32be (bo_t *p_bo, size_t i_pos, uint32_t i)
 
static bool bo_add_mem (bo_t *p_bo, size_t i_size, const void *p_mem)
 
static size_t bo_size (const bo_t *p_bo)
 

Detailed Description

This file defines functions, structures for handling boxes/atoms in vlc.

Macro Definition Documentation

◆ BO_ADD_DECL_S

#define BO_ADD_DECL_S (   func,
  handler,
  type 
)
Value:
static inline bool func(bo_t *p_bo, type val)\
{\
if(!p_bo->b || !handler(p_bo, p_bo->b->i_buffer, val))\
return false;\
p_bo->b->i_buffer += sizeof(type);\
return true;\
}
Definition: vlc_boxes.h:37

◆ bo_add_fourcc

#define bo_add_fourcc (   p_bo,
  fcc 
)    bo_add_mem(p_bo, 4, fcc)

◆ BO_FUNC_DECL

#define BO_FUNC_DECL (   suffix,
  handler,
  type 
)
Value:
BO_SET_DECL_S( bo_set_ ## suffix ## be, handler ## BE, type )\
BO_SET_DECL_S( bo_set_ ## suffix ## le, handler ## LE, type )\
BO_ADD_DECL_S( bo_add_ ## suffix ## be, bo_set_ ## suffix ## be, type )\
BO_ADD_DECL_S( bo_add_ ## suffix ## le, bo_set_ ## suffix ## le, type )
#define BO_SET_DECL_S(func, handler, type)
Definition: vlc_boxes.h:88

◆ BO_SET_DECL_S

#define BO_SET_DECL_S (   func,
  handler,
  type 
)
Value:
static inline bool func(bo_t *p_bo, size_t i_offset, type val)\
{\
if (!bo_extend(p_bo, i_offset + sizeof(type)))\
return false;\
handler(&p_bo->b->p_buffer[i_offset], val);\
return true;\
}
static int bo_extend(bo_t *p_bo, size_t i_total)
Definition: vlc_boxes.h:68

Typedef Documentation

◆ bo_t

typedef struct bo_t bo_t

Function Documentation

◆ bo_add_16be()

static bool bo_add_16be ( bo_t p_bo,
uint16_t  val 
)
inlinestatic

◆ bo_add_16le()

static bool bo_add_16le ( bo_t p_bo,
uint16_t  val 
)
inlinestatic

◆ bo_add_24be()

static bool bo_add_24be ( bo_t p_bo,
uint32_t  i 
)
inlinestatic

◆ bo_add_32be()

static bool bo_add_32be ( bo_t p_bo,
uint32_t  val 
)
inlinestatic

◆ bo_add_32le()

static bool bo_add_32le ( bo_t p_bo,
uint32_t  val 
)
inlinestatic

◆ bo_add_64be()

static bool bo_add_64be ( bo_t p_bo,
uint64_t  val 
)
inlinestatic

◆ bo_add_64le()

static bool bo_add_64le ( bo_t p_bo,
uint64_t  val 
)
inlinestatic

◆ bo_add_8()

static bool bo_add_8 ( bo_t p_bo,
uint8_t  i 
)
inlinestatic

◆ bo_add_mem()

static bool bo_add_mem ( bo_t p_bo,
size_t  i_size,
const void *  p_mem 
)
inlinestatic

◆ bo_deinit()

static void bo_deinit ( bo_t p_bo)
inlinestatic

References bo_t::b, and block_Release().

Referenced by bo_free().

◆ bo_extend()

static int bo_extend ( bo_t p_bo,
size_t  i_total 
)
inlinestatic

◆ bo_free()

static void bo_free ( bo_t p_bo)
inlinestatic

References bo_deinit().

◆ bo_init()

static bool bo_init ( bo_t p_bo,
int  i_size 
)
inlinestatic

◆ bo_set_16be()

static bool bo_set_16be ( bo_t p_bo,
size_t  i_offset,
uint16_t  val 
)
inlinestatic

◆ bo_set_16le()

static bool bo_set_16le ( bo_t p_bo,
size_t  i_offset,
uint16_t  val 
)
inlinestatic

◆ bo_set_32be()

static bool bo_set_32be ( bo_t p_bo,
size_t  i_offset,
uint32_t  val 
)
inlinestatic

◆ bo_set_32le()

static bool bo_set_32le ( bo_t p_bo,
size_t  i_offset,
uint32_t  val 
)
inlinestatic

◆ bo_set_64be()

static bool bo_set_64be ( bo_t p_bo,
size_t  i_offset,
uint64_t  val 
)
inlinestatic

◆ bo_set_64le()

static bool bo_set_64le ( bo_t p_bo,
size_t  i_offset,
uint64_t  val 
)
inlinestatic

◆ bo_set_8()

static bool bo_set_8 ( bo_t p_bo,
size_t  i_offset,
uint8_t  i 
)
inlinestatic

References bo_t::b, bo_extend(), and block_t::p_buffer.

Referenced by bo_add_8().

◆ bo_size()

static size_t bo_size ( const bo_t p_bo)
inlinestatic

References bo_t::b, and block_t::i_buffer.

◆ bo_swap_32be()

static void bo_swap_32be ( bo_t p_bo,
size_t  i_pos,
uint32_t  i 
)
inlinestatic