mirror of
https://github.com/odrling/Aegisub
synced 2025-04-11 22:56:02 +02:00
Merge branch 'vapoursynth' into feature
This commit is contained in:
commit
db0e79323f
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -74,7 +74,7 @@ jobs:
|
||||
name: macOS Release,
|
||||
os: macos-latest,
|
||||
buildtype: release,
|
||||
args: -Ddefault_library=static -Dbuild_osx_bundle=true -Dlocal_boost=true --force-fallback-for=ffms2
|
||||
args: -Ddefault_library=static -Dbuild_osx_bundle=true -Dlocal_boost=true -Dvapoursynth=enabled --force-fallback-for=ffms2
|
||||
}
|
||||
|
||||
steps:
|
||||
|
@ -392,7 +392,7 @@
|
||||
},
|
||||
"VapourSynth" : {
|
||||
"Log Level": "Information",
|
||||
"Default Script" : "# This default script will load a video file using LWLibavSource.\n# It requires the `lsmas` plugin.\n# See ?data/automation/vapoursynth/aegisub_vs.py for more information.\n\nimport vapoursynth as vs\nimport time\nimport aegisub_vs as a\na.set_paths(locals())\n\nclip, videoinfo = a.wrap_lwlibavsource(filename)\nclip.set_output()\n__aegi_timecodes = videoinfo[\"timecodes\"]\n__aegi_keyframes = videoinfo[\"keyframes\"]\n\n# Uncomment the first following line to read keyframes from a file when present.\n#__aegi_keyframes = a.try_get_keyframes(filename, __aegi_keyframes)\n\n# Uncomment the following line to automatically generate keyframes at scene changes. This will take some time when first loading a video.\n__aegi_keyframes = a.get_keyframes(filename, clip)\n\n# Check if the file has an audio track. This requires the `bas` plugin.\n__aegi_hasaudio = 1 if a.check_audio(filename) else 0"
|
||||
"Default Script" : "# This default script will load a video file using LWLibavSource.\n# It requires the `lsmas` plugin.\n# See ?data/automation/vapoursynth/aegisub_vs.py for more information.\n\nimport vapoursynth as vs\nimport time\nimport aegisub_vs as a\na.set_paths(locals())\n\nclip, videoinfo = a.wrap_lwlibavsource(filename)\nclip.set_output()\n__aegi_timecodes = videoinfo[\"timecodes\"]\n__aegi_keyframes = videoinfo[\"keyframes\"]\n\n# Uncomment the first following line to read keyframes from a file when present.\n#__aegi_keyframes = a.try_get_keyframes(filename, __aegi_keyframes)\n\n# Uncomment the following line to automatically generate keyframes at scene changes. This will take some time when first loading a video.\n#__aegi_keyframes = a.get_keyframes(filename, clip)\n\n# Check if the file has an audio track. This requires the `bas` plugin.\n__aegi_hasaudio = 1 if a.check_audio(filename) else 0"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -392,7 +392,7 @@
|
||||
},
|
||||
"VapourSynth" : {
|
||||
"Log Level": "Information",
|
||||
"Default Script" : "# This default script will load a video file using LWLibavSource.\n# It requires the `lsmas` plugin.\n# See ?data/automation/vapoursynth/aegisub_vs.py for more information.\n\nimport vapoursynth as vs\nimport time\nimport aegisub_vs as a\na.set_paths(locals())\n\nclip, videoinfo = a.wrap_lwlibavsource(filename)\nclip.set_output()\n__aegi_timecodes = videoinfo[\"timecodes\"]\n__aegi_keyframes = videoinfo[\"keyframes\"]\n\n# Uncomment the first following line to read keyframes from a file when present.\n#__aegi_keyframes = a.try_get_keyframes(filename, __aegi_keyframes)\n\n# Uncomment the following line to automatically generate keyframes at scene changes. This will take some time when first loading a video.\n__aegi_keyframes = a.get_keyframes(filename, clip)\n\n# Check if the file has an audio track. This requires the `bas` plugin.\n__aegi_hasaudio = 1 if a.check_audio(filename) else 0"
|
||||
"Default Script" : "# This default script will load a video file using LWLibavSource.\n# It requires the `lsmas` plugin.\n# See ?data/automation/vapoursynth/aegisub_vs.py for more information.\n\nimport vapoursynth as vs\nimport time\nimport aegisub_vs as a\na.set_paths(locals())\n\nclip, videoinfo = a.wrap_lwlibavsource(filename)\nclip.set_output()\n__aegi_timecodes = videoinfo[\"timecodes\"]\n__aegi_keyframes = videoinfo[\"keyframes\"]\n\n# Uncomment the first following line to read keyframes from a file when present.\n#__aegi_keyframes = a.try_get_keyframes(filename, __aegi_keyframes)\n\n# Uncomment the following line to automatically generate keyframes at scene changes. This will take some time when first loading a video.\n#__aegi_keyframes = a.get_keyframes(filename, clip)\n\n# Check if the file has an audio track. This requires the `bas` plugin.\n__aegi_hasaudio = 1 if a.check_audio(filename) else 0"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -26,8 +26,6 @@
|
||||
|
||||
#include "options.h"
|
||||
|
||||
#include <mutex>
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
@ -35,7 +33,13 @@
|
||||
#ifdef _WIN32
|
||||
#define VSSCRIPT_SO "vsscript.dll"
|
||||
#else
|
||||
#ifdef __APPLE__
|
||||
#define VSSCRIPT_SO "libvapoursynth-script.dylib"
|
||||
#define DLOPEN_FLAGS RTLD_LAZY | RTLD_GLOBAL
|
||||
#else
|
||||
#define VSSCRIPT_SO "libvapoursynth-script.so"
|
||||
#define DLOPEN_FLAGS RTLD_LAZY | RTLD_GLOBAL | RTLD_DEEPBIND
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Allocate storage for and initialise static members
|
||||
@ -63,7 +67,7 @@ VapourSynthWrapper::VapourSynthWrapper() {
|
||||
#undef _Lstr
|
||||
#undef CONCATENATE
|
||||
#else
|
||||
hLib = dlopen(VSSCRIPT_SO, RTLD_LAZY | RTLD_GLOBAL | RTLD_DEEPBIND);
|
||||
hLib = dlopen(VSSCRIPT_SO, DLOPEN_FLAGS);
|
||||
#endif
|
||||
|
||||
if (!hLib)
|
||||
|
@ -21,13 +21,14 @@
|
||||
|
||||
#ifdef WITH_VAPOURSYNTH
|
||||
|
||||
#include <mutex>
|
||||
|
||||
#include <libaegisub/exception.h>
|
||||
|
||||
DEFINE_EXCEPTION(VapourSynthError, agi::Exception);
|
||||
|
||||
struct VSAPI;
|
||||
struct VSSCRIPTAPI;
|
||||
namespace std { class mutex; }
|
||||
|
||||
class VapourSynthWrapper {
|
||||
VapourSynthWrapper(VapourSynthWrapper const&);
|
||||
|
Loading…
x
Reference in New Issue
Block a user