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