FFmpeg
Loading...
Searching...
No Matches
mpegvideo_parser.c File Reference
#include "libavutil/avassert.h"
#include "decode.h"
#include "parser.h"
#include "mpeg12.h"
#include "mpeg12data.h"
#include "parser_internal.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.
 
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 av_cold int mpegvideo_parse_init (AVCodecParserContext *s)
 

Variables

const FFCodecParser 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 42 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 103 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 264 of file mpegvideo_parser.c.

◆ mpegvideo_parse_init()

static av_cold int mpegvideo_parse_init ( AVCodecParserContext * s)
static

Definition at line 297 of file mpegvideo_parser.c.

Variable Documentation

◆ ff_mpegvideo_parser

const FFCodecParser ff_mpegvideo_parser
Initial value:
= {
.priv_data_size = sizeof(struct MpvParseContext),
.parse = mpegvideo_parse,
.close = ff_parse_close,
}
int(* init)(AVBSFContext *ctx)
Definition dts2pts.c:608
@ AV_CODEC_ID_MPEG1VIDEO
Definition codec_id.h:51
@ AV_CODEC_ID_MPEG2VIDEO
preferred ID for MPEG-1/2 video decoding
Definition codec_id.h:52
static av_cold int mpegvideo_parse_init(AVCodecParserContext *s)
static int mpegvideo_parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
av_cold void ff_parse_close(AVCodecParserContext *s)
Definition parser.c:300
#define PARSER_CODEC_LIST(...)

Definition at line 303 of file mpegvideo_parser.c.