-
- All Implemented Interfaces:
public class YuvFrame
-
-
Field Summary
Fields Modifier and Type Field Description public intwidthpublic intheightpublic Array<byte>nv21Bufferpublic introtationDegreepublic longtimestamppublic final static intPROCESSING_NONEpublic final static intPROCESSING_CROP_TO_SQUARE
-
Constructor Summary
Constructors Constructor Description YuvFrame(VideoFrame videoFrame)Creates a YuvFrame from the provided VideoFrame. YuvFrame(VideoFrame videoFrame, int processingFlags)Creates a YuvFrame from the provided VideoFrame. YuvFrame(VideoFrame videoFrame, int processingFlags, long timestamp)Creates a YuvFrame from the provided VideoFrame.
-
Method Summary
Modifier and Type Method Description voidfromVideoFrame(VideoFrame videoFrame, int processingFlags, long timestamp)Replaces the data in this YuvFrame with the data from the provided frame. voiddispose()booleanhasData()BitmapgetBitmap()Converts this YUV frame to an ARGB_8888 Bitmap. -
-
Constructor Detail
-
YuvFrame
YuvFrame(VideoFrame videoFrame)
Creates a YuvFrame from the provided VideoFrame.- Parameters:
videoFrame- Source VideoFrame.
-
YuvFrame
YuvFrame(VideoFrame videoFrame, int processingFlags)
Creates a YuvFrame from the provided VideoFrame.- Parameters:
videoFrame- Source VideoFrame.processingFlags- Processing flags, YuvFrame.PROCESSING_NONE for no processing.
-
YuvFrame
YuvFrame(VideoFrame videoFrame, int processingFlags, long timestamp)
Creates a YuvFrame from the provided VideoFrame.- Parameters:
videoFrame- Source VideoFrame.processingFlags- Processing flags, YuvFrame.PROCESSING_NONE for no processing.timestamp- The timestamp to give the frame.
-
-
Method Detail
-
fromVideoFrame
void fromVideoFrame(VideoFrame videoFrame, int processingFlags, long timestamp)
Replaces the data in this YuvFrame with the data from the provided frame. Will create new byte arrays to hold pixel data if necessary, or will reuse existing arrays if they're already the correct size.
- Parameters:
videoFrame- Source VideoFrame.processingFlags- Processing flags, YuvFrame.PROCESSING_NONE for no processing.timestamp- The timestamp to give the frame.
-
dispose
void dispose()
-
hasData
boolean hasData()
-
-
-
-