Add support rawvideo format

This commit is contained in:
Alex X
2024-05-25 08:22:38 +03:00
parent 8749562c96
commit f8bc25d0ae
7 changed files with 248 additions and 3 deletions
+1
View File
@@ -18,6 +18,7 @@ const (
CodecVP9 = "VP9"
CodecAV1 = "AV1"
CodecJPEG = "JPEG" // payloadType: 26
CodecRAW = "RAW"
CodecPCMU = "PCMU" // payloadType: 0
CodecPCMA = "PCMA" // payloadType: 8
+7
View File
@@ -38,6 +38,13 @@ func RandString(size, base byte) string {
return string(b)
}
func Before(s, sep string) string {
if i := strings.Index(s, sep); i > 0 {
return s[:i]
}
return s
}
func Between(s, sub1, sub2 string) string {
i := strings.Index(s, sub1)
if i < 0 {