
* feat: paint event move shared texture to handle, add color space * feat: add breaking change * fix: properties. * fix: remove utf8 bom
1.9 KiB
1.9 KiB
OffscreenSharedTexture Object
textureInfo
Object - The shared texture info.widgetType
string - The widget type of the texture. Can bepopup
orframe
.pixelFormat
string - The pixel format of the texture. Can bergba
orbgra
.codedSize
Size - The full dimensions of the video frame.colorSpace
ColorSpace - The color space of the video frame.visibleRect
Rectangle - A subsection of [0, 0, codedSize.width, codedSize.height]. In OSR case, it is expected to have the full section area.contentRect
Rectangle - The region of the video frame that capturer would like to populate. In OSR case, it is the same withdirtyRect
that needs to be painted.timestamp
number - The time in microseconds since the capture start.metadata
Object - Extra metadata. See comments in src\media\base\video_frame_metadata.h for accurate details.captureUpdateRect
Rectangle (optional) - Updated area of frame, can be considered as thedirty
area.regionCaptureRect
Rectangle (optional) - May reflect the frame's contents origin if region capture is used internally.sourceSize
Rectangle (optional) - Full size of the source frame.frameCount
number (optional) - The increasing count of captured frame. May contain gaps if frames are dropped between two consecutively received frames.
handle
SharedTextureHandle - The shared texture handle data.
release
Function - Release the resources. Thetexture
cannot be directly passed to another process, users need to maintain texture lifecycles in main process, but it is safe to pass thetextureInfo
to another process. Only a limited number of textures can exist at the same time, so it's important that you calltexture.release()
as soon as you're done with the texture.