/
githubmirror
/
photoprism
Обзор
Документация
Войти
/
githubmirror
/
photoprism
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
internal/ffmpeg/exclude.go
34 строки
957 B
Michael Mayer
Video: Recognize MagicYUV in the probe and exclude the VFW wrapper #5617
31 май 2026, 00:29
31 май 2026, 00:29
9e5b941
Код
Авторство
О чём код?
package ffmpeg import ( "sync/atomic" "github.com/photoprism/photoprism/pkg/media/video" ) // excludePtr atomically holds the active FFmpeg exclude list so updates // from Config.Propagate do not tear concurrent reads on workers and CLI // commands. var excludePtr atomic.Pointer[video.Formats] // DefaultExclude is the comma-separated list of container and codec formats // that should not be processed by FFmpeg by default. var DefaultExclude string func init() { f := video.NewFormats(video.CodecMagicYUV, video.CodecVFW) excludePtr.Store(&f) DefaultExclude = f.String() } // Exclude returns the current FFmpeg exclude list. The returned map must not // be mutated; publish a new list via SetExclude instead. func Exclude() video.Formats { return *excludePtr.Load() } // SetExclude replaces the active FFmpeg exclude list atomically. The caller // must not mutate f after the call. func SetExclude(f video.Formats) { excludePtr.Store(&f) }