Documentation ¶
Overview ¶
Part of this code is borrowed from/inspired by https://github.com/iqhater/get-youtube-thumbnail, which is licensed by MIT license
Index ¶
- Variables
- func DownSampleTo(img image.Image, NewPixelCount int) image.Image
- func SanitizeString(drawstring string) string
- type AttributeTypeDescription
- type Manifest
- type Processor
- func (p *Processor) FileExists(filename string) bool
- func (p *Processor) GetMD5HashByte(text []byte) string
- func (p *Processor) HandleError(err error) bool
- func (p *Processor) Initialize(ctx types.NodeContext) *Processor
- func (p *Processor) LoadPluginManifest(pluginHash string) (*Manifest, error)
- func (p *Processor) Present(imageID string) (*types.MetaDef, *string)
- func (p *Processor) PresentTexture(ID *string, rsize string) (*types.MetaDef, *string)
- func (p *Processor) ProcessAsset(body io.ReadCloser) (string, error)
- func (p *Processor) ProcessFrame(body []byte) (string, error)
- func (p *Processor) ProcessImage(src []byte) (string, error)
- func (p *Processor) ProcessPlugin(body io.ReadCloser) (string, error)
- func (p *Processor) ProcessTrack(body io.ReadCloser) (string, error)
- func (p *Processor) ProcessTube(src []byte) (string, error)
- func (p *Processor) ProcessVideo(body io.ReadCloser) (string, error)
- func (p *Processor) RenderFrame(req *types.FrameRenderRequest)
- func (p *Processor) SaveWriteToFile(fname string, data []byte) error
- func (p *Processor) SaveWriteToPNG(fname string, img image.Image) error
- func (p *Processor) WriteToF(img image.Image) (error, string)
- func (p *Processor) WriteToScaled(base string, img image.Image, rsize string) error
- type TubeDesc
Constants ¶
This section is empty.
Variables ¶
View Source
var AllowedAssetsTypes map[types.Type]bool
Functions ¶
func SanitizeString ¶
Types ¶
type Manifest ¶
type Manifest struct { Name string `json:"name"` DisplayName *string `json:"displayName"` Description string `json:"description"` Version string `json:"version"` Author *string `json:"author"` Repository *string `json:"repository"` Homepage *string `json:"homepage"` License *string `json:"license"` AttributeTypes *[]AttributeTypeDescription `json:"attribute_types"` Scopes *map[string][]string `json:"scopes"` }
type Processor ¶
type Processor struct { Fontpath string Imagepath string Audiopath string Videopath string Assetpath string Pluginpath string ImPathF string ImPathS map[string]string ImageMapF *lru.Cache ImageMapS map[string]*lru.Cache PresentMutex sync.Mutex RenderQueue chan *types.FrameRenderRequest RenderDone chan *types.FrameRenderRequest ImagesRescaleInProgress sync.Map // contains filtered or unexported fields }
func NewProcessor ¶
func NewProcessor() *Processor
func (*Processor) FileExists ¶
func (*Processor) GetMD5HashByte ¶
func (*Processor) HandleError ¶
func (*Processor) Initialize ¶
func (p *Processor) Initialize(ctx types.NodeContext) *Processor
func (*Processor) LoadPluginManifest ¶
func (*Processor) PresentTexture ¶
func (*Processor) ProcessAsset ¶
func (p *Processor) ProcessAsset(body io.ReadCloser) (string, error)
func (*Processor) ProcessPlugin ¶
func (p *Processor) ProcessPlugin(body io.ReadCloser) (string, error)
func (*Processor) ProcessTrack ¶
func (p *Processor) ProcessTrack(body io.ReadCloser) (string, error)
func (*Processor) ProcessVideo ¶
func (p *Processor) ProcessVideo(body io.ReadCloser) (string, error)
func (*Processor) RenderFrame ¶
func (p *Processor) RenderFrame(req *types.FrameRenderRequest)
func (*Processor) SaveWriteToFile ¶
func (*Processor) SaveWriteToPNG ¶
Click to show internal directories.
Click to hide internal directories.