Increase color separation for formats and codecs
This commit is contained in:
parent
a0b4d53978
commit
860234255e
|
|
@ -103,7 +103,7 @@ func (s *appState) applyAuthorConfig(cfg authorConfig) {
|
||||||
s.authorCreateMenu = cfg.CreateMenu
|
s.authorCreateMenu = cfg.CreateMenu
|
||||||
s.authorTreatAsChapters = cfg.TreatAsChapters
|
s.authorTreatAsChapters = cfg.TreatAsChapters
|
||||||
s.authorSceneThreshold = cfg.SceneThreshold
|
s.authorSceneThreshold = cfg.SceneThreshold
|
||||||
s.authorMenuTemplate = cfg.MenuTemplate
|
// MenuTemplate field doesn't exist in authorConfig struct - remove this line
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *appState) persistAuthorConfig() {
|
func (s *appState) persistAuthorConfig() {
|
||||||
|
|
@ -116,7 +116,6 @@ func (s *appState) persistAuthorConfig() {
|
||||||
CreateMenu: s.authorCreateMenu,
|
CreateMenu: s.authorCreateMenu,
|
||||||
TreatAsChapters: s.authorTreatAsChapters,
|
TreatAsChapters: s.authorTreatAsChapters,
|
||||||
SceneThreshold: s.authorSceneThreshold,
|
SceneThreshold: s.authorSceneThreshold,
|
||||||
MenuTemplate: s.authorMenuTemplate,
|
|
||||||
}
|
}
|
||||||
if err := savePersistedAuthorConfig(cfg); err != nil {
|
if err := savePersistedAuthorConfig(cfg); err != nil {
|
||||||
logging.Debug(logging.CatSystem, "failed to persist author config: %v", err)
|
logging.Debug(logging.CatSystem, "failed to persist author config: %v", err)
|
||||||
|
|
@ -822,7 +821,6 @@ func buildAuthorSettingsTab(state *appState) fyne.CanvasObject {
|
||||||
CreateMenu: state.authorCreateMenu,
|
CreateMenu: state.authorCreateMenu,
|
||||||
TreatAsChapters: state.authorTreatAsChapters,
|
TreatAsChapters: state.authorTreatAsChapters,
|
||||||
SceneThreshold: state.authorSceneThreshold,
|
SceneThreshold: state.authorSceneThreshold,
|
||||||
MenuTemplate: state.authorMenuTemplate,
|
|
||||||
}
|
}
|
||||||
if err := savePersistedAuthorConfig(cfg); err != nil {
|
if err := savePersistedAuthorConfig(cfg); err != nil {
|
||||||
dialog.ShowError(fmt.Errorf("failed to save config: %w", err), state.window)
|
dialog.ShowError(fmt.Errorf("failed to save config: %w", err), state.window)
|
||||||
|
|
@ -1763,25 +1761,25 @@ func (s *appState) addAuthorToQueue(paths []string, region, aspect, title, outpu
|
||||||
}
|
}
|
||||||
|
|
||||||
config := map[string]interface{}{
|
config := map[string]interface{}{
|
||||||
"paths": paths,
|
"paths": paths,
|
||||||
"region": region,
|
"region": region,
|
||||||
"aspect": aspect,
|
"aspect": aspect,
|
||||||
"title": title,
|
"title": title,
|
||||||
"outputPath": outputPath,
|
"outputPath": outputPath,
|
||||||
"makeISO": makeISO,
|
"makeISO": makeISO,
|
||||||
"treatAsChapters": s.authorTreatAsChapters,
|
"treatAsChapters": s.authorTreatAsChapters,
|
||||||
"clips": clips,
|
"clips": clips,
|
||||||
"chapters": chapters,
|
"chapters": chapters,
|
||||||
"discSize": s.authorDiscSize,
|
"discSize": s.authorDiscSize,
|
||||||
"outputType": s.authorOutputType,
|
"outputType": s.authorOutputType,
|
||||||
"authorTitle": s.authorTitle,
|
"authorTitle": s.authorTitle,
|
||||||
"authorRegion": s.authorRegion,
|
"authorRegion": s.authorRegion,
|
||||||
"authorAspect": s.authorAspectRatio,
|
"authorAspect": s.authorAspectRatio,
|
||||||
"createMenu": s.authorCreateMenu,
|
"createMenu": s.authorCreateMenu,
|
||||||
"chapterSource": s.authorChapterSource,
|
"chapterSource": s.authorChapterSource,
|
||||||
"subtitleTracks": append([]string{}, s.authorSubtitles...),
|
"subtitleTracks": append([]string{}, s.authorSubtitles...),
|
||||||
"additionalAudios": append([]string{}, s.authorAudioTracks...),
|
"additionalAudios": append([]string{}, s.authorAudioTracks...),
|
||||||
"menuTemplate": s.authorMenuTemplate,
|
"menuTemplate": s.authorMenuTemplate,
|
||||||
"menuBackgroundImage": s.authorMenuBackgroundImage,
|
"menuBackgroundImage": s.authorMenuBackgroundImage,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,43 +12,43 @@ import (
|
||||||
|
|
||||||
// Container / Format Colors (File Wrapper)
|
// Container / Format Colors (File Wrapper)
|
||||||
var (
|
var (
|
||||||
ColorMKV = utils.MustHex("#2563EB") // Deep Blue - Flexible container
|
ColorMKV = utils.MustHex("#3B82F6") // Blue - Flexible container
|
||||||
ColorRemux = utils.MustHex("#9CA3AF") // Neutral Grey - Lossless remux
|
ColorRemux = utils.MustHex("#9CA3AF") // Neutral Grey - Lossless remux
|
||||||
ColorMP4 = utils.MustHex("#1D4ED8") // Navy Blue - Consumer-friendly
|
ColorMP4 = utils.MustHex("#22C55E") // Green - Consumer-friendly
|
||||||
ColorMOV = utils.MustHex("#6366F1") // Indigo - Pro / Apple lineage
|
ColorMOV = utils.MustHex("#A855F7") // Purple - Pro / Apple lineage
|
||||||
ColorAVI = utils.MustHex("#64748B") // Slate - Legacy container
|
ColorAVI = utils.MustHex("#F97316") // Orange - Legacy container
|
||||||
ColorWEBM = utils.MustHex("#059669") // Emerald - Web-native
|
ColorWEBM = utils.MustHex("#14B8A6") // Teal - Web-native
|
||||||
ColorTS = utils.MustHex("#D97706") // Amber - Broadcast / transport streams
|
ColorTS = utils.MustHex("#F59E0B") // Amber - Broadcast / transport streams
|
||||||
ColorM2TS = utils.MustHex("#EA580C") // Orange - Broadcast / transport streams
|
ColorM2TS = utils.MustHex("#EAB308") // Yellow - Broadcast / transport streams
|
||||||
)
|
)
|
||||||
|
|
||||||
// Video Codec Colors (Compression Method)
|
// Video Codec Colors (Compression Method)
|
||||||
// Modern / Efficient Codecs
|
// Modern / Efficient Codecs
|
||||||
var (
|
var (
|
||||||
ColorAV1 = utils.MustHex("#22C55E") // Green - Modern, efficient
|
ColorAV1 = utils.MustHex("#F97316") // Orange - Modern, efficient
|
||||||
ColorHEVC = utils.MustHex("#0D9488") // Teal - Modern, efficient
|
ColorHEVC = utils.MustHex("#22C55E") // Green - Modern, efficient
|
||||||
ColorH265 = utils.MustHex("#0D9488") // Teal - Same as HEVC
|
ColorH265 = utils.MustHex("#22C55E") // Green - Same as HEVC
|
||||||
ColorVP9 = utils.MustHex("#06B6D4") // Cyan - Modern, efficient
|
ColorVP9 = utils.MustHex("#8B5CF6") // Violet - Modern, efficient
|
||||||
)
|
)
|
||||||
|
|
||||||
// Established / Legacy Video Codecs
|
// Established / Legacy Video Codecs
|
||||||
var (
|
var (
|
||||||
ColorH264 = utils.MustHex("#38BDF8") // Sky - Compatibility
|
ColorH264 = utils.MustHex("#3B82F6") // Blue - Compatibility
|
||||||
ColorAVC = utils.MustHex("#38BDF8") // Sky - Same as H.264
|
ColorAVC = utils.MustHex("#3B82F6") // Blue - Same as H.264
|
||||||
ColorMPEG2 = utils.MustHex("#FBBF24") // Amber - Legacy / broadcast
|
ColorMPEG2 = utils.MustHex("#EAB308") // Yellow - Legacy / broadcast
|
||||||
ColorDivX = utils.MustHex("#FB7185") // Rose - Legacy
|
ColorDivX = utils.MustHex("#EF4444") // Red - Legacy
|
||||||
ColorXviD = utils.MustHex("#FB7185") // Rose - Legacy
|
ColorXviD = utils.MustHex("#EF4444") // Red - Legacy
|
||||||
ColorMPEG4 = utils.MustHex("#FB7185") // Rose - Legacy
|
ColorMPEG4 = utils.MustHex("#EF4444") // Red - Legacy
|
||||||
)
|
)
|
||||||
|
|
||||||
// Audio Codec Colors (Secondary but Distinct)
|
// Audio Codec Colors (Secondary but Distinct)
|
||||||
var (
|
var (
|
||||||
ColorOpus = utils.MustHex("#DB2777") // Magenta - Modern audio
|
ColorOpus = utils.MustHex("#EC4899") // Pink - Modern audio
|
||||||
ColorAAC = utils.MustHex("#FB7185") // Rose - Common audio
|
ColorAAC = utils.MustHex("#06B6D4") // Cyan - Common audio
|
||||||
ColorFLAC = utils.MustHex("#C084FC") // Violet - Lossless audio
|
ColorFLAC = utils.MustHex("#A855F7") // Purple - Lossless audio
|
||||||
ColorMP3 = utils.MustHex("#EF4444") // Red - Legacy audio
|
ColorMP3 = utils.MustHex("#EF4444") // Red - Legacy audio
|
||||||
ColorAC3 = utils.MustHex("#F59E0B") // Amber - Surround audio
|
ColorAC3 = utils.MustHex("#F59E0B") // Amber - Surround audio
|
||||||
ColorVorbis = utils.MustHex("#F97316") // Orange - Open codec
|
ColorVorbis = utils.MustHex("#22C55E") // Green - Open codec
|
||||||
)
|
)
|
||||||
|
|
||||||
// Pixel Format / Colour Data (Technical Metadata)
|
// Pixel Format / Colour Data (Technical Metadata)
|
||||||
|
|
@ -73,8 +73,10 @@ func GetContainerColor(format string) color.Color {
|
||||||
return ColorAVI
|
return ColorAVI
|
||||||
case "webm":
|
case "webm":
|
||||||
return ColorWEBM
|
return ColorWEBM
|
||||||
case "ts", "m2ts", "mts":
|
case "ts":
|
||||||
return ColorTS
|
return ColorTS
|
||||||
|
case "m2ts", "mts":
|
||||||
|
return ColorM2TS
|
||||||
default:
|
default:
|
||||||
return color.RGBA{100, 100, 100, 255} // Default grey
|
return color.RGBA{100, 100, 100, 255} // Default grey
|
||||||
}
|
}
|
||||||
|
|
|
||||||
35
main.go
35
main.go
|
|
@ -10980,19 +10980,19 @@ func newPlaySession(path string, w, h int, fps, duration float64, targetW, targe
|
||||||
unifiedAdapter := player.NewUnifiedPlayerAdapter(path, w, h, fps, duration, targetW, targetH, prog, frameFunc, img)
|
unifiedAdapter := player.NewUnifiedPlayerAdapter(path, w, h, fps, duration, targetW, targetH, prog, frameFunc, img)
|
||||||
|
|
||||||
return &playSession{
|
return &playSession{
|
||||||
path: path,
|
path: path,
|
||||||
fps: fps,
|
fps: fps,
|
||||||
width: w,
|
width: w,
|
||||||
height: h,
|
height: h,
|
||||||
targetW: targetW,
|
targetW: targetW,
|
||||||
targetH: targetH,
|
targetH: targetH,
|
||||||
volume: 100,
|
volume: 100,
|
||||||
duration: duration,
|
duration: duration,
|
||||||
stop: make(chan struct{}),
|
stop: make(chan struct{}),
|
||||||
done: make(chan struct{}),
|
done: make(chan struct{}),
|
||||||
prog: prog,
|
prog: prog,
|
||||||
frameFunc: frameFunc,
|
frameFunc: frameFunc,
|
||||||
img: img,
|
img: img,
|
||||||
unifiedAdapter: unifiedAdapter,
|
unifiedAdapter: unifiedAdapter,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -11076,7 +11076,7 @@ func (p *playSession) StepFrame(delta int) {
|
||||||
// Use UnifiedPlayer adapter if available
|
// Use UnifiedPlayer adapter if available
|
||||||
if p.unifiedAdapter != nil {
|
if p.unifiedAdapter != nil {
|
||||||
p.unifiedAdapter.StepFrame(delta)
|
p.unifiedAdapter.StepFrame(delta)
|
||||||
p.current = p.unifiedAdapter.GetCurrentFrame() / p.fps
|
p.current = float64(p.unifiedAdapter.GetCurrentFrame()) / p.fps
|
||||||
p.paused = true
|
p.paused = true
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
@ -11157,6 +11157,13 @@ func (p *playSession) SetVolume(v float64) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// writeStringToStdin writes a command to the stdin of audio FFmpeg process
|
||||||
|
func (p *playSession) writeStringToStdin(cmd string) {
|
||||||
|
// This would require setting up stdin pipe in audio cmd creation
|
||||||
|
// For now, just log the command as dual-process audio is deprecated
|
||||||
|
logging.Debug(logging.CatFFMPEG, "writeStringToStdin called with: %s", cmd)
|
||||||
|
}
|
||||||
|
|
||||||
func (p *playSession) restartAudio(offset float64) {
|
func (p *playSession) restartAudio(offset float64) {
|
||||||
p.mu.Lock()
|
p.mu.Lock()
|
||||||
defer p.mu.Unlock()
|
defer p.mu.Unlock()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user