Documentation ¶
Index ¶
- Constants
- func ParseAsc(a *AFmtPBase) ([]byte, error)
- func ParseSpsPps(a *AFmtPBase) (sps, pps []byte, err error)
- func ParseVpsSpsPps(a *AFmtPBase) (vps, sps, pps []byte, err error)
- type AControl
- type AFmtPBase
- type ARtpMap
- type AudioInfo
- type LogicContext
- func (lc *LogicContext) GetAudioMediaType() media.AvMediaType
- func (lc *LogicContext) GetVideoMediaType() media.AvMediaType
- func (lc *LogicContext) HasAudioAControl() bool
- func (lc *LogicContext) HasVideoAControl() bool
- func (lc *LogicContext) IsAudioAvailable() bool
- func (lc *LogicContext) IsAudioPayloadType(t int) bool
- func (lc *LogicContext) IsAudioUri(uri string) bool
- func (lc *LogicContext) IsPayloadType(t int) bool
- func (lc *LogicContext) IsVideoAvailable() bool
- func (lc *LogicContext) IsVideoPayloadType(t int) bool
- func (lc *LogicContext) IsVideoUri(uri string) bool
- func (lc *LogicContext) MakeAudioSetupUri(uri string) string
- func (lc *LogicContext) MakeVideoSetupUri(uri string) string
- type M
- type MediaDesc
- type RawContext
- type VideoInfo
Constants ¶
View Source
const ( ARtpMapEncodingNameH265 = "H265" ARtpMapEncodingNameH264 = "H264" ARtpMapEncodingNameAac = "MPEG4-GENERIC" ARtpMapEncodingNameG711A = "PCMA" ARtpMapEncodingNameG711U = "PCMU" )
Variables ¶
This section is empty.
Functions ¶
func ParseVpsSpsPps ¶
Types ¶
type AFmtPBase ¶
type AFmtPBase struct { Format int // same as PayloadType Parameters map[string]string // name -> value }
func ParseAFmtPBase ¶
ParseAFmtPBase 例子见单元测试
type ARtpMap ¶
func ParseARtpMap ¶
type AudioInfo ¶
type AudioInfo struct { AudioPt media.AvMediaType SamplingFrequency int Asc []byte }
type LogicContext ¶
type LogicContext struct { RawSdp []byte AudioClockRate int VideoClockRate int Asc []byte Vps []byte Sps []byte Pps []byte AudioMediaType media.AvMediaType // 本端使用的PT值(用于代码中编码类型判断) VideoMediaType media.AvMediaType // 本端使用的PT值(用于代码中编码类型判断) // 没有用上的 HasAudio bool HasVideo bool // contains filtered or unexported fields }
func ParseSdp2LogicContext ¶
func ParseSdp2LogicContext(b []byte) (LogicContext, error)
func (*LogicContext) GetAudioMediaType ¶
func (lc *LogicContext) GetAudioMediaType() media.AvMediaType
func (*LogicContext) GetVideoMediaType ¶
func (lc *LogicContext) GetVideoMediaType() media.AvMediaType
func (*LogicContext) HasAudioAControl ¶
func (lc *LogicContext) HasAudioAControl() bool
func (*LogicContext) HasVideoAControl ¶
func (lc *LogicContext) HasVideoAControl() bool
func (*LogicContext) IsAudioAvailable ¶
func (lc *LogicContext) IsAudioAvailable() bool
func (*LogicContext) IsAudioPayloadType ¶
func (lc *LogicContext) IsAudioPayloadType(t int) bool
func (*LogicContext) IsAudioUri ¶
func (lc *LogicContext) IsAudioUri(uri string) bool
func (*LogicContext) IsPayloadType ¶
func (lc *LogicContext) IsPayloadType(t int) bool
func (*LogicContext) IsVideoAvailable ¶
func (lc *LogicContext) IsVideoAvailable() bool
func (*LogicContext) IsVideoPayloadType ¶
func (lc *LogicContext) IsVideoPayloadType(t int) bool
func (*LogicContext) IsVideoUri ¶
func (lc *LogicContext) IsVideoUri(uri string) bool
func (*LogicContext) MakeAudioSetupUri ¶
func (lc *LogicContext) MakeAudioSetupUri(uri string) string
func (*LogicContext) MakeVideoSetupUri ¶
func (lc *LogicContext) MakeVideoSetupUri(uri string) string
type RawContext ¶
type RawContext struct {
MediaDescList []MediaDesc
}
func ParseSdp2RawContext ¶
func ParseSdp2RawContext(b []byte) (RawContext, error)
ParseSdp2RawContext 例子见单元测试
type VideoInfo ¶
type VideoInfo struct { VideoPt media.AvMediaType Vps, Sps, Pps []byte }
Click to show internal directories.
Click to hide internal directories.