SharedTextureImportedSubtle

Properties

Link copied to clipboard

This method is for advanced users. If used, it is typically called after finishTransferSharedTexture, and should be passed to the object which was called startTransferSharedTexture to prevent the source object release the underlying resource before the target object actually acquire the reference at gpu process asyncly.

Link copied to clipboard
abstract var getVideoFrame: () -> VideoFrame

Create a VideoFrame that uses the imported shared texture in the current process. You can call VideoFrame.close() once you've finished using the object. The underlying resources will wait for GPU finish internally.

Link copied to clipboard
abstract var release: (callback: () -> Unit?) -> Unit

Release the resources. If you transferred and get multiple SharedTextureImported objects, you have to release every one of them. The resource on the GPU process will be destroyed when the last one is released.

Link copied to clipboard
abstract var setReleaseSyncToken: (syncToken: SharedTextureSyncToken) -> Unit

This method is for advanced users. If used, this object's underlying resource will not be released until the set sync token is fulfilled at gpu process. By using sync tokens, users are not required to use release callbacks for lifetime management.

Link copied to clipboard

Create a SharedTextureTransfer that can be serialized and transferred to other processes.