mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +01:00
[d3d11] Add ID3D11VideoProcessorEnumerator stub
This commit is contained in:
parent
1eaf2545c3
commit
bdb7eef874
@ -21,6 +21,7 @@
|
|||||||
#include "d3d11_state_object.h"
|
#include "d3d11_state_object.h"
|
||||||
#include "d3d11_swapchain.h"
|
#include "d3d11_swapchain.h"
|
||||||
#include "d3d11_texture.h"
|
#include "d3d11_texture.h"
|
||||||
|
#include "d3d11_video.h"
|
||||||
|
|
||||||
namespace dxvk {
|
namespace dxvk {
|
||||||
|
|
||||||
@ -2490,8 +2491,13 @@ namespace dxvk {
|
|||||||
HRESULT STDMETHODCALLTYPE D3D11VideoDevice::CreateVideoProcessorEnumerator(
|
HRESULT STDMETHODCALLTYPE D3D11VideoDevice::CreateVideoProcessorEnumerator(
|
||||||
const D3D11_VIDEO_PROCESSOR_CONTENT_DESC* pDesc,
|
const D3D11_VIDEO_PROCESSOR_CONTENT_DESC* pDesc,
|
||||||
ID3D11VideoProcessorEnumerator** ppEnum) {
|
ID3D11VideoProcessorEnumerator** ppEnum) {
|
||||||
Logger::err("D3D11VideoDevice::CreateVideoProcessorEnumerator: Stub");
|
try {
|
||||||
return E_NOTIMPL;
|
*ppEnum = ref(new D3D11VideoProcessorEnumerator(m_device, *pDesc));
|
||||||
|
return S_OK;
|
||||||
|
} catch (const DxvkError& e) {
|
||||||
|
Logger::err(e.message());
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
82
src/d3d11/d3d11_video.cpp
Normal file
82
src/d3d11/d3d11_video.cpp
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
#include "d3d11_context.h"
|
||||||
|
#include "d3d11_video.h"
|
||||||
|
|
||||||
|
namespace dxvk {
|
||||||
|
|
||||||
|
D3D11VideoProcessorEnumerator::D3D11VideoProcessorEnumerator(
|
||||||
|
D3D11Device* pDevice,
|
||||||
|
const D3D11_VIDEO_PROCESSOR_CONTENT_DESC& Desc)
|
||||||
|
: D3D11DeviceChild<ID3D11VideoProcessorEnumerator>(pDevice),
|
||||||
|
m_desc(Desc) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
D3D11VideoProcessorEnumerator::~D3D11VideoProcessorEnumerator() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE D3D11VideoProcessorEnumerator::QueryInterface(
|
||||||
|
REFIID riid,
|
||||||
|
void** ppvObject) {
|
||||||
|
if (riid == __uuidof(IUnknown)
|
||||||
|
|| riid == __uuidof(ID3D11DeviceChild)
|
||||||
|
|| riid == __uuidof(ID3D11VideoProcessorEnumerator)) {
|
||||||
|
*ppvObject = ref(this);
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
Logger::warn("D3D11VideoProcessorEnumerator::QueryInterface: Unknown interface query");
|
||||||
|
Logger::warn(str::format(riid));
|
||||||
|
return E_NOINTERFACE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE D3D11VideoProcessorEnumerator::GetVideoProcessorContentDesc(
|
||||||
|
D3D11_VIDEO_PROCESSOR_CONTENT_DESC* pContentDesc) {
|
||||||
|
*pContentDesc = m_desc;
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE D3D11VideoProcessorEnumerator::CheckVideoProcessorFormat(
|
||||||
|
DXGI_FORMAT Format,
|
||||||
|
UINT* pFlags) {
|
||||||
|
Logger::err("D3D11VideoProcessorEnumerator::CheckVideoProcessorFormat: Stub");
|
||||||
|
return E_NOTIMPL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE D3D11VideoProcessorEnumerator::GetVideoProcessorCaps(
|
||||||
|
D3D11_VIDEO_PROCESSOR_CAPS* pCaps) {
|
||||||
|
Logger::err("D3D11VideoProcessorEnumerator::GetVideoProcessorCaps: Stub");
|
||||||
|
return E_NOTIMPL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE D3D11VideoProcessorEnumerator::GetVideoProcessorRateConversionCaps(
|
||||||
|
UINT TypeIndex,
|
||||||
|
D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS* pCaps) {
|
||||||
|
Logger::err("D3D11VideoProcessorEnumerator::GetVideoProcessorRateConversionCaps: Stub");
|
||||||
|
return E_NOTIMPL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE D3D11VideoProcessorEnumerator::GetVideoProcessorCustomRate(
|
||||||
|
UINT TypeIndex,
|
||||||
|
UINT CustomRateIndex,
|
||||||
|
D3D11_VIDEO_PROCESSOR_CUSTOM_RATE* pRate) {
|
||||||
|
Logger::err("D3D11VideoProcessorEnumerator::GetVideoProcessorCustomRate: Stub");
|
||||||
|
return E_NOTIMPL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE D3D11VideoProcessorEnumerator::GetVideoProcessorFilterRange(
|
||||||
|
D3D11_VIDEO_PROCESSOR_FILTER Filter,
|
||||||
|
D3D11_VIDEO_PROCESSOR_FILTER_RANGE* pRange) {
|
||||||
|
Logger::err("D3D11VideoProcessorEnumerator::GetVideoProcessorFilterRange: Stub");
|
||||||
|
return E_NOTIMPL;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
50
src/d3d11/d3d11_video.h
Normal file
50
src/d3d11/d3d11_video.h
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "d3d11_device.h"
|
||||||
|
|
||||||
|
namespace dxvk {
|
||||||
|
|
||||||
|
class D3D11VideoProcessorEnumerator : public D3D11DeviceChild<ID3D11VideoProcessorEnumerator> {
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
D3D11VideoProcessorEnumerator(
|
||||||
|
D3D11Device* pDevice,
|
||||||
|
const D3D11_VIDEO_PROCESSOR_CONTENT_DESC& Desc);
|
||||||
|
|
||||||
|
~D3D11VideoProcessorEnumerator();
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE QueryInterface(
|
||||||
|
REFIID riid,
|
||||||
|
void** ppvObject);
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE GetVideoProcessorContentDesc(
|
||||||
|
D3D11_VIDEO_PROCESSOR_CONTENT_DESC* pContentDesc);
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE CheckVideoProcessorFormat(
|
||||||
|
DXGI_FORMAT Format,
|
||||||
|
UINT* pFlags);
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE GetVideoProcessorCaps(
|
||||||
|
D3D11_VIDEO_PROCESSOR_CAPS* pCaps);
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE GetVideoProcessorRateConversionCaps(
|
||||||
|
UINT TypeIndex,
|
||||||
|
D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS* pCaps);
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE GetVideoProcessorCustomRate(
|
||||||
|
UINT TypeIndex,
|
||||||
|
UINT CustomRateIndex,
|
||||||
|
D3D11_VIDEO_PROCESSOR_CUSTOM_RATE* pRate);
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE GetVideoProcessorFilterRange(
|
||||||
|
D3D11_VIDEO_PROCESSOR_FILTER Filter,
|
||||||
|
D3D11_VIDEO_PROCESSOR_FILTER_RANGE* pRange);
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
D3D11_VIDEO_PROCESSOR_CONTENT_DESC m_desc;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
@ -52,6 +52,7 @@ d3d11_src = [
|
|||||||
'd3d11_swapchain.cpp',
|
'd3d11_swapchain.cpp',
|
||||||
'd3d11_texture.cpp',
|
'd3d11_texture.cpp',
|
||||||
'd3d11_util.cpp',
|
'd3d11_util.cpp',
|
||||||
|
'd3d11_video.cpp',
|
||||||
'd3d11_view_dsv.cpp',
|
'd3d11_view_dsv.cpp',
|
||||||
'd3d11_view_rtv.cpp',
|
'd3d11_view_rtv.cpp',
|
||||||
'd3d11_view_srv.cpp',
|
'd3d11_view_srv.cpp',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user