mirror of
https://github.com/openlibrecommunity/olcrtc.git
synced 2026-06-05 20:09:47 +00:00
feat(log): Log frame length and codec in handleFrame, and B codec decode
failures in visual_b.go
This commit is contained in:
@@ -390,6 +390,7 @@ func (p *streamTransport) handleRemoteTrack(track *webrtc.TrackRemote, _ *webrtc
|
||||
}
|
||||
|
||||
func (p *streamTransport) handleFrame(frame []byte) {
|
||||
logger.Debugf("videochannel handleFrame: len=%d videoCodec=%s", len(frame), p.videoCodec)
|
||||
var payload []byte
|
||||
var err error
|
||||
if p.videoCodec == "b" {
|
||||
|
||||
@@ -5,6 +5,7 @@ package videochannel
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/openlibrecommunity/olcrtc/internal/logger"
|
||||
"github.com/zarazaex69/b/go"
|
||||
)
|
||||
|
||||
@@ -59,6 +60,7 @@ func extractVisualPayloadB(frame []byte, width, height int) ([]byte, error) {
|
||||
cfg := b.DefaultConfig()
|
||||
decoded, err := b.Decode(frame, uint32(width), uint32(height), cfg)
|
||||
if err != nil {
|
||||
logger.Debugf("b decode failed: %v", err)
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user