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/frame.h"
#include "libavutil/imgutils.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avformat.h"
#include "demux.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 FFInputFormat 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 65 of file vapoursynth.c.

◆ A

#define A   AV_OPT_FLAG_AUDIO_PARAM

Definition at line 66 of file vapoursynth.c.

◆ D

Definition at line 67 of file vapoursynth.c.

Function Documentation

◆ free_vss_state()

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

Definition at line 73 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 83 of file vapoursynth.c.

◆ is_native_endian()

static av_cold int is_native_endian ( enum AVPixelFormat  pixfmt)
static

Definition at line 99 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 109 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 171 of file vapoursynth.c.

◆ free_frame()

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

Definition at line 301 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 308 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 324 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 336 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 460 of file vapoursynth.c.

◆ probe_vs()

static av_cold int probe_vs ( const AVProbeData p)
static

Definition at line 471 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 68 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 478 of file vapoursynth.c.

◆ ff_vapoursynth_demuxer

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

Definition at line 485 of file vapoursynth.c.

OFFSET
#define OFFSET(x)
Definition: vapoursynth.c:65
class_vs
static const AVClass class_vs
Definition: vapoursynth.c:478
read_seek
static int read_seek(AVFormatContext *ctx, int stream_index, int64_t timestamp, int flags)
Definition: libcdio.c:151
read_close
static av_cold int read_close(AVFormatContext *ctx)
Definition: libcdio.c:143
read_packet
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
Definition: avio_read_callback.c:42
options
static const AVOption options[]
Definition: vapoursynth.c:68
AV_OPT_TYPE_INT64
@ AV_OPT_TYPE_INT64
Definition: opt.h:236
read_header_vs
static av_cold int read_header_vs(AVFormatContext *s)
Definition: vapoursynth.c:171
FF_INFMT_FLAG_INIT_CLEANUP
#define FF_INFMT_FLAG_INIT_CLEANUP
For an FFInputFormat with this flag set read_close() needs to be called by the caller upon read_heade...
Definition: demux.h:35
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_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:237
read_seek_vs
static int read_seek_vs(AVFormatContext *s, int stream_idx, int64_t ts, int flags)
Definition: vapoursynth.c:460
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:94
read_close_vs
static av_cold int read_close_vs(AVFormatContext *s)
Definition: vapoursynth.c:83
read_packet_vs
static int read_packet_vs(AVFormatContext *s, AVPacket *pkt)
Definition: vapoursynth.c:336
VSContext
Definition: vapoursynth.c:47
A
#define A
Definition: vapoursynth.c:66
probe_vs
static av_cold int probe_vs(const AVProbeData *p)
Definition: vapoursynth.c:471
read_probe
static int read_probe(const AVProbeData *p)
Definition: cdg.c:30
D
#define D
Definition: vapoursynth.c:67