23 #include <com/avpkit/core/AVPKit.h>
24 #include <com/avpkit/core/IMediaData.h>
25 namespace com {
namespace avpkit {
namespace core
281 static IPacket* make(int32_t size);
Represents an encoded piece of data that can be placed in an IContainer for a given IStream of data.
virtual void reset()=0
Clear out any data in this packet, but leaves the buffer available for reuse.
virtual void setComplete(bool complete, int32_t size)=0
Set if this packet is complete, and what the total size of the data should be assumed to be.
virtual void setStreamIndex(int32_t streamIndex)=0
Set the stream index for this packet.
virtual int32_t getMaxSize()=0
Get the maximum size (in bytes) of payload this packet can hold.
virtual bool isKeyPacket()=0
Does this packet contain Key data? i.e.
virtual int64_t getDuration()=0
Return the duration of this packet, in units of getTimeBase().
virtual void setPosition(int64_t position)=0
Set the position.
virtual void setDts(int64_t aDts)=0
Set a new Decompression Time Stamp (DTS) for this packet.
virtual int64_t getPosition()=0
Return the position (in bytes) of this packet in the stream.
virtual int32_t getStreamIndex()=0
Get the container-specific index for the stream this packet is part of.
virtual int64_t getDts()=0
Get the Decompression Time Stamp (DTS) for this packet.
virtual void setPts(int64_t aPts)=0
Set a new Presentation Time Stamp (PTS) for this packet.
virtual void setDuration(int64_t duration)=0
Set the duration.
virtual bool isComplete()=0
Is this packet complete.
virtual int64_t getPts()=0
Get the Presentation Time Stamp (PTS) for this packet.
virtual int32_t allocateNewPayload(int32_t payloadSize)=0
Discard the current payload and allocate a new payload.
virtual int32_t getFlags()=0
Get any flags set on this packet, as a 4-byte binary-ORed bit-mask.
virtual void setFlags(int32_t flags)=0
Set any internal flags.
virtual int32_t getSize()=0
Get the size in bytes of the payload currently in this packet.
virtual void setKeyPacket(bool keyPacket)=0
Set if this is a key packet.
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...