ipc

package
v0.0.0-...-2031ce5 Latest Latest
Warning

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

Go to latest
Published: May 8, 2020 License: AGPL-3.0, AGPL-3.0-or-later Imports: 8 Imported by: 0

Documentation

Overview

Common structures and helpers to communicate between cutechan processes. Don't import here meguca packages to keep build small.

Index

Constants

View Source
const (
	THUMB_CMD             = "cutethumb"
	THUMB_ERROR_EXIT_CODE = 100
	MAX_OBJ_LEN           = 65535
)

Variables

View Source
var (
	ErrThumbProcess     = errors.New("error generating thumbnail")
	ErrThumbUnsupported = errors.New("unsupported file format")
	ErrThumbTracks      = errors.New("unsupported track set")
)

Functions

This section is empty.

Types

type Thumb

type Thumb struct {
	HasVideo  bool
	HasAudio  bool
	HasAlpha  bool
	Mime      string
	SrcWidth  uint16
	SrcHeight uint16
	Width     uint16
	Height    uint16
	Duration  uint32
	Title     string
	Data      []byte `json:"-"`
}

func GetThumbnail

func GetThumbnail(user string, srcData []byte) (thumb *Thumb, err error)

Abstract thumbnailer IPC.

func (*Thumb) Marshal

func (t *Thumb) Marshal() (data []byte, err error)

Use LOB-alike encoding: [ VARUINT JSON LENGTH ] [ JSON ] [ DATA ] See: https://github.com/telehash/telehash.github.io/blob/master/v3/lob.md

Jump to

Keyboard shortcuts

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