修复配置合并bug

This commit is contained in:
dexter
2022-02-12 21:15:14 +08:00
parent b08d03efba
commit 2c7ca7b781
18 changed files with 227 additions and 130 deletions

View File

@@ -2,18 +2,42 @@ package codec
import (
"errors"
)
type AudioCodecID byte
type VideoCodecID byte
const (
ADTS_HEADER_SIZE = 7
CodecID_AAC = 0xA
CodecID_PCMA = 7
CodecID_PCMU = 8
CodecID_H264 = 7
CodecID_H265 = 0xC
ADTS_HEADER_SIZE = 7
CodecID_AAC AudioCodecID = 0xA
CodecID_PCMA AudioCodecID = 7
CodecID_PCMU AudioCodecID = 8
CodecID_H264 VideoCodecID = 7
CodecID_H265 VideoCodecID = 0xC
)
func (codecId AudioCodecID) String() string {
switch codecId {
case CodecID_AAC:
return "aac"
case CodecID_PCMA:
return "pcma"
case CodecID_PCMU:
return "pcmu"
}
return "unknow"
}
func (codecId VideoCodecID) String() string {
switch codecId {
case CodecID_H264:
return "h264"
case CodecID_H265:
return "h265"
}
return "unknow"
}
// ISO/IEC 14496-3 38(52)/page
//
// Audio
@@ -212,5 +236,3 @@ func ParseRTPAAC(payload []byte) (result [][]byte) {
}
return
}