avcpp
2.0
Wrapper for the FFmpeg that simplify usage from C++ projects.
|
Go to the documentation of this file.
13 #include <libavutil/attributes.h>
19 #if API_AVCODEC_NEW_INIT_PACKET
27 void initFromAVPacket(
const AVPacket *avpacket,
bool deepCopy,
OptionalErrorCode ec);
45 explicit Packet(
const std::vector<uint8_t> &
data);
55 const uint8_t*
data()
const;
93 void dump(
const Stream & st,
bool dumpPayload =
false)
const;
101 #if API_AVCODEC_NEW_INIT_PACKET
112 #if API_AVCODEC_NEW_INIT_PACKET
124 int allocatePayload(int32_t
size);
125 int reallocatePayload(int32_t newSize);
Timestamp ts() const
Definition: packet.cpp:218
bool setData(const std::vector< uint8_t > &newData, OptionalErrorCode ec=throws())
Definition: rational.h:25
void addFlags(int flags)
Definition: packet.cpp:306
bool isKeyPacket() const
Definition: packet.cpp:268
int streamIndex() const
Definition: packet.cpp:258
void setTimeBase(const Rational &value)
Definition: packet.cpp:325
void setStreamIndex(int idx)
Definition: packet.cpp:288
attribute_deprecated void setDts(int64_t dts, const Rational &tsTimeBase=Rational(0, 0))
Definition: packet.cpp:236
AVPacket makeRef(OptionalErrorCode ec=throws()) const
Definition: packet.cpp:373
Packet clone(OptionalErrorCode ec=throws()) const
Definition: packet.cpp:385
const Rational & timeBase() const
Definition: packet.h:95
Wrap static data, do not owning and free.
Definition: packet.h:38
size_t size() const
Definition: packet.cpp:223
void dump(const Stream &st, bool dumpPayload=false) const
Definition: packet.cpp:316
attribute_deprecated void setPts(int64_t pts, const Rational &tsTimeBase=Rational(0, 0))
Set packet PTS field.
Definition: packet.cpp:228
int flags() const
Definition: packet.cpp:263
const uint8_t * data() const
Definition: packet.cpp:198
bool isComplete() const
Definition: packet.cpp:278
Timestamp pts() const
Definition: packet.cpp:208
void clearFlags(int flags)
Definition: packet.cpp:311
Timestamp dts() const
Definition: packet.cpp:213
void setFlags(int flags)
Definition: packet.cpp:301
Wrap data and take owning.
Definition: packet.h:33
int duration() const
Definition: packet.cpp:273
void setDuration(int duration, const Rational &durationTimeBase=Rational(0, 0))
Definition: packet.cpp:448
Definition: audioresampler.cpp:8
Packet()
Definition: packet.cpp:7
void swap(Packet &other)
Definition: packet.cpp:440
int refCount() const
Definition: packet.cpp:343
void setComplete(bool complete)
Definition: packet.cpp:393
The Timestamp class represents timestamp value and it timebase.
Definition: timestamp.h:13
void setKeyPacket(bool keyPacket)
Definition: packet.cpp:293
bool isReferenced() const
Definition: packet.cpp:338
bool isNull() const
Definition: packet.cpp:283
~Packet()
Definition: packet.cpp:100
Packet & operator=(const Packet &rhs)
Definition: packet.cpp:398