MythTV  master
Public Member Functions | Private Member Functions | Private Attributes | List of all members
MythAVCopy Class Reference

#include <mythavutil.h>

Collaboration diagram for MythAVCopy:
Collaboration graph
[legend]

Public Member Functions

 MythAVCopy ()=default
 
 ~MythAVCopy ()
 
int Copy (AVFrame *To, const MythVideoFrame *From, unsigned char *Buffer, AVPixelFormat Fmt=AV_PIX_FMT_YUV420P)
 Initialise AVFrame and copy contents of VideoFrame frame into it, performing any required conversion. More...
 
int Copy (AVFrame *To, AVPixelFormat ToFmt, const AVFrame *From, AVPixelFormat FromFmt, int Width, int Height)
 

Private Member Functions

int SizeData (int Width, int Height, AVPixelFormat Fmt)
 

Private Attributes

AVPixelFormat m_format { AV_PIX_FMT_NONE }
 
SwsContext * m_swsctx { nullptr }
 
int m_width { 0 }
 
int m_height { 0 }
 
int m_size { 0 }
 

Detailed Description

Copy AVFrame<->frame, performing the required conversion if any

Definition at line 40 of file mythavutil.h.

Constructor & Destructor Documentation

◆ MythAVCopy()

MythAVCopy::MythAVCopy ( )
default

◆ ~MythAVCopy()

MythAVCopy::~MythAVCopy ( )

Definition at line 174 of file mythavutil.cpp.

Member Function Documentation

◆ Copy() [1/2]

int MythAVCopy::Copy ( AVFrame To,
const MythVideoFrame From,
unsigned char *  Buffer,
AVPixelFormat  Fmt = AV_PIX_FMT_YUV420P 
)

Initialise AVFrame and copy contents of VideoFrame frame into it, performing any required conversion.

Returns
Size of buffer allocated
Note
AVFrame buffers must be deleted manually by the caller (av_freep(pic->data[0]))

Definition at line 220 of file mythavutil.cpp.

Referenced by MHIBitmap::CreateFromMPEG(), ThumbFinder::getFrameImage(), MythPreviewPlayer::GetScreenGrabAtFrame(), grabThumbnail(), VideoOutputD3D::UpdateFrame(), and MythVideoTexture::YV12ToYUYV().

◆ Copy() [2/2]

int MythAVCopy::Copy ( AVFrame To,
AVPixelFormat  ToFmt,
const AVFrame From,
AVPixelFormat  FromFmt,
int  Width,
int  Height 
)

Definition at line 191 of file mythavutil.cpp.

◆ SizeData()

int MythAVCopy::SizeData ( int  Width,
int  Height,
AVPixelFormat  Fmt 
)
private

Definition at line 179 of file mythavutil.cpp.

Referenced by Copy().

Member Data Documentation

◆ m_format

AVPixelFormat MythAVCopy::m_format { AV_PIX_FMT_NONE }
private

Definition at line 54 of file mythavutil.h.

Referenced by SizeData().

◆ m_swsctx

SwsContext* MythAVCopy::m_swsctx { nullptr }
private

Definition at line 55 of file mythavutil.h.

Referenced by Copy(), and ~MythAVCopy().

◆ m_width

int MythAVCopy::m_width { 0 }
private

Definition at line 56 of file mythavutil.h.

Referenced by SizeData().

◆ m_height

int MythAVCopy::m_height { 0 }
private

Definition at line 57 of file mythavutil.h.

Referenced by SizeData().

◆ m_size

int MythAVCopy::m_size { 0 }
private

Definition at line 58 of file mythavutil.h.

Referenced by SizeData().


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