normalize names

This commit is contained in:
aler9
2021-01-06 12:26:07 +01:00
parent 85e7127cfe
commit 8e70ac4d59
15 changed files with 117 additions and 117 deletions

View File

@@ -92,9 +92,9 @@ func (f *InterleavedFrame) Read(br *bufio.Reader) error {
channel := header[1]
f.TrackID, f.StreamType = func() (int, StreamType) {
if (channel % 2) == 0 {
return int(channel / 2), StreamTypeRtp
return int(channel / 2), StreamTypeRTP
}
return int((channel - 1) / 2), StreamTypeRtcp
return int((channel - 1) / 2), StreamTypeRTCP
}()
f.Content = f.Content[:framelen]
@@ -110,7 +110,7 @@ func (f *InterleavedFrame) Read(br *bufio.Reader) error {
func (f InterleavedFrame) Write(bw *bufio.Writer) error {
// convert TrackID and StreamType into channel
channel := func() uint8 {
if f.StreamType == StreamTypeRtp {
if f.StreamType == StreamTypeRTP {
return uint8(f.TrackID * 2)
}
return uint8((f.TrackID * 2) + 1)