FFmpeg
Data Structures | Macros | Functions | Variables
mpjpeg.c File Reference
#include "libavutil/opt.h"
#include "avformat.h"
#include "mux.h"

Go to the source code of this file.

Data Structures

struct  MPJPEGContext
 

Macros

#define BOUNDARY_TAG   "ffmpeg"
 

Functions

static int mpjpeg_write_header (AVFormatContext *s)
 
static int mpjpeg_write_packet (AVFormatContext *s, AVPacket *pkt)
 

Variables

static const AVOption options []
 
static const AVClass mpjpeg_muxer_class
 
const FFOutputFormat ff_mpjpeg_muxer
 

Macro Definition Documentation

◆ BOUNDARY_TAG

#define BOUNDARY_TAG   "ffmpeg"

Definition at line 27 of file mpjpeg.c.

Function Documentation

◆ mpjpeg_write_header()

static int mpjpeg_write_header ( AVFormatContext s)
static

Definition at line 34 of file mpjpeg.c.

◆ mpjpeg_write_packet()

static int mpjpeg_write_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 41 of file mpjpeg.c.

Variable Documentation

◆ options

const AVOption options[]
static
Initial value:
= {
{ "boundary_tag", "Boundary tag", 0x42, AV_OPT_TYPE_STRING, {.str = BOUNDARY_TAG}, .flags = AV_OPT_FLAG_ENCODING_PARAM },
{ NULL },
}

Definition at line 53 of file mpjpeg.c.

◆ mpjpeg_muxer_class

const AVClass mpjpeg_muxer_class
static
Initial value:
= {
.class_name = "mpjpeg_muxer",
.item_name = av_default_item_name,
.option = options,
}

Definition at line 58 of file mpjpeg.c.

◆ ff_mpjpeg_muxer

const FFOutputFormat ff_mpjpeg_muxer
Initial value:
= {
.p.name = "mpjpeg",
.p.long_name = NULL_IF_CONFIG_SMALL("MIME multipart JPEG"),
.p.mime_type = "multipart/x-mixed-replace;boundary=" BOUNDARY_TAG,
.p.extensions = "mjpg",
.priv_data_size = sizeof(MPJPEGContext),
.p.audio_codec = AV_CODEC_ID_NONE,
.p.video_codec = AV_CODEC_ID_MJPEG,
.p.subtitle_codec = AV_CODEC_ID_NONE,
.write_header = mpjpeg_write_header,
.write_packet = mpjpeg_write_packet,
.p.flags = AVFMT_NOTIMESTAMPS,
.p.priv_class = &mpjpeg_muxer_class,
}

Definition at line 65 of file mpjpeg.c.

mpjpeg_write_packet
static int mpjpeg_write_packet(AVFormatContext *s, AVPacket *pkt)
Definition: mpjpeg.c:41
mpjpeg_write_header
static int mpjpeg_write_header(AVFormatContext *s)
Definition: mpjpeg.c:34
AVFMT_NOTIMESTAMPS
#define AVFMT_NOTIMESTAMPS
Format does not need / have any timestamps.
Definition: avformat.h:479
FF_OFMT_FLAG_ONLY_DEFAULT_CODECS
#define FF_OFMT_FLAG_ONLY_DEFAULT_CODECS
If this flag is set, then the only permitted audio/video/subtitle codec ids are AVOutputFormat....
Definition: mux.h:59
MPJPEGContext
Definition: mpjpeg.c:29
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
NULL
#define NULL
Definition: coverity.c:32
mpjpeg_muxer_class
static const AVClass mpjpeg_muxer_class
Definition: mpjpeg.c:58
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:237
AV_OPT_FLAG_ENCODING_PARAM
#define AV_OPT_FLAG_ENCODING_PARAM
A generic parameter which can be set by the user for muxing or encoding.
Definition: opt.h:269
BOUNDARY_TAG
#define BOUNDARY_TAG
Definition: mpjpeg.c:27
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:106
options
static const AVOption options[]
Definition: mpjpeg.c:53
AV_CODEC_ID_MJPEG
@ AV_CODEC_ID_MJPEG
Definition: codec_id.h:59
AV_CODEC_ID_NONE
@ AV_CODEC_ID_NONE
Definition: codec_id.h:50
AV_OPT_TYPE_STRING
@ AV_OPT_TYPE_STRING
Definition: opt.h:239