[vlc-devel] [PATCH 2/4] d3d11_fmt: rename inputView to processorInput
Steve Lhomme
robux4 at videolabs.io
Mon Apr 10 16:07:25 CEST 2017
---
modules/codec/avcodec/d3d11va.c | 8 ++++----
modules/video_chroma/d3d11_fmt.h | 2 +-
modules/video_output/win32/direct3d11.c | 4 ++++
3 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c
index 256408493f..6377c87277 100644
--- a/modules/codec/avcodec/d3d11va.c
+++ b/modules/codec/avcodec/d3d11va.c
@@ -284,7 +284,7 @@ static int Extract(vlc_va_t *va, picture_t *output, uint8_t *data)
D3D11_VIDEO_PROCESSOR_STREAM stream = {
.Enable = TRUE,
- .pInputSurface = p_sys_in->inputView,
+ .pInputSurface = p_sys_in->processorInput,
};
HRESULT hr = ID3D11VideoContext_VideoProcessorBlt(sys->d3dvidctx, sys->videoProcessor,
@@ -1209,8 +1209,8 @@ static void DestroyPicture(picture_t *picture)
{
picture_sys_t *p_sys = picture->p_sys;
ID3D11Texture2D_Release( p_sys->texture[KNOWN_DXGI_INDEX] );
- if (p_sys->inputView)
- ID3D11View_Release( (ID3D11View*) p_sys->inputView );
+ if (p_sys->processorInput)
+ ID3D11VideoProcessorInputView_Release( p_sys->processorInput );
free(p_sys);
free(picture);
@@ -1245,7 +1245,7 @@ static picture_t *DxAllocPicture(vlc_va_t *va, const video_format_t *fmt, unsign
pic_sys->resource[KNOWN_DXGI_INDEX],
sys->procEnumerator,
&inDesc,
- &pic_sys->inputView);
+ &pic_sys->processorInput);
if (FAILED(hr))
{
msg_Err(va, "Failed to create the processor input ArraySlice=%d. (hr=0x%lX)", inDesc.Texture2D.ArraySlice, hr);
diff --git a/modules/video_chroma/d3d11_fmt.h b/modules/video_chroma/d3d11_fmt.h
index 904c465f07..3bf004a119 100644
--- a/modules/video_chroma/d3d11_fmt.h
+++ b/modules/video_chroma/d3d11_fmt.h
@@ -39,7 +39,7 @@ struct picture_sys_t
};
ID3D11DeviceContext *context;
unsigned slice_index;
- ID3D11VideoProcessorInputView *inputView; /* when used as processor input */
+ ID3D11VideoProcessorInputView *processorInput; /* when used as processor input */
ID3D11ShaderResourceView *resourceView[D3D11_MAX_SHADER_VIEW];
DXGI_FORMAT formatTexture;
};
diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index f02970cc73..34b0a651e6 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -905,6 +905,10 @@ static void ReleasePictureResources(picture_sys_t *p_sys)
ID3D11VideoDecoderOutputView_Release(p_sys->decoder);
p_sys->decoder = NULL;
}
+ if (p_sys->processorInput) {
+ ID3D11VideoProcessorInputView_Release(p_sys->processorInput);
+ p_sys->processorInput = NULL;
+ }
}
static void DestroyDisplayPoolPicture(picture_t *picture)
--
2.11.1
More information about the vlc-devel
mailing list