blob: 127d11fdeddbefe0be2c5c1f6468d3254cab447a (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
 | package ffmpeg
import (
	_ "embed"
	"os"
	"github.com/tetratelabs/wazero/api"
)
func init() {
	// Check for WASM source file path.
	path := os.Getenv("FFMPEG_WASM")
	if path == "" {
		return
	}
	var err error
	// Read file into memory.
	B, err = os.ReadFile(path)
	if err != nil {
		panic(err)
	}
}
// CoreFeatures is the WebAssembly Core specification
// features this embedded binary was compiled with.
const CoreFeatures = api.CoreFeatureSIMD |
	api.CoreFeatureBulkMemoryOperations |
	api.CoreFeatureNonTrappingFloatToIntConversion |
	api.CoreFeatureMutableGlobal |
	api.CoreFeatureReferenceTypes |
	api.CoreFeatureSignExtensionOps
//go:embed ffmpeg.wasm
var B []byte
 |