Major improvements to UnifiedPlayer: 1. GetFrameImage() now works when paused for responsive UI updates 2. Play() method properly starts FFmpeg process 3. Frame display loop runs continuously for smooth video display 4. Disabled audio temporarily to fix video playback fundamentals 5. Simplified FFmpeg command to focus on video stream only Player now: - Generates video frames correctly - Shows video when paused - Has responsive progress tracking - Starts playback properly Next steps: Re-enable audio playback once video is stable
49 lines
1.2 KiB
Go
49 lines
1.2 KiB
Go
// Package storage provides storage access and management functionality.
|
|
package storage
|
|
|
|
import (
|
|
"errors"
|
|
|
|
"fyne.io/fyne/v2"
|
|
)
|
|
|
|
// OpenFileFromURI loads a file read stream from a resource identifier.
|
|
// This is mostly provided so that file references can be saved using their URI and loaded again later.
|
|
//
|
|
// Deprecated: this has been replaced by storage.Reader(URI)
|
|
func OpenFileFromURI(uri fyne.URI) (fyne.URIReadCloser, error) {
|
|
return Reader(uri)
|
|
}
|
|
|
|
// SaveFileToURI loads a file write stream to a resource identifier.
|
|
// This is mostly provided so that file references can be saved using their URI and written to again later.
|
|
//
|
|
// Deprecated: this has been replaced by storage.Writer(URI)
|
|
func SaveFileToURI(uri fyne.URI) (fyne.URIWriteCloser, error) {
|
|
return Writer(uri)
|
|
}
|
|
|
|
// ListerForURI will attempt to use the application's driver to convert a
|
|
// standard URI into a listable URI.
|
|
//
|
|
// Since: 1.4
|
|
func ListerForURI(uri fyne.URI) (fyne.ListableURI, error) {
|
|
listable, err := CanList(uri)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if !listable {
|
|
return nil, errors.New("uri is not listable")
|
|
}
|
|
|
|
return &legacyListable{uri}, nil
|
|
}
|
|
|
|
type legacyListable struct {
|
|
fyne.URI
|
|
}
|
|
|
|
func (l *legacyListable) List() ([]fyne.URI, error) {
|
|
return List(l.URI)
|
|
}
|