Defines | Functions

libavcodec/bytestream.h File Reference

#include <string.h>
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"

Go to the source code of this file.

Defines

#define DEF_T(type, name, bytes, read, write)
#define DEF(name, bytes, read, write)   DEF_T(unsigned int, name, bytes, read, write)
#define DEF64(name, bytes, read, write)   DEF_T(uint64_t, name, bytes, read, write)

Functions

static unsigned int bytestream_get_le32 (const uint8_t **b)
static void bytestream_put_le32 (uint8_t **b, const unsigned int value)
static unsigned int bytestream_get_le24 (const uint8_t **b)
static void bytestream_put_le24 (uint8_t **b, const unsigned int value)
static unsigned int bytestream_get_le16 (const uint8_t **b)
static void bytestream_put_le16 (uint8_t **b, const unsigned int value)
 DEF64 (be64, 8, AV_RB64, AV_WB64) static inline unsigned int bytestream_get_be32(const uint8_t **b)
static void bytestream_put_be32 (uint8_t **b, const unsigned int value)
static unsigned int bytestream_get_be24 (const uint8_t **b)
static void bytestream_put_be24 (uint8_t **b, const unsigned int value)
static unsigned int bytestream_get_be16 (const uint8_t **b)
static void bytestream_put_be16 (uint8_t **b, const unsigned int value)
static unsigned int bytestream_get_byte (const uint8_t **b)
static void bytestream_put_byte (uint8_t **b, const unsigned int value)
static av_always_inline
unsigned int 
bytestream_get_buffer (const uint8_t **b, uint8_t *dst, unsigned int size)
static av_always_inline void bytestream_put_buffer (uint8_t **b, const uint8_t *src, unsigned int size)

Define Documentation

#define DEF (   name,
  bytes,
  read,
  write 
)    DEF_T(unsigned int, name, bytes, read, write)

Definition at line 39 of file bytestream.h.

#define DEF64 (   name,
  bytes,
  read,
  write 
)    DEF_T(uint64_t, name, bytes, read, write)

Definition at line 41 of file bytestream.h.

#define DEF_T (   type,
  name,
  bytes,
  read,
  write 
)
Value:
static av_always_inline type bytestream_get_ ## name(const uint8_t **b){\
    (*b) += bytes;\
    return read(*b - bytes);\
}\
static av_always_inline void bytestream_put_ ##name(uint8_t **b, const type value){\
    write(*b, value);\
    (*b) += bytes;\
}

Definition at line 29 of file bytestream.h.


Function Documentation

static unsigned int bytestream_get_be16 ( const uint8_t **  b  )  [inline, static]
static unsigned int bytestream_get_be24 ( const uint8_t **  b  )  [inline, static]
static av_always_inline unsigned int bytestream_get_buffer ( const uint8_t **  b,
uint8_t *  dst,
unsigned int  size 
) [static]
static unsigned int bytestream_get_byte ( const uint8_t **  b  )  [inline, static]
static unsigned int bytestream_get_le16 ( const uint8_t **  b  )  [inline, static]
static unsigned int bytestream_get_le24 ( const uint8_t **  b  )  [inline, static]

Definition at line 45 of file bytestream.h.

Referenced by bmp_decode_frame(), and cinvideo_decode_frame().

static unsigned int bytestream_get_le32 ( const uint8_t **  b  )  [inline, static]
static void bytestream_put_be16 ( uint8_t **  b,
const unsigned int  value 
) [inline, static]
static void bytestream_put_be24 ( uint8_t **  b,
const unsigned int  value 
) [inline, static]
static void bytestream_put_be32 ( uint8_t **  b,
const unsigned int  value 
) [inline, static]
static av_always_inline void bytestream_put_buffer ( uint8_t **  b,
const uint8_t *  src,
unsigned int  size 
) [static]
static void bytestream_put_byte ( uint8_t **  b,
const unsigned int  value 
) [inline, static]
static void bytestream_put_le16 ( uint8_t **  b,
const unsigned int  value 
) [inline, static]
static void bytestream_put_le24 ( uint8_t **  b,
const unsigned int  value 
) [inline, static]

Definition at line 45 of file bytestream.h.

Referenced by mxf_get_d10_aes3_packet().

static void bytestream_put_le32 ( uint8_t **  b,
const unsigned int  value 
) [inline, static]
DEF64 ( be64  ,
,
AV_RB64  ,
AV_WB64   
) const

Definition at line 45 of file bytestream.h.