00001 #ifndef DXVA2DECODER_H 00002 #define DXVA2DECODER_H 00003 00004 #include <windows.h> 00005 #include <d3d9.h> 00006 00007 extern "C" { 00008 #include "libavcodec/avcodec.h" 00009 #include "libavcodec/dxva2.h" 00010 } 00011 00012 #include "mythcodecid.h" 00013 #include "dxva2api.h" 00014 00015 class DXVA2Decoder 00016 { 00017 public: 00018 DXVA2Decoder(uint num_bufs, MythCodecID codec_id, 00019 uint width, uint height); 00020 ~DXVA2Decoder(void); 00021 bool Init(MythRenderD3D9* render); 00022 bool CreateVideoService(MythRenderD3D9* render); 00023 void DestroyVideoService(void); 00024 bool GetInputOutput(void); 00025 void InitFormat(void); 00026 bool TestTarget(const GUID &guid); 00027 bool GetDecoderConfig(void); 00028 bool CreateSurfaces(void); 00029 void DestroySurfaces(void); 00030 bool CreateDecoder(void); 00031 void DestroyDecoder(void); 00032 void* GetSurface(uint num); 00033 00034 IDirect3DDeviceManager9 *m_deviceManager; 00035 HANDLE m_device; 00036 IDirectXVideoDecoderService *m_service; 00037 struct dxva_context m_context; 00038 DXVA2_ConfigPictureDecode m_config; 00039 MythCodecID m_codec_id; 00040 GUID m_input; 00041 DXVA2_VideoDesc m_format; 00042 uint m_width; 00043 uint m_height; 00044 }; 00045 00046 #endif // DXVA2DECODER_H
1.6.3