Versions in this module Expand all Collapse all v0 v0.1.1 Aug 28, 2026 v0.1.0 Aug 23, 2026 Changes in this version + var ErrClosed = errors.New("videotoolbox: session is closed") + var ErrNALUnitLength = errors.New("videotoolbox: invalid NAL unit length prefix size") + var ErrParameterSets = errors.New("videotoolbox: incomplete parameter sets") + var ErrSample = errors.New("videotoolbox: invalid sample") + var ErrUnsupported = errors.New("videotoolbox: unsupported on this platform (darwin only)") + var ErrUnsupportedCodec = errors.New("videotoolbox: unsupported codec") + var ErrUnsupportedFormat = errors.New("videotoolbox: the decoder will not produce that pixel format") + func AnnexBToAVCC(data []byte, lengthSize int) ([]byte, error) + func ReleaseAll(frames []*Frame) + func StripStartCode(nalu []byte) []byte + type Bitstream uint8 + const AVCC + const AnnexB + func (b Bitstream) String() string + type Codec uint8 + const H264 + const HEVC + func CodecFor(sampleEntry string) (Codec, bool) + func (c Codec) String() string + type Config struct + Bitstream Bitstream + Codec Codec + Height int + NALUnitLengthSize int + PPS [][]byte + SPS [][]byte + VPS [][]byte + Width int + type Frame struct + Format PixelFormat + Height int + PTS time.Duration + Pix []byte + Stride int + Width int + func (f *Frame) Release() + func (f *Frame) Released() bool + func (f *Frame) ToRGBA(dst *image.RGBA) *image.RGBA + type Options struct + Format PixelFormat + RequireHardware bool + type PixelFormat uint32 + const BGRA + const RGBA + func (f PixelFormat) String() string + type Sample struct + Data []byte + Duration time.Duration + PTS time.Duration + type Session struct + func New(cfg Config, opts ...Options) (*Session, error) + func (s *Session) Close() error + func (s *Session) Config() Config + func (s *Session) Decode(sample Sample) ([]*Frame, error) + func (s *Session) Flush() ([]*Frame, error) + func (s *Session) Format() PixelFormat + type StatusError struct + Op string + Status int32 + func (e *StatusError) Error() string