Class AVFrame
- java.lang.Object
-
- org.jitsi.impl.neomedia.codec.video.AVFrame
-
public class AVFrame extends Object
Represents a pointer to a native FFmpeg AVFrame object.- Author:
- Lyubomir Marinov
-
-
Constructor Summary
Constructors Constructor Description AVFrame()Initializes a new FinalizableAVFrame instance which is to allocate a new native FFmpeg AVFrame and represent it.AVFrame(long ptr)Initializes a new AVFrame instance which is to represent a specific pointer to a native FFmpeg AVFrame object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intavpicture_fill(ByteBuffer data, AVFrameFormat format)protected voidfinalize()Deallocates the native memory/FFmpeg AVFrame object represented by this instance if this instance has allocated it upon initialization and it has not been deallocated yet i.e.voidfree()Deallocates the native memory/FFmpeg AVFrame object represented by this instance if this instance has allocated it upon initialization and it has not been deallocated yet.ByteBuffergetData()Gets the ByteBuffer whose native memory is set on the native counterpart of this instance/AVFrame.longgetPtr()Gets the pointer to the native FFmpeg AVFrame object represented by this instance.static intread(javax.media.Buffer buffer, javax.media.Format format, ByteBuffer data)
-
-
-
Constructor Detail
-
AVFrame
public AVFrame()
Initializes a new FinalizableAVFrame instance which is to allocate a new native FFmpeg AVFrame and represent it.
-
AVFrame
public AVFrame(long ptr)
Initializes a new AVFrame instance which is to represent a specific pointer to a native FFmpeg AVFrame object. Because the native memory/AVFrame has been allocated outside the new instance, the new instance does not automatically free it upon finalization.- Parameters:
ptr- the pointer to the native FFmpeg AVFrame object to be represented by the new instance
-
-
Method Detail
-
read
public static int read(javax.media.Buffer buffer, javax.media.Format format, ByteBuffer data)
-
avpicture_fill
public int avpicture_fill(ByteBuffer data, AVFrameFormat format)
-
finalize
protected void finalize() throws ThrowableDeallocates the native memory/FFmpeg AVFrame object represented by this instance if this instance has allocated it upon initialization and it has not been deallocated yet i.e. ensures thatfree()is invoked on this instance.- Overrides:
finalizein classObject- Throws:
Throwable- See Also:
Object.finalize()
-
free
public void free()
Deallocates the native memory/FFmpeg AVFrame object represented by this instance if this instance has allocated it upon initialization and it has not been deallocated yet.
-
getData
public ByteBuffer getData()
Gets the ByteBuffer whose native memory is set on the native counterpart of this instance/AVFrame.- Returns:
- the ByteBuffer whose native memory is set on the native counterpart of this instance/AVFrame.
-
getPtr
public long getPtr()
Gets the pointer to the native FFmpeg AVFrame object represented by this instance.- Returns:
- the pointer to the native FFmpeg AVFrame object represented by this instance
-
-