codecs

package
v0.20.18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertAVCCToAnnexB added in v0.20.2

func ConvertAVCCToAnnexB(avccReader io.Reader, annexBWriter io.Writer) error

ConvertAVCCToAnnexB length -> 00 00 00 01

func ConvertAVCCToAnnexBData added in v0.20.2

func ConvertAVCCToAnnexBData(data []byte) ([]byte, error)

ConvertAVCCToAnnexBData length -> 00 00 00 01

func ConvertAnnexBToAVCC added in v0.20.2

func ConvertAnnexBToAVCC(annexbReader io.Reader, avccWriter io.Writer) error

ConvertAnnexBToAVCC 00 00 00 01 -> length

func ConvertAnnexBToAVCCData added in v0.20.2

func ConvertAnnexBToAVCCData(data []byte) ([]byte, error)

ConvertAnnexBToAVCCData 00 00 00 01 -> length

func EmitNALUData added in v0.20.2

func EmitNALUData(data []byte, withStartCode NALUFormatType, emit func(data []byte))

func EmitNALUH264Data added in v0.20.2

func EmitNALUH264Data(data []byte, withStartCode NALUFormatType, emit func(t h264.NALUType, data []byte)) error

func EmitNALUH264Reader

func EmitNALUH264Reader(r io.Reader, typ NALUFormatType, withStartCode NALUFormatType, emit func(t h264.NALUType, data []byte)) error

func EmitNALUH265Data added in v0.20.5

func EmitNALUH265Data(data []byte, withStartCode NALUFormatType, emit func(t h265.NALUType, data []byte)) error

func EmitNALUH265Reader

func EmitNALUH265Reader(r io.Reader, typ NALUFormatType, withStartCode NALUFormatType, emit func(t h265.NALUType, data []byte)) error

func EmitNALUReaderAVCC added in v0.20.2

func EmitNALUReaderAVCC(r io.Reader, withStartCode NALUFormatType, emit func(data []byte)) error

EmitNALUReaderAVCC length

func EmitNALUReaderAnnexB added in v0.20.2

func EmitNALUReaderAnnexB(r io.Reader, withStartCode NALUFormatType, emit func(data []byte))

EmitNALUReaderAnnexB 00 00 00 01

func H264NALUType

func H264NALUType(firstByte byte) h264.NALUType

func H265NALUType

func H265NALUType(firstByte byte) h265.NALUType

func IsH264KeyFrame

func IsH264KeyFrame(t h264.NALUType) bool

func IsH265KeyFrame

func IsH265KeyFrame(t h265.NALUType) bool

func IsRTPKeyFrame

func IsRTPKeyFrame(data []byte) bool

IsRTPKeyFrame data: rtp.Packet.Payload github.com\pion\webrtc\v3@v3.1.43\pkg\media\h264writer

func NALUAVCCFormatValid added in v0.20.2

func NALUAVCCFormatValid(data []byte) bool

NALUAVCCFormatValid valid AVCC format data

Types

type H264Param added in v0.20.1

type H264Param struct {
	// contains filtered or unexported fields
}

func NewH264Param added in v0.20.1

func NewH264Param(sps []byte, pps []byte, packetMode ...int) *H264Param

func (*H264Param) GetCodecData added in v0.20.1

func (c *H264Param) GetCodecData() (h264parser.CodecData, error)

func (*H264Param) GetExtraData added in v0.20.1

func (c *H264Param) GetExtraData() ([]byte, error)

func (*H264Param) GetFmtpString added in v0.20.1

func (c *H264Param) GetFmtpString() string

func (*H264Param) GetSpsPps added in v0.20.4

func (c *H264Param) GetSpsPps() ([]byte, []byte)

func (*H264Param) Load added in v0.20.1

func (c *H264Param) Load(fmtp string)

Load a=fmtp:98 profile-level-id=42A01E;packetization-mode=1;sprop-parameter-sets=<parameter sets data>

func (*H264Param) ParseSPS added in v0.20.1

func (c *H264Param) ParseSPS() (h264parser.SPSInfo, error)

type H265Param added in v0.20.1

type H265Param struct {
	// contains filtered or unexported fields
}

func NewH265Param added in v0.20.1

func NewH265Param(vps []byte, sps []byte, pps []byte) *H265Param

func (*H265Param) GetCodecData added in v0.20.1

func (c *H265Param) GetCodecData() (h265parser.CodecData, error)

func (*H265Param) GetExtraData added in v0.20.1

func (c *H265Param) GetExtraData() ([]byte, error)

func (*H265Param) GetFmtpString added in v0.20.1

func (c *H265Param) GetFmtpString() string

func (*H265Param) GetVpsSpsPps added in v0.20.4

func (c *H265Param) GetVpsSpsPps() ([]byte, []byte, []byte)

func (*H265Param) Load added in v0.20.1

func (c *H265Param) Load(fmtp string)

func (*H265Param) ParseSPS added in v0.20.1

func (c *H265Param) ParseSPS() (h265parser.SPSInfo, error)

type NALUFormatType added in v0.20.2

type NALUFormatType int
const (
	NALUFormatNo     NALUFormatType = 0
	NALUFormatAVCC   NALUFormatType = 1 // length
	NALUFormatAnnexB NALUFormatType = 2 // 00 00 00 01 / 00 00 01
)

func GetNALUFormatType added in v0.20.2

func GetNALUFormatType(data []byte) (int, NALUFormatType)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL