Documentation ¶
Overview ¶
Package h265 - AVCC format related functions
Package h265 - MPEG4 format related functions
Index ¶
- Constants
- func AVCCToCodec(avcc []byte) *core.Codec
- func ConfigToCodec(conf []byte) *core.Codec
- func DecodeConfig(conf []byte) (profile, vps, sps, pps []byte)
- func DecodeStream(annexb []byte) ([]byte, int)deprecated
- func EncodeConfig(vps, sps, pps []byte) []byte
- func GetParameterSet(fmtp string) (vps, sps, pps []byte)
- func IsKeyframe(b []byte) bool
- 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 RepairAVCC(codec *core.Codec, handler core.HandlerFunc) core.HandlerFunc
- func SafariPay(mtu uint16, handler core.HandlerFunc) core.HandlerFunc
- func Types(data []byte) []byte
- type H265FragmentationUnitHeader
- type H265NALUHeader
- func (h H265NALUHeader) F() bool
- func (h H265NALUHeader) IsAggregationPacket() bool
- func (h H265NALUHeader) IsFragmentationUnit() bool
- func (h H265NALUHeader) IsPACIPacket() bool
- func (h H265NALUHeader) IsTypeVCLUnit() bool
- func (h H265NALUHeader) LayerID() uint8
- func (h H265NALUHeader) TID() uint8
- func (h H265NALUHeader) Type() uint8
- type Payloader
- type SPS
Constants ¶
const ( NALUTypePFrame = 1 NALUTypeIFrame = 19 NALUTypeIFrame2 = 20 NALUTypeIFrame3 = 21 NALUTypeVPS = 32 NALUTypeSPS = 33 NALUTypePPS = 34 NALUTypePrefixSEI = 39 NALUTypeSuffixSEI = 40 NALUTypeFU = 49 )
Variables ¶
This section is empty.
Functions ¶
func AVCCToCodec ¶ added in v1.7.0
func ConfigToCodec ¶ added in v1.8.5
func DecodeConfig ¶ added in v1.8.5
func DecodeStream
deprecated
added in
v1.5.0
func EncodeConfig ¶ added in v1.7.0
func GetParameterSet ¶
func IsKeyframe ¶
func RTPDepay ¶
func RTPDepay(codec *core.Codec, handler core.HandlerFunc) core.HandlerFunc
func RTPPay ¶ added in v1.2.0
func RTPPay(mtu uint16, handler core.HandlerFunc) core.HandlerFunc
func RepairAVCC ¶ added in v1.8.5
func RepairAVCC(codec *core.Codec, handler core.HandlerFunc) core.HandlerFunc
func SafariPay ¶
func SafariPay(mtu uint16, handler core.HandlerFunc) core.HandlerFunc
SafariPay - generate Safari friendly payload for H265 https://github.com/AlexxIT/Blog/issues/5
Types ¶
type H265FragmentationUnitHeader ¶ added in v1.2.0
type H265FragmentationUnitHeader uint8
H265FragmentationUnitHeader is a H265 FU Header +---------------+ |0|1|2|3|4|5|6|7| +-+-+-+-+-+-+-+-+ |S|E| FuType | +---------------+
func (H265FragmentationUnitHeader) E ¶ added in v1.2.0
func (h H265FragmentationUnitHeader) E() bool
E represents the end of a fragmented NAL unit.
func (H265FragmentationUnitHeader) FuType ¶ added in v1.2.0
func (h H265FragmentationUnitHeader) FuType() uint8
FuType MUST be equal to the field Type of the fragmented NAL unit.
func (H265FragmentationUnitHeader) S ¶ added in v1.2.0
func (h H265FragmentationUnitHeader) S() bool
S represents the start of a fragmented NAL unit.
type H265NALUHeader ¶ added in v1.2.0
type H265NALUHeader uint16
H265NALUHeader is a H265 NAL Unit Header https://datatracker.ietf.org/doc/html/rfc7798#section-1.1.4 +---------------+---------------+
|0|1|2|3|4|5|6|7|0|1|2|3|4|5|6|7| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |F| Type | LayerID | TID | +-------------+-----------------+
func (H265NALUHeader) F ¶ added in v1.2.0
func (h H265NALUHeader) F() bool
F is the forbidden bit, should always be 0.
func (H265NALUHeader) IsAggregationPacket ¶ added in v1.2.0
func (h H265NALUHeader) IsAggregationPacket() bool
IsAggregationPacket returns whether or not the packet is an Aggregation packet.
func (H265NALUHeader) IsFragmentationUnit ¶ added in v1.2.0
func (h H265NALUHeader) IsFragmentationUnit() bool
IsFragmentationUnit returns whether or not the packet is a Fragmentation Unit packet.
func (H265NALUHeader) IsPACIPacket ¶ added in v1.2.0
func (h H265NALUHeader) IsPACIPacket() bool
IsPACIPacket returns whether or not the packet is a PACI packet.
func (H265NALUHeader) IsTypeVCLUnit ¶ added in v1.2.0
func (h H265NALUHeader) IsTypeVCLUnit() bool
IsTypeVCLUnit returns whether or not the NAL Unit type is a VCL NAL unit.
func (H265NALUHeader) LayerID ¶ added in v1.2.0
func (h H265NALUHeader) LayerID() uint8
LayerID should always be 0 in non-3D HEVC context.
func (H265NALUHeader) TID ¶ added in v1.2.0
func (h H265NALUHeader) TID() uint8
TID is the temporal identifier of the NAL unit +1.