avcpp  2.0
Wrapper for the FFmpeg that simplify usage from C++ projects.
Public Member Functions | List of all members
av::VideoFrame Class Reference

#include <frame.h>

Inheritance diagram for av::VideoFrame:
Inheritance graph
[legend]
Collaboration diagram for av::VideoFrame:
Collaboration graph
[legend]

Public Member Functions

 VideoFrame ()=default
 
 VideoFrame (PixelFormat pixelFormat, int width, int height, int align=1)
 
 VideoFrame (const uint8_t *data, size_t size, PixelFormat pixelFormat, int width, int height, int align=1)
 
 VideoFrame (const VideoFrame &other)
 
 VideoFrame (VideoFrame &&other)
 
VideoFrameoperator= (const VideoFrame &rhs)
 
VideoFrameoperator= (VideoFrame &&rhs)
 
PixelFormat pixelFormat () const
 
int width () const
 
int height () const
 
bool isKeyFrame () const
 
void setKeyFrame (bool isKey)
 
int quality () const
 
void setQuality (int quality)
 
AVPictureType pictureType () const
 
void setPictureType (AVPictureType type=AV_PICTURE_TYPE_NONE)
 
Rational sampleAspectRatio () const
 
void setSampleAspectRatio (const Rational &sampleAspectRatio)
 
size_t bufferSize (int align=1, OptionalErrorCode ec=throws()) const
 
bool copyToBuffer (uint8_t *dst, size_t size, int align=1, OptionalErrorCode ec=throws())
 
bool copyToBuffer (std::vector< uint8_t > &dst, int align=1, OptionalErrorCode ec=throws())
 
- Public Member Functions inherited from av::Frame< VideoFrame >
 Frame ()
 
 Frame (const AVFrame *frame)
 
 Frame (const VideoFrame &other)
 
 Frame (VideoFrame &&other)
 
 ~Frame ()
 
void operator= (const Frame &)=delete
 
void swap (Frame &other)
 
void copyInfoFrom (const VideoFrame &other)
 
bool isReferenced () const
 
int refCount () const
 
AVFrame * makeRef () const
 
VideoFrame clone (size_t align=1) const
 
Timestamp pts () const
 
attribute_deprecated void setPts (int64_t pts, Rational ptsTimeBase)
 
void setPts (const Timestamp &ts)
 
const RationaltimeBase () const
 
void setTimeBase (const Rational &value)
 
int streamIndex () const
 
void setStreamIndex (int streamIndex)
 
void setComplete (bool isComplete)
 
bool isComplete () const
 
bool isValid () const
 
 operator bool () const
 
uint8_t * data (size_t plane=0)
 
const uint8_t * data (size_t plane=0) const
 
size_t size (size_t plane) const
 
size_t size () const
 
void dump () const
 
- Public Member Functions inherited from FFWrapperPtr< AVFrame >
 FFWrapperPtr ()=default
 
 FFWrapperPtr (AVFrame *raw)
 
const AVFrame * raw () const
 
AVFrame * raw ()
 
void reset (AVFrame *raw=nullptr)
 
bool isNull () const
 
void _log (int level, const char *fmt) const
 
void _log (int level, const char *fmt, const Args &... args) const
 

Additional Inherited Members

- Static Public Member Functions inherited from av::Frame< VideoFrame >
static VideoFrame null ()
 
- Protected Member Functions inherited from av::Frame< VideoFrame >
VideoFrameassignOperator (const VideoFrame &rhs)
 
VideoFramemoveOperator (VideoFrame &&rhs)
 
- Protected Attributes inherited from av::Frame< VideoFrame >
Rational m_timeBase
 
int m_streamIndex
 
bool m_isComplete
 
- Protected Attributes inherited from FFWrapperPtr< AVFrame >
AVFrame * m_raw
 

Constructor & Destructor Documentation

◆ VideoFrame() [1/5]

av::VideoFrame::VideoFrame ( )
default

◆ VideoFrame() [2/5]

av::VideoFrame::VideoFrame ( PixelFormat  pixelFormat,
int  width,
int  height,
int  align = 1 
)

◆ VideoFrame() [3/5]

av::VideoFrame::VideoFrame ( const uint8_t *  data,
size_t  size,
PixelFormat  pixelFormat,
int  width,
int  height,
int  align = 1 
)

◆ VideoFrame() [4/5]

av::VideoFrame::VideoFrame ( const VideoFrame other)

◆ VideoFrame() [5/5]

av::VideoFrame::VideoFrame ( VideoFrame &&  other)

Member Function Documentation

◆ bufferSize()

size_t av::VideoFrame::bufferSize ( int  align = 1,
OptionalErrorCode  ec = throws() 
) const

◆ copyToBuffer() [1/2]

bool av::VideoFrame::copyToBuffer ( std::vector< uint8_t > &  dst,
int  align = 1,
OptionalErrorCode  ec = throws() 
)

◆ copyToBuffer() [2/2]

bool av::VideoFrame::copyToBuffer ( uint8_t *  dst,
size_t  size,
int  align = 1,
OptionalErrorCode  ec = throws() 
)

◆ height()

int av::VideoFrame::height ( ) const

◆ isKeyFrame()

bool av::VideoFrame::isKeyFrame ( ) const

◆ operator=() [1/2]

VideoFrame & av::VideoFrame::operator= ( const VideoFrame rhs)

◆ operator=() [2/2]

VideoFrame & av::VideoFrame::operator= ( VideoFrame &&  rhs)

◆ pictureType()

AVPictureType av::VideoFrame::pictureType ( ) const

◆ pixelFormat()

PixelFormat av::VideoFrame::pixelFormat ( ) const

◆ quality()

int av::VideoFrame::quality ( ) const

◆ sampleAspectRatio()

Rational av::VideoFrame::sampleAspectRatio ( ) const

◆ setKeyFrame()

void av::VideoFrame::setKeyFrame ( bool  isKey)

◆ setPictureType()

void av::VideoFrame::setPictureType ( AVPictureType  type = AV_PICTURE_TYPE_NONE)

◆ setQuality()

void av::VideoFrame::setQuality ( int  quality)

◆ setSampleAspectRatio()

void av::VideoFrame::setSampleAspectRatio ( const Rational sampleAspectRatio)

◆ width()

int av::VideoFrame::width ( ) const

The documentation for this class was generated from the following files: