30 #if LIBAVCODEC_VERSION_MAJOR > 54
33 #if LIBAVCODEC_VERSION_MAJOR > 53
34 avcodec_free_frame(&
_frame);
45 return av_frame_get_pkt_size(
_frame);
78 #if LIBAVCODEC_VERSION_MAJOR > 54
81 _frame = avcodec_alloc_frame();
85 throw std::runtime_error(
"Unable to allocate an empty Frame.");
bool isVideoFrame() const
Frame()
Allocate an empty frame. This only allocates the AVFrame itself, not the data buffers.
void clear()
Unreference all the buffers referenced by frame and reset the frame fields.
std::string getDescriptionFromErrorCode(const int code)
Get the string description corresponding to the error code provided by ffmpeg/libav.
bool isAudioFrame() const
void refFrame(const Frame &otherFrame)
Copy frame properties and create a new reference to data of the given frame.
void copyProperties(const Frame &otherFrame)
Copy all the fields that do not affect the data layout in the buffers.
int getEncodedSize() const
This class describes decoded (raw) audio or video data.
void copyData(const Frame &frameToRef)
Copy the data of the given Frame.