FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
latm_parser.c File Reference

AAC LATM parser. More...

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

Variables

AVCodecParser ff_aac_latm_parser
 

Detailed Description

AAC LATM parser.

Definition in file latm_parser.c.

Macro Definition Documentation

#define LATM_HEADER   0x56e000

Definition at line 29 of file latm_parser.c.

Referenced by latm_find_frame_end().

#define LATM_MASK   0xFFE000

Definition at line 30 of file latm_parser.c.

Referenced by latm_find_frame_end().

#define LATM_SIZE_MASK   0x001FFF

Definition at line 31 of file latm_parser.c.

Referenced by latm_find_frame_end().

Function Documentation

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().

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

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.