feat(log): Log frame length and codec in handleFrame, and B codec decode

failures in visual_b.go
This commit is contained in:
zarazaex69
2026-04-26 22:53:49 +03:00
parent fe13ba28e3
commit 12d22770b4
2 changed files with 3 additions and 0 deletions

View File

@@ -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" {

View File

@@ -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
}