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
void InitFormat(void)
bool TestTarget(const GUID &guid)
bool CreateSurfaces(void)
DXVA2Decoder(uint num_bufs, MythCodecID codec_id, uint width, uint height)
MythCodecID
Definition: mythcodecid.h:10
void * GetSurface(uint num)
bool GetInputOutput(void)
HANDLE m_device
Definition: dxva2decoder.h:35
unsigned int uint
Definition: compat.h:140
bool Init(MythRenderD3D9 *render)
void DestroySurfaces(void)
void DestroyVideoService(void)
void DestroyDecoder(void)
bool CreateDecoder(void)
DXVA2_ConfigPictureDecode m_config
Definition: dxva2decoder.h:38
IDirectXVideoDecoderService * m_service
Definition: dxva2decoder.h:36
bool CreateVideoService(MythRenderD3D9 *render)
MythCodecID m_codec_id
Definition: dxva2decoder.h:39
IDirect3DDeviceManager9 * m_deviceManager
Definition: dxva2decoder.h:34
DXVA2_VideoDesc m_format
Definition: dxva2decoder.h:41
bool GetDecoderConfig(void)
struct dxva_context m_context
Definition: dxva2decoder.h:37