enc_base.h File Reference

Go to the source code of this file.

Data Structures

struct  aiff_enc_config
 encoder config structures More...
struct  mp3_enc_config
struct  wav_enc_config
struct  wavpack_enc_config
struct  encoder_config
struct  enc_chunk_hdr
struct  enc_file_event_data
 encoder can write extra data to the file such as headers or more encoded samples and must update sizes and samples accordingly. More...
struct  enc_buffer_event_data
 encoder may add some data to the end of the last and start of the next but must never yield when called so any encoding done should be absolutely minimal. More...
struct  enc_inputs
 Callbacks called by encoder codec. More...
struct  enc_parameters

Defines

#define SKIPBYTES(p, count)   ((typeof (p))((char *)(p) + (count)))
#define P2_M1(p2)   ((1 << (p2))-1)
#define ALIGN_DOWN_P2(n, p2)   ((n) & ~P2_M1(p2))
#define ALIGN_UP_P2(n, p2)   ALIGN_DOWN_P2((n) + P2_M1(p2),p2)
#define MP3_BITR_CAP_8   (1 << 0)
 mp3_enc.codec
#define MP3_BITR_CAP_16   (1 << 1)
#define MP3_BITR_CAP_24   (1 << 2)
#define MP3_BITR_CAP_32   (1 << 3)
#define MP3_BITR_CAP_40   (1 << 4)
#define MP3_BITR_CAP_48   (1 << 5)
#define MP3_BITR_CAP_56   (1 << 6)
#define MP3_BITR_CAP_64   (1 << 7)
#define MP3_BITR_CAP_80   (1 << 8)
#define MP3_BITR_CAP_96   (1 << 9)
#define MP3_BITR_CAP_112   (1 << 10)
#define MP3_BITR_CAP_128   (1 << 11)
#define MP3_BITR_CAP_144   (1 << 12)
#define MP3_BITR_CAP_160   (1 << 13)
#define MP3_BITR_CAP_192   (1 << 14)
#define MP3_BITR_CAP_224   (1 << 15)
#define MP3_BITR_CAP_256   (1 << 16)
#define MP3_BITR_CAP_320   (1 << 17)
#define MP3_ENC_NUM_BITR   18
#define MPEG1_SAMPR_CAPS   (SAMPR_CAP_32 | SAMPR_CAP_48 | SAMPR_CAP_44)
#define MPEG1_BITR_CAPS
#define MPEG2_SAMPR_CAPS   (SAMPR_CAP_22 | SAMPR_CAP_24 | SAMPR_CAP_16)
#define MPEG2_BITR_CAPS
#define MP3_ENC_SAMPR_CAPS   (MPEG1_SAMPR_CAPS | MPEG2_SAMPR_CAPS)
#define MP3_ENC_NUM_SAMPR   6
#define MP3_ENC_BITRATE_CFG_DEFAULT   11
#define MP3_ENC_BITRATE_CFG_VALUE_LIST
#define WAV_ENC_SAMPR_CAPS   SAMPR_CAP_ALL
 wav_enc.codec
#define WAVPACK_ENC_SAMPR_CAPS   SAMPR_CAP_ALL
 wavpack_enc.codec
#define CHUNKF_START_FILE   0x0001ul
 Encoder chunk macros and definitions.
#define CHUNKF_END_FILE   0x0002ul
#define CHUNKF_PRERECORD   0x0010ul
#define CHUNKF_ABORT   0x0020ul
#define CHUNKF_ERROR   (~0ul ^ (~0ul >> 1))
#define CHUNKF_ALLFLAGS   (0x0033ul | CHUNKF_ERROR)
#define ENC_CHUNK_HDR_SIZE   ALIGN_UP_P2(sizeof (struct enc_chunk_hdr), 2)
#define ENC_CHUNK_SKIP_HDR(t, hdr)   ((typeof (t))((char *)hdr + ENC_CHUNK_HDR_SIZE))
#define ENC_CHUNK_HDR(p)   ((struct enc_chunk_hdr *)(p))
#define PCM_MAX_FEED_SIZE   20000

Enumerations

enum  enc_events { ENC_START_FILE = 0, ENC_WRITE_CHUNK, ENC_END_FILE, ENC_REC_NEW_STREAM }

Functions

void enc_get_inputs (struct enc_inputs *inputs)
void enc_set_parameters (struct enc_parameters *params)
struct enc_chunk_hdrenc_get_chunk (void)
void enc_finish_chunk (void)
unsigned char * enc_get_pcm_data (size_t size)
size_t enc_unget_pcm_data (size_t size)

Variables

