From d35b2a325a94664c455899f6d1e81d31951cd2a8 Mon Sep 17 00:00:00 2001 From: Raphael <68374617+raphaelscholle@users.noreply.github.com> Date: Mon, 6 Jan 2025 19:08:08 +0100 Subject: [PATCH] Update avcodec_decoder.cpp --- app/videostreaming/avcodec/avcodec_decoder.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/videostreaming/avcodec/avcodec_decoder.cpp b/app/videostreaming/avcodec/avcodec_decoder.cpp index f19a0d473..b3ff9b215 100644 --- a/app/videostreaming/avcodec/avcodec_decoder.cpp +++ b/app/videostreaming/avcodec/avcodec_decoder.cpp @@ -508,8 +508,14 @@ int AVCodecDecoder::open_and_decode_until_error(const QOpenHDVideoHelper::VideoS return 0; } + #ifdef _WIN32 + const AVHWDeviceType kAvhwDeviceType = AV_HWDEVICE_TYPE_DXVA2; + #else + const AVHWDeviceType kAvhwDeviceType = AV_HWDEVICE_TYPE_DRM; + #endif + //const AVHWDeviceType kAvhwDeviceType = AV_HWDEVICE_TYPE_D3D11VA; - const AVHWDeviceType kAvhwDeviceType = AV_HWDEVICE_TYPE_DXVA2; + //const AVHWDeviceType kAvhwDeviceType = AV_HWDEVICE_TYPE_DXVA2; //const AVHWDeviceType kAvhwDeviceType = AV_HWDEVICE_TYPE_DRM; //const AVHWDeviceType kAvhwDeviceType = AV_HWDEVICE_TYPE_D3D11VA; //const AVHWDeviceType kAvhwDeviceType = AV_HWDEVICE_TYPE_VAAPI;