Documentation ¶
Index ¶
- Variables
- type Chunk
- type FrameSet
- type FrameSetSequential
- type MovHash
- type MovRecord
- type MovieExtractor
- type MovieSequential
- type MultiMov
- func (mm *MultiMov) AppendMovie(mov MovRecord)
- func (mm MultiMov) Duration() time.Duration
- func (mm MultiMov) ExtractFrame(frame uint64) (image.Image, error)
- func (mm MultiMov) MovPath(hash MovHash) string
- func (mm MultiMov) NumFrames() uint64
- func (mm MultiMov) NumMovies() int
- func (mm MultiMov) Offset(frame uint64) (MovHash, uint64, error)
- type NotAFrameSetError
- type Sequence
- type SequenceElement
- type Sequential
- type SliceOfChunks
- type UInt64Slice
- type VirtualMov
Constants ¶
This section is empty.
Variables ¶
var MultiMovVersion = "0.1"
MultiMovVersion is the semantic version string for the current MultiMov JSON structure.
Functions ¶
This section is empty.
Types ¶
type Chunk ¶
type Chunk struct { Name string Description string `json:",omitempty"` Start uint64 `json:",omitempty"` End uint64 `json:",omitempty"` Frames UInt64Slice `json:",omitempty"` }
type FrameSet ¶
type FrameSet struct { Source string Chunks SliceOfChunks `json:",omitempty"` ImageName string NumFrames uint64 `json:",omitempty"` // contains filtered or unexported fields }
func LoadFrameSet ¶
LoadFrameSet reads a FrameSet...
func (*FrameSet) ChunkNames ¶
func (*FrameSet) MovFromChunk ¶
func (fs *FrameSet) MovFromChunk(name string) (VirtualMov, error)
func (FrameSet) MovieExtractor ¶
func (set FrameSet) MovieExtractor() (MovieExtractor, error)
type FrameSetSequential ¶
type FrameSetSequential struct { *FrameSet Movie MovieExtractor // contains filtered or unexported fields }
func MakeFrameSetSequential ¶
func MakeFrameSetSequential(set *FrameSet) (*FrameSetSequential, error)
func (*FrameSetSequential) Advance ¶
func (source *FrameSetSequential) Advance()
func (*FrameSetSequential) Next ¶
func (source *FrameSetSequential) Next() (image.Image, uint64, error)
func (*FrameSetSequential) Valid ¶
func (source *FrameSetSequential) Valid() error
type MovRecord ¶
type MovRecord struct { ShortName string `json:",omitempty"` Relapath string `json:",omitempty"` NumFrames uint64 `json:",omitempty"` StartTime time.Time `json:",omitempty"` Duration time.Duration `json:",omitempty"` // contains filtered or unexported fields }
MovRecord stores filepath and meta-information about a single Mov within a Multimov
func MovRecordFromLqt ¶
func MovRecordFromLqt(lqt *lazyquicktime.LazyQuicktime) MovRecord
MovRecordFromLqt creates a MovRecord given a LazyQuicktime
type MovieExtractor ¶
type MovieExtractor interface { NumFrames() uint64 Duration() time.Duration ExtractFrame(frame uint64) (image.Image, error) }
MovieExtractor is the abstract interface to a quicktime movie.
func OpenMovieExtractor ¶
func OpenMovieExtractor(path string) (MovieExtractor, error)
type MovieSequential ¶
type MovieSequential struct {
// contains filtered or unexported fields
}
Thin wrapper around a MovieExtractor which implements Sequental interface
func MakeMovieSequential ¶
func MakeMovieSequential(ext MovieExtractor) (*MovieSequential, error)
type MultiMov ¶
type MultiMov struct { Version string BaseDir string `json:",omitempty"` Movies map[MovHash]MovRecord Sequence Sequence }
MultiMov is the top-level container representing a MultiMov
func LoadMultiMov ¶
LoadMultiMov reads a MultiMov from the a path to a given JSON file. Returns a pointer to a new MultiMov if successful, or nil and an error if unsuccessful
func (*MultiMov) AppendMovie ¶
AppendMovie adds the given MovRecord to the end of the sequence in the MultiMov
func (MultiMov) Duration ¶
Duration calculates the total continuous duration within a MultiMov. The sum of all movie durations, does account for time gaps
func (MultiMov) ExtractFrame ¶
ExtractFrame extracts the specified frame from a MultiMov
func (MultiMov) NumFrames ¶
NumFrames returns the total number of frames in a MultiMov -- the sum of the number of frames in all movies within the MultiMov
type NotAFrameSetError ¶
type NotAFrameSetError struct{}
func (NotAFrameSetError) Error ¶
func (f NotAFrameSetError) Error() string
type Sequence ¶
type Sequence []SequenceElement
Sequence is a convenience type representing a slice of SequenceElements
type SequenceElement ¶
A SequenceElement represents one movie within a sequence
type Sequential ¶
A Sequential is a generic one-function interface which provides a sequence of images.
func OpenSequential ¶
func OpenSequential(path string) (Sequential, error)
type SliceOfChunks ¶
type SliceOfChunks []Chunk
func (SliceOfChunks) Less ¶
func (p SliceOfChunks) Less(i, j int) bool
func (SliceOfChunks) Swap ¶
func (p SliceOfChunks) Swap(i, j int)
type UInt64Slice ¶
type UInt64Slice []uint64
func (UInt64Slice) Len ¶
func (p UInt64Slice) Len() int
func (UInt64Slice) Less ¶
func (p UInt64Slice) Less(i, j int) bool
func (UInt64Slice) Swap ¶
func (p UInt64Slice) Swap(i, j int)
type VirtualMov ¶
type VirtualMov struct {
Offset, Length uint64
Mov MovieExtractor
}
func CreateVirtualMov ¶
func CreateVirtualMov(mov MovieExtractor, offset uint64, length uint64) (VirtualMov, error)
func (VirtualMov) Duration ¶
func (vm VirtualMov) Duration() time.Duration
func (VirtualMov) ExtractFrame ¶
func (vm VirtualMov) ExtractFrame(frame uint64) (image.Image, error)
func (VirtualMov) NumFrames ¶
func (vm VirtualMov) NumFrames() uint64