Class CVPixelBuffer
- java.lang.Object
-
- org.jitsi.impl.neomedia.quicktime.CVImageBuffer
-
- org.jitsi.impl.neomedia.quicktime.CVPixelBuffer
-
public class CVPixelBuffer extends CVImageBuffer
Represents a CoreVideo CVPixelBufferRef.- Author:
- Lyubomir Marinov
-
-
Constructor Summary
Constructors Constructor Description CVPixelBuffer(long ptr)Initializes a new CVPixelBuffer instance which is to represent a specific CoreVideo CVPixelBufferRef.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetByteCount()Gets the number of bytes which represent the pixels of the associated CoreVideo CVPixelBufferRef.byte[]getBytes()Gets a byte array which represents the pixels of the associated CoreVideo CVPixelBufferRef.intgetBytes(long buf, int bufLength)Gets the bytes which represent the pixels of the associated CVPixelBufferRef into a specific native byte buffer with a specific capacity.intgetHeight()Gets the height in pixels of this CVPixelBuffer.intgetWidth()Gets the width in pixels of this CVPixelBuffer.static voidmemcpy(byte[] dst, int dstOffset, int dstLength, long src)Native copy from native pointer src to byte array dst.-
Methods inherited from class org.jitsi.impl.neomedia.quicktime.CVImageBuffer
getPtr, setPtr
-
-
-
-
Method Detail
-
getByteCount
public int getByteCount()
Gets the number of bytes which represent the pixels of the associated CoreVideo CVPixelBufferRef.- Returns:
- the number of bytes which represent the pixels of the associated CoreVideo CVPixelBufferRef
-
getBytes
public byte[] getBytes()
Gets a byte array which represents the pixels of the associated CoreVideo CVPixelBufferRef.- Returns:
- a byte array which represents the pixels of the associated CoreVideo CVPixelBufferRef
-
getBytes
public int getBytes(long buf, int bufLength)Gets the bytes which represent the pixels of the associated CVPixelBufferRef into a specific native byte buffer with a specific capacity.- Parameters:
buf- the native byte buffer to return the bytes intobufLength- the capacity in bytes of buf- Returns:
- the number of bytes written into buf
-
getHeight
public int getHeight()
Gets the height in pixels of this CVPixelBuffer.- Returns:
- the height in pixels of this CVPixelBuffer
-
getWidth
public int getWidth()
Gets the width in pixels of this CVPixelBuffer.- Returns:
- the width in pixels of this CVPixelBuffer
-
memcpy
public static void memcpy(byte[] dst, int dstOffset, int dstLength, long src)Native copy from native pointer src to byte array dst.- Parameters:
dst- destination arraydstOffset- offset of dst to copy data todstLength- length of dstsrc- native pointer source
-
-