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

Go to the source code of this file.

Macros

#define CACHED_BITSTREAM_READER   !ARCH_X86_32
 
#define BITSTREAM_READER_LE
 

Functions

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

Variables

static const int64_t tak_channel_layouts []
 
static const uint16_t frame_duration_type_quants []
 

Macro Definition Documentation

◆ CACHED_BITSTREAM_READER

#define CACHED_BITSTREAM_READER   !ARCH_X86_32

Definition at line 26 of file tak.c.

◆ BITSTREAM_READER_LE

#define BITSTREAM_READER_LE

Definition at line 27 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 56 of file tak.c.

Referenced by tak_parse_streaminfo().

◆ ff_tak_check_crc()

int ff_tak_check_crc ( const uint8_t *  buf,
unsigned int  buf_size 
)

Definition at line 79 of file tak.c.

Referenced by tak_decode_frame(), and tak_parse().

◆ tak_parse_streaminfo()

static int tak_parse_streaminfo ( TAKStreamInfo s,
GetBitContext gb 
)
static

Definition at line 95 of file tak.c.

Referenced by avpriv_tak_parse_streaminfo(), and ff_tak_decode_frame_header().

◆ avpriv_tak_parse_streaminfo()

int avpriv_tak_parse_streaminfo ( TAKStreamInfo s,
const uint8_t *  buf,
int  size 
)

Parse the Streaminfo metadata block.

Parameters
[out]sstorage for parsed information
[in]bufinput buffer
[in]sizesize of input buffer in bytes
Returns
non-zero on error, 0 if OK

Definition at line 136 of file tak.c.

Referenced by tak_read_header().

◆ ff_tak_decode_frame_header()

int ff_tak_decode_frame_header ( void *  logctx,
GetBitContext gb,
TAKStreamInfo s,
int  log_level_offset 
)

Validate and decode a frame header.

Parameters
logctxfor 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 147 of file tak.c.

Referenced by tak_decode_frame(), and tak_parse().

Variable Documentation

◆ tak_channel_layouts

const int64_t tak_channel_layouts[]
static

◆ 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 52 of file tak.c.

Referenced by tak_get_nb_samples().

AV_CH_TOP_FRONT_CENTER
#define AV_CH_TOP_FRONT_CENTER
Definition: channel_layout.h:181
AV_CH_TOP_FRONT_RIGHT
#define AV_CH_TOP_FRONT_RIGHT
Definition: channel_layout.h:182
AV_CH_TOP_FRONT_LEFT
#define AV_CH_TOP_FRONT_LEFT
Definition: channel_layout.h:180
AV_CH_TOP_BACK_LEFT
#define AV_CH_TOP_BACK_LEFT
Definition: channel_layout.h:183
AV_CH_TOP_BACK_CENTER
#define AV_CH_TOP_BACK_CENTER
Definition: channel_layout.h:184
AV_CH_BACK_LEFT
#define AV_CH_BACK_LEFT
Definition: channel_layout.h:172
AV_CH_LOW_FREQUENCY
#define AV_CH_LOW_FREQUENCY
Definition: channel_layout.h:171
AV_CH_TOP_CENTER
#define AV_CH_TOP_CENTER
Definition: channel_layout.h:179
AV_CH_FRONT_CENTER
#define AV_CH_FRONT_CENTER
Definition: channel_layout.h:170
AV_CH_FRONT_LEFT_OF_CENTER
#define AV_CH_FRONT_LEFT_OF_CENTER
Definition: channel_layout.h:174
AV_CH_TOP_BACK_RIGHT
#define AV_CH_TOP_BACK_RIGHT
Definition: channel_layout.h:185
AV_CH_FRONT_RIGHT_OF_CENTER
#define AV_CH_FRONT_RIGHT_OF_CENTER
Definition: channel_layout.h:175
AV_CH_BACK_CENTER
#define AV_CH_BACK_CENTER
Definition: channel_layout.h:176
AV_CH_FRONT_LEFT
#define AV_CH_FRONT_LEFT
Definition: channel_layout.h:168
AV_CH_SIDE_RIGHT
#define AV_CH_SIDE_RIGHT
Definition: channel_layout.h:178
AV_CH_FRONT_RIGHT
#define AV_CH_FRONT_RIGHT
Definition: channel_layout.h:169
AV_CH_BACK_RIGHT
#define AV_CH_BACK_RIGHT
Definition: channel_layout.h:173
AV_CH_SIDE_LEFT
#define AV_CH_SIDE_LEFT
Definition: channel_layout.h:177