From 8e5a72ac5c37f26b49f5fdd02726ea13e3aac6b0 Mon Sep 17 00:00:00 2001 From: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com> Date: Fri, 23 Aug 2024 15:15:35 +0000 Subject: [performance] ffmpeg ffprobe wrapper improvements (#3225) * use a single instance of wazero runtime and compiled modules * remove test output :facepalm: * undo process-{media,emoji} changes * update test runner to include wazero compilation cache * sign drone.yml --------- Co-authored-by: tobi --- internal/media/ffmpeg.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'internal/media/ffmpeg.go') diff --git a/internal/media/ffmpeg.go b/internal/media/ffmpeg.go index f88908196..0443f95b8 100644 --- a/internal/media/ffmpeg.go +++ b/internal/media/ffmpeg.go @@ -27,7 +27,6 @@ import ( "codeberg.org/gruf/go-byteutil" - "codeberg.org/gruf/go-ffmpreg/wasm" _ffmpeg "github.com/superseriousbusiness/gotosocial/internal/media/ffmpeg" "github.com/superseriousbusiness/gotosocial/internal/gtserror" @@ -161,7 +160,7 @@ func ffmpegGenerateStatic(ctx context.Context, filepath string) (string, error) // ffmpeg calls `ffmpeg [args...]` (WASM) with directory path mounted in runtime. func ffmpeg(ctx context.Context, dirpath string, args ...string) error { var stderr byteutil.Buffer - rc, err := _ffmpeg.Ffmpeg(ctx, wasm.Args{ + rc, err := _ffmpeg.Ffmpeg(ctx, _ffmpeg.Args{ Stderr: &stderr, Args: args, Config: func(modcfg wazero.ModuleConfig) wazero.ModuleConfig { @@ -188,7 +187,7 @@ func ffprobe(ctx context.Context, filepath string) (*result, error) { dirpath := path.Dir(filepath) // Run ffprobe on our given file at path. - _, err := _ffmpeg.Ffprobe(ctx, wasm.Args{ + _, err := _ffmpeg.Ffprobe(ctx, _ffmpeg.Args{ Stdout: &stdout, Args: []string{ -- cgit v1.2.3