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>
26 #include "gstd3d11pluginutils.h"
30 typedef struct _GstD3D11VideoProcessor GstD3D11VideoProcessor;
32 GstD3D11VideoProcessor * gst_d3d11_video_processor_new (GstD3D11Device * device,
38 void gst_d3d11_video_processor_free (GstD3D11VideoProcessor * processor);
40 gboolean gst_d3d11_video_processor_supports_input_format (GstD3D11VideoProcessor * processor,
43 gboolean gst_d3d11_video_processor_supports_output_format (GstD3D11VideoProcessor * processor,
46 gboolean gst_d3d11_video_processor_get_caps (GstD3D11VideoProcessor * processor,
47 D3D11_VIDEO_PROCESSOR_CAPS * caps);
49 gboolean gst_d3d11_video_processor_set_input_color_space (GstD3D11VideoProcessor * processor,
50 GstVideoColorimetry * color);
52 gboolean gst_d3d11_video_processor_set_output_color_space (GstD3D11VideoProcessor * processor,
53 GstVideoColorimetry * color);
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);
67 gboolean gst_d3d11_video_processor_set_input_hdr10_metadata (GstD3D11VideoProcessor * processor,
68 DXGI_HDR_METADATA_HDR10 * hdr10_meta);
70 gboolean gst_d3d11_video_processor_set_output_hdr10_metadata (GstD3D11VideoProcessor * processor,
71 DXGI_HDR_METADATA_HDR10 * hdr10_meta);
73 gboolean gst_d3d11_video_processor_create_input_view (GstD3D11VideoProcessor * processor,
74 D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC * desc,
75 ID3D11Resource *resource,
76 ID3D11VideoProcessorInputView ** view);
78 ID3D11VideoProcessorInputView * gst_d3d11_video_processor_get_input_view (GstD3D11VideoProcessor * processor,
81 gboolean gst_d3d11_video_processor_create_output_view (GstD3D11VideoProcessor * processor,
82 D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC * desc,
83 ID3D11Resource *resource,
84 ID3D11VideoProcessorOutputView ** view);
86 ID3D11VideoProcessorOutputView * gst_d3d11_video_processor_get_output_view (GstD3D11VideoProcessor * processor,
89 gboolean gst_d3d11_video_processor_render (GstD3D11VideoProcessor * processor,
91 ID3D11VideoProcessorInputView * in_view,
93 ID3D11VideoProcessorOutputView * out_view);
95 gboolean gst_d3d11_video_processor_render_unlocked (GstD3D11VideoProcessor * processor,
97 ID3D11VideoProcessorInputView * in_view,
99 ID3D11VideoProcessorOutputView * out_view);
102 gboolean gst_d3d11_video_processor_check_bind_flags_for_input_view (guint bind_flags);
104 gboolean gst_d3d11_video_processor_check_bind_flags_for_output_view (guint bind_flags);
108 #endif /* __GST_D3D11_VIDEO_PROCESSOR_H__ */