FFmpeg  4.0
Data Structures | Macros | Functions | Variables
avisynth.c File Reference
#include "libavutil/attributes.h"
#include "libavutil/internal.h"
#include "libavcodec/internal.h"
#include "avformat.h"
#include "internal.h"
#include "config.h"
#include <dlfcn.h>
#include "compat/avisynth/avxsynth_c.h"

Go to the source code of this file.

Data Structures

struct  AviSynthLibrary
 
struct  AviSynthContext
 

Macros

#define AVSC_NO_DECLSPEC
 
#define AVISYNTH_NAME   "libavxsynth"
 
#define AVISYNTH_LIB   AVISYNTH_NAME SLIBSUF
 
#define AVSC_DECLARE_FUNC(name)   name ## _func name
 
#define LOAD_AVS_FUNC(name, continue_on_fail)
 

Functions

static av_cold void avisynth_atexit_handler (void)
 
static av_cold int avisynth_load_library (void)
 
static av_cold int avisynth_context_create (AVFormatContext *s)
 
static av_cold void avisynth_context_destroy (AviSynthContext *avs)
 
static int avisynth_create_stream_video (AVFormatContext *s, AVStream *st)
 
static int avisynth_create_stream_audio (AVFormatContext *s, AVStream *st)
 
static int avisynth_create_stream (AVFormatContext *s)
 
static int avisynth_open_file (AVFormatContext *s)
 
static void avisynth_next_stream (AVFormatContext *s, AVStream **st, AVPacket *pkt, int *discard)
 
static int avisynth_read_packet_video (AVFormatContext *s, AVPacket *pkt, int discard)
 
static int avisynth_read_packet_audio (AVFormatContext *s, AVPacket *pkt, int discard)
 
static av_cold int avisynth_read_header (AVFormatContext *s)
 
static int avisynth_read_packet (AVFormatContext *s, AVPacket *pkt)
 
static av_cold int avisynth_read_close (AVFormatContext *s)
 
