1 /* GStreamer 2 * Copyright (C) 2019 Seungha Yang <seungha.yang@navercorp.com> 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_VIDEO_SINK_H__ 22 #define __GST_D3D11_VIDEO_SINK_H__ 23 24 #include <gst/gst.h> 25 #include <gst/video/video.h> 26 #include <gst/video/gstvideosink.h> 27 #include <gst/video/videooverlay.h> 28 #include <gst/video/navigation.h> 29 #include <gst/d3d11/gstd3d11.h> 30 #include "gstd3d11window.h" 31 32 G_BEGIN_DECLS 33 34 #define GST_TYPE_D3D11_VIDEO_SINK (gst_d3d11_video_sink_get_type()) 35 #define GST_D3D11_VIDEO_SINK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_D3D11_VIDEO_SINK, GstD3D11VideoSink)) 36 #define GST_D3D11_VIDEO_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_D3D11_VIDEO_SINK, GstD3D11VideoSinkClass)) 37 #define GST_IS_D3D11_VIDEO_SINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_D3D11_VIDEO_SINK)) 38 #define GST_IS_D3D11_VIDEO_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_D3D11_VIDEO_SINK)) 39 #define GST_D3D11_VIDEO_SINK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GST_TYPE_D3D11_VIDEO_SINK, GstD3D11VideoSinkClass)) 40 41 typedef struct _GstD3D11VideoSink GstD3D11VideoSink; 42 typedef struct _GstD3D11VideoSinkClass GstD3D11VideoSinkClass; 43 struct _GstD3D11VideoSinkClass 44 { 45 GstVideoSinkClass parent_class; 46 47 /* signals */ 48 void (*begin_draw) (GstD3D11VideoSink * videosink); 49 50 /* actions */ 51 gboolean (*draw) (GstD3D11VideoSink * videosink, 52 gpointer shared_handle, 53 guint texture_misc_flags, 54 guint64 acquire_key, 55 guint64 release_key); 56 }; 57 58 GType gst_d3d11_video_sink_get_type (void); 59 60 G_END_DECLS 61 62 #endif /* __GST_D3D11_VIDEO_SINK_H__ */ 63