Add FFplay support to the application
Integrated FFplay functionality across the application. This includes support for setting up the FFplay path and invoking FFplay for media playback.
This commit is contained in:
13
main.go
13
main.go
@@ -36,15 +36,16 @@ func init() {
|
||||
return
|
||||
}
|
||||
|
||||
ffPathUtilities = &kernel.FFPathUtilities{FFmpeg: "", FFprobe: ""}
|
||||
ffPathUtilities = &kernel.FFPathUtilities{FFmpeg: "", FFprobe: "", FFplay: ""}
|
||||
convertorService := kernel.NewService(ffPathUtilities)
|
||||
ffplayService := kernel.NewFFplay(ffPathUtilities)
|
||||
|
||||
queue := kernel.NewQueueList()
|
||||
application = kernel.NewApp(
|
||||
appMetadata,
|
||||
localizerService,
|
||||
queue,
|
||||
kernel.NewQueueLayoutObject(queue, localizerService),
|
||||
kernel.NewQueueLayoutObject(queue, localizerService, ffplayService),
|
||||
convertorService,
|
||||
)
|
||||
}
|
||||
@@ -93,6 +94,14 @@ func main() {
|
||||
}
|
||||
ffPathUtilities.FFprobe = pathFFprobe
|
||||
|
||||
pathFFplay, err := convertorRepository.GetPathFfplay()
|
||||
if err != nil && errors.Is(err, dberror.ErrRecordNotFound) == false {
|
||||
errorView.PanicError(err)
|
||||
application.GetWindow().ShowAndRun()
|
||||
return
|
||||
}
|
||||
ffPathUtilities.FFplay = pathFFplay
|
||||
|
||||
application.RunConvertor()
|
||||
defer application.AfterClosing()
|
||||
|
||||
|
Reference in New Issue
Block a user