Libav
Functions | Variables
mjpeg_parser.c File Reference

MJPEG parser. More...

#include "parser.h"

Go to the source code of this file.

Functions

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

Variables

AVCodecParser ff_mjpeg_parser
 

Detailed Description

MJPEG parser.

Definition in file mjpeg_parser.c.

Function Documentation

§ find_frame_end()

static int 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 36 of file mjpeg_parser.c.

Referenced by jpeg_parse().

§ jpeg_parse()

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

Definition at line 73 of file mjpeg_parser.c.

Variable Documentation

§ ff_mjpeg_parser

AVCodecParser ff_mjpeg_parser
Initial value:
= {
.codec_ids = { AV_CODEC_ID_MJPEG },
.priv_data_size = sizeof(ParseContext),
.parser_parse = jpeg_parse,
.parser_close = ff_parse_close,
}
void ff_parse_close(AVCodecParserContext *s)
Definition: parser.c:287
static int jpeg_parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
Definition: mjpeg_parser.c:73

Definition at line 99 of file mjpeg_parser.c.