Merging gst-plugins-bad
[platform/upstream/gstreamer.git] / sys / d3d11 / gstd3d11desktopdup.h
1 /*
2  * GStreamer
3  * Copyright (C) 2020 Seungha Yang <seungha@centricular.com>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public
16  * License along with this library; if not, write to the
17  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
18  * Boston, MA 02110-1301, USA.
19  */
20
21 #ifndef __GST_D3D11_DESKTOP_DUP_H__
22 #define __GST_D3D11_DESKTOP_DUP_H__
23
24 #include <gst/gst.h>
25 #include <gst/video/video.h>
26 #include <gst/d3d11/gstd3d11.h>
27
28 G_BEGIN_DECLS
29
30 #define GST_D3D11_DESKTOP_DUP_FLOW_EXPECTED_ERROR GST_FLOW_CUSTOM_SUCCESS
31 #define GST_D3D11_DESKTOP_DUP_FLOW_SIZE_CHANGED GST_FLOW_CUSTOM_SUCCESS_1
32 #define GST_D3D11_DESKTOP_DUP_FLOW_UNSUPPORTED GST_FLOW_CUSTOM_ERROR
33
34 #define GST_TYPE_D3D11_DESKTOP_DUP (gst_d3d11_desktop_dup_get_type())
35 G_DECLARE_FINAL_TYPE (GstD3D11DesktopDup, gst_d3d11_desktop_dup,
36     GST, D3D11_DESKTOP_DUP, GstObject);
37
38 GstD3D11DesktopDup *  gst_d3d11_desktop_dup_new (GstD3D11Device * device,
39                                                  gint output_index);
40
41 GstFlowReturn   gst_d3d11_desktop_dup_prepare (GstD3D11DesktopDup * desktop);
42
43 gboolean        gst_d3d11_desktop_dup_get_size (GstD3D11DesktopDup * desktop,
44                                                 guint * width,
45                                                 guint * height);
46
47 GstFlowReturn   gst_d3d11_desktop_dup_capture (GstD3D11DesktopDup * desktop,
48                                                ID3D11Texture2D * texture,
49                                                ID3D11RenderTargetView *rtv,
50                                                gboolean draw_mouse);
51
52 G_END_DECLS
53
54 #endif /* __GST_D3D11_DESKTOP_DUP_H__ */