diff --git a/en-US/dita/RTC-NG/API/class_externalvideoframe.dita b/en-US/dita/RTC-NG/API/class_externalvideoframe.dita
index 2ff2563eb68..9794047f03d 100644
--- a/en-US/dita/RTC-NG/API/class_externalvideoframe.dita
+++ b/en-US/dita/RTC-NG/API/class_externalvideoframe.dita
@@ -50,49 +50,54 @@
@property(assign, nonatomic) int rotation;
@end
struct ExternalVideoFrame {
- ExternalVideoFrame()
- : type(VIDEO_BUFFER_RAW_DATA),
- format(VIDEO_PIXEL_DEFAULT),
- buffer(NULL),
- stride(0),
- height(0),
- cropLeft(0),
- cropTop(0),
- cropRight(0),
- cropBottom(0),
- rotation(0),
- timestamp(0),
- eglContext(NULL),
- eglType(EGL_CONTEXT10),
- textureId(0),
- metadata_buffer(NULL),
- metadata_size(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;
- int stride;
- int height;
- int cropLeft;
- int cropTop;
- int cropRight;
- int cropBottom;
- int rotation;
- long long timestamp;
- void *eglContext;
- EGL_CONTEXT_TYPE eglType;
- int textureId;
- uint8_t* metadata_buffer;
- int metadata_size;
- };
+ ExternalVideoFrame()
+ : type(VIDEO_BUFFER_RAW_DATA),
+ format(VIDEO_PIXEL_DEFAULT),
+ buffer(NULL),
+ stride(0),
+ height(0),
+ cropLeft(0),
+ cropTop(0),
+ cropRight(0),
+ cropBottom(0),
+ rotation(0),
+ timestamp(0),
+ eglContext(NULL),
+ eglType(EGL_CONTEXT10),
+ textureId(0),
+ metadata_buffer(NULL),
+ metadata_size(0),
+ d3d11_texture_2d(NULL),
+ texture_slice_index(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;
+ int stride;
+ int height;
+ int cropLeft;
+ int cropTop;
+ int cropRight;
+ int cropBottom;
+ int rotation;
+ long long timestamp;
+ void *eglContext;
+ EGL_CONTEXT_TYPE eglType;
+ int textureId;
+ float matrix[16];
+ uint8_t* metadata_buffer;
+ int metadata_size;
+ void *d3d11_texture_2d;
+ int texture_slice_index;
+};
export class ExternalVideoFrame {
type?: VideoBufferType;
format?: VideoPixelFormat;
@@ -190,8 +195,8 @@
metadata_buffer?: Uint8Array;
metadata_size?: number;
}
- class ExternalVideoFrame {
-
+ @JsonSerializable(explicitToJson: true, includeIfNull: false)
+class ExternalVideoFrame {
const ExternalVideoFrame(
{this.type,
this.format,
@@ -208,7 +213,9 @@
this.textureId,
this.matrix,
this.metadataBuffer,
- this.metadataSize});
+ this.metadataSize,
+ this.alphaBuffer,
+ this.textureSliceIndex});
@JsonKey(name: 'type')
final VideoBufferType? type;
@@ -258,6 +265,12 @@
@JsonKey(name: 'metadata_size')
final int? metadataSize;
+ @JsonKey(name: 'alphaBuffer', ignore: true)
+ final Uint8List? alphaBuffer;
+
+ @JsonKey(name: 'texture_slice_index')
+ final int? textureSliceIndex;
+
factory ExternalVideoFrame.fromJson(Map<String, dynamic> json) =>
_$ExternalVideoFrameFromJson(json);