FFmpeg
Loading...
Searching...
No Matches
latm_parser.c File Reference

AAC LATM parser. More...

#include <stdint.h>
#include "parser.h"
#include "parser_internal.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.
 
static int latm_parse (AVCodecParserContext *s1, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
 

Variables

const FFCodecParser 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 30 of file latm_parser.c.

Referenced by latm_find_frame_end().

◆ LATM_MASK

#define LATM_MASK   0xFFE000

Definition at line 31 of file latm_parser.c.

Referenced by latm_find_frame_end().

◆ LATM_SIZE_MASK

#define LATM_SIZE_MASK   0x001FFF

Definition at line 32 of file latm_parser.c.

Referenced by latm_find_frame_end().

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 43 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 84 of file latm_parser.c.

Variable Documentation

◆ ff_aac_latm_parser

const FFCodecParser ff_aac_latm_parser
Initial value:
= {
.priv_data_size = sizeof(LATMParseContext),
}
static int parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
Definition apv_parser.c:92
static av_cold void close(AVCodecParserContext *s)
Definition apv_parser.c:197
@ AV_CODEC_ID_AAC_LATM
Definition codec_id.h:502
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:84
av_cold void ff_parse_close(AVCodecParserContext *s)
Definition parser.c:300
#define PARSER_CODEC_LIST(...)

Definition at line 108 of file latm_parser.c.