2 * Copyright (C) <2020> Seungha Yang <seungha.yang@navercorp.com>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
20 #ifndef __GST_D3D11_VIDEO_PROCESSOR_H__
21 #define __GST_D3D11_VIDEO_PROCESSOR_H__
24 #include <gst/video/video.h>
25 #include <gst/d3d11/gstd3d11.h>
29 typedef struct _GstD3D11VideoProcessor GstD3D11VideoProcessor;
31 GstD3D11VideoProcessor * gst_d3d11_video_processor_new (GstD3D11Device * device,
37 void gst_d3d11_video_processor_free (GstD3D11VideoProcessor * processor);
39 gboolean gst_d3d11_video_processor_supports_input_format (GstD3D11VideoProcessor * processor,
42 gboolean gst_d3d11_video_processor_supports_output_format (GstD3D11VideoProcessor * processor,
45 gboolean gst_d3d11_video_processor_get_caps (GstD3D11VideoProcessor * processor,
46 D3D11_VIDEO_PROCESSOR_CAPS * caps);
48 gboolean gst_d3d11_video_processor_set_input_color_space (GstD3D11VideoProcessor * processor,
49 GstVideoColorimetry * color);
51 gboolean gst_d3d11_video_processor_set_output_color_space (GstD3D11VideoProcessor * processor,
52 GstVideoColorimetry * color);
54 #if (GST_D3D11_DXGI_HEADER_VERSION >= 4)
55 gboolean gst_d3d11_video_processor_check_format_conversion (GstD3D11VideoProcessor * processor,
56 DXGI_FORMAT in_format,
57 DXGI_COLOR_SPACE_TYPE in_color_space,
58 DXGI_FORMAT out_format,
59 DXGI_COLOR_SPACE_TYPE out_color_space);
61 gboolean gst_d3d11_video_processor_set_input_dxgi_color_space (GstD3D11VideoProcessor * processor,
62 DXGI_COLOR_SPACE_TYPE color_space);
64 gboolean gst_d3d11_video_processor_set_output_dxgi_color_space (GstD3D11VideoProcessor * processor,
65 DXGI_COLOR_SPACE_TYPE color_space);
68 #if (GST_D3D11_DXGI_HEADER_VERSION >= 5)
69 gboolean gst_d3d11_video_processor_set_input_hdr10_metadata (GstD3D11VideoProcessor * processor,
70 DXGI_HDR_METADATA_HDR10 * hdr10_meta);
72 gboolean gst_d3d11_video_processor_set_output_hdr10_metadata (GstD3D11VideoProcessor * processor,
73 DXGI_HDR_METADATA_HDR10 * hdr10_meta);
76 gboolean gst_d3d11_video_processor_create_input_view (GstD3D11VideoProcessor * processor,
77 D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC * desc,
78 ID3D11Resource *resource,
79 ID3D11VideoProcessorInputView ** view);
81 ID3D11VideoProcessorInputView * gst_d3d11_video_processor_get_input_view (GstD3D11VideoProcessor * processor,
84 gboolean gst_d3d11_video_processor_create_output_view (GstD3D11VideoProcessor * processor,
85 D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC * desc,
86 ID3D11Resource *resource,
87 ID3D11VideoProcessorOutputView ** view);
89 ID3D11VideoProcessorOutputView * gst_d3d11_video_processor_get_output_view (GstD3D11VideoProcessor * processor,
92 gboolean gst_d3d11_video_processor_render (GstD3D11VideoProcessor * processor,
94 ID3D11VideoProcessorInputView * in_view,
96 ID3D11VideoProcessorOutputView * out_view);
98 gboolean gst_d3d11_video_processor_render_unlocked (GstD3D11VideoProcessor * processor,
100 ID3D11VideoProcessorInputView * in_view,
102 ID3D11VideoProcessorOutputView * out_view);
105 gboolean gst_d3d11_video_processor_check_bind_flags_for_input_view (guint bind_flags);
107 gboolean gst_d3d11_video_processor_check_bind_flags_for_output_view (guint bind_flags);
111 #endif /* __GST_D3D11_VIDEO_PROCESSOR_H__ */