diff options
author | 2024-10-14 09:59:12 +0000 | |
---|---|---|
committer | 2024-10-14 11:59:12 +0200 | |
commit | 6a76b9d609fab579a3b54674f098fda06e121e49 (patch) | |
tree | 6fbfcaceb88c3e9a86cbd41242042e1e9fe6ee27 /internal/media/ffmpeg/runner.go | |
parent | [chore]: Bump github.com/minio/minio-go/v7 from 7.0.77 to 7.0.78 (#3431) (diff) | |
download | gotosocial-6a76b9d609fab579a3b54674f098fda06e121e49.tar.xz |
[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
Diffstat (limited to 'internal/media/ffmpeg/runner.go')
-rw-r--r-- | internal/media/ffmpeg/runner.go | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/internal/media/ffmpeg/runner.go b/internal/media/ffmpeg/runner.go index 8c59ac752..64ff6008c 100644 --- a/internal/media/ffmpeg/runner.go +++ b/internal/media/ffmpeg/runner.go @@ -19,9 +19,6 @@ package ffmpeg import ( "context" - - "codeberg.org/gruf/go-ffmpreg/wasm" - "github.com/tetratelabs/wazero" ) // runner simply abstracts away the complexities @@ -53,7 +50,7 @@ func (r *runner) Init(n int) { // Run will attempt to pass the given compiled WebAssembly module with args to run(), waiting on // the receiving runner until a free slot is available to run an instance, (if a limit is enabled). -func (r *runner) Run(ctx context.Context, cmod wazero.CompiledModule, args Args) (uint32, error) { +func (r *runner) Run(ctx context.Context, run func() (uint32, error)) (uint32, error) { select { // Context canceled. case <-ctx.Done(): @@ -66,6 +63,6 @@ func (r *runner) Run(ctx context.Context, cmod wazero.CompiledModule, args Args) // Release slot back to pool on end. defer func() { r.pool <- struct{}{} }() - // Pass to main module runner function. - return wasm.Run(ctx, runtime, cmod, args) + // Call run. + return run() } |