Set video surface size and surface ffmpeg errors
This commit is contained in:
parent
142d2f1383
commit
ab9f19095d
7
main.go
7
main.go
|
|
@ -469,6 +469,7 @@ func (s *appState) buildComparePane(src *videoSource, onStop func(), setSess fun
|
|||
stageBG := canvas.NewRectangle(utils.MustHex("#0F1529"))
|
||||
stageBG.SetMinSize(fyne.NewSize(640, 360))
|
||||
videoImg := canvas.NewImageFromResource(nil)
|
||||
videoImg.SetMinSize(fyne.NewSize(960, 540))
|
||||
// Populate a preview frame if available
|
||||
if len(src.PreviewFrames) == 0 {
|
||||
if frames, err := capturePreviewFrames(src.Path, src.Duration); err == nil && len(frames) > 0 {
|
||||
|
|
@ -3922,6 +3923,9 @@ func (p *playSession) runVideo(offset float64) {
|
|||
fmt.Printf("❌ FATAL: ffmpeg not found in PATH: %v\n", pathErr)
|
||||
}
|
||||
logging.Debug(logging.CatFFMPEG, "video start failed: %v (%s)", err, errMsg)
|
||||
fyne.Do(func() {
|
||||
dialog.ShowError(fmt.Errorf("Failed to start video decode: %v\n%s", err, errMsg), fyne.CurrentApp().Driver().AllWindows()[0])
|
||||
})
|
||||
return
|
||||
}
|
||||
fmt.Printf("✅ FFmpeg started (PID: %d) in %.3fs\n", cmd.Process.Pid, time.Since(startTime).Seconds())
|
||||
|
|
@ -3975,6 +3979,9 @@ func (p *playSession) runVideo(offset float64) {
|
|||
fmt.Printf(" FFmpeg error: %s\n", msg)
|
||||
}
|
||||
logging.Debug(logging.CatFFMPEG, "video read failed: %v (%s)", err, msg)
|
||||
fyne.Do(func() {
|
||||
dialog.ShowError(fmt.Errorf("Video decode failed: %v\n%s", err, msg), fyne.CurrentApp().Driver().AllWindows()[0])
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user