mirror of
https://github.com/pion/mediadevices.git
synced 2025-10-05 08:36:55 +08:00

Since DecoderFunc is not being used as a public API, there's no need to increase the API surface area.
15 lines
359 B
Go
15 lines
359 B
Go
package frame
|
|
|
|
import "image"
|
|
|
|
type Decoder interface {
|
|
Decode(frame []byte, width, height int) (image.Image, error)
|
|
}
|
|
|
|
// DecoderFunc is a proxy type for Decoder
|
|
type decoderFunc func(frame []byte, width, height int) (image.Image, error)
|
|
|
|
func (f decoderFunc) Decode(frame []byte, width, height int) (image.Image, error) {
|
|
return f(frame, width, height)
|
|
}
|