const unsigned long mp3_enc_sampr [6]
const unsigned long mp3_enc_bitr [18]


Define Documentation

#define ALIGN_DOWN_P2 ( n,
p2   )     ((n) & ~P2_M1(p2))

#define ALIGN_UP_P2 ( n,
p2   )     ALIGN_DOWN_P2((n) + P2_M1(p2),p2)

#define CHUNKF_ABORT   0x0020ul

#define CHUNKF_ALLFLAGS   (0x0033ul | CHUNKF_ERROR)

#define CHUNKF_END_FILE   0x0002ul

#define CHUNKF_ERROR   (~0ul ^ (~0ul >> 1))

#define CHUNKF_PRERECORD   0x0010ul

#define CHUNKF_START_FILE   0x0001ul

Encoder chunk macros and definitions.

Referenced by encode_frame().

#define ENC_CHUNK_HDR (  )     ((struct enc_chunk_hdr *)(p))

#define ENC_CHUNK_HDR_SIZE   ALIGN_UP_P2(sizeof (struct enc_chunk_hdr), 2)

#define ENC_CHUNK_SKIP_HDR ( t,
hdr   )     ((typeof (t))((char *)hdr + ENC_CHUNK_HDR_SIZE))

Referenced by EncodeFrame().

#define MP3_BITR_CAP_112   (1 << 10)

#define MP3_BITR_CAP_128   (1 << 11)

#define MP3_BITR_CAP_144   (1 << 12)

#define MP3_BITR_CAP_16   (1 << 1)

#define MP3_BITR_CAP_160   (1 << 13)

#define MP3_BITR_CAP_192   (1 << 14)

#define MP3_BITR_CAP_224   (1 << 15)

#define MP3_BITR_CAP_24   (1 << 2)

#define MP3_BITR_CAP_256   (1 << 16)

#define MP3_BITR_CAP_32   (1 << 3)

#define MP3_BITR_CAP_320   (1 << 17)

#define MP3_BITR_CAP_40   (1 << 4)

#define MP3_BITR_CAP_48   (1 << 5)

#define MP3_BITR_CAP_56   (1 << 6)

#define MP3_BITR_CAP_64   (1 << 7)

#define MP3_BITR_CAP_8   (1 << 0)

mp3_enc.codec

#define MP3_BITR_CAP_80   (1 << 8)

#define MP3_BITR_CAP_96   (1 << 9)

#define MP3_ENC_BITRATE_CFG_DEFAULT   11

#define MP3_ENC_BITRATE_CFG_VALUE_LIST

Value:

"8,16,24,32,40,48,56,64,80,96," \
                                        "112,128,144,160,192,224,256,320"

#define MP3_ENC_NUM_BITR   18

#define MP3_ENC_NUM_SAMPR   6

#define MP3_ENC_SAMPR_CAPS   (MPEG1_SAMPR_CAPS | MPEG2_SAMPR_CAPS)

#define MPEG1_BITR_CAPS

#define MPEG1_SAMPR_CAPS   (SAMPR_CAP_32 | SAMPR_CAP_48 | SAMPR_CAP_44)

#define MPEG2_BITR_CAPS

#define MPEG2_SAMPR_CAPS   (SAMPR_CAP_22 | SAMPR_CAP_24 | SAMPR_CAP_16)

#define P2_M1 ( p2   )     ((1 << (p2))-1)

#define PCM_MAX_FEED_SIZE   20000

#define SKIPBYTES ( p,
count   )     ((typeof (p))((char *)(p) + (count)))

Referenced by byte_swap_frame32().

#define WAV_ENC_SAMPR_CAPS   SAMPR_CAP_ALL

wav_enc.codec

#define WAVPACK_ENC_SAMPR_CAPS   SAMPR_CAP_ALL

wavpack_enc.codec


Enumeration Type Documentation

enum enc_events

Enumerator:
ENC_START_FILE 
ENC_WRITE_CHUNK 
ENC_END_FILE 
ENC_REC_NEW_STREAM 


Function Documentation

void enc_finish_chunk ( void   ) 

struct enc_chunk_hdr* enc_get_chunk ( void   )  [read]

void enc_get_inputs ( struct enc_inputs inputs  ) 

unsigned char* enc_get_pcm_data ( size_t  size  ) 

void enc_set_parameters ( struct enc_parameters params  ) 

size_t enc_unget_pcm_data ( size_t  size  ) 


Variable Documentation

const unsigned long mp3_enc_bitr[18]

const unsigned long mp3_enc_sampr[6]


Generated on Tue May 25 08:05:14 2010 for VLC by  doxygen 1.5.6