mirror of
https://github.com/pion/mediadevices.git
synced 2025-10-28 10:51:30 +08:00
Hide DecoderFunc
Since DecoderFunc is not being used as a public API, there's no need to increase the API surface area.
This commit is contained in:
@@ -5,7 +5,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func NewDecoder(f Format) (Decoder, error) {
|
func NewDecoder(f Format) (Decoder, error) {
|
||||||
var decoder DecoderFunc
|
var decoder decoderFunc
|
||||||
|
|
||||||
switch f {
|
switch f {
|
||||||
case FormatI420:
|
case FormatI420:
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ type Decoder interface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// DecoderFunc is a proxy type for Decoder
|
// DecoderFunc is a proxy type for Decoder
|
||||||
type DecoderFunc func(frame []byte, width, height int) (image.Image, error)
|
type decoderFunc func(frame []byte, width, height int) (image.Image, error)
|
||||||
|
|
||||||
func (f DecoderFunc) Decode(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)
|
return f(frame, width, height)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user