lazyquicktime

package module
v0.0.0-...-bbf745e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2019 License: MIT Imports: 7 Imported by: 4

README

go-lazyquicktime

GoDoc wercker status

A simple application written using LazyFS, go-quicktime, goav nad go-prores-ffmpeg.

TODO

License

This library is under the MIT License

Documentation

Index

Constants

View Source
const Version = "v0.1.0"

Version string for the package

Variables

This section is empty.

Functions

This section is empty.

Types

type LQTPerformance

type LQTPerformance struct {
	Read, Decode time.Duration
}

type LazyQuicktime

type LazyQuicktime struct {
	Source lazyfs.FileSource
	Tree   quicktime.AtomArray
	Trak   quicktime.TRAKAtom
	Stbl   *quicktime.STBLAtom
	Mvhd   quicktime.MVHDAtom

	FileSize int64
}

LazyQuicktime stores the metadata from a Quicktime Movie extracted via a lazyFS. Stores a copy of the lazyFS to allow lazy-loading

func LoadMovMetadata

func LoadMovMetadata(file lazyfs.FileSource) (*LazyQuicktime, error)

LoadMovMetadata creates a LazyQuicktime by querying a lazyfs.FileSource.

func (*LazyQuicktime) Duration

func (mov *LazyQuicktime) Duration() time.Duration

Duration reports the length of the LazyQuicktime in seconds.

func (*LazyQuicktime) ExtractFrame

func (mov *LazyQuicktime) ExtractFrame(frame uint64) (image.Image, error)

ExtractFrame extracts an individual frame from a ProRes file as an Image

func (*LazyQuicktime) ExtractFramePerf

func (mov *LazyQuicktime) ExtractFramePerf(frame uint64) (image.Image, LQTPerformance, error)

ExtractFrame extracts an individual frame from a ProRes file as an Image

func (*LazyQuicktime) ExtractNRGBA

func (mov *LazyQuicktime) ExtractNRGBA(frame uint64) (*image.NRGBA, error)

ExtractNRGBA extracts an individual frame from a ProRes file as an image.NRGBA in its native height

func (*LazyQuicktime) ExtractNRGBAPerf

func (mov *LazyQuicktime) ExtractNRGBAPerf(frame uint64) (*image.NRGBA, LQTPerformance, error)

ExtractNRGBAPerf extracts an individual frame from a ProRes file as an image.NRGBA and also returns performance information in an LQTPerformance structure

func (*LazyQuicktime) NumFrames

func (mov *LazyQuicktime) NumFrames() uint64

NumFrames reports the number of frames in the LazyQuicktime

type MovieExtractor

type MovieExtractor interface {
	NumFrames() uint64
	Duration() time.Duration
	ExtractFrame(frame uint64) (image.Image, error)
	ExtractFramePerf(frame uint64) (image.Image, LQTPerformance, error)
}

MovieExtractor is the abstract interface to a quicktime movie.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL