encoder

package
v2.6.1 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Encoder

type Encoder interface {
	Encode(input []byte) []byte
	Shutdown() error
}

type InFrame

type InFrame struct {
	Image     *image.RGBA
	Timestamp uint32
}

type OutFrame

type OutFrame struct {
	Data      []byte
	Timestamp uint32
}

type VideoPipe added in v2.5.0

type VideoPipe struct {
	Input  chan InFrame
	Output chan OutFrame
	// contains filtered or unexported fields
}

func NewVideoPipe added in v2.5.0

func NewVideoPipe(enc Encoder, w, h int) *VideoPipe

NewVideoPipe returns new video encoder pipe. By default it waits for RGBA images on the input channel, converts them into YUV I420 format, encodes with provided video encoder, and puts the result into the output channel.

func (*VideoPipe) Start added in v2.5.0

func (vp *VideoPipe) Start()

Start begins video encoding pipe. Should be wrapped into a goroutine.

func (*VideoPipe) Stop added in v2.5.0

func (vp *VideoPipe) Stop()

Directories

Path Synopsis
Implements cgo bindings for [x264](https://www.videolan.org/developers/x264.html) library.
Implements cgo bindings for [x264](https://www.videolan.org/developers/x264.html) library.

Jump to

Keyboard shortcuts

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