Libav
Macros | Functions | Variables
tak.c File Reference
#include "libavutil/bswap.h"
#include "libavutil/crc.h"
#include "libavutil/intreadwrite.h"
#include "tak.h"

Go to the source code of this file.

Macros

#define CRC_TABLE_SIZE   1024
 

Functions

static int tak_get_nb_samples (int sample_rate, enum TAKFrameSizeType type)
 
av_cold void ff_tak_init_crc (void)
 
int ff_tak_check_crc (const uint8_t *buf, unsigned int buf_size)
 
void avpriv_tak_parse_streaminfo (GetBitContext *gb, TAKStreamInfo *s)
 Parse the Streaminfo metadata block. More...
 
int ff_tak_decode_frame_header (AVCodecContext *avctx, GetBitContext *gb, TAKStreamInfo *ti, int log_level_offset)
 Validate and decode a frame header. More...
 

Variables

static const uint16_t frame_duration_type_quants []
 
static int crc_init = 0
 
static AVCRC crc_24 [CRC_TABLE_SIZE]
 

Macro Definition Documentation

§ CRC_TABLE_SIZE

#define CRC_TABLE_SIZE   1024

Definition at line 58 of file tak.c.

Function Documentation

§ tak_get_nb_samples()

static int tak_get_nb_samples ( int  sample_rate,
enum TAKFrameSizeType  type 
)
static

Definition at line 31 of file tak.c.

Referenced by avpriv_tak_parse_streaminfo().

§ ff_tak_init_crc()

av_cold void ff_tak_init_crc ( void  )

Definition at line 62 of file tak.c.

Referenced by tak_init(), and tak_init_static_data().

§ ff_tak_check_crc()

int ff_tak_check_crc ( const uint8_t buf,
unsigned int  buf_size 
)

Definition at line 70 of file tak.c.

Referenced by tak_decode_frame(), and tak_parse().

§ avpriv_tak_parse_streaminfo()

void avpriv_tak_parse_streaminfo ( GetBitContext gb,
TAKStreamInfo s 
)

Parse the Streaminfo metadata block.

Parameters
[in]gbpointer to GetBitContext
[out]sstorage for parsed information

Definition at line 86 of file tak.c.

Referenced by ff_tak_decode_frame_header(), and tak_read_header().

§ ff_tak_decode_frame_header()

int ff_tak_decode_frame_header ( AVCodecContext avctx,
GetBitContext gb,
TAKStreamInfo s,
int  log_level_offset 
)

Validate and decode a frame header.

Parameters
avctxAVCodecContext to use as av_log() context
[in]gbGetBitContext from which to read frame header
[out]sframe information
log_level_offsetlog level offset, can be used to silence error messages.
Returns
non-zero on error, 0 if OK

Definition at line 121 of file tak.c.

Referenced by tak_decode_frame(), and tak_parse().

Variable Documentation

§ frame_duration_type_quants

const uint16_t frame_duration_type_quants[]
static
Initial value:
= {
3, 4, 6, 8, 4096, 8192, 16384, 512, 1024, 2048,
}

Definition at line 27 of file tak.c.

Referenced by tak_get_nb_samples().

§ crc_init

int crc_init = 0
static

Definition at line 54 of file tak.c.

Referenced by ff_tak_init_crc().

§ crc_24

AVCRC crc_24[CRC_TABLE_SIZE]
static

Definition at line 60 of file tak.c.

Referenced by ff_tak_check_crc(), and ff_tak_init_crc().