1 /* GStreamer 2 * Copyright (C) 2019 Aaron Boxer <aaron.boxer@collabora.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., 59 Temple Place - Suite 330, 17 * Boston, MA 02111-1307, USA. 18 */ 19 #ifndef _GST_D3D9_OVERLAY_H_ 20 #define _GST_D3D9_OVERLAY_H_ 21 22 #include <gst/gst.h> 23 #include <gst/video/video.h> 24 25 #include <windows.h> 26 27 #if defined(__MINGW32__) 28 # ifndef _OBJC_NO_COM_ 29 # if defined(__cplusplus) && !defined(CINTERFACE) 30 # if defined(__GNUC__) && __GNUC__ < 3 && !defined(NOCOMATTRIBUTE) 31 # define DECLARE_INTERFACE_IID_(i,b,d) _COM_interface __attribute__((com_interface)) i : public b 32 # else 33 # define DECLARE_INTERFACE_IID_(i,b,d) _COM_interface i : public b 34 # endif 35 # elif !defined(DECLARE_INTERFACE_IID_) 36 # define DECLARE_INTERFACE_IID_(i,b,d) DECLARE_INTERFACE(i) 37 # endif 38 # endif 39 # if !defined(__MSABI_LONG) 40 # define __MSABI_LONG(x) x ## l 41 # endif 42 #endif 43 44 #include <d3d9.h> 45 46 typedef struct _GstD3DVideoSinkOverlay 47 { 48 GstVideoOverlayRectangle *rectangle; 49 LPDIRECT3DTEXTURE9 texture; 50 IDirect3DVertexBuffer9 *g_list_vb; 51 int g_list_count; 52 } GstD3DVideoSinkOverlay; 53 54 GstFlowReturn gst_d3d9_overlay_prepare (GstD3DVideoSink *sink, GstBuffer * buf); 55 void gst_d3d9_overlay_free (GstD3DVideoSink * sink); 56 gboolean gst_d3d9_overlay_set_render_state (GstD3DVideoSink * sink); 57 gboolean gst_d3d9_overlay_render (GstD3DVideoSink * sink); 58 #endif /* _GST_D3D9_OVERLAY_H_ */ 59