From ed01acf328cae1e28c86e5226007308182d82ac0 Mon Sep 17 00:00:00 2001 From: Suchith J N Date: Fri, 29 Sep 2023 13:32:56 +0530 Subject: [PATCH] add max_bitrate parameter to VideoLayerSetting --- protobuf/video/sfu/event/events.pb.go | 117 ++++++++++-------- protobuf/video/sfu/event/events.proto | 4 + protobuf/video/sfu/event/events_vtproto.pb.go | 27 ++++ 3 files changed, 96 insertions(+), 52 deletions(-) diff --git a/protobuf/video/sfu/event/events.pb.go b/protobuf/video/sfu/event/events.pb.go index 7a6f9b5b..72eb95ac 100644 --- a/protobuf/video/sfu/event/events.pb.go +++ b/protobuf/video/sfu/event/events.pb.go @@ -1829,6 +1829,9 @@ func (x *VideoMediaRequest) GetIdealFrameRate() int32 { return 0 } +// VideoLayerSetting is used to specify various parameters of a particular encoding in simulcast. +// The parameters are specified here - https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpEncodingParameters +// SDKs use these parameters sent from the server to dynamically adjust these parameters to save CPU, bandwidth type VideoLayerSetting struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1840,6 +1843,7 @@ type VideoLayerSetting struct { ScaleResolutionDownBy float32 `protobuf:"fixed32,4,opt,name=scale_resolution_down_by,json=scaleResolutionDownBy,proto3" json:"scale_resolution_down_by,omitempty"` Priority VideoLayerSetting_Priority `protobuf:"varint,5,opt,name=priority,proto3,enum=stream.video.sfu.event.VideoLayerSetting_Priority" json:"priority,omitempty"` Codec *models.Codec `protobuf:"bytes,6,opt,name=codec,proto3" json:"codec,omitempty"` + MaxFramerate uint32 `protobuf:"varint,7,opt,name=max_framerate,json=maxFramerate,proto3" json:"max_framerate,omitempty"` } func (x *VideoLayerSetting) Reset() { @@ -1916,6 +1920,13 @@ func (x *VideoLayerSetting) GetCodec() *models.Codec { return nil } +func (x *VideoLayerSetting) GetMaxFramerate() uint32 { + if x != nil { + return x.MaxFramerate + } + return 0 +} + type VideoSender struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2454,7 +2465,7 @@ var file_video_sfu_event_events_proto_rawDesc = []byte{ 0x0a, 0x69, 0x64, 0x65, 0x61, 0x6c, 0x57, 0x69, 0x64, 0x74, 0x68, 0x12, 0x28, 0x0a, 0x10, 0x69, 0x64, 0x65, 0x61, 0x6c, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x69, 0x64, 0x65, 0x61, 0x6c, 0x46, 0x72, 0x61, 0x6d, - 0x65, 0x52, 0x61, 0x74, 0x65, 0x22, 0x88, 0x03, 0x0a, 0x11, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x4c, + 0x65, 0x52, 0x61, 0x74, 0x65, 0x22, 0xad, 0x03, 0x0a, 0x11, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, @@ -2472,57 +2483,59 @@ var file_video_sfu_event_events_proto_rawDesc = []byte{ 0x79, 0x12, 0x34, 0x0a, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2e, 0x73, 0x66, 0x75, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x63, - 0x52, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x22, 0x67, 0x0a, 0x08, 0x50, 0x72, 0x69, 0x6f, 0x72, - 0x69, 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x19, 0x50, 0x52, 0x49, 0x4f, 0x52, 0x49, 0x54, 0x59, 0x5f, - 0x48, 0x49, 0x47, 0x48, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, - 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x50, 0x52, 0x49, 0x4f, 0x52, 0x49, 0x54, 0x59, 0x5f, 0x4c, - 0x4f, 0x57, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x50, 0x52, 0x49, 0x4f, 0x52, 0x49, 0x54, 0x59, - 0x5f, 0x4d, 0x45, 0x44, 0x49, 0x55, 0x4d, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x52, 0x49, - 0x4f, 0x52, 0x49, 0x54, 0x59, 0x5f, 0x56, 0x45, 0x52, 0x59, 0x5f, 0x4c, 0x4f, 0x57, 0x10, 0x03, - 0x22, 0xd6, 0x01, 0x0a, 0x0b, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x12, 0x4e, 0x0a, 0x0d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x2e, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2e, 0x73, 0x66, 0x75, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, - 0x2e, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x52, 0x0c, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x34, 0x0a, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1e, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2e, 0x73, - 0x66, 0x75, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x63, 0x52, - 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x12, 0x41, 0x0a, 0x06, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, - 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2e, 0x73, 0x66, 0x75, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, - 0x56, 0x69, 0x64, 0x65, 0x6f, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, - 0x67, 0x52, 0x06, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x22, 0xaa, 0x01, 0x0a, 0x14, 0x43, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x51, 0x75, 0x61, 0x6c, 0x69, - 0x74, 0x79, 0x12, 0x48, 0x0a, 0x0d, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x5f, 0x73, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x73, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x2e, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2e, 0x73, 0x66, 0x75, 0x2e, 0x65, 0x76, 0x65, - 0x6e, 0x74, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x52, 0x0c, - 0x61, 0x75, 0x64, 0x69, 0x6f, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x73, 0x12, 0x48, 0x0a, 0x0d, - 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x69, 0x64, - 0x65, 0x6f, 0x2e, 0x73, 0x66, 0x75, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x56, 0x69, 0x64, - 0x65, 0x6f, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x52, 0x0c, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x53, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x73, 0x22, 0x79, 0x0a, 0x11, 0x43, 0x61, 0x6c, 0x6c, 0x47, 0x72, - 0x61, 0x6e, 0x74, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x4a, 0x0a, 0x0e, 0x63, - 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x69, 0x64, - 0x65, 0x6f, 0x2e, 0x73, 0x66, 0x75, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x43, 0x61, - 0x6c, 0x6c, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, - 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x22, 0x47, 0x0a, 0x06, 0x47, 0x6f, 0x41, 0x77, 0x61, 0x79, 0x12, 0x3d, 0x0a, 0x06, 0x72, - 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x73, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2e, 0x73, 0x66, 0x75, 0x2e, 0x6d, - 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x47, 0x6f, 0x41, 0x77, 0x61, 0x79, 0x52, 0x65, 0x61, 0x73, - 0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x42, 0x64, 0x42, 0x0b, 0x53, 0x66, - 0x75, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x56, 0x31, 0x50, 0x01, 0x5a, 0x36, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x65, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f, 0x73, 0x66, 0x75, 0x2f, 0x65, 0x76, - 0x65, 0x6e, 0x74, 0xaa, 0x02, 0x1a, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x56, 0x69, 0x64, - 0x65, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x66, 0x75, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x61, 0x78, 0x5f, 0x66, + 0x72, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, + 0x6d, 0x61, 0x78, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x72, 0x61, 0x74, 0x65, 0x22, 0x67, 0x0a, 0x08, + 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x19, 0x50, 0x52, 0x49, 0x4f, + 0x52, 0x49, 0x54, 0x59, 0x5f, 0x48, 0x49, 0x47, 0x48, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x50, 0x52, 0x49, 0x4f, 0x52, + 0x49, 0x54, 0x59, 0x5f, 0x4c, 0x4f, 0x57, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x50, 0x52, 0x49, + 0x4f, 0x52, 0x49, 0x54, 0x59, 0x5f, 0x4d, 0x45, 0x44, 0x49, 0x55, 0x4d, 0x10, 0x02, 0x12, 0x15, + 0x0a, 0x11, 0x50, 0x52, 0x49, 0x4f, 0x52, 0x49, 0x54, 0x59, 0x5f, 0x56, 0x45, 0x52, 0x59, 0x5f, + 0x4c, 0x4f, 0x57, 0x10, 0x03, 0x22, 0xd6, 0x01, 0x0a, 0x0b, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x53, + 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x4e, 0x0a, 0x0d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2e, 0x73, 0x66, 0x75, 0x2e, + 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x4d, 0x65, 0x64, 0x69, 0x61, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0c, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x69, + 0x64, 0x65, 0x6f, 0x2e, 0x73, 0x66, 0x75, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x43, + 0x6f, 0x64, 0x65, 0x63, 0x52, 0x05, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x12, 0x41, 0x0a, 0x06, 0x6c, + 0x61, 0x79, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x73, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2e, 0x73, 0x66, 0x75, 0x2e, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x53, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x22, 0xaa, + 0x01, 0x0a, 0x14, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, + 0x51, 0x75, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x48, 0x0a, 0x0d, 0x61, 0x75, 0x64, 0x69, 0x6f, + 0x5f, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, + 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2e, 0x73, 0x66, + 0x75, 0x2e, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x75, 0x64, 0x69, 0x6f, 0x53, 0x65, 0x6e, + 0x64, 0x65, 0x72, 0x52, 0x0c, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, + 0x73, 0x12, 0x48, 0x0a, 0x0d, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x5f, 0x73, 0x65, 0x6e, 0x64, 0x65, + 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x2e, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2e, 0x73, 0x66, 0x75, 0x2e, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x2e, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x52, 0x0c, 0x76, + 0x69, 0x64, 0x65, 0x6f, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x73, 0x22, 0x79, 0x0a, 0x11, 0x43, + 0x61, 0x6c, 0x6c, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, + 0x12, 0x4a, 0x0a, 0x0e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x67, 0x72, 0x61, 0x6e, + 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x2e, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2e, 0x73, 0x66, 0x75, 0x2e, 0x6d, 0x6f, 0x64, 0x65, + 0x6c, 0x73, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x0d, 0x63, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x18, 0x0a, 0x07, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x47, 0x0a, 0x06, 0x47, 0x6f, 0x41, 0x77, 0x61, 0x79, + 0x12, 0x3d, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x25, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2e, + 0x73, 0x66, 0x75, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x47, 0x6f, 0x41, 0x77, 0x61, + 0x79, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x42, + 0x64, 0x42, 0x0b, 0x53, 0x66, 0x75, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x56, 0x31, 0x50, 0x01, + 0x5a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x65, 0x74, + 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x2f, 0x73, + 0x66, 0x75, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0xaa, 0x02, 0x1a, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x2e, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x66, 0x75, 0x2e, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/protobuf/video/sfu/event/events.proto b/protobuf/video/sfu/event/events.proto index 75f321da..728983f7 100644 --- a/protobuf/video/sfu/event/events.proto +++ b/protobuf/video/sfu/event/events.proto @@ -235,6 +235,9 @@ message VideoMediaRequest { } +// VideoLayerSetting is used to specify various parameters of a particular encoding in simulcast. +// The parameters are specified here - https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpEncodingParameters +// SDKs use these parameters sent from the server to dynamically adjust these parameters to save CPU, bandwidth message VideoLayerSetting { string name = 1; bool active = 2; @@ -248,6 +251,7 @@ message VideoLayerSetting { } Priority priority = 5; models.Codec codec = 6; + uint32 max_framerate = 7; } message VideoSender { diff --git a/protobuf/video/sfu/event/events_vtproto.pb.go b/protobuf/video/sfu/event/events_vtproto.pb.go index 9a52cd07..cd3c3263 100644 --- a/protobuf/video/sfu/event/events_vtproto.pb.go +++ b/protobuf/video/sfu/event/events_vtproto.pb.go @@ -1851,6 +1851,11 @@ func (m *VideoLayerSetting) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } + if m.MaxFramerate != 0 { + i = encodeVarint(dAtA, i, uint64(m.MaxFramerate)) + i-- + dAtA[i] = 0x38 + } if m.Codec != nil { if marshalto, ok := interface{}(m.Codec).(interface { MarshalToSizedBufferVT([]byte) (int, error) @@ -3005,6 +3010,9 @@ func (m *VideoLayerSetting) SizeVT() (n int) { } n += 1 + l + sov(uint64(l)) } + if m.MaxFramerate != 0 { + n += 1 + sov(uint64(m.MaxFramerate)) + } if m.unknownFields != nil { n += len(m.unknownFields) } @@ -6950,6 +6958,25 @@ func (m *VideoLayerSetting) UnmarshalVT(dAtA []byte) error { } } iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxFramerate", wireType) + } + m.MaxFramerate = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MaxFramerate |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skip(dAtA[iNdEx:])