|
AvTranscoder
0.9.4
C++APIforLibav/FFmpeg
|
This class describes coded data. More...
#include <CodedData.hpp>
Public Member Functions | |
| CodedData () | |
| Create an empty data buffer. More... | |
| CodedData (const size_t dataSize) | |
| Create a data buffer with a the given size. More... | |
| CodedData (const AVPacket &avPacket) | |
| Create a data buffer from the given AVPAcket (copy data of given packet) More... | |
| CodedData (const CodedData &other) | |
| Override copy constructor in order to copy AVPacket data. More... | |
| CodedData & | operator= (const CodedData &other) |
| Override operator = in order to copy AVPacket data. More... | |
| ~CodedData () | |
| Free buffer of data. More... | |
| void | refAVStream (const AVStream &avStream) |
| void | resize (const size_t newSize) |
| Resize data buffer. More... | |
| void | copyData (unsigned char *buffer, const size_t size) |
| Copy external data buffer. More... | |
| void | assign (const size_t size, const int value) |
| Resize the buffer with the given size, and copy the given value. More... | |
| void | clear () |
| Clear existing data and set size to 0. More... | |
| unsigned char * | getData () |
| const unsigned char * | getData () const |
| size_t | getSize () const |
| const AVStream * | getAVStream () const |
| AVPacket & | getAVPacket () |
| const AVPacket & | getAVPacket () const |
| void | refData (CodedData &frame) |
| void | refData (unsigned char *buffer, const size_t size) |
Private Member Functions | |
| void | initAVPacket () |
| void | copyAVPacket (const AVPacket &avPacket) |
Private Attributes | |
| AVPacket | _packet |
| const AVStream * | _avStream |
This class describes coded data.
Definition at line 18 of file CodedData.hpp.
| avtranscoder::CodedData::CodedData | ( | ) |
| avtranscoder::CodedData::CodedData | ( | const size_t | dataSize | ) |
Create a data buffer with a the given size.
Definition at line 14 of file CodedData.cpp.
References _packet.
| avtranscoder::CodedData::CodedData | ( | const AVPacket & | avPacket | ) |
Create a data buffer from the given AVPAcket (copy data of given packet)
Definition at line 20 of file CodedData.cpp.
References copyAVPacket().
| avtranscoder::CodedData::CodedData | ( | const CodedData & | other | ) |
Override copy constructor in order to copy AVPacket data.
Definition at line 26 of file CodedData.cpp.
References _avStream, copyAVPacket(), getAVPacket(), and getAVStream().
| avtranscoder::CodedData::~CodedData | ( | ) |
| void avtranscoder::CodedData::assign | ( | const size_t | size, |
| const int | value | ||
| ) |
Resize the buffer with the given size, and copy the given value.
Definition at line 77 of file CodedData.cpp.
| void avtranscoder::CodedData::clear | ( | ) |
Clear existing data and set size to 0.
Definition at line 71 of file CodedData.cpp.
References _packet, and initAVPacket().
Referenced by avtranscoder::AudioDecoder::decodeNextFrame(), avtranscoder::VideoDecoder::decodeNextFrame(), and avtranscoder::InputFile::readNextPacket().
|
private |
Definition at line 90 of file CodedData.cpp.
References _packet, copyData(), and initAVPacket().
Referenced by CodedData(), and operator=().
| void avtranscoder::CodedData::copyData | ( | unsigned char * | buffer, |
| const size_t | size | ||
| ) |
Copy external data buffer.
Definition at line 58 of file CodedData.cpp.
References _packet, and resize().
Referenced by copyAVPacket(), and avtranscoder::InputStream::readNextPacket().
|
inline |
Definition at line 78 of file CodedData.hpp.
Referenced by CodedData(), avtranscoder::VideoDecoder::decodeNextFrame(), avtranscoder::AudioDecoder::decodeNextFrame(), avtranscoder::AudioEncoder::encodeFrame(), avtranscoder::VideoEncoder::encodeFrame(), operator=(), avtranscoder::InputFile::readNextPacket(), avtranscoder::OutputStream::wrap(), and avtranscoder::OutputFile::wrap().
|
inline |
Definition at line 79 of file CodedData.hpp.
|
inline |
Definition at line 77 of file CodedData.hpp.
Referenced by CodedData(), operator=(), and avtranscoder::OutputFile::wrap().
|
inline |
Definition at line 65 of file CodedData.hpp.
Referenced by refData(), and avtranscoder::OutputFile::wrap().
|
inline |
Definition at line 67 of file CodedData.hpp.
|
inline |
Definition at line 70 of file CodedData.hpp.
Referenced by avtranscoder::StreamTranscoder::processTranscode(), refData(), avtranscoder::OutputStream::wrap(), and avtranscoder::OutputFile::wrap().
|
private |
Definition at line 83 of file CodedData.cpp.
References _packet.
Referenced by clear(), CodedData(), and copyAVPacket().
Override operator = in order to copy AVPacket data.
Definition at line 32 of file CodedData.cpp.
References _avStream, copyAVPacket(), getAVPacket(), and getAVStream().
|
inline |
Definition at line 42 of file CodedData.hpp.
Referenced by avtranscoder::InputFile::readNextPacket().
| void avtranscoder::CodedData::refData | ( | CodedData & | frame | ) |
Ref to external data buffer
Definition at line 65 of file CodedData.cpp.
| void avtranscoder::CodedData::refData | ( | unsigned char * | buffer, |
| const size_t | size | ||
| ) |
Definition at line 52 of file CodedData.cpp.
References _packet.
| void avtranscoder::CodedData::resize | ( | const size_t | newSize | ) |
Resize data buffer.
Definition at line 44 of file CodedData.cpp.
References _packet.
Referenced by assign(), and copyData().
|
private |
Definition at line 90 of file CodedData.hpp.
Referenced by CodedData(), and operator=().
|
private |
Definition at line 87 of file CodedData.hpp.
Referenced by assign(), clear(), CodedData(), copyAVPacket(), copyData(), initAVPacket(), refData(), resize(), and ~CodedData().