FFmpeg
Data Structures | Macros | Functions | Variables
latm_parser.c File Reference
#include <stdint.h>
#include "parser.h"

Go to the source code of this file.

Data Structures

struct  LATMParseContext
 

Macros

#define LATM_HEADER   0x56e000
 
#define LATM_MASK   0xFFE000
 
#define LATM_SIZE_MASK   0x001FFF
 

Functions

static int latm_find_frame_end (AVCodecParserContext *s1, const uint8_t *buf, int buf_size)
 Find the end of the current frame in the bitstream. More...
 
static int latm_parse (AVCodecParserContext *s1, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
 

Variables

const AVCodecParser ff_aac_latm_parser
 

Detailed Description

AAC LATM parser

Definition in file latm_parser.c.

Macro Definition Documentation

◆ LATM_HEADER

#define LATM_HEADER   0x56e000

Definition at line 29 of file latm_parser.c.

◆ LATM_MASK

#define LATM_MASK   0xFFE000

Definition at line 30 of file latm_parser.c.

◆ LATM_SIZE_MASK

#define LATM_SIZE_MASK   0x001FFF

Definition at line 31 of file latm_parser.c.

Function Documentation

◆ latm_find_frame_end()

static int latm_find_frame_end ( AVCodecParserContext s1,
const uint8_t *  buf,
int  buf_size 
)
static

Find the end of the current frame in the bitstream.

Returns
the position of the first byte of the next frame, or -1

Definition at line 42 of file latm_parser.c.

Referenced by latm_parse().

◆ latm_parse()

static int latm_parse ( AVCodecParserContext s1,
AVCodecContext avctx,
const uint8_t **  poutbuf,
int poutbuf_size,
const uint8_t *  buf,
int  buf_size 
)
static

Definition at line 83 of file latm_parser.c.

Variable Documentation

◆ ff_aac_latm_parser

const AVCodecParser ff_aac_latm_parser
Initial value:
= {
.codec_ids = { AV_CODEC_ID_AAC_LATM },
.priv_data_size = sizeof(LATMParseContext),
.parser_parse = latm_parse,
.parser_close = ff_parse_close
}

Definition at line 107 of file latm_parser.c.

ff_parse_close
void ff_parse_close(AVCodecParserContext *s)
Definition: parser.c:286
LATMParseContext
Definition: latm_parser.c:33
AV_CODEC_ID_AAC_LATM
@ AV_CODEC_ID_AAC_LATM
Definition: codec_id.h:472
latm_parse
static int latm_parse(AVCodecParserContext *s1, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
Definition: latm_parser.c:83