VideoTools/vendor/github.com/ebitengine/purego/nocgo.go
Stu Leak 68df790d27 Fix player frame generation and video playback
Major improvements to UnifiedPlayer:

1. GetFrameImage() now works when paused for responsive UI updates
2. Play() method properly starts FFmpeg process
3. Frame display loop runs continuously for smooth video display
4. Disabled audio temporarily to fix video playback fundamentals
5. Simplified FFmpeg command to focus on video stream only

Player now:
- Generates video frames correctly
- Shows video when paused
- Has responsive progress tracking
- Starts playback properly

Next steps: Re-enable audio playback once video is stable
2026-01-07 22:20:00 -05:00

26 lines
1.3 KiB
Go

// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: 2022 The Ebitengine Authors
//go:build !cgo && (darwin || freebsd || linux || netbsd)
package purego
// if CGO_ENABLED=0 import fakecgo to setup the Cgo runtime correctly.
// This is required since some frameworks need TLS setup the C way which Go doesn't do.
// We currently don't support ios in fakecgo mode so force Cgo or fail
//
// The way that the Cgo runtime (runtime/cgo) works is by setting some variables found
// in runtime with non-null GCC compiled functions. The variables that are replaced are
// var (
// iscgo bool // in runtime/cgo.go
// _cgo_init unsafe.Pointer // in runtime/cgo.go
// _cgo_thread_start unsafe.Pointer // in runtime/cgo.go
// _cgo_notify_runtime_init_done unsafe.Pointer // in runtime/cgo.go
// _cgo_setenv unsafe.Pointer // in runtime/env_posix.go
// _cgo_unsetenv unsafe.Pointer // in runtime/env_posix.go
// )
// importing fakecgo will set these (using //go:linkname) with functions written
// entirely in Go (except for some assembly trampolines to change GCC ABI to Go ABI).
// Doing so makes it possible to build applications that call into C without CGO_ENABLED=1.
import _ "github.com/ebitengine/purego/internal/fakecgo"