FFmpeg
Data Structures | Macros | Functions | Variables
librsvgdec.c File Reference
#include "avcodec.h"
#include "codec_internal.h"
#include "decode.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, AVFrame *frame, int *got_frame, AVPacket *pkt)
 

Variables

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

Macro Definition Documentation

◆ OFFSET

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

Definition at line 148 of file librsvgdec.c.

◆ DEC

Definition at line 149 of file librsvgdec.c.

Function Documentation

◆ librsvg_decode_frame()

static int librsvg_decode_frame ( AVCodecContext avctx,
AVFrame frame,
int got_frame,
AVPacket pkt 
)
static

Definition at line 36 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 150 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 157 of file librsvgdec.c.

◆ ff_librsvg_decoder

const FFCodec ff_librsvg_decoder
Initial value:
= {
.p.name = "librsvg",
CODEC_LONG_NAME("Librsvg rasterizer"),
.p.priv_class = &librsvg_decoder_class,
.p.type = AVMEDIA_TYPE_VIDEO,
.p.id = AV_CODEC_ID_SVG,
.p.capabilities = AV_CODEC_CAP_DR1,
.p.wrapper_name = "librsvg",
.priv_data_size = sizeof(LibRSVGContext),
}

Definition at line 164 of file librsvgdec.c.

options
static const AVOption options[]
Definition: librsvgdec.c:150
librsvg_decoder_class
static const AVClass librsvg_decoder_class
Definition: librsvgdec.c:157
width
#define width
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:306
LibRSVGContext
Definition: librsvgdec.c:28
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:272
librsvg_decode_frame
static int librsvg_decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *pkt)
Definition: librsvgdec.c:36
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:237
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
height
#define height
AV_CODEC_ID_SVG
@ AV_CODEC_ID_SVG
Definition: codec_id.h:287
OFFSET
#define OFFSET(x)
Definition: librsvgdec.c:148
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:225
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
AV_OPT_TYPE_BOOL
@ AV_OPT_TYPE_BOOL
Definition: opt.h:244
DEC
#define DEC
Definition: librsvgdec.c:149