fix: log level

This commit is contained in:
langhuihui
2024-05-14 20:39:26 +08:00
parent de76bde317
commit e1cc2eda38
18 changed files with 950 additions and 393 deletions

View File

@@ -30,15 +30,16 @@ func (avcc *RTMPData) MarshalJSON() ([]byte, error) {
}
func (avcc *RTMPData) String() string {
return fmt.Sprintf("% 02X", avcc.Buffers.Buffers[0][:5])
reader := avcc.Buffers
first10 := avcc.Malloc(10)
reader.ReadBytesTo(first10)
defer avcc.Free(first10)
return fmt.Sprintf("%d % 02X", avcc.Timestamp, first10)
}
func (avcc *RTMPData) GetTimestamp() time.Duration {
return time.Duration(avcc.Timestamp) * time.Millisecond
}
func (avcc *RTMPData) IsIDR() bool {
return false
}
func (avcc *RTMPData) WrapAudio() *RTMPAudio {
return &RTMPAudio{RTMPData: *avcc}
@@ -46,4 +47,4 @@ func (avcc *RTMPData) WrapAudio() *RTMPAudio {
func (avcc *RTMPData) WrapVideo() *RTMPVideo {
return &RTMPVideo{RTMPData: *avcc}
}
}