Skip to content

Commit

Permalink
Merge pull request #3804 from AgoraIO/auto/sync-cn-proto-to-en-patch-…
Browse files Browse the repository at this point in the history
…1730278534
  • Loading branch information
github-actions[bot] authored Oct 30, 2024
2 parents 8aff75a + d471cca commit 3202885
Show file tree
Hide file tree
Showing 7 changed files with 421 additions and 87 deletions.
26 changes: 17 additions & 9 deletions en-US/dita/RTC-NG/API/class_audiotrackconfig.dita
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,35 @@
<section id="prototype">
<p outputclass="codeblock">
<codeblock props="android" outputclass="language-java">public class AudioTrackConfig {

public boolean enableLocalPlayback;


public boolean enableAudioProcessing;
public AudioTrackConfig() {
this.enableLocalPlayback = true;
this.enableAudioProcessing = false;
}
@Override
public String toString() {
return &quot;AudioTrackConfig{&quot;
+ &quot;enableLocalPlayback=&quot; + enableLocalPlayback + &quot;enableAudioProcessing&quot;
+ enableAudioProcessing + &#x27;}&#x27;;
}
}</codeblock>
}</codeblock>
<codeblock props="hmos" outputclass="language-arkts">export class AudioTrackConfig {

public enableLocalPlayback: boolean = true;
}</codeblock>
<codeblock props="ios mac" outputclass="language-objectivec">NS_SWIFT_NAME(AgoraAudioTrackConfig) __attribute__((visibility("default"))) @interface AgoraAudioTrackConfig : NSObject
<codeblock props="ios mac" outputclass="language-objectivec">NS_SWIFT_NAME(AgoraAudioTrackConfig) __attribute__((visibility(&quot;default&quot;))) @interface AgoraAudioTrackConfig : NSObject
@property (assign, nonatomic) BOOL enableLocalPlayback NS_SWIFT_NAME(enableLocalPlayback);
@property (assign, nonatomic) BOOL enableAudioProcessing NS_SWIFT_NAME(enableAudioProcessing);
@end</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp">struct AudioTrackConfig {

bool enableLocalPlayback;


AudioTrackConfig()
: enableLocalPlayback(true) {}

bool enableAudioProcessing;
AudioTrackConfig() : enableLocalPlayback(true),enableAudioProcessing(false) {}
};</codeblock>
<codeblock props="bp" outputclass="language-cpp">USTRUCT(BlueprintType)
struct FAudioTrackConfig
Expand Down
61 changes: 38 additions & 23 deletions en-US/dita/RTC-NG/API/class_externalvideoframe.dita
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
public static final int BUFFER_TYPE_ARRAY = 2;
public static final int BUFFER_TYPE_TEXTURE = 3;
public AgoraVideoFrame() {
format = 10;
format = 10;
timeStamp = 0;
stride = 0;
height = 0;
Expand All @@ -37,6 +37,7 @@
rotation = 0;
alphaStitchMode = 0;
}

public int format;
public long timeStamp;
public int stride;
Expand All @@ -46,7 +47,6 @@
public float[] transform;
public javax.microedition.khronos.egl.EGLContext eglContext10;
public android.opengl.EGLContext eglContext14;

public byte[] buf;
public int cropLeft;
public int cropTop;
Expand All @@ -56,34 +56,43 @@
public int alphaStitchMode;
@Override
public String toString() {
return "AgoraVideoFrame{"
+ "format=" + format + ", timeStamp=" + timeStamp + ", stride=" + stride
+ ", height=" + height + ", textureID=" + textureID
+ ", buf.length=" + (buf != null ? buf.length : 0) + ", cropLeft=" + cropLeft
+ ", cropTop=" + cropTop + ", cropRight=" + cropRight + ", cropBottom=" + cropBottom
+ ", rotation=" + rotation + ", alphaStitchMode=" + alphaStitchMode + '}';
return &quot;AgoraVideoFrame{&quot;
+ &quot;format=&quot; + format + &quot;, timeStamp=&quot; + timeStamp + &quot;, stride=&quot; + stride
+ &quot;, height=&quot; + height + &quot;, textureID=&quot; + textureID
+ &quot;, buf.length=&quot; + (buf != null ? buf.length : 0) + &quot;, cropLeft=&quot; + cropLeft
+ &quot;, cropTop=&quot; + cropTop + &quot;, cropRight=&quot; + cropRight + &quot;, cropBottom=&quot; + cropBottom
+ &quot;, rotation=&quot; + rotation + &quot;, alphaStitchMode=&quot; + alphaStitchMode + &#x27;}&#x27;;
}
}</codeblock>
<codeblock props="hmos" outputclass="language-arkts"></codeblock>
<codeblock props="ios mac" outputclass="language-objectivec">__attribute__((visibility("default"))) @interface AgoraVideoFrame : NSObject
<codeblock props="ios mac" outputclass="language-objectivec">
__attribute__((visibility(&quot;default&quot;))) @interface AgoraVideoFrame : NSObject
@property(assign, nonatomic) NSInteger format;
@property(assign, nonatomic) CMTime time;
@property(assign, nonatomic) int stride DEPRECATED_MSG_ATTRIBUTE("use strideInPixels instead");
@property(assign, nonatomic) int strideInPixels;
@property(assign, nonatomic) int height;