static int avisynth_read_seek (AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
 

Variables

static const int avs_planes_packed [1] = { 0 }
 
static const int avs_planes_grey [1] = { AVS_PLANAR_Y }
 
static const int avs_planes_yuv [3]
 
static AviSynthLibrary avs_library
 
static int avs_atexit_called = 0
 
static AviSynthContextavs_ctx_list = NULL
 
AVInputFormat ff_avisynth_demuxer
 

Macro Definition Documentation

◆ AVSC_NO_DECLSPEC

#define AVSC_NO_DECLSPEC

Definition at line 32 of file avisynth.c.

◆ AVISYNTH_NAME

#define AVISYNTH_NAME   "libavxsynth"

Definition at line 44 of file avisynth.c.

◆ AVISYNTH_LIB

#define AVISYNTH_LIB   AVISYNTH_NAME SLIBSUF

Definition at line 45 of file avisynth.c.

Referenced by avisynth_load_library().

◆ AVSC_DECLARE_FUNC

#define AVSC_DECLARE_FUNC (   name)    name ## _func name

Definition at line 50 of file avisynth.c.

◆ LOAD_AVS_FUNC

#define LOAD_AVS_FUNC (   name,
  continue_on_fail 
)
Value:
avs_library.name = dlsym(avs_library.library, #name); \
if (!continue_on_fail && !avs_library.name) \
goto fail;
const char * name
Definition: avisynth_c.h:775
#define fail()
Definition: checkasm.h:116
static AviSynthLibrary avs_library
Definition: avisynth.c:111
void * library
Definition: avisynth.c:49

Referenced by avisynth_load_library().

Function Documentation

◆ avisynth_atexit_handler()

static av_cold void avisynth_atexit_handler ( void  )
static

Definition at line 218 of file avisynth.c.

Referenced by avisynth_load_library().

◆ avisynth_load_library()

static av_cold int avisynth_load_library ( void  )
static

Definition at line 119 of file avisynth.c.

Referenced by avisynth_context_create().

◆ avisynth_context_create()

static av_cold int avisynth_context_create ( AVFormatContext s)
static

Definition at line 166 of file avisynth.c.

Referenced by avisynth_open_file().

◆ avisynth_context_destroy()

static av_cold void avisynth_context_destroy ( AviSynthContext avs)
static

Definition at line 194 of file avisynth.c.

Referenced by avisynth_atexit_handler(), avisynth_open_file(), and avisynth_read_close().

◆ avisynth_create_stream_video()

static int avisynth_create_stream_video ( AVFormatContext s,
AVStream st 
)
static

Definition at line 233 of file avisynth.c.

Referenced by avisynth_create_stream().

◆ avisynth_create_stream_audio()

static int avisynth_create_stream_audio ( AVFormatContext s,
AVStream st 
)
static

Definition at line 461 of file avisynth.c.

Referenced by avisynth_create_stream().

◆ avisynth_create_stream()

static int avisynth_create_stream ( AVFormatContext s)
static

Definition at line 496 of file avisynth.c.

Referenced by avisynth_open_file().

◆ avisynth_open_file()

static int avisynth_open_file ( AVFormatContext s)
static

Definition at line 522 of file avisynth.c.

Referenced by avisynth_read_header().

◆ avisynth_next_stream()

static void avisynth_next_stream ( AVFormatContext s,
AVStream **  st,
AVPacket pkt,
int discard 
)
static

Definition at line 586 of file avisynth.c.

Referenced by avisynth_read_packet().

◆ avisynth_read_packet_video()

static int avisynth_read_packet_video ( AVFormatContext s,
AVPacket pkt,
int  discard 
)
static

Definition at line 604 of file avisynth.c.

Referenced by avisynth_read_packet().

◆ avisynth_read_packet_audio()

static int avisynth_read_packet_audio ( AVFormatContext s,
AVPacket pkt,
int  discard 
)
static

Definition at line 705 of file avisynth.c.

Referenced by avisynth_read_packet().

◆ avisynth_read_header()

static av_cold int avisynth_read_header ( AVFormatContext s)
static

Definition at line 772 of file avisynth.c.

◆ avisynth_read_packet()

static int avisynth_read_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 789 of file avisynth.c.

◆ avisynth_read_close()

static av_cold int avisynth_read_close ( AVFormatContext s)
static

Definition at line 819 of file avisynth.c.

◆ avisynth_read_seek()

static int avisynth_read_seek ( AVFormatContext s,
int  stream_index,
int64_t  timestamp,
int  flags 
)
static

Definition at line 829 of file avisynth.c.

Variable Documentation

◆ avs_planes_packed

const int avs_planes_packed[1] = { 0 }
static

Definition at line 96 of file avisynth.c.

Referenced by avisynth_create_stream_video().

◆ avs_planes_grey

const int avs_planes_grey[1] = { AVS_PLANAR_Y }
static

Definition at line 97 of file avisynth.c.

Referenced by avisynth_create_stream_video().

◆ avs_planes_yuv

const int avs_planes_yuv[3]
static
Initial value:

Definition at line 98 of file avisynth.c.

Referenced by avisynth_create_stream_video().

◆ avs_library

AviSynthLibrary avs_library
static

Definition at line 111 of file avisynth.c.

◆ avs_atexit_called

int avs_atexit_called = 0
static

Definition at line 112 of file avisynth.c.

Referenced by avisynth_atexit_handler(), and avisynth_context_destroy().

◆ avs_ctx_list

AviSynthContext* avs_ctx_list = NULL
static

◆ ff_avisynth_demuxer

AVInputFormat ff_avisynth_demuxer
Initial value:
= {
.name = "avisynth",
.long_name = NULL_IF_CONFIG_SMALL("AviSynth script"),
.priv_data_size = sizeof(AviSynthContext),
.extensions = "avs",
}
static int read_seek(AVFormatContext *ctx, int stream_index, int64_t timestamp, int flags)
Definition: libcdio.c:153
static av_cold int read_close(AVFormatContext *ctx)
Definition: libcdio.c:145
static av_cold int avisynth_read_close(AVFormatContext *s)
Definition: avisynth.c:819
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static int avisynth_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition: avisynth.c:789
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:530
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
Definition: avio_reading.c:42
static int avisynth_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
Definition: avisynth.c:829
static av_cold int avisynth_read_header(AVFormatContext *s)
Definition: avisynth.c:772

Definition at line 868 of file avisynth.c.