Skip to content
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

Merged
merged 16 commits into from
Jul 16, 2020
Merged

Conversation

karasusan
Copy link
Collaborator

@karasusan karasusan commented May 14, 2020

This API provides a way to control the streaming quality.

RTCRtpSendParametersRTCRtpSender.GetParameters()
RTCErrorType RTCRtpSender.SetParameters(RTCRtpSendParameters parameter)

Javascript API reference

RTCRtpSendParameters contains an array of RTCRtpEncodingParameters.
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.
image

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.
image

maxFramerate

This parameter is not implemented.

@karasusan karasusan marked this pull request as ready for review May 18, 2020 06:45
@karasusan karasusan changed the title [WIP] feat: Add API RTCRtpSender.SetParameters feat: Add API RTCRtpSender.SetParameters May 18, 2020
}

internal struct RTCRtpCodecParameters
[StructLayout(LayoutKind.Sequential)]
internal struct RTCRtpSendParametersInternal
Copy link
Contributor

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.

Copy link
Collaborator Author

@karasusan karasusan May 20, 2020

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.

struct RTCRtpSendParameters
{
uint32_t encodingsLength;
RTCRtpEncodingParameters* encodings;
char* transactionId;
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants