Skip to content

Commit

Permalink
Merge pull request #3701 from AgoraIO/auto/sync-cn-proto-to-en-patch-…
Browse files Browse the repository at this point in the history
…1720761763
  • Loading branch information
github-actions[bot] authored Jul 12, 2024
2 parents c875520 + 0513cca commit 82f469b
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 23 deletions.
16 changes: 8 additions & 8 deletions en-US/dita/RTC-NG/API/class_externalvideoframe.dita
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,13 @@
eglContext(NULL),
eglType(EGL_CONTEXT10),
textureId(0),
metadata_buffer(NULL),
metadata_size(0),
metadataBuffer(NULL),
metadataSize(0),
alphaBuffer(NULL),
fillAlphaBuffer(false),
alphaStitchMode(0),
d3d11_texture_2d(NULL),
texture_slice_index(0){}
d3d11Texture2d(NULL),
textureSliceIndex(0){}
enum EGL_CONTEXT_TYPE {
EGL_CONTEXT10 = 0,
EGL_CONTEXT14 = 1,
Expand All @@ -130,13 +130,13 @@
EGL_CONTEXT_TYPE eglType;
int textureId;
float matrix[16];
uint8_t* metadata_buffer;
int metadata_size;
uint8_t* metadataBuffer;
int metadataSize;
uint8_t* alphaBuffer;
bool fillAlphaBuffer;
int alphaStitchMode;
void *d3d11_texture_2d;
int texture_slice_index;
void *d3d11Texture2d;
int textureSliceIndex;
};</codeblock>
<codeblock props="electron" outputclass="language-typescript">export class ExternalVideoFrame {
type?: VideoBufferType;
Expand Down
33 changes: 18 additions & 15 deletions en-US/dita/RTC-NG/API/class_videoencoderconfiguration.dita
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,17 @@
static public class AdvanceOptions {
public ENCODING_PREFERENCE encodingPreference;
public COMPRESSION_PREFERENCE compressionPreference;
public AdvanceOptions(
ENCODING_PREFERENCE encodingPreference, COMPRESSION_PREFERENCE compressionPreference) {
public boolean encodeAlpha;
public AdvanceOptions(ENCODING_PREFERENCE encodingPreference,
COMPRESSION_PREFERENCE compressionPreference, boolean encodeAlpha) {
this.encodingPreference = encodingPreference;
this.compressionPreference = compressionPreference;
this.encodeAlpha = encodeAlpha;
}
public AdvanceOptions() {
this.encodingPreference = ENCODING_PREFERENCE.PREFER_AUTO;
this.compressionPreference = COMPRESSION_PREFERENCE.PREFER_LOW_LATENCY;
this.encodeAlpha = false;
}
}
public enum DEGRADATION_PREFERENCE {
Expand Down Expand Up @@ -187,8 +190,8 @@
this.degradationPrefer = DEGRADATION_PREFERENCE.MAINTAIN_QUALITY;
this.mirrorMode = MIRROR_MODE_TYPE.MIRROR_MODE_DISABLED;
this.advanceOptions = new AdvanceOptions(
ENCODING_PREFERENCE.PREFER_AUTO, COMPRESSION_PREFERENCE.PREFER_LOW_LATENCY);
this.codecType = VIDEO_CODEC_TYPE.VIDEO_CODEC_H265;
ENCODING_PREFERENCE.PREFER_AUTO, COMPRESSION_PREFERENCE.PREFER_LOW_LATENCY, false);
this.codecType = VIDEO_CODEC_TYPE.VIDEO_CODEC_NONE;
}
public VideoEncoderConfiguration(VideoDimensions dimensions, FRAME_RATE frameRate, int bitrate,
ORIENTATION_MODE orientationMode) {
Expand All @@ -201,8 +204,8 @@
this.degradationPrefer = DEGRADATION_PREFERENCE.MAINTAIN_QUALITY;
this.mirrorMode = MIRROR_MODE_TYPE.MIRROR_MODE_DISABLED;
this.advanceOptions = new AdvanceOptions(
ENCODING_PREFERENCE.PREFER_AUTO, COMPRESSION_PREFERENCE.PREFER_LOW_LATENCY);
this.codecType = VIDEO_CODEC_TYPE.VIDEO_CODEC_H265;
ENCODING_PREFERENCE.PREFER_AUTO, COMPRESSION_PREFERENCE.PREFER_LOW_LATENCY, false);
this.codecType = VIDEO_CODEC_TYPE.VIDEO_CODEC_NONE;
}
public VideoEncoderConfiguration(VideoDimensions dimensions, FRAME_RATE frameRate, int bitrate,
ORIENTATION_MODE orientationMode, MIRROR_MODE_TYPE mirrorMode) {
Expand All @@ -215,8 +218,8 @@
this.degradationPrefer = DEGRADATION_PREFERENCE.MAINTAIN_QUALITY;
this.mirrorMode = mirrorMode;
this.advanceOptions = new AdvanceOptions(
ENCODING_PREFERENCE.PREFER_AUTO, COMPRESSION_PREFERENCE.PREFER_LOW_LATENCY);
this.codecType = VIDEO_CODEC_TYPE.VIDEO_CODEC_H265;
ENCODING_PREFERENCE.PREFER_AUTO, COMPRESSION_PREFERENCE.PREFER_LOW_LATENCY, false);
this.codecType = VIDEO_CODEC_TYPE.VIDEO_CODEC_NONE;
}
public VideoEncoderConfiguration(
int width, int height, FRAME_RATE frameRate, int bitrate, ORIENTATION_MODE orientationMode) {
Expand All @@ -229,8 +232,8 @@
this.degradationPrefer = DEGRADATION_PREFERENCE.MAINTAIN_QUALITY;
this.mirrorMode = MIRROR_MODE_TYPE.MIRROR_MODE_DISABLED;
this.advanceOptions = new AdvanceOptions(
ENCODING_PREFERENCE.PREFER_AUTO, COMPRESSION_PREFERENCE.PREFER_LOW_LATENCY);
this.codecType = VIDEO_CODEC_TYPE.VIDEO_CODEC_H265;
ENCODING_PREFERENCE.PREFER_AUTO, COMPRESSION_PREFERENCE.PREFER_LOW_LATENCY, false);
this.codecType = VIDEO_CODEC_TYPE.VIDEO_CODEC_NONE;
}
public VideoEncoderConfiguration(int width, int height, FRAME_RATE frameRate, int bitrate,
ORIENTATION_MODE orientationMode, MIRROR_MODE_TYPE mirrorMode) {
Expand All @@ -243,8 +246,8 @@
this.degradationPrefer = DEGRADATION_PREFERENCE.MAINTAIN_QUALITY;
this.mirrorMode = mirrorMode;
this.advanceOptions = new AdvanceOptions(
ENCODING_PREFERENCE.PREFER_AUTO, COMPRESSION_PREFERENCE.PREFER_LOW_LATENCY);
this.codecType = VIDEO_CODEC_TYPE.VIDEO_CODEC_H265;
ENCODING_PREFERENCE.PREFER_AUTO, COMPRESSION_PREFERENCE.PREFER_LOW_LATENCY, false);
this.codecType = VIDEO_CODEC_TYPE.VIDEO_CODEC_NONE;
}
}</codeblock>
<codeblock props="hmos" outputclass="language-arkts">export class VideoEncoderConfiguration{
Expand Down Expand Up @@ -300,7 +303,7 @@
orientationMode(m),
degradationPreference(MAINTAIN_QUALITY),
mirrorMode(mirror),
advanceOptions(PREFER_AUTO, PREFER_LOW_LATENCY) {}
advanceOptions(PREFER_AUTO, PREFER_LOW_LATENCY, false) {}
VideoEncoderConfiguration(int width, int height, int f, int b, ORIENTATION_MODE m, VIDEO_MIRROR_MODE_TYPE mirror = VIDEO_MIRROR_MODE_DISABLED)
: codecType(VIDEO_CODEC_NONE),
dimensions(width, height),
Expand All @@ -310,7 +313,7 @@
orientationMode(m),
degradationPreference(MAINTAIN_QUALITY),
mirrorMode(mirror),
advanceOptions(PREFER_AUTO, PREFER_LOW_LATENCY) {}
advanceOptions(PREFER_AUTO, PREFER_LOW_LATENCY, false) {}
VideoEncoderConfiguration(const VideoEncoderConfiguration&amp; config)
: codecType(config.codecType),
dimensions(config.dimensions),
Expand All @@ -330,7 +333,7 @@
orientationMode(ORIENTATION_MODE_ADAPTIVE),
degradationPreference(MAINTAIN_QUALITY),
mirrorMode(VIDEO_MIRROR_MODE_DISABLED),
advanceOptions(PREFER_AUTO, PREFER_LOW_LATENCY) {}
advanceOptions(PREFER_AUTO, PREFER_LOW_LATENCY, false) {}
VideoEncoderConfiguration&amp; operator=(const VideoEncoderConfiguration&amp; rhs) {
if (this == &amp;rhs) return *this;
codecType = rhs.codecType;
Expand Down

0 comments on commit 82f469b

Please sign in to comment.