MythTV  master
dxva2decoder.h
Go to the documentation of this file.
1 #ifndef DXVA2DECODER_H
2 #define DXVA2DECODER_H
3 
4 #include <windows.h>
5 #include <d3d9.h>
6 
7 extern "C" {
8 #include "libavcodec/avcodec.h"
9 #include "libavcodec/dxva2.h"
10 }
11 
12 #include "mythcodecid.h"
13 #include "dxva2api.h"
14 
16 {
17  public:
18  DXVA2Decoder(uint num_bufs, MythCodecID codec_id,
19  uint width, uint height);
20  ~DXVA2Decoder(void);
21  bool Init(MythRenderD3D9* render);
22  bool CreateVideoService(MythRenderD3D9* render);
23  void DestroyVideoService(void);
24  bool GetInputOutput(void);
25  void InitFormat(void);
26  bool TestTarget(const GUID &guid);
27  bool GetDecoderConfig(void);
28  bool CreateSurfaces(void);
29  void DestroySurfaces(void);
30  bool CreateDecoder(void);
31  void DestroyDecoder(void);
32  void* GetSurface(uint num);
33 
34  IDirect3DDeviceManager9 *m_deviceManager {nullptr};
35  HANDLE m_device {nullptr};
36  IDirectXVideoDecoderService *m_service {nullptr};
37  struct dxva_context m_context;
38  DXVA2_ConfigPictureDecode m_config;
40  GUID m_input;
41  DXVA2_VideoDesc m_format;
44 };
45 
46 #endif // DXVA2DECODER_H
DXVA2Decoder::Init
bool Init(MythRenderD3D9 *render)
Definition: dxva2decoder.cpp:153
DXVA2Decoder::m_input
GUID m_input
Definition: dxva2decoder.h:40
DXVA2Decoder::m_codec_id
MythCodecID m_codec_id
Definition: dxva2decoder.h:39
MythCodecID
MythCodecID
Definition: mythcodecid.h:10
DXVA2Decoder::m_context
struct dxva_context m_context
Definition: dxva2decoder.h:37
DXVA2Decoder
Definition: dxva2decoder.h:15
DXVA2Decoder::InitFormat
void InitFormat(void)
Definition: dxva2decoder.cpp:272
DXVA2Decoder::GetInputOutput
bool GetInputOutput(void)
Definition: dxva2decoder.cpp:218
DXVA2Decoder::GetDecoderConfig
bool GetDecoderConfig(void)
Definition: dxva2decoder.cpp:283
DXVA2Decoder::m_deviceManager
IDirect3DDeviceManager9 * m_deviceManager
Definition: dxva2decoder.h:34
DXVA2Decoder::m_config
DXVA2_ConfigPictureDecode m_config
Definition: dxva2decoder.h:38
MythRenderD3D9
Definition: mythrender_d3d9.h:91
mythcodecid.h
DXVA2Decoder::DXVA2Decoder
DXVA2Decoder(uint num_bufs, MythCodecID codec_id, uint width, uint height)
Definition: dxva2decoder.cpp:132
DXVA2Decoder::CreateSurfaces
bool CreateSurfaces(void)
Definition: dxva2decoder.cpp:320
uint
unsigned int uint
Definition: compat.h:81
DXVA2Decoder::DestroyVideoService
void DestroyVideoService(void)
Definition: dxva2decoder.cpp:207
DXVA2Decoder::m_width
uint m_width
Definition: dxva2decoder.h:42
DXVA2Decoder::m_device
HANDLE m_device
Definition: dxva2decoder.h:35
DXVA2Decoder::DestroyDecoder
void DestroyDecoder(void)
Definition: dxva2decoder.cpp:374
DXVA2Decoder::~DXVA2Decoder
~DXVA2Decoder(void)
Definition: dxva2decoder.cpp:146
DXVA2Decoder::m_format
DXVA2_VideoDesc m_format
Definition: dxva2decoder.h:41
DXVA2Decoder::CreateDecoder
bool CreateDecoder(void)
Definition: dxva2decoder.cpp:354
DXVA2Decoder::DestroySurfaces
void DestroySurfaces(void)
Definition: dxva2decoder.cpp:340
DXVA2Decoder::GetSurface
void * GetSurface(uint num)
Definition: dxva2decoder.cpp:381
DXVA2Decoder::TestTarget
bool TestTarget(const GUID &guid)
Definition: dxva2decoder.cpp:251
DXVA2Decoder::m_service
IDirectXVideoDecoderService * m_service
Definition: dxva2decoder.h:36
DXVA2Decoder::m_height
uint m_height
Definition: dxva2decoder.h:43
DXVA2Decoder::CreateVideoService
bool CreateVideoService(MythRenderD3D9 *render)
Definition: dxva2decoder.cpp:171