FFmpeg
Data Structures | Macros | Functions | Variables
vapoursynth.c File Reference
#include <limits.h>
#include <VapourSynth.h>
#include <VSScript.h>
#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
#include "libavutil/eval.h"
#include "libavutil/imgutils.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avformat.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  VSState
 
struct  VSContext
 
struct  vsframe_ref_data
 

Macros

#define OFFSET(x)   offsetof(VSContext, x)
 
#define A   AV_OPT_FLAG_AUDIO_PARAM
 
#define D   AV_OPT_FLAG_DECODING_PARAM
 

Functions

static void free_vss_state (void *opaque, uint8_t *data)
 
static av_cold int read_close_vs (AVFormatContext *s)
 
static av_cold int is_native_endian (enum AVPixelFormat pixfmt)
 
static av_cold enum AVPixelFormat match_pixfmt (const VSFormat *vsf, int c_order[4])
 
static av_cold int read_header_vs (AVFormatContext *s)
 
static void free_frame (void *opaque, uint8_t *data)
 
static int get_vs_prop_int (AVFormatContext *s, const VSMap *map, const char *name, int def)
 
static void free_vsframe_ref (void *opaque, uint8_t *data)
 
static int read_packet_vs (AVFormatContext *s, AVPacket *pkt)
 
static int read_seek_vs (AVFormatContext *s, int stream_idx, int64_t ts, int flags)
 
static av_cold int probe_vs (const AVProbeData *p)
 

Variables

static const AVOption options []
 
static const AVClass class_vs
 
const AVInputFormat ff_vapoursynth_demuxer
 

Detailed Description

VapourSynth demuxer

Synthesizes vapour (?)

Definition in file vapoursynth.c.

Macro Definition Documentation

◆ OFFSET

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

Definition at line 62 of file vapoursynth.c.

◆ A

#define A   AV_OPT_FLAG_AUDIO_PARAM

Definition at line 63 of file vapoursynth.c.

◆ D

Definition at line 64 of file vapoursynth.c.

Function Documentation

◆ free_vss_state()

static void free_vss_state ( void *  opaque,
uint8_t *  data 
)
static

Definition at line 70 of file vapoursynth.c.

Referenced by read_header_vs().

◆ read_close_vs()

static av_cold int read_close_vs ( AVFormatContext s)
static

Definition at line 80 of file vapoursynth.c.

◆ is_native_endian()

static av_cold int is_native_endian ( enum AVPixelFormat  pixfmt)
static

Definition at line 96 of file vapoursynth.c.

Referenced by match_pixfmt().

◆ match_pixfmt()

static av_cold enum AVPixelFormat match_pixfmt ( const VSFormat *  vsf,
int  c_order[4] 
)
static

Definition at line 106 of file vapoursynth.c.

Referenced by read_header_vs().

◆ read_header_vs()

static av_cold int read_header_vs ( AVFormatContext s)
static

Definition at line 170 of file vapoursynth.c.

◆ free_frame()

static void free_frame ( void *  opaque,
uint8_t *  data 
)
static

Definition at line 300 of file vapoursynth.c.

Referenced by read_packet_vs().

◆ get_vs_prop_int()

static int get_vs_prop_int ( AVFormatContext s,
const VSMap *  map,
const char *  name,
int  def 
)
static

Definition at line 307 of file vapoursynth.c.

Referenced by read_packet_vs().

◆ free_vsframe_ref()

static void free_vsframe_ref ( void *  opaque,
uint8_t *  data 
)
static

Definition at line 323 of file vapoursynth.c.

Referenced by read_packet_vs().

◆ read_packet_vs()

static int read_packet_vs ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 335 of file vapoursynth.c.

◆ read_seek_vs()

static int read_seek_vs ( AVFormatContext s,
int  stream_idx,
int64_t  ts,
int  flags 
)
static

Definition at line 459 of file vapoursynth.c.

◆ probe_vs()

static av_cold int probe_vs ( const AVProbeData p)
static

Definition at line 470 of file vapoursynth.c.

Variable Documentation

◆ options

const AVOption options[]
static
Initial value:
= {
{"max_script_size", "set max file size supported (in bytes)", OFFSET(max_script_size), AV_OPT_TYPE_INT64, {.i64 = 1 * 1024 * 1024}, 0, SIZE_MAX - 1, A|D},
{NULL}
}

Definition at line 65 of file vapoursynth.c.

◆ class_vs

const AVClass class_vs
static
Initial value:
= {
.class_name = "VapourSynth demuxer",
.item_name = av_default_item_name,
.option = options,
}

Definition at line 477 of file vapoursynth.c.

◆ ff_vapoursynth_demuxer

const AVInputFormat ff_vapoursynth_demuxer
Initial value:
= {
.name = "vapoursynth",
.long_name = NULL_IF_CONFIG_SMALL("VapourSynth demuxer"),
.priv_data_size = sizeof(VSContext),
.flags_internal = FF_FMT_INIT_CLEANUP,
.priv_class = &class_vs,
}

Definition at line 484 of file vapoursynth.c.

FF_FMT_INIT_CLEANUP
#define FF_FMT_INIT_CLEANUP
For an AVInputFormat with this flag set read_close() needs to be called by the caller upon read_heade...
Definition: internal.h:49
OFFSET
#define OFFSET(x)
Definition: vapoursynth.c:62
class_vs
static const AVClass class_vs
Definition: vapoursynth.c:477
read_seek
static int read_seek(AVFormatContext *ctx, int stream_index, int64_t timestamp, int flags)
Definition: libcdio.c:149
read_close
static av_cold int read_close(AVFormatContext *ctx)
Definition: libcdio.c:141
options
static const AVOption options[]
Definition: vapoursynth.c:65
AV_OPT_TYPE_INT64
@ AV_OPT_TYPE_INT64
Definition: opt.h:225
read_header_vs
static av_cold int read_header_vs(AVFormatContext *s)
Definition: vapoursynth.c:170
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
read_header
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:527
NULL
#define NULL
Definition: coverity.c:32
read_probe
static int read_probe(const AVProbeData *pd)
Definition: jvdec.c:55
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:235
read_seek_vs
static int read_seek_vs(AVFormatContext *s, int stream_idx, int64_t ts, int flags)
Definition: vapoursynth.c:459
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
read_close_vs
static av_cold int read_close_vs(AVFormatContext *s)
Definition: vapoursynth.c:80
read_packet_vs
static int read_packet_vs(AVFormatContext *s, AVPacket *pkt)
Definition: vapoursynth.c:335
VSContext
Definition: vapoursynth.c:44
read_packet
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
Definition: avio_reading.c:42
A
#define A
Definition: vapoursynth.c:63
probe_vs
static av_cold int probe_vs(const AVProbeData *p)
Definition: vapoursynth.c:470
D
#define D
Definition: vapoursynth.c:64