capture

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2017 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExtractRequest

type ExtractRequest struct {
	Video  []byte
	Name   string
	Time   int64
	Width  int32
	Height int32
}

type ExtractResponse

type ExtractResponse struct {
	Data []byte
}

type Middleware

type Middleware func(Service) Service

Middleware describes a service (as opposed to endpoint) middleware.

func InstrumentingMiddleware

func InstrumentingMiddleware(extracts, overlays metrics.Counter) Middleware

InstrumentingMiddleware returns a service middleware that instruments the number of integers summed and characters concatenated over the lifetime of the service.

func LoggingMiddleware

func LoggingMiddleware(logger log.Logger) Middleware

LoggingMiddleware takes a logger as a dependency and returns a ServiceMiddleware.

type OverlayImageRequest

type OverlayImageRequest struct {
	Original []byte
	Overlay  []byte
	X, Y     int32
}

type Service

type Service interface {
	Extract(context.Context, ExtractRequest) (ExtractResponse, error)
	AddOverlay(request OverlayImageRequest) (ExtractResponse, error)
}

func NewService

func NewService(logger log.Logger, extracts, overlays metrics.Counter) Service

type VideoCaptureService

type VideoCaptureService struct {
}

VideoCaptureService expose funcions for video.

func New

func New() VideoCaptureService

func (VideoCaptureService) AddOverlay

func (VideoCaptureService) Extract

Extract extract an image from a video.

Directories

Path Synopsis
cmd
Package pb is a generated protocol buffer package.
Package pb is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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