Promoting a few logs to Info (#921)

* Promoting a few logs to Info

Also, adding a couple of more info logs which I will remove later
after some debugging.

* mime type

* Protect pause/max layer

* notify even if not bound
This commit is contained in:
Raja Subramanian
2022-08-16 13:03:14 +05:30
committed by GitHub
parent 1d199d1efa
commit d9fdcf8c2b
6 changed files with 27 additions and 10 deletions
+3 -2
View File
@@ -597,6 +597,7 @@ func (d *DownTrack) WritePaddingRTP(bytesToSend int) int {
// Mute enables or disables media forwarding
func (d *DownTrack) Mute(muted bool) {
d.logger.Infow("setting mute", "muted", muted)
changed, maxLayers := d.forwarder.Mute(muted)
if !changed {
return
@@ -694,13 +695,13 @@ func (d *DownTrack) CloseWithFlush(flush bool) {
}
func (d *DownTrack) SetMaxSpatialLayer(spatialLayer int32) {
d.logger.Infow("setting max spatial layer", "layer", spatialLayer)
changed, maxLayers, currentLayers := d.forwarder.SetMaxSpatialLayer(spatialLayer)
if !changed {
return
}
if d.onMaxLayerChanged != nil && d.kind == webrtc.RTPCodecTypeVideo &&
maxLayers.SpatialGreaterThanOrEqual(currentLayers) && d.bound.Load() {
if d.onMaxLayerChanged != nil && d.kind == webrtc.RTPCodecTypeVideo && maxLayers.SpatialGreaterThanOrEqual(currentLayers) {
//
// Notify when new max is
// 1. Equal to current -> already locked to the new max