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

New YiCAT updates #3842

Merged
merged 2 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions en-US/dita/RTC-NG/API/api_rte_destroy.dita
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd">
<reference id="api_rte_destroy">
<title><ph keyref="Destroy_Rte"/></title>
<shortdesc id="short"><ph id="shortdesc">Destroys an RTE object.</ph></shortdesc>
<prolog>
<metadata>
<keywords>
<indexterm keyref="Destroy_Rte"/>
</keywords>
</metadata>
</prolog>
<refbody>
<section id="prototype">
<p outputclass="codeblock">
<codeblock props="android" outputclass="language-java">public synchronized void destroy() throws RteException;</codeblock>
<codeblock props="ios mac" outputclass="language-objectivec">- (BOOL)destroy:(AgoraRteError * _Nullable)error;</codeblock>
<codeblock props="cpp unreal" outputclass="language-cpp">bool Destroy(Error *err = nullptr){
return RteDestroy(&amp;c_rte, err != nullptr ? err->get_underlying_impl() : nullptr);
}</codeblock>
<codeblock props="bp" outputclass="language-cpp"/>
<codeblock props="electron" outputclass="language-typescript"/>
<codeblock props="unity cs" outputclass="language-csharp"/>
<codeblock props="rn" outputclass="language-typescript"/>
<codeblock props="flutter" outputclass="language-dart"/> </p>
</section>
<section id="detailed_desc" deliveryTarget="details" otherprops="no-title">
<dl outputclass="since">
<dlentry props="native">
<dt>Since</dt>
<dd>v4.5.0</dd>
</dlentry>
</dl>
<p>This method releases all resources used by the RTE object.</p>
</section>
<section id="restriction" deliveryTarget="details">
<title>Restrictions</title>
<p>None.</p>
</section>
<section id="parameters" deliveryTarget="details">
<title><ph props="cpp apple">Parameters</ph></title>
<parml props="cpp apple">
<plentry conkeyref="SetConfigs_Rte/err">
<pt/>
<pd/>
</plentry>
</parml> </section>
<section id="return_values" props="apple cpp framework">
<title><ph keyref="return-section-title"/></title>
<p props="flutter">When the method call succeeds, there is no return value; when fails, the <xref keyref="AgoraRtcException"/> exception is thrown. You need to catch the exception and handle it accordingly. <ph props="cn">See <xref keyref="error-code-link"/> for details and resolution suggestions.</ph></p>
<p props="cpp apple unreal bp electron unity rn cs">Whether the RTE object is successfully destroyed:<ul>
<li><codeph><ph keyref="true"/></codeph>: The RTE object is destroyed.</li>
<li><codeph><ph keyref="false"/></codeph>: The RTE object is not destroyed.</li>
</ul>
</p> </section>
<section props="android" conkeyref="SetAppId/exception"/>
</refbody>
</reference>
141 changes: 67 additions & 74 deletions en-US/dita/RTC-NG/API/class_videoframe.dita
Original file line number Diff line number Diff line change
Expand Up @@ -7,45 +7,45 @@
<section id="prototype">
<p outputclass="codeblock">
<codeblock props="android" outputclass="language-java">public class VideoFrame implements RefCounted {

public interface Buffer extends RefCounted {

@CalledByNative(&quot;Buffer&quot;) int getWidth();

@CalledByNative(&quot;Buffer&quot;) int getHeight();

@CalledByNative(&quot;Buffer&quot;) I420Buffer toI420();

@Override @CalledByNative(&quot;Buffer&quot;) void release();

@Override @CalledByNative(&quot;Buffer&quot;) void retain();

@CalledByNative(&quot;Buffer&quot;)
Buffer cropAndScale(
int cropX, int cropY, int cropWidth, int cropHeight, int scaleWidth, int scaleHeight);

@CalledByNative(&quot;Buffer&quot;) @Nullable Buffer mirror(int frameRotation);

@CalledByNative(&quot;Buffer&quot;) @Nullable Buffer rotate(int frameRotation);

@CalledByNative(&quot;Buffer&quot;)
@Nullable
Buffer transform(int cropX, int cropY, int cropWidth, int cropHeight, int scaleWidth,
int scaleHeight, int frameRotation);
}

public interface I420Buffer extends Buffer {

@CalledByNative(&quot;I420Buffer&quot;) ByteBuffer getDataY();

@CalledByNative(&quot;I420Buffer&quot;) ByteBuffer getDataU();

@CalledByNative(&quot;I420Buffer&quot;) ByteBuffer getDataV();
@CalledByNative(&quot;I420Buffer&quot;) int getStrideY();
@CalledByNative(&quot;I420Buffer&quot;) int getStrideU();
@CalledByNative(&quot;I420Buffer&quot;) int getStrideV();
}

public interface I422Buffer extends Buffer {
@CalledByNative(&quot;I422Buffer&quot;) ByteBuffer getDataY();
@CalledByNative(&quot;I422Buffer&quot;) ByteBuffer getDataU();
Expand All @@ -55,13 +55,13 @@
@CalledByNative(&quot;I422Buffer&quot;) int getStrideV();
}
public interface RgbaBuffer extends Buffer { @CalledByNative(&quot;RgbaBuffer&quot;) ByteBuffer getData(); }

public interface TextureBuffer extends Buffer {

enum Type {

OES(GLES11Ext.GL_TEXTURE_EXTERNAL_OES),

RGB(GLES20.GL_TEXTURE_2D);
private final int glTarget;
private Type(final int glTarget) {
Expand All @@ -76,17 +76,17 @@
EGL_CONTEXT_14;
}
Type getType();

@CalledByNative(&quot;TextureBuffer&quot;) int getTextureId();

Matrix getTransformMatrix();

@CalledByNative(&quot;TextureBuffer&quot;) EglBase.Context getEglBaseContext();
@CalledByNative(&quot;TextureBuffer&quot;) Object getSourceTexturePool();
@CalledByNative(&quot;TextureBuffer&quot;) long getNativeEglContext();
@CalledByNative(&quot;TextureBuffer&quot;) int getEglContextType();
@CalledByNative(&quot;TextureBuffer&quot;) float[] getTransformMatrixArray();

@CalledByNative(&quot;TextureBuffer&quot;) int getSequence();
@CalledByNative(&quot;TextureBuffer&quot;) long getFenceObject();
@CalledByNative(&quot;TextureBuffer&quot;) boolean is10BitTexture();
Expand Down Expand Up @@ -198,22 +198,22 @@
return stitchMode;
}
}

private Buffer buffer;

private int rotation;

private long timestampNs;
private ColorSpace colorSpace;
private SourceType sourceType;
private float sampleAspectRatio;

private AlphaStitchMode alphaStitchMode = AlphaStitchMode.ALPHA_NO_STITCH;
private VideoFrameMetaInfo metaInfo = new VideoFrameMetaInfo();

private @Nullable ByteBuffer alphaBuffer;
private long nativeAlphaBuffer;

public VideoFrame(Buffer buffer, int rotation, long timestampNs) {
this(buffer, rotation, timestampNs, new WrappedNativeColorSpace(), null, 0L, 1.0f,
SourceType.kUnspecified.ordinal());
Expand Down Expand Up @@ -243,12 +243,12 @@
public float getSampleAspectRatio() {
return sampleAspectRatio;
}

@CalledByNative
public Buffer getBuffer() {
return buffer;
}

@CalledByNative
public int getRotation() {
return rotation;
Expand All @@ -261,7 +261,7 @@
public void setAlphaStitchMode(int stitchMode) {
alphaStitchMode = AlphaStitchMode.values()[stitchMode];
}

@CalledByNative
public long getTimestampNs() {
return timestampNs;
Expand All @@ -270,7 +270,7 @@
public VideoFrameMetaInfo getMetaInfo() {
return metaInfo;
}

public int getRotatedWidth() {
if (rotation % 180 == 0) {
return (alphaStitchMode == AlphaStitchMode.ALPHA_STITCH_LEFT
Expand All @@ -283,7 +283,7 @@
? buffer.getHeight() / 2
: buffer.getHeight();
}

public int getRotatedHeight() {
if (rotation % 180 == 0) {
return (alphaStitchMode == AlphaStitchMode.ALPHA_STITCH_UP
Expand All @@ -296,7 +296,7 @@
? buffer.getWidth() / 2
: buffer.getWidth();
}

public void replaceBuffer(Buffer buffer, int rotation, long timestampNs) {
release();
this.buffer = buffer;
Expand Down Expand Up @@ -351,12 +351,12 @@
public void fillAlphaData(ByteBuffer buffer) {
alphaBuffer = buffer;
}

@Override
public void retain() {
buffer.retain();
}

@Override
@CalledByNative
public void release() {
Expand Down Expand Up @@ -431,51 +431,51 @@ struct VideoFrame {
metaInfo(NULL){
memset(matrix, 0, sizeof(matrix));
}

VIDEO_PIXEL_FORMAT type;

int width;

int height;

int yStride;

int uStride;

int vStride;

uint8_t* yBuffer;

uint8_t* uBuffer;

uint8_t* vBuffer;

int rotation;

int64_t renderTimeMs;

int avsync_type;

uint8_t* metadata_buffer;

int metadata_size;

void* sharedContext;

int textureId;

void* d3d11Texture2d;

float matrix[16];

uint8_t* alphaBuffer;

ALPHA_STITCH_MODE alphaStitchMode;

void* pixelBuffer;

IVideoFrameMetaInfo* metaInfo;

ColorSpace colorSpace;
};</codeblock>
<codeblock props="bp" outputclass="language-cpp">USTRUCT(BlueprintType)
Expand Down Expand Up @@ -742,19 +742,6 @@ class VideoFrame {
<section id="detailed_desc">
<p>Note that the buffer provides a pointer to a pointer. This interface cannot modify the pointer of the buffer, but it can modify the content of the buffer.</p>
</section>
<section id="sub-method" props="android">
<title>Method</title>
<parml>
<plentry>
<pt>getColorSpace</pt>
<pd>Get the color space properties of the video frame.</pd>
</plentry>
<plentry>
<pt>setColorSpace</pt>
<pd>Get the color space properties of the video frame.</pd>
</plentry>
</parml>
</section>
<section id="parameters">
<title><text conref="../conref/conref_api_metadata.dita#conref_api_metadata/property"/></title>
<parml>
Expand Down Expand Up @@ -878,7 +865,13 @@ class VideoFrame {
</plentry>
<plentry id="colorspace">
<pt>colorSpace</pt>
<pd>By default, the color space properties of video frames will apply the Full Range and BT.709 standard configurations. You can configure the settings according your needs for custom video capturing and rendering. See <xref keyref="videocolorspace-link"/>.</pd>
<pd props="ios mac cpp cs unity flutter electron rn unreal bp">By default, the color space properties of video frames will apply the Full Range and BT.709 standard configurations. You can configure the settings according your needs for custom video capturing and rendering. See <xref
keyref="videocolorspace-link"/>.</pd>
<pd props="android hmos">By default, the color space properties of video frames will apply the Full Range and BT.709 standard configurations. You can configure the settings according your needs for custom video capturing and rendering. See <xref
keyref="videocolorspace-link"/>. The methods associated with this parameter are as follows:<ul>
<li><codeph>getColorSpace</codeph>: Get the color space attribute of the video frame.</li>
<li><codeph>setColorSpace</codeph>:Set the color space attribute of the video frame.</li>
</ul></pd>
</plentry>
<plentry props="android hmos">
<pt>sourceType</pt>
Expand Down
Loading