setHardwareBuffer

@RequiresApi(value = 28)
fun setHardwareBuffer(hwBuffer: HardwareBuffer): Boolean

Sets the image HardwareBuffer of the VideoMaterial in the following modes: VideoDimensionMode.MONO, VideoDimensionMode.SIDE_BY_SIDE, and VideoDimensionMode.TOP_AND_DOWN.

Return

true if the HardwareBuffer is set successfully; false otherwise.

Parameters

hwBuffer

The HardwareBuffer object to be set.


@RequiresApi(value = 28)
fun setHardwareBuffer(leftEyeBuffer: HardwareBuffer, rightEyeBuffer: HardwareBuffer): Boolean

Sets the image of the VideoMaterial in VideoDimensionMode.MULTIPLE_VIEW mode.

This method sets the video texture from two hardware buffers, one for the left eye and one for the right eye.

Return

true if the HardwareBuffers are set successfully; false otherwise.

Parameters

leftEyeBuffer

The HardwareBuffer object to be set for the left eye.

rightEyeBuffer

The HardwareBuffer object to be set for the right eye.