From 6a76b9d609fab579a3b54674f098fda06e121e49 Mon Sep 17 00:00:00 2001 From: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com> Date: Mon, 14 Oct 2024 09:59:12 +0000 Subject: [feature/OFFICIALLY UNSUPPORTED] add nowasm build tag to disable building with WebAssembly (#3429) * add experimental build-tag 'nowasm' which uses local ffmpeg / ffprobe * updated experimental support message * add comment to build script explaining build tag * add nowasm build tags to moderncsqlite files --- internal/media/ffmpeg/ffmpeg.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'internal/media/ffmpeg/ffmpeg.go') diff --git a/internal/media/ffmpeg/ffmpeg.go b/internal/media/ffmpeg/ffmpeg.go index d33fef34e..0571c029a 100644 --- a/internal/media/ffmpeg/ffmpeg.go +++ b/internal/media/ffmpeg/ffmpeg.go @@ -15,10 +15,14 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . +//go:build !nowasm + package ffmpeg import ( "context" + + "codeberg.org/gruf/go-ffmpreg/wasm" ) // ffmpegRunner limits the number of @@ -36,5 +40,7 @@ func InitFfmpeg(ctx context.Context, max int) error { // Ffmpeg runs the given arguments with an instance of ffmpeg. func Ffmpeg(ctx context.Context, args Args) (uint32, error) { - return ffmpegRunner.Run(ctx, ffmpeg, args) + return ffmpegRunner.Run(ctx, func() (uint32, error) { + return wasm.Run(ctx, runtime, ffmpeg, args) + }) } -- cgit v1.2.3