mirror of
https://github.com/langhuihui/monibuca.git
synced 2025-10-08 15:30:14 +08:00
feat: grpc support
This commit is contained in:
@@ -29,6 +29,10 @@ func (avcc *RTMPData) GetSize() int {
|
||||
return avcc.Length
|
||||
}
|
||||
|
||||
func (avcc *RTMPData) MarshalJSON() ([]byte, error) {
|
||||
return []byte(fmt.Sprintf(`{"Timestamp":%d,"Size":%d,"Data":"%s"}`, avcc.Timestamp, avcc.Length, avcc.Print())), nil
|
||||
}
|
||||
|
||||
func (avcc *RTMPData) Print() string {
|
||||
return fmt.Sprintf("% 02X", avcc.Buffers.Buffers[0][:5])
|
||||
}
|
||||
|
Reference in New Issue
Block a user