2 * Copyright (C) 2007 Haakon Sporsheim <hakon.sporsheim@tandberg.com>
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.
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.
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.
23 #include "gstwinscreencap.h"
24 #include "gstgdiscreencapsrc.h"
25 #include "gstdx9screencapsrc.h"
28 #include "gstdxgiscreencapsrc.h"
30 GST_DEBUG_CATEGORY (gst_dxgi_screen_cap_src_debug);
34 _diplay_monitor_enum (HMONITOR hMon, HDC hdc, LPRECT rect, LPARAM param)
36 LPRECT *pp_rect = (LPRECT *) param;
37 CopyRect (*pp_rect, rect);
43 gst_win32_get_monitor_rect (UINT index)
48 data = (LPRECT) malloc (sizeof (RECT) * GetSystemMetrics (SM_CMONITORS));
51 EnumDisplayMonitors (NULL, NULL, _diplay_monitor_enum, (LPARAM) & tmp);
53 ret_rect = data[index];
56 ZeroMemory (&ret_rect, sizeof (RECT));
63 plugin_init (GstPlugin * plugin)
65 if (!gst_element_register (plugin, "gdiscreencapsrc",
66 GST_RANK_NONE, GST_TYPE_GDISCREENCAPSRC)) {
70 if (!gst_element_register (plugin, "dx9screencapsrc",
71 GST_RANK_NONE, GST_TYPE_DX9SCREENCAPSRC)) {
75 GST_DEBUG_CATEGORY_INIT (gst_dxgi_screen_cap_src_debug,
76 "dxgiscreencapsrc", 0, "DirectX DXGI screen capture source");
77 gst_dxgi_screen_cap_src_register (plugin, GST_RANK_NONE);
83 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
86 "Screen capture plugin for Windows",
87 plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)