@property(assign, nonatomic) CMTime time;
@property(assign, nonatomic) int stride DEPRECATED_MSG_ATTRIBUTE(&quot;use strideInPixels instead&quot;);

@property(assign, nonatomic) int strideInPixels;
@property(assign, nonatomic) int height;
@property(assign, nonatomic) CVPixelBufferRef _Nullable textureBuf;

@property(strong, nonatomic) IMAGE_CLASS * _Nullable image;
@property(strong, nonatomic) NSData *_Nullable dataBuf;

@property(strong, nonatomic) NSData *_Nullable dataBuf;
@property(strong, nonatomic) NSData *_Nullable alphaBuf;
@property(assign, nonatomic) AgoraAlphaStitchMode alphaStitchMode;
@property(assign, nonatomic) int cropLeft;
@property(assign, nonatomic) int cropTop;
@property(assign, nonatomic) int cropRight;
@property(assign, nonatomic) int cropBottom;
@property(assign, nonatomic) int rotation;

@property(assign, nonatomic) int cropLeft;
@property(assign, nonatomic) int cropTop;
@property(assign, nonatomic) int cropRight;
@property(assign, nonatomic) int cropBottom;
@property(assign, nonatomic) int rotation;
@property(strong, nonatomic) AgoraColorSpace *_Nullable colorSpace;

- (void)fillAlphaData;
@end</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp">struct ExternalVideoFrame {
<codeblock props="cpp unreal" outputclass="language-cpp">
struct ExternalVideoFrame {
ExternalVideoFrame()
: type(VIDEO_BUFFER_RAW_DATA),
format(VIDEO_PIXEL_DEFAULT),
Expand All @@ -99,22 +108,26 @@
eglContext(NULL),
eglType(EGL_CONTEXT10),
textureId(0),
fenceObject(0),
metadataBuffer(NULL),
metadataSize(0),
alphaBuffer(NULL),
fillAlphaBuffer(false),
alphaStitchMode(0),
alphaStitchMode(NO_ALPHA_STITCH),
d3d11Texture2d(NULL),
textureSliceIndex(0){}

enum EGL_CONTEXT_TYPE {
EGL_CONTEXT10 = 0,
EGL_CONTEXT14 = 1,
};

enum VIDEO_BUFFER_TYPE {
VIDEO_BUFFER_RAW_DATA = 1,
VIDEO_BUFFER_ARRAY = 2,
VIDEO_BUFFER_TEXTURE = 3,
};

VIDEO_BUFFER_TYPE type;
VIDEO_PIXEL_FORMAT format;
void* buffer;
Expand All @@ -126,17 +139,19 @@
int cropBottom;
int rotation;
long long timestamp;
void *eglContext;
void* eglContext;
EGL_CONTEXT_TYPE eglType;
int textureId;
long long fenceObject;
float matrix[16];
uint8_t* metadataBuffer;
int metadataSize;
uint8_t* alphaBuffer;
bool fillAlphaBuffer;
int alphaStitchMode;
ALPHA_STITCH_MODE alphaStitchMode;
void *d3d11Texture2d;
int textureSliceIndex;
ColorSpace colorSpace;
};</codeblock>
<codeblock props="electron" outputclass="language-typescript">export class ExternalVideoFrame {
type?: VideoBufferType;
Expand Down
Loading

0 comments on commit 3202885

Please sign in to comment.