Documentation
¶
Overview ¶
Package mpeg4 implements an MPEG-4 Part 2 Visual decoder.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrInvalid reports malformed data. ErrInvalid = errors.New("mpeg4: invalid data") // ErrUnsupported reports a well-formed stream that uses a tool this package does not decode. ErrUnsupported = errors.New("mpeg4: unsupported") )
Functions ¶
This section is empty.
Types ¶
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
Decoder decodes an MPEG-4 Part 2 Visual elementary stream.
func NewDecoder ¶
NewDecoder returns a decoder; fourcc is the container's codec tag, or empty.
type Picture ¶
type Picture struct {
// Width and Height are the displayed size.
Width, Height int
Y, Cb, Cr []uint8
StrideY, StrideC int
// SARWidth and SARHeight are the pixel aspect ratio, 0 when unknown.
SARWidth, SARHeight int
}
Picture is a decoded picture in 8-bit 4:2:0.
type Samples ¶
type Samples interface {
Len() int
SampleTime(i int) (pts time.Duration, key bool)
SampleData(i int, buf []byte) (data, config []byte, err error)
}
Samples is a track of MPEG-4 Visual samples, as a container indexes it.
type Video ¶
type Video struct {
// Decoder decodes the samples.
Decoder *Decoder
// contains filtered or unexported fields
}
Video decodes a track of samples into pictures in display order.