Package com.twilio.video
Class Rgba8888Buffer
java.lang.Object
com.twilio.video.Rgba8888Buffer
- All Implemented Interfaces:
RefCounted,VideoFrame.Buffer
A frame buffer that represents an image in the ARGB format with 8 bits of of precision.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncropAndScale(int cropX, int cropY, int cropWidth, int cropHeight, int scaleWidth, int scaleHeight) Crops a region defined by `cropx`, `cropY`, `cropWidth` and `cropHeight`.getData()Returns the raw frame buffer data.intReturns the frame height.intgetWidth()Returns the frame width.voidrelease()Decreases ref count by one.voidretain()Increases ref count by one.toI420()Converts the buffer to aVideoFrame.I420Buffer.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface tvi.webrtc.VideoFrame.Buffer
getBufferType
-
Constructor Details
-
Rgba8888Buffer
-
-
Method Details
-
getData
Returns the raw frame buffer data. -
getWidth
public int getWidth()Returns the frame width.- Specified by:
getWidthin interfaceVideoFrame.Buffer
-
getHeight
public int getHeight()Returns the frame height.- Specified by:
getHeightin interfaceVideoFrame.Buffer
-
toI420
Converts the buffer to aVideoFrame.I420Buffer.- Specified by:
toI420in interfaceVideoFrame.Buffer- Returns:
- a copy of the original buffer converted to an I420 buffer.
-
retain
public void retain()Description copied from interface:RefCountedIncreases ref count by one.- Specified by:
retainin interfaceRefCounted- Specified by:
retainin interfaceVideoFrame.Buffer
-
release
public void release()Description copied from interface:RefCountedDecreases ref count by one. When the ref count reaches zero, resources related to the object will be freed.- Specified by:
releasein interfaceRefCounted- Specified by:
releasein interfaceVideoFrame.Buffer
-
cropAndScale
public VideoFrame.Buffer cropAndScale(int cropX, int cropY, int cropWidth, int cropHeight, int scaleWidth, int scaleHeight) Description copied from interface:VideoFrame.BufferCrops a region defined by `cropx`, `cropY`, `cropWidth` and `cropHeight`. Scales it to size `scaleWidth` x `scaleHeight`.- Specified by:
cropAndScalein interfaceVideoFrame.Buffer
-