FFmpeg
Loading...
Searching...
No Matches
mpeg4video_parser.c File Reference
#include "decode.h"
#include "parser.h"
#include "mpegvideo.h"
#include "mpeg4videodec.h"
#include "mpeg4videodefs.h"
#include "parser_internal.h"

Go to the source code of this file.

Data Structures

struct  Mp4vParseContext
 

Macros

#define UNCHECKED_BITSTREAM_READER   1
 

Functions

static int mpeg4_find_frame_end (ParseContext *pc, const uint8_t *buf, int buf_size)
 Find the end of the current frame in the bitstream.
 
static int mpeg4_decode_header (AVCodecParserContext *s1, AVCodecContext *avctx, const uint8_t *buf, int buf_size)
 
static av_cold int mpeg4video_parse_init (AVCodecParserContext *s)
 
static int mpeg4video_parse (AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
 

Variables

const FFCodecParser ff_mpeg4video_parser
 

Macro Definition Documentation

◆ UNCHECKED_BITSTREAM_READER

#define UNCHECKED_BITSTREAM_READER   1

Definition at line 23 of file mpeg4video_parser.c.

Function Documentation

◆ mpeg4_find_frame_end()

static int mpeg4_find_frame_end ( ParseContext * pc,
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 mpeg4video_parser.c.

Referenced by mpeg4video_parse().

◆ mpeg4_decode_header()

static int mpeg4_decode_header ( AVCodecParserContext * s1,
AVCodecContext * avctx,
const uint8_t * buf,
int buf_size )
static

Definition at line 83 of file mpeg4video_parser.c.

Referenced by mpeg4video_parse().

◆ mpeg4video_parse_init()

static av_cold int mpeg4video_parse_init ( AVCodecParserContext * s)
static

Definition at line 122 of file mpeg4video_parser.c.

◆ mpeg4video_parse()

static int mpeg4video_parse ( AVCodecParserContext * s,
AVCodecContext * avctx,
const uint8_t ** poutbuf,
int * poutbuf_size,
const uint8_t * buf,
int buf_size )
static

Definition at line 133 of file mpeg4video_parser.c.

Variable Documentation

◆ ff_mpeg4video_parser

const FFCodecParser ff_mpeg4video_parser
Initial value:
= {
.priv_data_size = sizeof(struct Mp4vParseContext),
.parse = mpeg4video_parse,
.close = ff_parse_close,
}
int(* init)(AVBSFContext *ctx)
Definition dts2pts.c:608
@ AV_CODEC_ID_MPEG4
Definition codec_id.h:62
static int mpeg4video_parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
static av_cold int mpeg4video_parse_init(AVCodecParserContext *s)
av_cold void ff_parse_close(AVCodecParserContext *s)
Definition parser.c:300
#define PARSER_CODEC_LIST(...)

Definition at line 159 of file mpeg4video_parser.c.