Data Structures | Macros | Functions | Variables
mpjpegdec.c File Reference
#include "libavutil/avstring.h"
#include "libavutil/opt.h"
#include "avformat.h"
#include "internal.h"
#include "avio_internal.h"

Go to the source code of this file.

Data Structures

struct  MPJPEGDemuxContext


#define OFFSET(x)   offsetof(MPJPEGDemuxContext, x)


static void trim_right (char *p)
static int get_line (AVIOContext *pb, char *line, int line_size)
static int split_tag_value (char **tag, char **value, char *line)
static int parse_multipart_header (AVIOContext *pb, int *size, const char *expected_boundary, void *log_ctx)
static int mpjpeg_read_close (AVFormatContext *s)
static int mpjpeg_read_probe (const AVProbeData *p)
static int mpjpeg_read_header (AVFormatContext *s)
static int parse_content_length (const char *value)
static char * mpjpeg_get_boundary (AVIOContext *pb)
static int mpjpeg_read_packet (AVFormatContext *s, AVPacket *pkt)


static const AVOption mpjpeg_options []
static const AVClass mpjpeg_demuxer_class
AVInputFormat ff_mpjpeg_demuxer

Macro Definition Documentation

#define OFFSET (   x)    offsetof(MPJPEGDemuxContext, x)

Definition at line 367 of file mpjpegdec.c.


Definition at line 369 of file mpjpegdec.c.

Function Documentation

static void trim_right ( char *  p)

Definition at line 40 of file mpjpegdec.c.

Referenced by get_line(), and split_tag_value().

static int get_line ( AVIOContext pb,
char *  line,
int  line_size 

Definition at line 52 of file mpjpegdec.c.

Referenced by mpjpeg_read_header(), and parse_multipart_header().

static int split_tag_value ( char **  tag,
char **  value,
char *  line 

Definition at line 68 of file mpjpegdec.c.

Referenced by parse_multipart_header().

static int parse_multipart_header ( AVIOContext pb,
int size,
const char *  expected_boundary,
void log_ctx 

Definition at line 171 of file mpjpegdec.c.

Referenced by mpjpeg_read_packet(), mpjpeg_read_probe(), and split_tag_value().

static int mpjpeg_read_close ( AVFormatContext s)

Definition at line 106 of file mpjpegdec.c.

static int mpjpeg_read_probe ( const AVProbeData p)

Definition at line 114 of file mpjpegdec.c.

static int mpjpeg_read_header ( AVFormatContext s)

Definition at line 130 of file mpjpegdec.c.

static int parse_content_length ( const char *  value)

Definition at line 160 of file mpjpegdec.c.

Referenced by parse_multipart_header().

static char* mpjpeg_get_boundary ( AVIOContext pb)

Definition at line 249 of file mpjpegdec.c.

Referenced by mpjpeg_read_packet().

static int mpjpeg_read_packet ( AVFormatContext s,
AVPacket pkt 

Definition at line 293 of file mpjpegdec.c.

Variable Documentation

const AVOption mpjpeg_options[]
Initial value:
= {
{ "strict_mime_boundary", "require MIME boundaries match", OFFSET(strict_mime_boundary), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, DEC },
{ NULL }
#define NULL
Definition: coverity.c:32
#define DEC
Definition: mpjpegdec.c:369
#define OFFSET(x)
Definition: mpjpegdec.c:367

Definition at line 370 of file mpjpegdec.c.

const AVClass mpjpeg_demuxer_class
Initial value:
= {
.class_name = "MPJPEG demuxer",
.item_name = av_default_item_name,
.option = mpjpeg_options,
Definition: version.h:85
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:235
static const AVOption mpjpeg_options[]
Definition: mpjpegdec.c:370

Definition at line 376 of file mpjpegdec.c.

AVInputFormat ff_mpjpeg_demuxer
Initial value:
= {
.name = "mpjpeg",
.long_name = NULL_IF_CONFIG_SMALL("MIME multipart JPEG"),
.mime_type = "multipart/x-mixed-replace",
.extensions = "mjpg",
.priv_data_size = sizeof(MPJPEGDemuxContext),
.priv_class = &mpjpeg_demuxer_class,
static av_cold int read_close(AVFormatContext *ctx)
Definition: libcdio.c:145
static int mpjpeg_read_header(AVFormatContext *s)
Definition: mpjpegdec.c:130
static int mpjpeg_read_close(AVFormatContext *s)
Definition: mpjpegdec.c:106
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:115
static const AVClass mpjpeg_demuxer_class
Definition: mpjpegdec.c:376
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:527
static int mpjpeg_read_probe(const AVProbeData *p)
Definition: mpjpegdec.c:114
Format does not need / have any timestamps.
Definition: avformat.h:462
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
Definition: avio_reading.c:42
#define flags(name, subs,...)
Definition: cbs_av1.c:561
static int read_probe(const AVProbeData *pd)
Definition: jvdec.c:55
static int mpjpeg_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition: mpjpegdec.c:293

Definition at line 383 of file mpjpegdec.c.