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

[AUTO: DELETE THIS BRANCH ONCE YOU MERGE!!!] Sync cn prototype to en prototype in a flash #3339

Merged
Merged
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
105 changes: 59 additions & 46 deletions en-US/dita/RTC-NG/API/class_externalvideoframe.dita
Original file line number Diff line number Diff line change
Expand Up @@ -50,49 +50,54 @@
@property(assign, nonatomic) int rotation;
@end</codeblock>
<codeblock props="cpp unreal bp" outputclass="language-cpp">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;
};</codeblock>
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;
};</codeblock>
<codeblock props="electron" outputclass="language-typescript">export class ExternalVideoFrame {
type?: VideoBufferType;
format?: VideoPixelFormat;
Expand Down Expand Up @@ -190,8 +195,8 @@
metadata_buffer?: Uint8Array;
metadata_size?: number;
}</codeblock>
<codeblock props="flutter" outputclass="language-dart">class ExternalVideoFrame {

<codeblock props="flutter" outputclass="language-dart">@JsonSerializable(explicitToJson: true, includeIfNull: false)
class ExternalVideoFrame {
const ExternalVideoFrame(
{this.type,
this.format,
Expand All @@ -208,7 +213,9 @@
this.textureId,
this.matrix,
this.metadataBuffer,
this.metadataSize});
this.metadataSize,
this.alphaBuffer,
this.textureSliceIndex});

@JsonKey(name: 'type')
final VideoBufferType? type;
Expand Down Expand Up @@ -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&lt;String, dynamic&gt; json) =&gt;
_$ExternalVideoFrameFromJson(json);

Expand Down
Loading