avisynth.c File Reference
#include "avformat.h"
#include "internal.h"
#include "libavcodec/internal.h"
#include <dlfcn.h>
#include "compat/avisynth/avxsynth_c.h"
Include dependency graph for avisynth.c:

Go to the source code of this file.

Data Structures

struct  AviSynthLibrary
 
struct  AviSynthContext
 

Macros

#define AVSC_NO_DECLSPEC
 
#define AVISYNTH_LIB   "libavxsynth.so"
 
#define LoadLibrary(x)   dlopen(x, RTLD_NOW | RTLD_GLOBAL)
 
#define GetProcAddress   dlsym
 
#define FreeLibrary   dlclose
 
#define avs_is_yv24(vi)   0
 
#define avs_is_yv16(vi)   0
 
#define avs_is_yv411(vi)   0
 
#define avs_is_y8(vi)   0
 
#define AVSC_DECLARE_FUNC(name)   name##_func name
 
#define LOAD_AVS_FUNC(name, continue_on_fail)
 

Typedefs

typedef struct AviSynthContext AviSynthContext
 

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] = {AVS_PLANAR_Y, AVS_PLANAR_U, AVS_PLANAR_V}
 
static AviSynthLibraryavs_library = NULL
 
static int avs_atexit_called = 0
 
static AviSynthContextavs_ctx_list = NULL
 
AVInputFormat ff_avisynth_demuxer
 

Macro Definition Documentation

#define AVISYNTH_LIB   "libavxsynth.so"

Definition at line 46 of file avisynth.c.

Referenced by avisynth_load_library().

#define avs_is_y8 (   vi)    0

Definition at line 59 of file avisynth.c.

Referenced by avisynth_read_packet_video().

#define avs_is_yv16 (   vi)    0

Definition at line 57 of file avisynth.c.

Referenced by avisynth_read_packet_video().

#define avs_is_yv24 (   vi)    0

Definition at line 56 of file avisynth.c.

Referenced by avisynth_read_packet_video().

#define avs_is_yv411 (   vi)    0

Definition at line 58 of file avisynth.c.

Referenced by avisynth_read_packet_video().

#define AVSC_DECLARE_FUNC (   name)    name##_func name

Definition at line 64 of file avisynth.c.

#define AVSC_NO_DECLSPEC

Definition at line 26 of file avisynth.c.

#define FreeLibrary   dlclose

Definition at line 51 of file avisynth.c.

Referenced by avisynth_atexit_handler(), and avisynth_load_library().

#define GetProcAddress   dlsym

Definition at line 50 of file avisynth.c.

Referenced by w32thread_init().

#define LOAD_AVS_FUNC (   name,
  continue_on_fail 
)
Value:
{ \
if(!continue_on_fail && !avs_library->name) \
goto fail; \
}
const char * name
Definition: avisynth_c.h:675
static AviSynthLibrary * avs_library
Definition: avisynth.c:107
initialize output if(nPeaks >3)%at least 3 peaks in spectrum for trying to find f0 nf0peaks
void * library
Definition: avisynth.c:63
#define GetProcAddress
Definition: avisynth.c:50

Referenced by avisynth_load_library().

#define LoadLibrary (   x)    dlopen(x, RTLD_NOW | RTLD_GLOBAL)

Definition at line 49 of file avisynth.c.

Referenced by avisynth_load_library().

Typedef Documentation

Definition at line 99 of file avisynth.c.

Function Documentation

static av_cold void avisynth_atexit_handler ( void  )
static

Definition at line 209 of file avisynth.c.

Referenced by avisynth_load_library().

static av_cold int avisynth_context_create ( AVFormatContext s)
static

Definition at line 158 of file avisynth.c.

Referenced by avisynth_open_file().

static av_cold void avisynth_context_destroy ( AviSynthContext avs)
static

Definition at line 186 of file avisynth.c.

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

static int avisynth_create_stream ( AVFormatContext s)
static

Definition at line 329 of file avisynth.c.

Referenced by avisynth_open_file().

static int avisynth_create_stream_audio ( AVFormatContext s,
AVStream st 
)
static

Definition at line 297 of file avisynth.c.

Referenced by avisynth_create_stream().

static int avisynth_create_stream_video ( AVFormatContext s,
AVStream st 
)
static

Definition at line 224 of file avisynth.c.

Referenced by avisynth_create_stream().

static av_cold int avisynth_load_library ( void  )
static

Definition at line 115 of file avisynth.c.

Referenced by avisynth_context_create().

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

Definition at line 391 of file avisynth.c.

Referenced by avisynth_read_packet().

static int avisynth_open_file ( AVFormatContext s)
static

Definition at line 354 of file avisynth.c.

Referenced by avisynth_read_header().

static av_cold int avisynth_read_close ( AVFormatContext s)
static

Definition at line 587 of file avisynth.c.

static av_cold int avisynth_read_header ( AVFormatContext s)
static

Definition at line 541 of file avisynth.c.

static int avisynth_read_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 557 of file avisynth.c.

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

Definition at line 479 of file avisynth.c.

Referenced by avisynth_read_packet().

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

Definition at line 407 of file avisynth.c.

Referenced by avisynth_read_packet().

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

Definition at line 596 of file avisynth.c.

Variable Documentation

int avs_atexit_called = 0
static

Definition at line 108 of file avisynth.c.

Referenced by avisynth_atexit_handler(), and avisynth_context_destroy().

AviSynthContext* avs_ctx_list = NULL
static
AviSynthLibrary* avs_library = NULL
static

Definition at line 107 of file avisynth.c.

const int avs_planes_grey[1] = {AVS_PLANAR_Y}
static

Definition at line 102 of file avisynth.c.

Referenced by avisynth_create_stream_video().

const int avs_planes_packed[1] = {0}
static

Definition at line 101 of file avisynth.c.

Referenced by avisynth_create_stream_video().

const int avs_planes_yuv[3] = {AVS_PLANAR_Y, AVS_PLANAR_U, AVS_PLANAR_V}
static

Definition at line 103 of file avisynth.c.

Referenced by avisynth_create_stream_video().

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:587
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
struct AviSynthContext AviSynthContext
Definition: avisynth.c:99
static int avisynth_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition: avisynth.c:557
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:517
static int read_packet(AVFormatContext *ctx, AVPacket *pkt)
Definition: libcdio.c:114
static int avisynth_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
Definition: avisynth.c:596
static av_cold int avisynth_read_header(AVFormatContext *s)
Definition: avisynth.c:541

Definition at line 630 of file avisynth.c.