FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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
 

Macros

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

Functions

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 (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)
 

Variables

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 375 of file mpjpegdec.c.

#define DEC   AV_OPT_FLAG_DECODING_PARAM

Definition at line 377 of file mpjpegdec.c.

Function Documentation

static void trim_right ( char *  p)
static

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 
)
static

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 
)
static

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 
)
static

Definition at line 175 of file mpjpegdec.c.

Referenced by mpjpeg_read_packet(), and mpjpeg_read_probe().

static int mpjpeg_read_close ( AVFormatContext s)
static

Definition at line 106 of file mpjpegdec.c.

static int mpjpeg_read_probe ( AVProbeData p)
static

Definition at line 114 of file mpjpegdec.c.

static int mpjpeg_read_header ( AVFormatContext s)
static

Definition at line 134 of file mpjpegdec.c.

static int parse_content_length ( const char *  value)
static

Definition at line 164 of file mpjpegdec.c.

Referenced by parse_multipart_header().

static char* mpjpeg_get_boundary ( AVIOContext pb)
static

Definition at line 253 of file mpjpegdec.c.

Referenced by mpjpeg_read_packet().

static int mpjpeg_read_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 297 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:377
#define OFFSET(x)
Definition: mpjpegdec.c:375

Definition at line 378 of file mpjpegdec.c.

const AVClass mpjpeg_demuxer_class
static
Initial value:
= {
.class_name = "MPJPEG demuxer",
.item_name = av_default_item_name,
.option = mpjpeg_options,
}
#define LIBAVUTIL_VERSION_INT
Definition: version.h:70
av_default_item_name
const AVOption mpjpeg_options[]
Definition: mpjpegdec.c:378

Definition at line 384 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:134
static int mpjpeg_read_close(AVFormatContext *s)
Definition: mpjpegdec.c:106
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:176
static const AVClass mpjpeg_demuxer_class
Definition: mpjpegdec.c:384
static int read_probe(AVProbeData *pd)
Definition: jvdec.c:55
static int mpjpeg_read_probe(AVProbeData *p)
Definition: mpjpegdec.c:114
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:638
#define AVFMT_NOTIMESTAMPS
Format does not need / have any timestamps.
Definition: avformat.h:484
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
Definition: avio_reading.c:42
static int flags
Definition: cpu.c:47
static int mpjpeg_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition: mpjpegdec.c:297

Definition at line 391 of file mpjpegdec.c.