encoder

package
v3.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2023 License: Apache-2.0 Imports: 5 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 {
	LoadBuf(input []byte)
	Encode() []byte
	IntraRefresh()
	Shutdown() error
}

type InFrame

type InFrame *image.RGBA

type OutFrame

type OutFrame []byte

type VideoCodec

type VideoCodec string
const (
	H264 VideoCodec = "h264"
	VP8  VideoCodec = "vp8"
)

type VideoEncoder

type VideoEncoder struct {
	// contains filtered or unexported fields
}

func NewVideoEncoder

func NewVideoEncoder(enc Encoder, w, h int, concurrency int, log *logger.Logger) *VideoEncoder

NewVideoEncoder returns new video encoder. 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 (*VideoEncoder) Encode

func (vp *VideoEncoder) Encode(img InFrame) OutFrame

func (*VideoEncoder) Stop

func (vp *VideoEncoder) Stop()

Directories

Path Synopsis
Package h264 implements cgo bindings for [x264](https://www.videolan.org/developers/x264.html) library.
Package h264 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