diff --git a/protobuf/video/sfu/models/models.pb.go b/protobuf/video/sfu/models/models.pb.go index cb15deefa..a4caf3d2e 100644 --- a/protobuf/video/sfu/models/models.pb.go +++ b/protobuf/video/sfu/models/models.pb.go @@ -2563,7 +2563,7 @@ type EncodeStats struct { TrackType TrackType `protobuf:"varint,1,opt,name=track_type,json=trackType,proto3,enum=stream.video.sfu.models.TrackType" json:"track_type,omitempty"` Codec *Codec `protobuf:"bytes,2,opt,name=codec,proto3" json:"codec,omitempty"` AvgFrameEncodeTimeMs float32 `protobuf:"fixed32,3,opt,name=avg_frame_encode_time_ms,json=avgFrameEncodeTimeMs,proto3" json:"avg_frame_encode_time_ms,omitempty"` - AvgFps int64 `protobuf:"varint,4,opt,name=avg_fps,json=avgFps,proto3" json:"avg_fps,omitempty"` + AvgFps float32 `protobuf:"fixed32,4,opt,name=avg_fps,json=avgFps,proto3" json:"avg_fps,omitempty"` } func (x *EncodeStats) Reset() { @@ -2619,7 +2619,7 @@ func (x *EncodeStats) GetAvgFrameEncodeTimeMs() float32 { return 0 } -func (x *EncodeStats) GetAvgFps() int64 { +func (x *EncodeStats) GetAvgFps() float32 { if x != nil { return x.AvgFps } @@ -3001,7 +3001,7 @@ var file_video_sfu_models_models_proto_rawDesc = []byte{ 0x6d, 0x65, 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x14, 0x61, 0x76, 0x67, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x4d, 0x73, 0x12, 0x17, 0x0a, - 0x07, 0x61, 0x76, 0x67, 0x5f, 0x66, 0x70, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, + 0x07, 0x61, 0x76, 0x67, 0x5f, 0x66, 0x70, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x52, 0x06, 0x61, 0x76, 0x67, 0x46, 0x70, 0x73, 0x22, 0xa9, 0x02, 0x0a, 0x0b, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x41, 0x0a, 0x0a, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x73, 0x74, 0x72, diff --git a/protobuf/video/sfu/models/models.proto b/protobuf/video/sfu/models/models.proto index 62a09c2b2..46aa57135 100644 --- a/protobuf/video/sfu/models/models.proto +++ b/protobuf/video/sfu/models/models.proto @@ -406,7 +406,7 @@ message EncodeStats { TrackType track_type = 1; Codec codec = 2; float avg_frame_encode_time_ms = 3; - int64 avg_fps = 4; + float avg_fps = 4; } // DecodeStats represents the decoding statistics for a track. diff --git a/protobuf/video/sfu/models/models_vtproto.pb.go b/protobuf/video/sfu/models/models_vtproto.pb.go index 097227239..3bb3ea45d 100644 --- a/protobuf/video/sfu/models/models_vtproto.pb.go +++ b/protobuf/video/sfu/models/models_vtproto.pb.go @@ -1686,9 +1686,10 @@ func (m *EncodeStats) MarshalToSizedBufferVT(dAtA []byte) (int, error) { copy(dAtA[i:], m.unknownFields) } if m.AvgFps != 0 { - i = encodeVarint(dAtA, i, uint64(m.AvgFps)) + i -= 4 + binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.AvgFps)))) i-- - dAtA[i] = 0x20 + dAtA[i] = 0x25 } if m.AvgFrameEncodeTimeMs != 0 { i -= 4 @@ -2509,7 +2510,7 @@ func (m *EncodeStats) SizeVT() (n int) { n += 5 } if m.AvgFps != 0 { - n += 1 + sov(uint64(m.AvgFps)) + n += 5 } if m.unknownFields != nil { n += len(m.unknownFields) @@ -6676,24 +6677,16 @@ func (m *EncodeStats) UnmarshalVT(dAtA []byte) error { iNdEx += 4 m.AvgFrameEncodeTimeMs = float32(math.Float32frombits(v)) case 4: - if wireType != 0 { + if wireType != 5 { return fmt.Errorf("proto: wrong wireType = %d for field AvgFps", wireType) } - m.AvgFps = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AvgFps |= int64(b&0x7F) << shift - if b < 0x80 { - break - } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF } + v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.AvgFps = float32(math.Float32frombits(v)) default: iNdEx = preIndex skippy, err := skip(dAtA[iNdEx:])