-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add API RTCRtpSender.SetParameters #118
Conversation
9919c6d
to
83ac423
Compare
} | ||
|
||
internal struct RTCRtpCodecParameters | ||
[StructLayout(LayoutKind.Sequential)] | ||
internal struct RTCRtpSendParametersInternal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's better if we have this structure with the same name as the native one.
For the managed version, I think we can use another name,. such as ManagedRTCRtpSendParameters
, or something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with your suggestion that we have this structure in the managed code with the same name as the native one.
I am considering the name of the class in managed codes, this is the API for developers, the name is the same as the javascript one. I think this is easier to understand.
public class RTCRtpSendParameters |
I guess we can change the name of the structure in the native code and the managed one. For example, RTCRtpSendParametersStruct
or RTCRtpSendParametersData
.
com.unity.webrtc/Plugin~/WebRTCPlugin/WebRTCPlugin.cpp
Lines 468 to 473 in a40fcde
struct RTCRtpSendParameters | |
{ | |
uint32_t encodingsLength; | |
RTCRtpEncodingParameters* encodings; | |
char* transactionId; | |
}; |
a40fcde
to
6e107a1
Compare
6e107a1
to
bb4b9a9
Compare
This API provides a way to control the streaming quality.
Javascript API reference
RTCRtpSender.getParameters
RTCRtpSender.setParameters
RTCRtpSendParameters
contains an array ofRTCRtpEncodingParameters
.RTCRtpEncodingParameters
contains parameters to control video quality below.active
maxBitrate
scaleResolutionDownBy
maxFramerate
active
This flag can change on/off the streaming.
scaleResolutionDownBy
This parameter is working correctly with only the software encoder.
The factor makes possible to change the frame scale.
maxBitrate
This parameter can change the bitrate dynamically.
Add a note, this value doesn't reflect the result immediately because of the bit rate estimation.
maxFramerate
This parameter is not implemented.