d3d11: Update build-time dependency
[platform/upstream/gstreamer.git] / subprojects / gst-plugins-bad / sys / d3d11 / gstd3d11videoprocessor.h
1 /* GStreamer
2  * Copyright (C) <2020> Seungha Yang <seungha.yang@navercorp.com>
3  *
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.
8  *
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.
13  *
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.
18  */
19
20 #ifndef __GST_D3D11_VIDEO_PROCESSOR_H__
21 #define __GST_D3D11_VIDEO_PROCESSOR_H__
22
23 #include <gst/gst.h>
24 #include <gst/video/video.h>
25 #include <gst/d3d11/gstd3d11.h>
26 #include "gstd3d11pluginutils.h"
27
28 G_BEGIN_DECLS
29
30 typedef struct _GstD3D11VideoProcessor GstD3D11VideoProcessor;
31
32 GstD3D11VideoProcessor * gst_d3d11_video_processor_new  (GstD3D11Device * device,
33                                                          guint in_width,
34                                                          guint in_height,
35                                                          guint out_width,
36                                                          guint out_height);
37
38 void      gst_d3d11_video_processor_free (GstD3D11VideoProcessor * processor);
39
40 gboolean  gst_d3d11_video_processor_supports_input_format (GstD3D11VideoProcessor * processor,
41                                                            DXGI_FORMAT format);
42
43 gboolean  gst_d3d11_video_processor_supports_output_format (GstD3D11VideoProcessor * processor,
44                                                             DXGI_FORMAT format);
45
46 gboolean  gst_d3d11_video_processor_get_caps (GstD3D11VideoProcessor * processor,
47                                               D3D11_VIDEO_PROCESSOR_CAPS * caps);
48
49 gboolean  gst_d3d11_video_processor_set_input_color_space  (GstD3D11VideoProcessor * processor,
50                                                             GstVideoColorimetry * color);
51
52 gboolean  gst_d3d11_video_processor_set_output_color_space (GstD3D11VideoProcessor * processor,
53                                                             GstVideoColorimetry * color);
54
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);
60
61 gboolean  gst_d3d11_video_processor_set_input_dxgi_color_space (GstD3D11VideoProcessor * processor,
62                                                                 DXGI_COLOR_SPACE_TYPE color_space);
63
64 gboolean  gst_d3d11_video_processor_set_output_dxgi_color_space (GstD3D11VideoProcessor * processor,
65                                                                 DXGI_COLOR_SPACE_TYPE color_space);
66
67 gboolean  gst_d3d11_video_processor_set_input_hdr10_metadata (GstD3D11VideoProcessor * processor,
68                                                               DXGI_HDR_METADATA_HDR10 * hdr10_meta);
69
70 gboolean  gst_d3d11_video_processor_set_output_hdr10_metadata (GstD3D11VideoProcessor * processor,
71                                                               DXGI_HDR_METADATA_HDR10 * hdr10_meta);
72
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);
77
78 ID3D11VideoProcessorInputView * gst_d3d11_video_processor_get_input_view (GstD3D11VideoProcessor * processor,
79                                                                           GstD3D11Memory *mem);
80
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);
85
86 ID3D11VideoProcessorOutputView * gst_d3d11_video_processor_get_output_view (GstD3D11VideoProcessor * processor,
87                                                                             GstD3D11Memory *mem);
88
89 gboolean  gst_d3d11_video_processor_render             (GstD3D11VideoProcessor * processor,
90                                                         RECT *in_rect,
91                                                         ID3D11VideoProcessorInputView * in_view,
92                                                         RECT *out_rect,
93                                                         ID3D11VideoProcessorOutputView * out_view);
94
95 gboolean  gst_d3d11_video_processor_render_unlocked    (GstD3D11VideoProcessor * processor,
96                                                         RECT *in_rect,
97                                                         ID3D11VideoProcessorInputView * in_view,
98                                                         RECT *out_rect,
99                                                         ID3D11VideoProcessorOutputView * out_view);
100
101 /* utils */
102 gboolean gst_d3d11_video_processor_check_bind_flags_for_input_view (guint bind_flags);
103
104 gboolean gst_d3d11_video_processor_check_bind_flags_for_output_view (guint bind_flags);
105
106 G_END_DECLS
107
108 #endif /* __GST_D3D11_VIDEO_PROCESSOR_H__ */