Documentation
¶
Index ¶
- Constants
- Variables
- type Data
- type Option
- func WithExcludedFiles(files map[string]struct{}) Option
- func WithImage(param bool) Option
- func WithMaxFileSize(param int64) Option
- func WithMaxImages(param int64) Option
- func WithMaxVideos(param int64) Option
- func WithTimeout(param time.Duration) Option
- func WithVideo(param bool) Option
- func WithVideoAccel(param VideoProcessingAccelType) Option
- type Previewer
- type Source
- type VideoParams
- type VideoProcessingAccelType
Constants ¶
View Source
const ( BigVideosQueueSize = 4 BigVideoSizeB = 500 * 1024 * 1024 BigVideoThrottleMaxOccupiedPercent = 0.9 BigVideoThrottleMaxWaiting = time.Duration(5) * time.Second )
View Source
const (
VideoPreviewCollageItems = 5
)
Variables ¶
View Source
var ( ErrCommandNotFound = errors.New("not found") ErrIncorrectFFmpegVersion = errors.New("can't be parsed") ErrOutdatedFFmpegVersion = errors.New("is outdated") ErrMetaInfoUnmarshal = errors.New("failed to decode file's meta information") ErrMetaInfoFramesCountParse = errors.New("failed to parse frames count from meta information") ErrMetaInfoDurationParse = errors.New("failed to parse duration from meta information") ErrVideoStreamNotFound = errors.New("video stream not found") ErrParseFrameRate = errors.New("failed to parse frame rate") ErrNoSupportedCodecs = errors.New("there are no supported codecs") )
View Source
var ( ErrVipsLoadImage = errors.New("failed load image") ErrImageExport = errors.New("failed export the image") )
View Source
var ( ErrVideoPreview = errors.New("failed create preview for video") ErrImagePreview = errors.New("failed create preview for image") ErrFFmpegCudaDecodersNotFound = errors.New("cuda decoders not found in ffmpeg") ErrFFmpegCudaProbe = errors.New("failed probe cuda decoders in ffmpeg") )
View Source
var (
ErrPullSnapshot = errors.New("failed to pull snapshot")
)
Functions ¶
This section is empty.
Types ¶
type Option ¶ added in v1.1.0
type Option func(*Previewer)
func WithExcludedFiles ¶ added in v1.1.0
files = map[FilePath]struct{}.
func WithMaxFileSize ¶ added in v1.1.0
func WithMaxImages ¶ added in v1.1.0
func WithMaxVideos ¶ added in v1.1.0
func WithTimeout ¶ added in v1.1.0
func WithVideoAccel ¶ added in v1.6.0
func WithVideoAccel(param VideoProcessingAccelType) Option
type Previewer ¶ added in v1.1.0
type Previewer struct {
// contains filtered or unexported fields
}
func NewPreviewer ¶ added in v1.1.0
type VideoParams ¶ added in v1.1.0
type VideoParams struct {
// contains filtered or unexported fields
}
type VideoProcessingAccelType ¶ added in v1.6.0
type VideoProcessingAccelType string
const ( Auto VideoProcessingAccelType = "auto" Software VideoProcessingAccelType = "software" Hardware VideoProcessingAccelType = "hardware" )
Click to show internal directories.
Click to hide internal directories.