20 #ifndef VIDEOPICTURE_H_
21 #define VIDEOPICTURE_H_
23 #include <com/avpkit/ferry/RefPointer.h>
24 #include <com/avpkit/core/IVideoPicture.h>
25 #include <com/avpkit/core/ICodec.h>
26 #include <com/avpkit/core/FfmpegIncludes.h>
27 #include <com/avpkit/ferry/IBuffer.h>
28 #include <com/avpkit/core/IRational.h>
30 namespace com {
namespace avpkit {
namespace core
35 VS_JNIUTILS_REFCOUNTED_OBJECT_PRIVATE_MAKE(
VideoPicture);
48 virtual int getWidth() {
return mFrame->width; }
52 virtual void setPts(int64_t);
60 int width,
int height, int64_t pts);
63 virtual void render(
bool drop, int64_t timeStamp);
64 virtual void* getOpaqueData();
89 int32_t width, int32_t height);
128 void allocInternalFrameBuffer();
136 CMSampleBufferRef mCMSampleBuffer;
This class wraps represents a Rational number for the AVPKit.
Represents one raw (undecoded) picture in a video stream, plus a timestamp for when to display that v...
PictType
The different types of images that we can set.
virtual void setComplete(bool aIsComplete, IPixelFormat::Type format, int width, int height, int64_t pts)
After modifying the raw data in this buffer, call this function to let the object know it is now comp...
virtual void setData(com::avpkit::ferry::IBuffer *buffer)
Sets the underlying buffer used by this object.
virtual int64_t getPts()
What is the Presentation Time Stamp (in Microseconds) of this picture.
virtual IPixelFormat::Type getPixelType()
Returns the pixel format of the picture.
virtual int32_t getSize()
Total size in bytes of the decoded picture.
void copyAVFrame(AVFrame *frame, IPixelFormat::Type pixel, int32_t width, int32_t height)
Called by the StreamCoder once it's done decoding.
virtual void setKeyFrame(bool aIsKey)
Reset if this is a key frame or not.
virtual bool isKeyFrame()
Is this a key frame?
virtual void setPictureType(IVideoPicture::PictType type)
Set the picture type.
virtual com::avpkit::ferry::IBuffer * getData()
Get any underlying raw data available for this object.
virtual void setPts(int64_t)
Set the Presentation Time Stamp (in Microseconds) for this picture.
virtual int64_t getTimeStamp()
Get the time stamp of this object in getTimeBase() units.
virtual IVideoPicture::PictType getPictureType()
Get the picture type.
virtual int getDataLineSize(int lineNo)
Return the size of each line in the VideoPicture data.
void fillAVFrame(AVFrame *frame)
Called by the StreamCoder before it encodes a picture.
virtual bool isComplete()
Is this picture completely decoded?
virtual bool copy(IVideoPicture *srcFrame)
Copy the contents of the given picture into this picture.
virtual void setQuality(int newQuality)
Set the Quality to a new value.
virtual void setTimeStamp(int64_t aTimeStamp)
Set the time stamp for this object in getTimeBase() units.
virtual bool isKey()
Is this object a key object? i.e.
virtual int getQuality()
This value is the quality setting this VideoPicture had when it was decoded, or is the value to use w...
virtual int getWidth()
What is the width of the picture.
virtual int getHeight()
What is the height of the picture.
static VideoPicture * make(IPixelFormat::Type format, int width, int height)
The default factory for a frame.
virtual void setTimeBase(IRational *aBase)
Set the time base that time stamps of this object are represented in.
virtual IRational * getTimeBase()
Get the time base that time stamps of this object are represented in.
virtual void render(bool drop, int64_t timeStamp)
Render this picture on configured surface.
VS_API_AVPKIT AVFrame * getAVFrame()
Call to get the raw underlying AVFrame we manage; don't pass this to ffmpeg directly as ffmpeg often ...
Allows Java code to get data from a native buffers, and optionally modify native memory directly.
WARNING: Do not use logging in this class, and do not set any static file variables to values other t...