23 #include <com/avpkit/ferry/RefPointer.h>
24 #include <com/avpkit/core/IPacket.h>
25 #include <com/avpkit/core/FfmpegIncludes.h>
26 #include <com/avpkit/ferry/IBuffer.h>
28 namespace com {
namespace avpkit {
namespace core
34 VS_JNIUTILS_REFCOUNTED_OBJECT(
Packet);
70 virtual void setFlags(int32_t flags);
71 virtual void setPts(int64_t pts);
72 virtual void setDts(int64_t dts);
73 virtual void setComplete(
bool complete, int32_t size);
79 AVPacket *getAVPacket() {
return mPacket; }
86 void wrapAVPacket(AVPacket* pkt);
89 static void freeAVBuffer(
void *buf,
void *closure);
Represents an encoded piece of data that can be placed in an IContainer for a given IStream of data.
static IPacket * make()
Allocate a new packet.
This class wraps represents a Rational number for the AVPKit.
virtual void setFlags(int32_t flags)
Set any internal flags.
virtual int32_t allocateNewPayload(int32_t payloadSize)
Discard the current payload and allocate a new payload.
virtual int64_t getPts()
Get the Presentation Time Stamp (PTS) for this packet.
virtual void setKeyPacket(bool keyPacket)
Set if this is a key packet.
virtual void setTimeStamp(int64_t aTimeStamp)
Set the time stamp for this object in getTimeBase() units.
virtual void setDuration(int64_t duration)
Set the duration.
virtual com::avpkit::ferry::IBuffer * getData()
Get any underlying raw data available for this object.
virtual IRational * getTimeBase()
Get the time base that time stamps of this object are represented in.
virtual bool isKey()
Is this object a key object? i.e.
virtual void setPosition(int64_t position)
Set the position.
virtual int32_t getMaxSize()
Get the maximum size (in bytes) of payload this packet can hold.
virtual bool isKeyPacket()
Does this packet contain Key data? i.e.
virtual void setStreamIndex(int32_t streamIndex)
Set the stream index for this packet.
virtual void reset()
Clear out any data in this packet, but leaves the buffer available for reuse.
virtual int32_t getSize()
Get the size in bytes of the payload currently in this packet.
virtual void setPts(int64_t pts)
Set a new Presentation Time Stamp (PTS) for this packet.
virtual void setData(com::avpkit::ferry::IBuffer *buffer)
Sets the underlying buffer used by this object.
virtual void setDts(int64_t dts)
Set a new Decompression Time Stamp (DTS) for this packet.
virtual int32_t getFlags()
Get any flags set on this packet, as a 4-byte binary-ORed bit-mask.
virtual bool isComplete()
Is this packet complete.
virtual void setComplete(bool complete, int32_t size)
Set if this packet is complete, and what the total size of the data should be assumed to be.
virtual int32_t getStreamIndex()
Get the container-specific index for the stream this packet is part of.
virtual int64_t getTimeStamp()
Get the time stamp of this object in getTimeBase() units.
virtual void setTimeBase(IRational *aBase)
Set the time base that time stamps of this object are represented in.
virtual int64_t getPosition()
Return the position (in bytes) of this packet in the stream.
virtual int64_t getDts()
Get the Decompression Time Stamp (DTS) for this packet.
virtual int64_t getDuration()
Return the duration of this packet, in units of getTimeBase().
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...