mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
d3d11: Fix wrong preprocessing blocks
Missed in https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/464 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2051>
This commit is contained in:
parent
f7eb93e22b
commit
a4c6130477
7 changed files with 23 additions and 23 deletions
|
@ -41,15 +41,15 @@
|
|||
#include <d3d11.h>
|
||||
#endif
|
||||
|
||||
#if (GST_D3D11_DXGI_H_VERSION >= 6)
|
||||
#if (GST_D3D11_DXGI_HEADER_VERSION >= 6)
|
||||
#include <dxgi1_6.h>
|
||||
#elif (GST_D3D11_DXGI_H_VERSION >= 5)
|
||||
#elif (GST_D3D11_DXGI_HEADER_VERSION >= 5)
|
||||
#include <dxgi1_5.h>
|
||||
#elif (GST_D3D11_DXGI_H_VERSION >= 4)
|
||||
#elif (GST_D3D11_DXGI_HEADER_VERSION >= 4)
|
||||
#include <dxgi1_4.h>
|
||||
#elif (GST_D3D11_DXGI_H_VERSION >= 3)
|
||||
#elif (GST_D3D11_DXGI_HEADER_VERSION >= 3)
|
||||
#include <dxgi1_3.h>
|
||||
#elif (GST_D3D11_DXGI_H_VERSION >= 2)
|
||||
#elif (GST_D3D11_DXGI_HEADER_VERSION >= 2)
|
||||
#include <dxgi1_2.h>
|
||||
#else
|
||||
#include <dxgi.h>
|
||||
|
|
|
@ -1487,7 +1487,7 @@ gst_d3d11_base_convert_set_info (GstD3D11BaseFilter * filter,
|
|||
GST_ERROR_OBJECT (self, "couldn't set converter");
|
||||
return FALSE;
|
||||
}
|
||||
#if (DXGI_HEADER_VERSION >= 4)
|
||||
#if (GST_D3D11_DXGI_HEADER_VERSION >= 4)
|
||||
/* If both input and output formats are native DXGI format */
|
||||
if (self->in_d3d11_format->dxgi_format != DXGI_FORMAT_UNKNOWN &&
|
||||
self->out_d3d11_format->dxgi_format != DXGI_FORMAT_UNKNOWN) {
|
||||
|
|
|
@ -28,11 +28,11 @@
|
|||
GST_DEBUG_CATEGORY_EXTERN (gst_d3d11_video_processor_debug);
|
||||
#define GST_CAT_DEFAULT gst_d3d11_video_processor_debug
|
||||
|
||||
#if (D3D11_HEADER_VERSION >= 1 && DXGI_HEADER_VERSION >= 4)
|
||||
#if (GST_D3D11_HEADER_VERSION >= 1 && GST_D3D11_DXGI_HEADER_VERSION >= 4)
|
||||
#define HAVE_VIDEO_CONTEXT_ONE
|
||||
#endif
|
||||
|
||||
#if (D3D11_HEADER_VERSION >= 4) && (DXGI_HEADER_VERSION >= 5)
|
||||
#if (GST_D3D11_HEADER_VERSION >= 4) && (GST_D3D11_DXGI_HEADER_VERSION >= 5)
|
||||
#define HAVE_VIDEO_CONTEXT_TWO
|
||||
#endif
|
||||
|
||||
|
@ -297,7 +297,7 @@ gst_d3d11_video_processor_set_output_color_space (GstD3D11VideoProcessor *
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
#if (DXGI_HEADER_VERSION >= 4)
|
||||
#if (GST_D3D11_DXGI_HEADER_VERSION >= 4)
|
||||
gboolean
|
||||
gst_d3d11_video_processor_check_format_conversion (GstD3D11VideoProcessor *
|
||||
processor, DXGI_FORMAT in_format, DXGI_COLOR_SPACE_TYPE in_color_space,
|
||||
|
@ -361,7 +361,7 @@ gst_d3d11_video_processor_set_output_dxgi_color_space (GstD3D11VideoProcessor *
|
|||
}
|
||||
#endif
|
||||
|
||||
#if (DXGI_HEADER_VERSION >= 5)
|
||||
#if (GST_D3D11_DXGI_HEADER_VERSION >= 5)
|
||||
/* D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_METADATA_HDR10
|
||||
* missing in mingw header */
|
||||
#define FEATURE_CAPS_METADATA_HDR10 (0x800)
|
||||
|
|
|
@ -51,7 +51,7 @@ gboolean gst_d3d11_video_processor_set_input_color_space (GstD3D11VideoProcess
|
|||
gboolean gst_d3d11_video_processor_set_output_color_space (GstD3D11VideoProcessor * processor,
|
||||
GstVideoColorimetry * color);
|
||||
|
||||
#if (DXGI_HEADER_VERSION >= 4)
|
||||
#if (GST_D3D11_DXGI_HEADER_VERSION >= 4)
|
||||
gboolean gst_d3d11_video_processor_check_format_conversion (GstD3D11VideoProcessor * processor,
|
||||
DXGI_FORMAT in_format,
|
||||
DXGI_COLOR_SPACE_TYPE in_color_space,
|
||||
|
@ -65,7 +65,7 @@ gboolean gst_d3d11_video_processor_set_output_dxgi_color_space (GstD3D11VideoPr
|
|||
DXGI_COLOR_SPACE_TYPE color_space);
|
||||
#endif
|
||||
|
||||
#if (DXGI_HEADER_VERSION >= 5)
|
||||
#if (GST_D3D11_DXGI_HEADER_VERSION >= 5)
|
||||
gboolean gst_d3d11_video_processor_set_input_hdr10_metadata (GstD3D11VideoProcessor * processor,
|
||||
DXGI_HDR_METADATA_HDR10 * hdr10_meta);
|
||||
|
||||
|
|
|
@ -671,12 +671,12 @@ gst_d3d11_window_prepare_default (GstD3D11Window * window, guint display_width,
|
|||
};
|
||||
const GstD3D11WindowDisplayFormat *chosen_format = NULL;
|
||||
const GstDxgiColorSpace * chosen_colorspace = NULL;
|
||||
#if (DXGI_HEADER_VERSION >= 4)
|
||||
#if (GST_D3D11_DXGI_HEADER_VERSION >= 4)
|
||||
gboolean have_hdr10 = FALSE;
|
||||
DXGI_COLOR_SPACE_TYPE native_colorspace_type =
|
||||
DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709;
|
||||
#endif
|
||||
#if (DXGI_HEADER_VERSION >= 5)
|
||||
#if (GST_D3D11_DXGI_HEADER_VERSION >= 5)
|
||||
DXGI_HDR_METADATA_HDR10 hdr10_metadata = { 0, };
|
||||
#endif
|
||||
|
||||
|
@ -801,7 +801,7 @@ gst_d3d11_window_prepare_default (GstD3D11Window * window, guint display_width,
|
|||
* https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1175
|
||||
* To workaround it, BT709 colorspace will be chosen for non-HDR case.
|
||||
*/
|
||||
#if (DXGI_HEADER_VERSION >= 5)
|
||||
#if (GST_D3D11_DXGI_HEADER_VERSION >= 5)
|
||||
{
|
||||
GstVideoMasteringDisplayInfo minfo;
|
||||
GstVideoContentLightLevel cll;
|
||||
|
@ -846,7 +846,7 @@ gst_d3d11_window_prepare_default (GstD3D11Window * window, guint display_width,
|
|||
* target display color space type */
|
||||
window->render_info.colorimetry.range = GST_VIDEO_COLOR_RANGE_0_255;
|
||||
|
||||
#if (DXGI_HEADER_VERSION >= 4)
|
||||
#if (GST_D3D11_DXGI_HEADER_VERSION >= 4)
|
||||
{
|
||||
IDXGISwapChain3 *swapchain3 = NULL;
|
||||
HRESULT hr;
|
||||
|
@ -896,7 +896,7 @@ gst_d3d11_window_prepare_default (GstD3D11Window * window, guint display_width,
|
|||
window->render_info.colorimetry.range = GST_VIDEO_COLOR_RANGE_0_255;
|
||||
}
|
||||
|
||||
#if (DXGI_HEADER_VERSION >= 4)
|
||||
#if (GST_D3D11_DXGI_HEADER_VERSION >= 4)
|
||||
if (chosen_colorspace) {
|
||||
const GstDxgiColorSpace *in_color_space =
|
||||
gst_d3d11_video_info_to_dxgi_color_space (&window->info);
|
||||
|
@ -939,7 +939,7 @@ gst_d3d11_window_prepare_default (GstD3D11Window * window, guint display_width,
|
|||
gst_d3d11_video_processor_set_output_dxgi_color_space (processor,
|
||||
out_dxgi_color_space);
|
||||
|
||||
#if (DXGI_HEADER_VERSION >= 5)
|
||||
#if (GST_D3D11_DXGI_HEADER_VERSION >= 5)
|
||||
if (have_hdr10) {
|
||||
GST_DEBUG_OBJECT (window, "Set HDR metadata on video processor");
|
||||
gst_d3d11_video_processor_set_input_hdr10_metadata (processor,
|
||||
|
@ -1171,7 +1171,7 @@ gst_d3d111_window_present (GstD3D11Window * self, GstBuffer * buffer,
|
|||
gst_d3d11_overlay_compositor_upload (self->compositor, buffer);
|
||||
gst_d3d11_overlay_compositor_draw_unlocked (self->compositor, &rtv);
|
||||
|
||||
#if (DXGI_HEADER_VERSION >= 5)
|
||||
#if (GST_D3D11_DXGI_HEADER_VERSION >= 5)
|
||||
if (self->allow_tearing && self->fullscreen) {
|
||||
present_flags |= DXGI_PRESENT_ALLOW_TEARING;
|
||||
}
|
||||
|
|
|
@ -116,7 +116,7 @@ gst_d3d11_window_dummy_prepare (GstD3D11Window * window,
|
|||
|
||||
gst_d3d11_device_lock (window->device);
|
||||
|
||||
#if (DXGI_HEADER_VERSION >= 4)
|
||||
#if (GST_D3D11_DXGI_HEADER_VERSION >= 4)
|
||||
{
|
||||
const GstDxgiColorSpace *in_color_space =
|
||||
gst_d3d11_video_info_to_dxgi_color_space (&window->info);
|
||||
|
|
|
@ -770,7 +770,7 @@ create_swap_chain (GstD3D11WindowWin32 * self, GstD3D11Device * device,
|
|||
return swap_chain;
|
||||
}
|
||||
|
||||
#if (DXGI_HEADER_VERSION >= 2)
|
||||
#if (GST_D3D11_DXGI_HEADER_VERSION >= 2)
|
||||
static IDXGISwapChain1 *
|
||||
create_swap_chain_for_hwnd (GstD3D11WindowWin32 * self, GstD3D11Device * device,
|
||||
HWND hwnd, DXGI_SWAP_CHAIN_DESC1 * desc,
|
||||
|
@ -818,7 +818,7 @@ gst_d3d11_window_win32_create_swap_chain (GstD3D11Window * window,
|
|||
|
||||
self->have_swapchain1 = FALSE;
|
||||
|
||||
#if (DXGI_HEADER_VERSION >= 2)
|
||||
#if (GST_D3D11_DXGI_HEADER_VERSION >= 2)
|
||||
{
|
||||
DXGI_SWAP_CHAIN_DESC1 desc1 = { 0, };
|
||||
desc1.Width = 0;
|
||||
|
@ -949,7 +949,7 @@ gst_d3d11_window_win32_present (GstD3D11Window * window, guint present_flags)
|
|||
return GST_D3D11_WINDOW_FLOW_CLOSED;
|
||||
}
|
||||
|
||||
#if (DXGI_HEADER_VERSION >= 2)
|
||||
#if (GST_D3D11_DXGI_HEADER_VERSION >= 2)
|
||||
if (self->have_swapchain1) {
|
||||
IDXGISwapChain1 *swap_chain1 = (IDXGISwapChain1 *) window->swap_chain;
|
||||
DXGI_PRESENT_PARAMETERS present_params = { 0, };
|
||||
|
|
Loading…
Reference in a new issue