FFmpeg
Loading...
Searching...
No Matches
mjpeg_parser.c File Reference

MJPEG parser. More...

#include "parser.h"
#include "parser_internal.h"

Go to the source code of this file.

Data Structures

struct  MJPEGParserContext
 

Functions

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

Variables

const FFCodecParser ff_mjpeg_parser
 

Detailed Description

MJPEG parser.

Definition in file mjpeg_parser.c.

Function Documentation

◆ find_frame_end()

static int find_frame_end ( MJPEGParserContext * m,
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 41 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 105 of file mjpeg_parser.c.

Variable Documentation

◆ ff_mjpeg_parser

const FFCodecParser ff_mjpeg_parser
Initial value:
= {
.priv_data_size = sizeof(MJPEGParserContext),
}
static int parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
Definition apv_parser.c:92
static av_cold void close(AVCodecParserContext *s)
Definition apv_parser.c:197
@ AV_CODEC_ID_JPEGLS
Definition codec_id.h:61
@ AV_CODEC_ID_MJPEG
Definition codec_id.h:57
static int jpeg_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 132 of file mjpeg_parser.c.