Documentation
¶
Overview ¶
Package thumbnailer can be used to create either a series of thumbnail images or a single thumbnail image with the CreateFromLoader() and SingleFrameFromRewindState() functions respsectively.
The CreateFromLodaer() function will run asynchronously and is good for generating just the images from a new emulation.
The SingleFrameFromRewindState() function meanwhile, is more limited and is used to generate a single TV frame starting from the supplied rewind state.
Index ¶
- Constants
- type Anim
- func (thmb *Anim) CartYield(yield coprocessor.CoProcYieldType) coprocessor.YieldHookResponse
- func (thmb *Anim) Create(cartload cartridgeloader.Loader, numFrames int)
- func (thmb *Anim) EndCreation()
- func (thmb *Anim) EndRendering() error
- func (thmb *Anim) IsEmulating() bool
- func (thmb *Anim) NewFrame(frameInfo television.FrameInfo) error
- func (thmb *Anim) NewScanline(scanline int) error
- func (thmb *Anim) Reset()
- func (thmb *Anim) Resize(frameInfo television.FrameInfo) error
- func (thmb *Anim) SetPixels(sig []signal.SignalAttributes, last int) error
- func (thmb *Anim) String() string
- type Image
- func (thmb *Image) CartYield(yield coprocessor.CoProcYieldType) coprocessor.YieldHookResponse
- func (thmb *Image) Create(state *rewind.State)
- func (thmb *Image) EndRendering() error
- func (thmb *Image) NewFrame(frameInfo television.FrameInfo) error
- func (thmb *Image) NewScanline(scanline int) error
- func (thmb *Image) Reset()
- func (thmb *Image) Resize(frameInfo television.FrameInfo) error
- func (thmb *Image) SetPixels(sig []signal.SignalAttributes, last int) error
- func (thmb *Image) String() string
Constants ¶
const UndefinedNumFrames = -1
UndefinedNumFrames indicates the that the thumbnailing emulation should run until it is explicitely stopped with the EndCreation() function (or implicitely with a second call to Create())
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Anim ¶ added in v0.23.0
Anim type handles the emulation necessary for thumbnail image generation.
func NewAnim ¶ added in v0.23.0
func NewAnim(prefs *preferences.Preferences) (*Anim, error)
NewAnim is the preferred method of initialisation for the Anim type
func (*Anim) CartYield ¶ added in v0.25.0
func (thmb *Anim) CartYield(yield coprocessor.CoProcYieldType) coprocessor.YieldHookResponse
CartYield implements the coprocessor.CartYieldHook interface.
func (*Anim) Create ¶ added in v0.23.0
func (thmb *Anim) Create(cartload cartridgeloader.Loader, numFrames int)
Create will cause images to be generated by a running emulation initialised with the specified cartridge loader. The emulation will run for a number of frames before ending
func (*Anim) EndCreation ¶ added in v0.23.0
func (thmb *Anim) EndCreation()
EndCreation ends a running emulation that is creating a stream of thumbnails. Safe to use even when no emulation is running
func (*Anim) EndRendering ¶ added in v0.23.0
EndRendering implements the television.PixelRenderer interface
func (*Anim) IsEmulating ¶ added in v0.23.0
IsEmulating returns true if the thumbnail emulator is working. Useful for testing whether the cartridgeloader was an emulatable file
func (*Anim) NewFrame ¶ added in v0.23.0
func (thmb *Anim) NewFrame(frameInfo television.FrameInfo) error
NewFrame implements the television.PixelRenderer interface
func (*Anim) NewScanline ¶ added in v0.23.0
NewScanline implements the television.PixelRenderer interface
func (*Anim) Reset ¶ added in v0.23.0
func (thmb *Anim) Reset()
Reset implements the television.PixelRenderer interface
func (*Anim) Resize ¶ added in v0.23.0
func (thmb *Anim) Resize(frameInfo television.FrameInfo) error
Resize implements the television.PixelRenderer interface
type Image ¶ added in v0.23.0
Image type handles the emulation necessary for thumbnail image generation.
func NewImage ¶ added in v0.23.0
func NewImage(prefs *preferences.Preferences) (*Image, error)
NewImage is the preferred method of initialisation for the Image type
func (*Image) CartYield ¶ added in v0.25.0
func (thmb *Image) CartYield(yield coprocessor.CoProcYieldType) coprocessor.YieldHookResponse
CartYield implements the coprocessor.CartYieldHook interface.
func (*Image) Create ¶ added in v0.23.0
Create will run the thumbnailer emulation for a single frame using the state from another emultion as a starting point
The function must be called in the same goroutine as the emulation that generated the rewind.State
func (*Image) EndRendering ¶ added in v0.23.0
EndRendering implements the television.PixelRenderer interface
func (*Image) NewFrame ¶ added in v0.23.0
func (thmb *Image) NewFrame(frameInfo television.FrameInfo) error
NewFrame implements the television.PixelRenderer interface
func (*Image) NewScanline ¶ added in v0.23.0
NewScanline implements the television.PixelRenderer interface
func (*Image) Reset ¶ added in v0.23.0
func (thmb *Image) Reset()
Reset implements the television.PixelRenderer interface
func (*Image) Resize ¶ added in v0.23.0
func (thmb *Image) Resize(frameInfo television.FrameInfo) error
Resize implements the television.PixelRenderer interface