cognitivexr / CogStream

CogStream: a platform for distributed real-time AI-based video analytics 🧠 🤖
Apache License 2.0
7 stars 1 forks source link

Create higher-level pipeline structure in engines-go #16

Closed thrau closed 3 years ago

thrau commented 3 years ago

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
}