feat: add webrtc

This commit is contained in:
langhuihui
2024-04-18 09:01:09 +08:00
parent fc0d4de942
commit f4eab4cf51
24 changed files with 1145 additions and 25 deletions

View File

@@ -27,10 +27,10 @@ func (avcc *RTMPData) GetSize() int {
}
func (avcc *RTMPData) MarshalJSON() ([]byte, error) {
return []byte(fmt.Sprintf(`{"Timestamp":%d,"Size":%d,"Data":"%s"}`, avcc.Timestamp, avcc.Length, avcc.Print())), nil
return []byte(fmt.Sprintf(`{"Timestamp":%d,"Size":%d,"Data":"%s"}`, avcc.Timestamp, avcc.Length, avcc.String())), nil
}
func (avcc *RTMPData) Print() string {
func (avcc *RTMPData) String() string {
return fmt.Sprintf("% 02X", avcc.Buffers.Buffers[0][:5])
}