FFmpeg
Data Structures | Macros | Functions | Variables
rawvideodec.c File Reference
#include "config_components.h"
#include "libavutil/imgutils.h"
#include "libavutil/parseutils.h"
#include "libavutil/pixdesc.h"
#include "libavutil/opt.h"
#include "demux.h"
#include "internal.h"
#include "avformat.h"

Go to the source code of this file.

Data Structures

struct  RawVideoDemuxerContext
 

Macros

#define GET_PACKET_SIZE(w, h)   (((w + 47) / 48) * 48 * h * 8 / 3)
 
#define OFFSET(x)   offsetof(RawVideoDemuxerContext, x)
 
#define DEC   AV_OPT_FLAG_DECODING_PARAM
 

Functions

static int rawvideo_read_header (AVFormatContext *ctx)
 
static int rawvideo_read_packet (AVFormatContext *s, AVPacket *pkt)
 

Variables

static const AVOption rawvideo_options []
 
static const AVClass rawvideo_demuxer_class
 
const FFInputFormat ff_rawvideo_demuxer
 
static const AVClass bitpacked_demuxer_class
 
static const AVClass v210_demuxer_class
 

Macro Definition Documentation

◆ GET_PACKET_SIZE

#define GET_PACKET_SIZE (   w,
  h 
)    (((w + 47) / 48) * 48 * h * 8 / 3)

Definition at line 40 of file rawvideodec.c.

◆ OFFSET

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

Definition at line 136 of file rawvideodec.c.

◆ DEC

#define DEC   AV_OPT_FLAG_DECODING_PARAM

Definition at line 137 of file rawvideodec.c.

Function Documentation

◆ rawvideo_read_header()

static int rawvideo_read_header ( AVFormatContext ctx)
static

Definition at line 42 of file rawvideodec.c.

◆ rawvideo_read_packet()

static int rawvideo_read_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 123 of file rawvideodec.c.

Variable Documentation

◆ rawvideo_options

const AVOption rawvideo_options[]
static
Initial value:
= {
{ "pixel_format", "set pixel format", OFFSET(pixel_format), AV_OPT_TYPE_STRING, {.str = "yuv420p"}, 0, 0, DEC },
{ "video_size", "set frame size", OFFSET(width), AV_OPT_TYPE_IMAGE_SIZE, {.str = NULL}, 0, 0, DEC },
{ "framerate", "set frame rate", OFFSET(framerate), AV_OPT_TYPE_VIDEO_RATE, {.str = "25"}, 0, INT_MAX, DEC },
{ NULL },
}

Definition at line 138 of file rawvideodec.c.

◆ rawvideo_demuxer_class

const AVClass rawvideo_demuxer_class
static
Initial value:
= {
.class_name = "rawvideo demuxer",
.item_name = av_default_item_name,
.option = rawvideo_options,
}

Definition at line 146 of file rawvideodec.c.

◆ ff_rawvideo_demuxer

const FFInputFormat ff_rawvideo_demuxer
Initial value:
= {
.p.name = "rawvideo",
.p.long_name = NULL_IF_CONFIG_SMALL("raw video"),
.p.flags = AVFMT_GENERIC_INDEX,
.p.extensions = "yuv,cif,qcif,rgb",
.p.priv_class = &rawvideo_demuxer_class,
.priv_data_size = sizeof(RawVideoDemuxerContext),
.raw_codec_id = AV_CODEC_ID_RAWVIDEO,
}

Definition at line 153 of file rawvideodec.c.

◆ bitpacked_demuxer_class

const AVClass bitpacked_demuxer_class
static
Initial value:
= {
.class_name = "bitpacked demuxer",
.item_name = av_default_item_name,
.option = rawvideo_options,
}

Definition at line 165 of file rawvideodec.c.

◆ v210_demuxer_class

const AVClass v210_demuxer_class
static
Initial value:
= {
.class_name = "v210(x) demuxer",
.item_name = av_default_item_name,
.option = rawvideo_options + 1,
}

Definition at line 186 of file rawvideodec.c.

AV_OPT_TYPE_VIDEO_RATE
@ AV_OPT_TYPE_VIDEO_RATE
offset must point to AVRational
Definition: opt.h:248
AV_CODEC_ID_RAWVIDEO
@ AV_CODEC_ID_RAWVIDEO
Definition: codec_id.h:65
rawvideo_options
static const AVOption rawvideo_options[]
Definition: rawvideodec.c:138
RawVideoDemuxerContext
Definition: rawvideodec.c:32
AVFMT_GENERIC_INDEX
#define AVFMT_GENERIC_INDEX
Use generic index building code.
Definition: avformat.h:480
rawvideo_read_header
static int rawvideo_read_header(AVFormatContext *ctx)
Definition: rawvideodec.c:42
read_packet
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
Definition: avio_read_callback.c:41
width
#define width
OFFSET
#define OFFSET(x)
Definition: rawvideodec.c:136
framerate
float framerate
Definition: av1_levels.c:29
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
read_header
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:550
NULL
#define NULL
Definition: coverity.c:32
AV_OPT_TYPE_IMAGE_SIZE
@ AV_OPT_TYPE_IMAGE_SIZE
offset must point to two consecutive integers
Definition: opt.h:245
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:237
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
rawvideo_read_packet
static int rawvideo_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition: rawvideodec.c:123
DEC
#define DEC
Definition: rawvideodec.c:137
rawvideo_demuxer_class
static const AVClass rawvideo_demuxer_class
Definition: rawvideodec.c:146
AV_OPT_TYPE_STRING
@ AV_OPT_TYPE_STRING
Definition: opt.h:239