Format cleanup and minor fixes

- Apply go formatting across internal packages
- Clean up imports and code style
This commit is contained in:
Stu Leak 2025-12-23 21:56:47 -05:00
parent 81773c46a1
commit cf9422ad6b
6 changed files with 54 additions and 54 deletions

View File

@ -20,11 +20,11 @@ func NewDVDConfig() *DVDConvertConfig {
func (d *DVDConvertConfig) GetFFmpegArgs(inputPath, outputPath string, videoWidth, videoHeight int, videoFramerate float64, audioSampleRate int, isProgressive bool) []string {
// Create a minimal videoSource for passing to BuildDVDFFmpegArgs
tempSrc := &convert.VideoSource{
Width: videoWidth,
Height: videoHeight,
FrameRate: videoFramerate,
AudioRate: audioSampleRate,
FieldOrder: fieldOrderFromProgressive(isProgressive),
Width: videoWidth,
Height: videoHeight,
FrameRate: videoFramerate,
AudioRate: audioSampleRate,
FieldOrder: fieldOrderFromProgressive(isProgressive),
}
return convert.BuildDVDFFmpegArgs(inputPath, outputPath, d.cfg, tempSrc)
@ -59,16 +59,16 @@ func fieldOrderFromProgressive(isProgressive bool) string {
// DVDPresetInfo provides information about DVD-NTSC capability
type DVDPresetInfo struct {
Name string
Description string
VideoCodec string
AudioCodec string
Container string
Resolution string
FrameRate string
Name string
Description string
VideoCodec string
AudioCodec string
Container string
Resolution string
FrameRate string
DefaultBitrate string
MaxBitrate string
Features []string
MaxBitrate string
Features []string
}
// GetDVDPresetInfo returns detailed information about the DVD-NTSC preset

View File

@ -206,8 +206,8 @@ func normalizeFrameRate(rate float64) string {
}
// Check for common framerates with tolerance
checks := []struct {
name string
min, max float64
name string
min, max float64
}{
{"23.976", 23.9, 24.0},
{"24.0", 23.99, 24.01},

View File

@ -9,26 +9,26 @@ import (
type DVDRegion string
const (
DVDNTSCRegionFree DVDRegion = "ntsc-region-free"
DVDPALRegionFree DVDRegion = "pal-region-free"
DVDNTSCRegionFree DVDRegion = "ntsc-region-free"
DVDPALRegionFree DVDRegion = "pal-region-free"
DVDSECAMRegionFree DVDRegion = "secam-region-free"
)
// DVDStandard represents the technical specifications for a DVD encoding standard
type DVDStandard struct {
Region DVDRegion
Name string
Resolution string // "720x480" or "720x576"
FrameRate string // "29.97" or "25.00"
VideoFrames int // 30 or 25
AudioRate int // 48000 Hz (universal)
Type string // "NTSC", "PAL", or "SECAM"
Countries []string
DefaultBitrate string // "6000k" for NTSC, "8000k" for PAL
MaxBitrate string // "9000k" for NTSC, "9500k" for PAL
AspectRatios []string
InterlaceMode string // "interlaced" or "progressive"
Description string
Region DVDRegion
Name string
Resolution string // "720x480" or "720x576"
FrameRate string // "29.97" or "25.00"
VideoFrames int // 30 or 25
AudioRate int // 48000 Hz (universal)
Type string // "NTSC", "PAL", or "SECAM"
Countries []string
DefaultBitrate string // "6000k" for NTSC, "8000k" for PAL
MaxBitrate string // "9000k" for NTSC, "9500k" for PAL
AspectRatios []string
InterlaceMode string // "interlaced" or "progressive"
Description string
}
// GetDVDStandard returns specifications for a given DVD region

View File

@ -13,11 +13,11 @@ import (
// DetectionResult contains the results of interlacing analysis
type DetectionResult struct {
// Frame counts from idet filter
TFF int // Top Field First frames
BFF int // Bottom Field First frames
Progressive int // Progressive frames
Undetermined int // Undetermined frames
TotalFrames int // Total frames analyzed
TFF int // Top Field First frames
BFF int // Bottom Field First frames
Progressive int // Progressive frames
Undetermined int // Undetermined frames
TotalFrames int // Total frames analyzed
// Calculated metrics
InterlacedPercent float64 // Percentage of interlaced frames
@ -26,21 +26,21 @@ type DetectionResult struct {
Confidence string // "High", "Medium", "Low"
// Recommendations
Recommendation string // Human-readable recommendation
Recommendation string // Human-readable recommendation
SuggestDeinterlace bool // Whether deinterlacing is recommended
SuggestedFilter string // "yadif", "bwdif", etc.
}
// Detector analyzes video for interlacing
type Detector struct {
FFmpegPath string
FFmpegPath string
FFprobePath string
}
// NewDetector creates a new interlacing detector
func NewDetector(ffmpegPath, ffprobePath string) *Detector {
return &Detector{
FFmpegPath: ffmpegPath,
FFmpegPath: ffmpegPath,
FFprobePath: ffprobePath,
}
}

View File

@ -13,15 +13,15 @@ import (
// HardwareInfo contains system hardware information
type HardwareInfo struct {
CPU string `json:"cpu"`
CPUCores int `json:"cpu_cores"`
CPUMHz string `json:"cpu_mhz"`
GPU string `json:"gpu"`
GPUDriver string `json:"gpu_driver"`
RAM string `json:"ram"`
RAMMBytes uint64 `json:"ram_mb"`
OS string `json:"os"`
Arch string `json:"arch"`
CPU string `json:"cpu"`
CPUCores int `json:"cpu_cores"`
CPUMHz string `json:"cpu_mhz"`
GPU string `json:"gpu"`
GPUDriver string `json:"gpu_driver"`
RAM string `json:"ram"`
RAMMBytes uint64 `json:"ram_mb"`
OS string `json:"os"`
Arch string `json:"arch"`
}
// Detect gathers system hardware information

View File

@ -38,12 +38,12 @@ type BenchmarkProgressView struct {
textColor color.Color
onCancel func()
container *fyne.Container
statusLabel *widget.Label
progressBar *widget.ProgressBar
currentLabel *widget.Label
resultsBox *fyne.Container
cancelBtn *widget.Button
container *fyne.Container
statusLabel *widget.Label
progressBar *widget.ProgressBar
currentLabel *widget.Label
resultsBox *fyne.Container
cancelBtn *widget.Button
}
func (v *BenchmarkProgressView) build() {