Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Encoder ¶
type Encoder interface { io.Closer Encode(*image.RGBA) ([]byte, error) VideoSize() (image.Point, error) }
Encoder takes an image/frame and encodes it
type EncoderService ¶
type EncoderService struct { }
EncoderService creates instances of encoders
func (*EncoderService) NewEncoder ¶
func (*EncoderService) NewEncoder(codec VideoCodec, size image.Point, frameRate int) (Encoder, error)
NewEncoder creates an instance of an encoder of the selected codec
func (*EncoderService) Supports ¶
func (*EncoderService) Supports(codec VideoCodec) bool
Supports returns a boolean indicating if the codec is supported
type Service ¶
type Service interface { NewEncoder(codec VideoCodec, size image.Point, frameRate int) (Encoder, error) Supports(codec VideoCodec) bool }
Service creates encoder instances
func NewEncoderService ¶
func NewEncoderService() Service
NewEncoderService creates an encoder factory
type VideoCodec ¶
type VideoCodec = int
VideoCodec can be either h264 or vp8
const ( //NoCodec "zero-value" NoCodec VideoCodec = iota //H264Codec h264 H264Codec //VP8Codec vp8 VP8Codec )
Click to show internal directories.
Click to hide internal directories.