FFmpeg
Data Structures | Functions | Variables
mpegvideo_parser.c File Reference
#include "libavutil/avassert.h"
#include "decode.h"
#include "parser.h"
#include "mpeg12.h"
#include "mpeg12data.h"
#include "startcode.h"

Go to the source code of this file.

Data Structures

struct  MpvParseContext
 

Functions

static int mpeg1_find_frame_end (ParseContext *pc, const uint8_t *buf, int buf_size, AVCodecParserContext *s)
 Find the end of the current frame in the bitstream. More...
 
static void mpegvideo_extract_headers (AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t *buf, int buf_size)
 
static int mpegvideo_parse (AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
 
static int mpegvideo_parse_init (AVCodecParserContext *s)
 

Variables

const AVCodecParser ff_mpegvideo_parser
 

Function Documentation

◆ mpeg1_find_frame_end()

static int mpeg1_find_frame_end ( ParseContext pc,
const uint8_t *  buf,
int  buf_size,
AVCodecParserContext s 
)
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 41 of file mpegvideo_parser.c.

Referenced by mpegvideo_parse().

◆ mpegvideo_extract_headers()

static void mpegvideo_extract_headers ( AVCodecParserContext s,
AVCodecContext avctx,
const uint8_t *  buf,
int  buf_size 
)
static

Definition at line 102 of file mpegvideo_parser.c.

Referenced by mpegvideo_parse().

◆ mpegvideo_parse()

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

Definition at line 273 of file mpegvideo_parser.c.

◆ mpegvideo_parse_init()

static int mpegvideo_parse_init ( AVCodecParserContext s)
static

Definition at line 306 of file mpegvideo_parser.c.

Variable Documentation

◆ ff_mpegvideo_parser

const AVCodecParser ff_mpegvideo_parser
Initial value:
= {
.priv_data_size = sizeof(struct MpvParseContext),
.parser_init = mpegvideo_parse_init,
.parser_parse = mpegvideo_parse,
.parser_close = ff_parse_close,
}

Definition at line 312 of file mpegvideo_parser.c.

ff_parse_close
void ff_parse_close(AVCodecParserContext *s)
Definition: parser.c:289
mpegvideo_parse
static int mpegvideo_parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
Definition: mpegvideo_parser.c:273
AV_CODEC_ID_MPEG1VIDEO
@ AV_CODEC_ID_MPEG1VIDEO
Definition: codec_id.h:53
MpvParseContext
Definition: mpegvideo_parser.c:30
mpegvideo_parse_init
static int mpegvideo_parse_init(AVCodecParserContext *s)
Definition: mpegvideo_parser.c:306
AV_CODEC_ID_MPEG2VIDEO
@ AV_CODEC_ID_MPEG2VIDEO
preferred ID for MPEG-1/2 video decoding
Definition: codec_id.h:54