diff --git a/protobuf/video/sfu/models/models.pb.go b/protobuf/video/sfu/models/models.pb.go index 0bf8a7d0b..cb15deefa 100644 --- a/protobuf/video/sfu/models/models.pb.go +++ b/protobuf/video/sfu/models/models.pb.go @@ -2562,7 +2562,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 int64 `protobuf:"varint,3,opt,name=avg_frame_encode_time_ms,json=avgFrameEncodeTimeMs,proto3" json:"avg_frame_encode_time_ms,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"` } @@ -2612,7 +2612,7 @@ func (x *EncodeStats) GetCodec() *Codec { return nil } -func (x *EncodeStats) GetAvgFrameEncodeTimeMs() int64 { +func (x *EncodeStats) GetAvgFrameEncodeTimeMs() float32 { if x != nil { return x.AvgFrameEncodeTimeMs } @@ -2634,8 +2634,8 @@ type DecodeStats 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"` - AvgFrameDecodeTimeMs int64 `protobuf:"varint,3,opt,name=avg_frame_decode_time_ms,json=avgFrameDecodeTimeMs,proto3" json:"avg_frame_decode_time_ms,omitempty"` - AvgFps int64 `protobuf:"varint,4,opt,name=avg_fps,json=avgFps,proto3" json:"avg_fps,omitempty"` + AvgFrameDecodeTimeMs float32 `protobuf:"fixed32,3,opt,name=avg_frame_decode_time_ms,json=avgFrameDecodeTimeMs,proto3" json:"avg_frame_decode_time_ms,omitempty"` + AvgFps float32 `protobuf:"fixed32,4,opt,name=avg_fps,json=avgFps,proto3" json:"avg_fps,omitempty"` VideoDimension *VideoDimension `protobuf:"bytes,5,opt,name=video_dimension,json=videoDimension,proto3" json:"video_dimension,omitempty"` } @@ -2685,14 +2685,14 @@ func (x *DecodeStats) GetCodec() *Codec { return nil } -func (x *DecodeStats) GetAvgFrameDecodeTimeMs() int64 { +func (x *DecodeStats) GetAvgFrameDecodeTimeMs() float32 { if x != nil { return x.AvgFrameDecodeTimeMs } return 0 } -func (x *DecodeStats) GetAvgFps() int64 { +func (x *DecodeStats) GetAvgFps() float32 { if x != nil { return x.AvgFps } @@ -2999,7 +2999,7 @@ var file_video_sfu_models_models_proto_rawDesc = []byte{ 0x75, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x63, 0x52, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x12, 0x36, 0x0a, 0x18, 0x61, 0x76, 0x67, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6d, - 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, 0x61, 0x76, 0x67, 0x46, 0x72, 0x61, 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, 0x61, 0x76, 0x67, 0x46, 0x70, 0x73, 0x22, 0xa9, 0x02, 0x0a, 0x0b, 0x44, 0x65, 0x63, 0x6f, 0x64, @@ -3013,9 +3013,9 @@ var file_video_sfu_models_models_proto_rawDesc = []byte{ 0x6c, 0x73, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x63, 0x52, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x12, 0x36, 0x0a, 0x18, 0x61, 0x76, 0x67, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, 0x64, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x14, 0x61, 0x76, 0x67, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x44, 0x65, 0x63, 0x6f, 0x64, + 0x02, 0x52, 0x14, 0x61, 0x76, 0x67, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x44, 0x65, 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, 0x61, 0x76, 0x67, 0x46, 0x70, 0x73, + 0x70, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x52, 0x06, 0x61, 0x76, 0x67, 0x46, 0x70, 0x73, 0x12, 0x50, 0x0a, 0x0f, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x64, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2e, 0x73, 0x66, 0x75, 0x2e, 0x6d, 0x6f, 0x64, diff --git a/protobuf/video/sfu/models/models.proto b/protobuf/video/sfu/models/models.proto index 5391a4be2..62a09c2b2 100644 --- a/protobuf/video/sfu/models/models.proto +++ b/protobuf/video/sfu/models/models.proto @@ -405,7 +405,7 @@ enum AppleThermalState { message EncodeStats { TrackType track_type = 1; Codec codec = 2; - int64 avg_frame_encode_time_ms = 3; + float avg_frame_encode_time_ms = 3; int64 avg_fps = 4; } @@ -413,7 +413,7 @@ message EncodeStats { message DecodeStats { TrackType track_type = 1; Codec codec = 2; - int64 avg_frame_decode_time_ms = 3; - int64 avg_fps = 4; + float avg_frame_decode_time_ms = 3; + float avg_fps = 4; VideoDimension video_dimension = 5; } diff --git a/protobuf/video/sfu/models/models_vtproto.pb.go b/protobuf/video/sfu/models/models_vtproto.pb.go index 4399ec863..097227239 100644 --- a/protobuf/video/sfu/models/models_vtproto.pb.go +++ b/protobuf/video/sfu/models/models_vtproto.pb.go @@ -1691,9 +1691,10 @@ func (m *EncodeStats) MarshalToSizedBufferVT(dAtA []byte) (int, error) { dAtA[i] = 0x20 } if m.AvgFrameEncodeTimeMs != 0 { - i = encodeVarint(dAtA, i, uint64(m.AvgFrameEncodeTimeMs)) + i -= 4 + binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.AvgFrameEncodeTimeMs)))) i-- - dAtA[i] = 0x18 + dAtA[i] = 0x1d } if m.Codec != nil { size, err := m.Codec.MarshalToSizedBufferVT(dAtA[:i]) @@ -1754,14 +1755,16 @@ func (m *DecodeStats) MarshalToSizedBufferVT(dAtA []byte) (int, error) { dAtA[i] = 0x2a } 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.AvgFrameDecodeTimeMs != 0 { - i = encodeVarint(dAtA, i, uint64(m.AvgFrameDecodeTimeMs)) + i -= 4 + binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.AvgFrameDecodeTimeMs)))) i-- - dAtA[i] = 0x18 + dAtA[i] = 0x1d } if m.Codec != nil { size, err := m.Codec.MarshalToSizedBufferVT(dAtA[:i]) @@ -2503,7 +2506,7 @@ func (m *EncodeStats) SizeVT() (n int) { n += 1 + l + sov(uint64(l)) } if m.AvgFrameEncodeTimeMs != 0 { - n += 1 + sov(uint64(m.AvgFrameEncodeTimeMs)) + n += 5 } if m.AvgFps != 0 { n += 1 + sov(uint64(m.AvgFps)) @@ -2528,10 +2531,10 @@ func (m *DecodeStats) SizeVT() (n int) { n += 1 + l + sov(uint64(l)) } if m.AvgFrameDecodeTimeMs != 0 { - n += 1 + sov(uint64(m.AvgFrameDecodeTimeMs)) + n += 5 } if m.AvgFps != 0 { - n += 1 + sov(uint64(m.AvgFps)) + n += 5 } if m.VideoDimension != nil { l = m.VideoDimension.SizeVT() @@ -6662,24 +6665,16 @@ func (m *EncodeStats) UnmarshalVT(dAtA []byte) error { } iNdEx = postIndex case 3: - if wireType != 0 { + if wireType != 5 { return fmt.Errorf("proto: wrong wireType = %d for field AvgFrameEncodeTimeMs", wireType) } - m.AvgFrameEncodeTimeMs = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AvgFrameEncodeTimeMs |= 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.AvgFrameEncodeTimeMs = float32(math.Float32frombits(v)) case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field AvgFps", wireType) @@ -6806,43 +6801,27 @@ func (m *DecodeStats) UnmarshalVT(dAtA []byte) error { } iNdEx = postIndex case 3: - if wireType != 0 { + if wireType != 5 { return fmt.Errorf("proto: wrong wireType = %d for field AvgFrameDecodeTimeMs", wireType) } - m.AvgFrameDecodeTimeMs = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AvgFrameDecodeTimeMs |= 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.AvgFrameDecodeTimeMs = 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)) case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field VideoDimension", wireType)