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_COMPOSITOR_H__ 22 #define __GST_D3D11_COMPOSITOR_H__ 23 24 #include <gst/gst.h> 25 #include <gst/video/video.h> 26 #include <gst/video/gstvideoaggregator.h> 27 #include <gst/d3d11/gstd3d11.h> 28 29 G_BEGIN_DECLS 30 31 #define GST_TYPE_D3D11_COMPOSITOR_PAD (gst_d3d11_compositor_pad_get_type()) 32 G_DECLARE_FINAL_TYPE (GstD3D11CompositorPad, gst_d3d11_compositor_pad, 33 GST, D3D11_COMPOSITOR_PAD, GstVideoAggregatorPad) 34 35 #define GST_TYPE_D3D11_COMPOSITOR (gst_d3d11_compositor_get_type()) 36 G_DECLARE_FINAL_TYPE (GstD3D11Compositor, gst_d3d11_compositor, 37 GST, D3D11_COMPOSITOR, GstVideoAggregator) 38 39 typedef enum 40 { 41 GST_D3D11_COMPOSITOR_BLEND_OP_ADD, 42 GST_D3D11_COMPOSITOR_BLEND_OP_SUBTRACT, 43 GST_D3D11_COMPOSITOR_BLEND_OP_REV_SUBTRACT, 44 GST_D3D11_COMPOSITOR_BLEND_OP_MIN, 45 GST_D3D11_COMPOSITOR_BLEND_OP_MAX 46 } GstD3D11CompositorBlendOperation; 47 48 #define GST_TYPE_D3D11_COMPOSITOR_BLEND_OPERATION (gst_d3d11_compositor_blend_operation_get_type()) 49 GType gst_d3d11_compositor_blend_operation_get_type (void); 50 51 typedef enum 52 { 53 GST_D3D11_COMPOSITOR_BLEND_ZERO, 54 GST_D3D11_COMPOSITOR_BLEND_ONE, 55 GST_D3D11_COMPOSITOR_BLEND_SRC_COLOR, 56 GST_D3D11_COMPOSITOR_BLEND_INV_SRC_COLOR, 57 GST_D3D11_COMPOSITOR_BLEND_SRC_ALPHA, 58 GST_D3D11_COMPOSITOR_BLEND_INV_SRC_ALPHA, 59 GST_D3D11_COMPOSITOR_BLEND_DEST_ALPHA, 60 GST_D3D11_COMPOSITOR_BLEND_INV_DEST_ALPHA, 61 GST_D3D11_COMPOSITOR_BLEND_DEST_COLOR, 62 GST_D3D11_COMPOSITOR_BLEND_INV_DEST_COLOR, 63 GST_D3D11_COMPOSITOR_BLEND_SRC_ALPHA_SAT, 64 GST_D3D11_COMPOSITOR_BLEND_BLEND_FACTOR, 65 GST_D3D11_COMPOSITOR_BLEND_INV_BLEND_FACTOR, 66 } GstD3D11CompositorBlend; 67 68 #define GST_TYPE_D3D11_COMPOSITOR_BLEND (gst_d3d11_compositor_blend_get_type()) 69 GType gst_d3d11_compositor_blend_get_type (void); 70 71 typedef enum 72 { 73 GST_D3D11_COMPOSITOR_BACKGROUND_CHECKER, 74 GST_D3D11_COMPOSITOR_BACKGROUND_BLACK, 75 GST_D3D11_COMPOSITOR_BACKGROUND_WHITE, 76 GST_D3D11_COMPOSITOR_BACKGROUND_TRANSPARENT, 77 } GstD3D11CompositorBackground; 78 79 #define GST_TYPE_D3D11_COMPOSITOR_BACKGROUND (gst_d3d11_compositor_background_get_type()) 80 GType gst_d3d11_compositor_background_get_type (void); 81 82 typedef enum 83 { 84 GST_D3D11_COMPOSITOR_SIZING_POLICY_NONE, 85 GST_D3D11_COMPOSITOR_SIZING_POLICY_KEEP_ASPECT_RATIO, 86 } GstD3D11CompositorSizingPolicy; 87 88 #define GST_TYPE_D3D11_COMPOSITOR_SIZING_POLICY (gst_d3d11_compositor_sizing_policy_get_type()) 89 GType gst_d3d11_compositor_sizing_policy_get_type (void); 90 91 G_END_DECLS 92 93 #endif /* __GST_D3D11_COMPOSITOR_H__ */ 94