1 /* GStreamer 2 * Copyright (C) 2007 Haakon Sporsheim <hakon.sporsheim@tandberg.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_DX9SCREENCAPSRC_H__ 21 #define __GST_DX9SCREENCAPSRC_H__ 22 23 #include <d3d9.h> 24 25 #include <gst/gst.h> 26 #include <gst/base/gstpushsrc.h> 27 28 #include "gstwinscreencap.h" 29 30 G_BEGIN_DECLS 31 32 #define GST_TYPE_DX9SCREENCAPSRC (gst_dx9screencapsrc_get_type()) 33 #define GST_DX9SCREENCAPSRC(obj) \ 34 (G_TYPE_CHECK_INSTANCE_CAST((obj), \ 35 GST_TYPE_DX9SCREENCAPSRC,GstDX9ScreenCapSrc)) 36 #define GST_DX9SCREENCAPSRC_CLASS(klass) \ 37 (G_TYPE_CHECK_CLASS_CAST((klass), \ 38 GST_TYPE_DX9SCREENCAPSRC,GstDX9ScreenCapSrcClass)) 39 #define GST_IS_DX9SCREENCAPSRC(obj) \ 40 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DX9SCREENCAPSRC)) 41 #define GST_IS_DX9SCREENCAPSRC_CLASS(klass) \ 42 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DX9SCREENCAPSRC)) 43 44 typedef struct _GstDX9ScreenCapSrc GstDX9ScreenCapSrc; 45 typedef struct _GstDX9ScreenCapSrcClass GstDX9ScreenCapSrcClass; 46 47 struct _GstDX9ScreenCapSrc 48 { 49 /* Parent */ 50 GstPushSrc src; 51 52 /* Properties */ 53 gint capture_x; 54 gint capture_y; 55 gint capture_w; 56 gint capture_h; 57 guint monitor; 58 gboolean show_cursor; 59 60 /* Source pad frame rate */ 61 gint rate_numerator; 62 gint rate_denominator; 63 64 /* Runtime variables */ 65 RECT screen_rect; 66 RECT src_rect; 67 guint64 frame_number; 68 GstClockID clock_id; 69 70 D3DDISPLAYMODE disp_mode; 71 IDirect3DSurface9 *surface; 72 IDirect3DDevice9 *d3d9_device; 73 MONITORINFO monitor_info; 74 }; 75 76 struct _GstDX9ScreenCapSrcClass 77 { 78 GstPushSrcClass parent_class; 79 }; 80 81 GType gst_dx9screencapsrc_get_type (void); 82 83 G_END_DECLS 84 85 #endif /* __GST_DX9SCREENCAPSRC_H__ */ 86