Skip to content

Commit

Permalink
Bump AVISYNTH_INTERFACE_VERSION to version 7.
Browse files Browse the repository at this point in the history
In honesty, this probably should have been bumped a couple of times
already during AviSynth+ development, especially after high bit
depth was added, but it never was.

Basically, if API functions in avisynth.h and/or avisynth_c.h
change in a way that breaks compatibility with previous versions,
it needs to be bumped, and when new API functions are added, it
needs to be bumped.

While I'm not sure if any breaking changes to existing functions
have happened in Plus as of yet (due to the focus on maintaining
compatibility with 2.6), we certainly have added new API functions.

This means that checking avs_get_version could be used to ensure
the presence of Plus-specific functions, as version 7 will
guarantee it (and since classic 2.6 hasn't had a release or commit
in almost four years, avs_get_version returning 7 also means you're
using Plus).  Unfortunately, the lag here means that anything that
checks for version 6 compatibility will need to use GetProcAddress
or dlsym to figure out whether it's talking to classic or Plus.
  • Loading branch information
qyot27 committed Mar 19, 2020
1 parent 6905cdb commit 40900dc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions avs_core/include/avisynth.h
Expand Up @@ -52,8 +52,8 @@



#ifndef __AVISYNTH_6_H__
#define __AVISYNTH_6_H__
#ifndef __AVISYNTH_7_H__
#define __AVISYNTH_7_H__

#include "avs/config.h"
#include "avs/capi.h"
Expand All @@ -64,7 +64,7 @@
#define __cdecl
#endif

enum { AVISYNTH_INTERFACE_VERSION = 6 };
enum { AVISYNTH_INTERFACE_VERSION = 7 };


/* Compiler-specific crap */
Expand Down Expand Up @@ -1393,4 +1393,4 @@ AVSC_API(IScriptEnvironment2*, CreateScriptEnvironment2)(int version = AVISYNTH_

#pragma pack(pop)

#endif //__AVISYNTH_6_H__
#endif //__AVISYNTH_7_H__
4 changes: 2 additions & 2 deletions avs_core/include/avisynth_c.h
Expand Up @@ -66,8 +66,8 @@
// Constants
//

#ifndef __AVISYNTH_6_H__
enum { AVISYNTH_INTERFACE_VERSION = 6 };
#ifndef __AVISYNTH_7_H__
enum { AVISYNTH_INTERFACE_VERSION = 7 };
#endif

enum {AVS_SAMPLE_INT8 = 1<<0,
Expand Down

0 comments on commit 40900dc

Please sign in to comment.