Add initial implementations for encoder handling and conversion logic

Introduce encoder modules for various codecs and formats (e.g., h264_nvenc, libx264, libmp3lame). Add `Convertor` logic to retrieve supported formats via FFmpeg utilities and manage encoders for audio, video, and image processing.
This commit is contained in:
2025-06-08 17:26:17 +05:00
parent 6c0abac1c5
commit 9cdfa18fc8
42 changed files with 1242 additions and 7 deletions

View File

@@ -10,8 +10,9 @@ import (
type AppContract interface {
FyneApp() fyne.App
GetSetting() setting.SettingContract
GetProgressBarService() ProgressBarContract
GetProgressBarService() convertor.ProgressBarContract
GetFFmpegService() ffmpeg.UtilitiesContract
GetConvertorService() convertor.ConvertorContract
GetItemsToConvert() convertor.ItemsToConvertContract
GetQueueService() convertor.QueueListContract
Run()
@@ -20,19 +21,21 @@ type AppContract interface {
type application struct {
fyneApp fyne.App
setting setting.SettingContract
progressBarService ProgressBarContract
progressBarService convertor.ProgressBarContract
ffmpegService ffmpeg.UtilitiesContract
itemsToConvert convertor.ItemsToConvertContract
queueService convertor.QueueListContract
convertorService convertor.ConvertorContract
}
func NewApp(
fyneApp fyne.App,
setting setting.SettingContract,
progressBarService ProgressBarContract,
progressBarService convertor.ProgressBarContract,
ffmpegService ffmpeg.UtilitiesContract,
itemsToConvert convertor.ItemsToConvertContract,
queueService convertor.QueueListContract,
convertorService convertor.ConvertorContract,
) AppContract {
return &application{
fyneApp: fyneApp,
@@ -41,6 +44,7 @@ func NewApp(
ffmpegService: ffmpegService,
itemsToConvert: itemsToConvert,
queueService: queueService,
convertorService: convertorService,
}
}
@@ -52,7 +56,7 @@ func (a *application) GetSetting() setting.SettingContract {
return a.setting
}
func (a *application) GetProgressBarService() ProgressBarContract {
func (a *application) GetProgressBarService() convertor.ProgressBarContract {
return a.progressBarService
}
@@ -68,6 +72,10 @@ func (a *application) GetQueueService() convertor.QueueListContract {
return a.queueService
}
func (a *application) GetConvertorService() convertor.ConvertorContract {
return a.convertorService
}
func (a *application) Run() {
a.fyneApp.Run()
}