FFmpeg
Data Structures | Macros | Functions | Variables
librsvgdec.c File Reference
#include "avcodec.h"
#include "internal.h"
#include "libavutil/opt.h"
#include "librsvg-2.0/librsvg/rsvg.h"

Go to the source code of this file.

Data Structures

struct  LibRSVGContext
 

Macros

#define OFFSET(x)   offsetof(LibRSVGContext, x)
 
#define DEC   (AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_VIDEO_PARAM)
 

Functions

static int librsvg_decode_frame (AVCodecContext *avctx, void *data, int *got_frame, AVPacket *pkt)
 

Variables

static const AVOption options []
 
static const AVClass librsvg_decoder_class
 
const AVCodec ff_librsvg_decoder
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 104 of file librsvgdec.c.

◆ DEC

Definition at line 105 of file librsvgdec.c.

Function Documentation

◆ librsvg_decode_frame()

static int librsvg_decode_frame ( AVCodecContext avctx,
void *  data,
int got_frame,
AVPacket pkt 
)
static

Definition at line 35 of file librsvgdec.c.

Variable Documentation

◆ options

const AVOption options[]
static
Initial value:
= {
{ "width", "Width to render to (0 for default)", OFFSET(width), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, DEC },
{ "height", "Height to render to (0 for default)", OFFSET(height), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, DEC },
{ "keep_ar", "Keep aspect ratio with custom width/height", OFFSET(keep_ar), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, DEC },
{ NULL },
}

Definition at line 106 of file librsvgdec.c.

◆ librsvg_decoder_class

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

Definition at line 113 of file librsvgdec.c.

◆ ff_librsvg_decoder

const AVCodec ff_librsvg_decoder
Initial value:
= {
.name = "librsvg",
.long_name = NULL_IF_CONFIG_SMALL("Librsvg rasterizer"),
.priv_class = &librsvg_decoder_class,
.priv_data_size = sizeof(LibRSVGContext),
.capabilities = AV_CODEC_CAP_DR1,
.wrapper_name = "librsvg",
}

Definition at line 120 of file librsvgdec.c.

options
static const AVOption options[]
Definition: librsvgdec.c:106
librsvg_decoder_class
static const AVClass librsvg_decoder_class
Definition: librsvgdec.c:113
width
#define width
LibRSVGContext
Definition: librsvgdec.c:27
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
NULL
#define NULL
Definition: coverity.c:32
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:235
AV_CODEC_CAP_DR1
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
Definition: codec.h:52
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:117
librsvg_decode_frame
static int librsvg_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *pkt)
Definition: librsvgdec.c:35
height
#define height
AV_CODEC_ID_SVG
@ AV_CODEC_ID_SVG
Definition: codec_id.h:283
OFFSET
#define OFFSET(x)
Definition: librsvgdec.c:104
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:224
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
AV_OPT_TYPE_BOOL
@ AV_OPT_TYPE_BOOL
Definition: opt.h:241
DEC
#define DEC
Definition: librsvgdec.c:105