cognitivexr/CogStream

Create higher-level pipeline structure in engines-go

thrau opened this issue · 0 comments

thrau commented

Something like:

package engine

import (
	"context"
	"gocv.io/x/gocv"
)

type Scanner func(ctx context.Context, src <-chan *FramePacket)
type Decoder func(ctx context.Context, src <-chan *FramePacket, dest chan<- *gocv.Mat)
type Transformer func(ctx context.Context, src <-chan *gocv.Mat, dest chan<- *gocv.Mat)
type Sink func(ctx context.Context, src <-chan *gocv.Mat)

type Pipeline struct {
	Scanner     Scanner
	Decoder     Decoder
	Transformer Transformer
	Sink        Sink
}