MythTV master
mythavframe.h
Go to the documentation of this file.
1#ifndef MYTHAVFRAME_H
2#define MYTHAVFRAME_H
3
4#include "mythexp.h"
5
6extern "C" {
7#include "libavcodec/avcodec.h"
8}
27{
28 public:
29 MythAVFrame(void) : m_frame(av_frame_alloc()) {}
31 {
32 av_frame_free(&m_frame);
33 }
34 bool operator !() const
35 {
36 return m_frame == nullptr;
37 }
39 {
40 return m_frame;
41 }
43 {
44 return *m_frame;
45 }
46 operator AVFrame*() const
47 {
48 return m_frame;
49 }
50 operator const AVFrame*() const
51 {
52 return m_frame;
53 }
54
55 private:
56 AVFrame *m_frame {nullptr};
57};
58
59#endif // MYTHAVFRAME_H
AVFrame AVFrame
MythAVFrame little utility class that act as a safe way to allocate an AVFrame which can then be allo...
Definition: mythavframe.h:27
AVFrame * operator->() const
Definition: mythavframe.h:38
AVFrame & operator*() const
Definition: mythavframe.h:42
~MythAVFrame(void)
Definition: mythavframe.h:30
MythAVFrame(void)
Definition: mythavframe.h:29
#define MPUBLIC
Definition: mythexp.h:10