converter

package
v0.0.0-...-3c9401c Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2020 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertFrameToPng

func ConvertFrameToPng(r io.Reader, w io.Writer, fc *FrameContainer, encoder *png.Encoder) error

ConvertFrameToPng converts the frame referenced by the FrameContainer, has to be given source and dest files

func FrameWorker

func FrameWorker(jobsCh <-chan *FrameContainer, replyCh chan<- WorkerReply, encoder *png.Encoder)

FrameWorker is the method that is run in parallel to convert frames

Types

type FrameContainer

type FrameContainer struct {
	IsTop        bool                 // Whether the image is from the topCamera
	Path422      string               // The (rel) filename of the .422 file
	PngFileName  string               // The rel path to the .png file
	PathPngAbs   string               // The abs path to the .png file
	ImageSize422 [2]uint16            // Image dimensions of the .422 image
	ImageSize444 [2]uint16            // Image dimensions of the 444 png image
	Compression  png.CompressionLevel // Compression Level for the target image
}

FrameContainer is a container for an individual frame

type WorkerReply

type WorkerReply struct {
	Fc      *FrameContainer // A reference to the FrameContainer in question
	Success bool            // Whether conversion was a success
	Err     error           // Error value (nil if success)
	Msg     string          // The error message to print (if applicable)
}

WorkerReply is the reply sent from a FrameWorker

Jump to

Keyboard shortcuts

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