Documentation
¶
Index ¶
- Constants
- func AnnexB2AVC(b []byte) []byte
- func DecodeAnnexB(b []byte) []byte
- func DecodeStream(annexb []byte) ([]byte, int)
- func EmitNalus(nals []byte, isAVC bool, emit func([]byte))
- func EncodeAVC(nals ...[]byte) (avc []byte)
- func GetFmtpLine(avc []byte) string
- func GetParameterSet(fmtp string) (sps, pps []byte)
- func GetProfileLevelID(fmtp string) string
- func IndexFrom(b []byte, sep []byte, from int) int
- func IsKeyframe(b []byte) bool
- func Join(ps, iframe []byte) []byte
- func NALUType(b []byte) byte
- func RTPDepay(codec *core.Codec, handler core.HandlerFunc) core.HandlerFunc
- func RTPPay(mtu uint16, handler core.HandlerFunc) core.HandlerFunc
- func RepairAVC(codec *core.Codec, handler core.HandlerFunc) core.HandlerFunc
- func SplitAVC(data []byte) [][]byte
- func Types(data []byte) []byte
- type Payloader
Constants ¶
View Source
const ( NALUTypePFrame = 1 // Coded slice of a non-IDR picture NALUTypeIFrame = 5 // Coded slice of an IDR picture NALUTypeSEI = 6 // Supplemental enhancement information (SEI) NALUTypeSPS = 7 // Sequence parameter set NALUTypePPS = 8 // Picture parameter set NALUTypeAUD = 9 // Access unit delimiter )
View Source
const PSMaxSize = 128 // the biggest SPS I've seen is 48 (EZVIZ CS-CV210)
View Source
const RTPPacketVersionAVC = 0
Variables ¶
This section is empty.
Functions ¶
func AnnexB2AVC ¶ added in v1.2.0
func DecodeAnnexB ¶ added in v1.3.0
DecodeAnnexB - convert AnnexB to AVC format support unknown separator size
func DecodeStream ¶ added in v1.3.0
DecodeStream - find and return first AU in AVC format useful for processing live streams with unknown separator size
func GetFmtpLine ¶ added in v1.2.0
GetFmtpLine from SPS+PPS+IFrame in AVC format
func GetParameterSet ¶
func GetProfileLevelID ¶
GetProfileLevelID - get profile from fmtp line Some devices won't play video with high level, so limit max profile and max level. And return some profile even if fmtp line is empty.
func IsKeyframe ¶
IsKeyframe - check if any NALU in one AU is Keyframe
func RTPDepay ¶
func RTPDepay(codec *core.Codec, handler core.HandlerFunc) core.HandlerFunc
func RTPPay ¶
func RTPPay(mtu uint16, handler core.HandlerFunc) core.HandlerFunc
func RepairAVC ¶
func RepairAVC(codec *core.Codec, handler core.HandlerFunc) core.HandlerFunc
Types ¶
Click to show internal directories.
Click to hide internal directories.