mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +03:00
Restructure ffmpeg (#2392)
* Refactor transcode generation * Move phash generation into separate package * Refactor image thumbnail generation * Move JSONTime to separate package * Ffmpeg refactoring * Refactor live transcoding * Refactor scene marker preview generation * Refactor preview generation * Refactor screenshot generation * Refactor sprite generation * Change ffmpeg.IsStreamable to return error * Move frame rate calculation into ffmpeg * Refactor file locking * Refactor title set during scan * Add missing lockmanager instance * Return error instead of logging in MatchContainer
This commit is contained in:
@@ -37,9 +37,11 @@ type singleton struct {
|
||||
|
||||
Paths *paths.Paths
|
||||
|
||||
FFMPEG ffmpeg.Encoder
|
||||
FFMPEG ffmpeg.FFMpeg
|
||||
FFProbe ffmpeg.FFProbe
|
||||
|
||||
ReadLockManager *fsutil.ReadLockManager
|
||||
|
||||
SessionStore *session.Store
|
||||
|
||||
JobManager *job.Manager
|
||||
@@ -77,10 +79,11 @@ func Initialize() *singleton {
|
||||
initProfiling(cfg.GetCPUProfilePath())
|
||||
|
||||
instance = &singleton{
|
||||
Config: cfg,
|
||||
Logger: l,
|
||||
DownloadStore: NewDownloadStore(),
|
||||
PluginCache: plugin.NewCache(cfg),
|
||||
Config: cfg,
|
||||
Logger: l,
|
||||
ReadLockManager: fsutil.NewReadLockManager(),
|
||||
DownloadStore: NewDownloadStore(),
|
||||
PluginCache: plugin.NewCache(cfg),
|
||||
|
||||
TxnManager: sqlite.NewTransactionManager(),
|
||||
|
||||
@@ -218,7 +221,7 @@ func initFFMPEG(ctx context.Context) error {
|
||||
}
|
||||
}
|
||||
|
||||
instance.FFMPEG = ffmpeg.Encoder(ffmpegPath)
|
||||
instance.FFMPEG = ffmpeg.FFMpeg(ffmpegPath)
|
||||
instance.FFProbe = ffmpeg.FFProbe(ffprobePath)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user