ReactOS 0.4.15-dev-5667-ged97270
dvp.c
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS kernel
4 * PURPOSE: Native DirectDraw implementation
5 * FILE: win32ss/reactx/ntddraw/dvp.c
6 * PROGRAMER: Magnus olsen (magnus@greatlord.com)
7 * REVISION HISTORY:
8 * 19/1-2006 Magnus Olsen
9 */
10
11
12#include <win32k.h>
13#include <debug.h>
14
15/************************************************************************/
16/* NtGdiDvpCanCreateVideoPort */
17/************************************************************************/
21 PDD_CANCREATEVPORTDATA puCanCreateVPortData)
22{
24
25 if (pfnDvpCanCreateVideoPort == NULL)
26 {
27 DPRINT1("Warning: no pfnDvpCanCreateVideoPort");
29 }
30
31 DPRINT1("Calling dxg.sys pfnDvpCanCreateVideoPort");
32 return pfnDvpCanCreateVideoPort(hDirectDraw, puCanCreateVPortData);
33}
34
35/************************************************************************/
36/* NtGdiDvpColorControl */
37/************************************************************************/
41 PDD_VPORTCOLORDATA puVPortColorData)
42{
44
45 if (pfnDvpColorControl == NULL)
46 {
47 DPRINT1("Warning: no pfnDvpColorControl");
49 }
50
51 DPRINT1("Calling dxg.sys pfnDvpColorControl");
52 return pfnDvpColorControl(hVideoPort, puVPortColorData);
53}
54
55/************************************************************************/
56/* NtGdiDvpCreateVideoPort */
57/************************************************************************/
61 PDD_CREATEVPORTDATA puCreateVPortData)
62{
64
65 if (pfnDvpCreateVideoPort == NULL)
66 {
67 DPRINT1("Warning: no pfnDvpCreateVideoPort");
69 }
70
71 DPRINT1("Calling dxg.sys pfnDvpCreateVideoPort");
72 return pfnDvpCreateVideoPort(hDirectDraw, puCreateVPortData);
73}
74
75/************************************************************************/
76/* NtGdiDvpDestroyVideoPort */
77/************************************************************************/
81 PDD_DESTROYVPORTDATA puDestroyVPortData)
82{
84
85 if (pfnDvpDestroyVideoPort == NULL)
86 {
87 DPRINT1("Warning: no pfnDvpDestroyVideoPort");
89 }
90
91 DPRINT1("Calling dxg.sys pfnDvpDestroyVideoPort");
92 return pfnDvpDestroyVideoPort(hVideoPort, puDestroyVPortData);
93}
94
95/************************************************************************/
96/* NtGdiDvpFlipVideoPort */
97/************************************************************************/
101 HANDLE hDDSurfaceCurrent,
102 HANDLE hDDSurfaceTarget,
103 PDD_FLIPVPORTDATA puFlipVPortData)
104{
106
107 if (pfnDvpFlipVideoPort == NULL)
108 {
109 DPRINT1("Warning: no pfnDvpFlipVideoPort");
111 }
112
113 DPRINT1("Calling dxg.sys pfnDvpFlipVideoPort");
114 return pfnDvpFlipVideoPort(hVideoPort, hDDSurfaceCurrent, hDDSurfaceTarget, puFlipVPortData);
115}
116
117
118/************************************************************************/
119/* NtGdiDvpGetVideoPortBandwidth */
120/************************************************************************/
121DWORD
124 PDD_GETVPORTBANDWIDTHDATA puGetVPortBandwidthData)
125{
127
128 if (pfnDvpGetVideoPortBandwidth == NULL)
129 {
130 DPRINT1("Warning: no pfnDvpGetVideoPortBandwidth");
132 }
133
134 DPRINT1("Calling dxg.sys pfnDvpGetVideoPortBandwidth");
135 return pfnDvpGetVideoPortBandwidth(hVideoPort, puGetVPortBandwidthData);
136}
137
138
139/************************************************************************/
140/* NtGdiDvpGetVideoPortFlipStatus */
141/************************************************************************/
142DWORD
145 PDD_GETVPORTFLIPSTATUSDATA puGetVPortFlipStatusData)
146{
148
149 if (pfnDvpGetVideoPortFlipStatus == NULL)
150 {
151 DPRINT1("Warning: no pfnDvpGetVideoPortFlipStatus");
153 }
154
155 DPRINT1("Calling dxg.sys pfnDvpGetVideoPortFlipStatus");
156 return pfnDvpGetVideoPortFlipStatus(hDirectDraw, puGetVPortFlipStatusData);
157}
158
159
160/************************************************************************/
161/* NtGdiDvpGetVideoPortInputFormats */
162/************************************************************************/
163DWORD
166 PDD_GETVPORTINPUTFORMATDATA puGetVPortInputFormatData)
167{
169
170 if (pfnDvpGetVideoPortInputFormats == NULL)
171 {
172 DPRINT1("Warning: no pfnDvpGetVideoPortInputFormats");
174 }
175
176 DPRINT1("Calling dxg.sys pfnDvpGetVideoPortInputFormats");
177 return pfnDvpGetVideoPortInputFormats(hVideoPort, puGetVPortInputFormatData);
178}
179
180
181/************************************************************************/
182/* NtGdiDvpGetVideoPortLine */
183/************************************************************************/
184DWORD
187 PDD_GETVPORTLINEDATA puGetVPortLineData)
188{
190
191 if (pfnDvpGetVideoPortLine == NULL)
192 {
193 DPRINT1("Warning: no pfnDvpGetVideoPortLine");
195 }
196
197 DPRINT1("Calling dxg.sys pfnDvpGetVideoPortLine");
198 return pfnDvpGetVideoPortLine(hVideoPort, puGetVPortLineData);
199}
200
201
202/************************************************************************/
203/* NtGdiDvpGetVideoPortOutputFormats */
204/************************************************************************/
205DWORD
208 PDD_GETVPORTOUTPUTFORMATDATA puGetVPortOutputFormatData)
209{
211
212 if (pfnDvpGetVideoPortOutputFormats == NULL)
213 {
214 DPRINT1("Warning: no pfnDvpGetVideoPortOutputFormats");
216 }
217
218 DPRINT1("Calling dxg.sys pfnDvpGetVideoPortOutputFormats");
219 return pfnDvpGetVideoPortOutputFormats(hVideoPort, puGetVPortOutputFormatData);
220
221}
222
223
224/************************************************************************/
225/* NtGdiDvpGetVideoPortConnectInfo */
226/************************************************************************/
227DWORD
230 PDD_GETVPORTCONNECTDATA puGetVPortConnectData)
231{
233
234 if (pfnDvpGetVideoPortConnectInfo == NULL)
235 {
236 DPRINT1("Warning: no pfnDvpGetVideoPortConnectInfo");
238 }
239
240 DPRINT1("Calling dxg.sys pfnDvpGetVideoPortConnectInfo");
241 return pfnDvpGetVideoPortConnectInfo(hDirectDraw, puGetVPortConnectData);
242}
243
244
245/************************************************************************/
246/* NtGdiDvpGetVideoSignalStatus */
247/************************************************************************/
248DWORD
251 PDD_GETVPORTSIGNALDATA puGetVPortSignalData)
252{
254
255 if (pfnDvpGetVideoSignalStatus == NULL)
256 {
257 DPRINT1("Warning: no pfnDvpGetVideoSignalStatus");
259 }
260
261 DPRINT1("Calling dxg.sys pfnDvpGetVideoSignalStatus");
262 return pfnDvpGetVideoSignalStatus(hVideoPort, puGetVPortSignalData);
263
264}
265
266
267/************************************************************************/
268/* NtGdiDvpUpdateVideoPort */
269/************************************************************************/
270DWORD
273 HANDLE* phSurfaceVideo,
274 HANDLE* phSurfaceVbi,
275 PDD_UPDATEVPORTDATA puUpdateVPortData)
276{
278
279 if (pfnDvpUpdateVideoPort == NULL)
280 {
281 DPRINT1("Warning: no pfnDvpUpdateVideoPort");
283 }
284
285 DPRINT1("Calling dxg.sys pfnDvpUpdateVideoPort");
286 return pfnDvpUpdateVideoPort(hVideoPort, phSurfaceVideo, phSurfaceVbi, puUpdateVPortData);
287
288}
289
290
291/************************************************************************/
292/* NtGdiDvpWaitForVideoPortSync */
293/************************************************************************/
294DWORD
297 PDD_WAITFORVPORTSYNCDATA puWaitForVPortSyncData)
298{
300
301 if (pfnDvpWaitForVideoPortSync == NULL)
302 {
303 DPRINT1("Warning: no pfnDvpWaitForVideoPortSync");
305 }
306
307 DPRINT1("Calling dxg.sys pfnDvpWaitForVideoPortSync");
308 return pfnDvpWaitForVideoPortSync(hVideoPort, puWaitForVPortSyncData);
309}
310
311
312/************************************************************************/
313/* NtGdiDvpAcquireNotification */
314/************************************************************************/
315DWORD
318 HANDLE* hEvent,
319 LPDDVIDEOPORTNOTIFY pNotify)
320{
322
323 if (pfnDvpAcquireNotification == NULL)
324 {
325 DPRINT1("Warning: no pfnDvpAcquireNotification");
327 }
328
329 DPRINT1("Calling dxg.sys pfnDvpAcquireNotification");
330 return pfnDvpAcquireNotification(hVideoPort, hEvent, pNotify);
331}
332
333
334/************************************************************************/
335/* NtGdiDvpReleaseNotification */
336/************************************************************************/
337DWORD
341{
343
344 if (pfnDvpReleaseNotification == NULL)
345 {
346 DPRINT1("Warning: no pfnDvpReleaseNotification");
348 }
349
350 DPRINT1("Calling dxg.sys pfnDvpReleaseNotification");
351 return pfnDvpReleaseNotification(hVideoPort, hEvent);
352
353}
354
355
356/************************************************************************/
357/* NtGdiDvpGetVideoPortField */
358/************************************************************************/
359DWORD
362 PDD_GETVPORTFIELDDATA puGetVPortFieldData)
363{
365
366 if (pfnDvpGetVideoPortField == NULL)
367 {
368 DPRINT1("Warning: no pfnDvpGetVideoPortField");
370 }
371
372 DPRINT1("Calling dxg.sys pfnDvpGetVideoPortField");
373 return pfnDvpGetVideoPortField(hVideoPort, puGetVPortFieldData);
374
375}
#define DPRINT1
Definition: precomp.h:8
#define DDHAL_DRIVER_NOTHANDLED
Definition: ddrawi.h:320
#define NULL
Definition: types.h:112
#define APIENTRY
Definition: api.h:79
DWORD APIENTRY NtGdiDvpGetVideoPortConnectInfo(HANDLE hDirectDraw, PDD_GETVPORTCONNECTDATA puGetVPortConnectData)
Definition: dvp.c:229
DWORD APIENTRY NtGdiDvpGetVideoPortBandwidth(HANDLE hVideoPort, PDD_GETVPORTBANDWIDTHDATA puGetVPortBandwidthData)
Definition: dvp.c:123
DWORD APIENTRY NtGdiDvpGetVideoPortOutputFormats(HANDLE hVideoPort, PDD_GETVPORTOUTPUTFORMATDATA puGetVPortOutputFormatData)
Definition: dvp.c:207
DWORD APIENTRY NtGdiDvpUpdateVideoPort(HANDLE hVideoPort, HANDLE *phSurfaceVideo, HANDLE *phSurfaceVbi, PDD_UPDATEVPORTDATA puUpdateVPortData)
Definition: dvp.c:272
DWORD APIENTRY NtGdiDvpGetVideoPortLine(HANDLE hVideoPort, PDD_GETVPORTLINEDATA puGetVPortLineData)
Definition: dvp.c:186
DWORD APIENTRY NtGdiDvpGetVideoPortField(HANDLE hVideoPort, PDD_GETVPORTFIELDDATA puGetVPortFieldData)
Definition: dvp.c:361
HANDLE APIENTRY NtGdiDvpCreateVideoPort(HANDLE hDirectDraw, PDD_CREATEVPORTDATA puCreateVPortData)
Definition: dvp.c:60
DWORD APIENTRY NtGdiDvpAcquireNotification(HANDLE hVideoPort, HANDLE *hEvent, LPDDVIDEOPORTNOTIFY pNotify)
Definition: dvp.c:317
DWORD APIENTRY NtGdiDvpGetVideoPortInputFormats(HANDLE hVideoPort, PDD_GETVPORTINPUTFORMATDATA puGetVPortInputFormatData)
Definition: dvp.c:165
DWORD APIENTRY NtGdiDvpDestroyVideoPort(HANDLE hVideoPort, PDD_DESTROYVPORTDATA puDestroyVPortData)
Definition: dvp.c:80
DWORD APIENTRY NtGdiDvpGetVideoSignalStatus(HANDLE hVideoPort, PDD_GETVPORTSIGNALDATA puGetVPortSignalData)
Definition: dvp.c:250
DWORD APIENTRY NtGdiDvpColorControl(HANDLE hVideoPort, PDD_VPORTCOLORDATA puVPortColorData)
Definition: dvp.c:40
DWORD APIENTRY NtGdiDvpWaitForVideoPortSync(HANDLE hVideoPort, PDD_WAITFORVPORTSYNCDATA puWaitForVPortSyncData)
Definition: dvp.c:296
DWORD APIENTRY NtGdiDvpCanCreateVideoPort(HANDLE hDirectDraw, PDD_CANCREATEVPORTDATA puCanCreateVPortData)
Definition: dvp.c:20
DWORD APIENTRY NtGdiDvpGetVideoPortFlipStatus(HANDLE hDirectDraw, PDD_GETVPORTFLIPSTATUSDATA puGetVPortFlipStatusData)
Definition: dvp.c:144
DWORD APIENTRY NtGdiDvpFlipVideoPort(HANDLE hVideoPort, HANDLE hDDSurfaceCurrent, HANDLE hDDSurfaceTarget, PDD_FLIPVPORTDATA puFlipVPortData)
Definition: dvp.c:100
DWORD APIENTRY NtGdiDvpReleaseNotification(HANDLE hVideoPort, HANDLE hEvent)
Definition: dvp.c:339
#define DXG_INDEX_DxDvpCreateVideoPort
Definition: dxg.h:72
#define DXG_INDEX_DxDvpGetVideoPortConnectInfo
Definition: dxg.h:81
#define DXG_INDEX_DxDvpGetVideoPortFlipStatus
Definition: dxg.h:77
#define DXG_INDEX_DxDvpAcquireNotification
Definition: dxg.h:85
#define DXG_INDEX_DxDvpGetVideoPortLine
Definition: dxg.h:79
#define DXG_INDEX_DxDvpDestroyVideoPort
Definition: dxg.h:73
#define DXG_INDEX_DxDvpReleaseNotification
Definition: dxg.h:86
#define DXG_INDEX_DxDvpFlipVideoPort
Definition: dxg.h:74
#define DXG_INDEX_DxDvpGetVideoPortBandwidth
Definition: dxg.h:75
#define DXG_INDEX_DxDvpWaitForVideoPortSync
Definition: dxg.h:84
#define DXG_INDEX_DxDvpGetVideoPortInputFormats
Definition: dxg.h:78
#define DXG_INDEX_DxDvpUpdateVideoPort
Definition: dxg.h:83
#define DXG_INDEX_DxDvpGetVideoPortField
Definition: dxg.h:76
#define DXG_INDEX_DxDvpGetVideoPortOutputFormats
Definition: dxg.h:80
#define DXG_INDEX_DxDvpCanCreateVideoPort
Definition: dxg.h:70
#define DXG_INDEX_DxDvpGetVideoSignalStatus
Definition: dxg.h:82
#define DXG_INDEX_DxDvpColorControl
Definition: dxg.h:71
unsigned long DWORD
Definition: ntddk_ex.h:95
DWORD(APIENTRY * PGD_DXDVPGETVIDEOPORTCONNECTINFO)(HANDLE, PDD_GETVPORTCONNECTDATA)
Definition: intddraw.h:60
DWORD(APIENTRY * PGD_DXDVPACQUIRENOTIFICATION)(HANDLE, HANDLE *, LPDDVIDEOPORTNOTIFY)
Definition: intddraw.h:64
DWORD(APIENTRY * PGD_DVPFLIPVIDEOPORT)(HANDLE, HANDLE, HANDLE, PDD_FLIPVPORTDATA)
Definition: intddraw.h:54
DWORD(APIENTRY * PGD_DXDVPGETVIDEOPORTOUTPUTFORMATS)(HANDLE, PDD_GETVPORTOUTPUTFORMATDATA)
Definition: intddraw.h:59
DWORD(APIENTRY * PGD_DVPGETVIDEOPORTBANDWITH)(HANDLE, PDD_GETVPORTBANDWIDTHDATA)
Definition: intddraw.h:55
DWORD(APIENTRY * PGD_DVPCOLORCONTROL)(HANDLE, PDD_VPORTCOLORDATA)
Definition: intddraw.h:51
DWORD(APIENTRY * PGD_DXDVPGETVIDEOPORTFLIPSTATUS)(HANDLE, PDD_GETVPORTFLIPSTATUSDATA)
Definition: intddraw.h:56
DWORD(APIENTRY * PGD_DXDVPGETVIDEOSIGNALSTATUS)(HANDLE, PDD_GETVPORTSIGNALDATA)
Definition: intddraw.h:61
DWORD(APIENTRY * PGD_DXDVPGETVIDEOPORTINPUTFORMATS)(HANDLE, PDD_GETVPORTINPUTFORMATDATA)
Definition: intddraw.h:57
DWORD(APIENTRY * PGD_DXDVPWAITFORVIDEOPORTSYNC)(HANDLE, PDD_WAITFORVPORTSYNCDATA)
Definition: intddraw.h:63
DWORD(APIENTRY * PGD_DXDVPRELEASENOTIFICATION)(HANDLE, HANDLE)
Definition: intddraw.h:65
DWORD(APIENTRY * PGD_DXDVPGETVIDEOPORTLINE)(HANDLE, PDD_GETVPORTLINEDATA)
Definition: intddraw.h:58
DWORD(APIENTRY * PGD_DXDVPUPDATEVIDEOPORT)(HANDLE, HANDLE *, HANDLE *, PDD_UPDATEVPORTDATA)
Definition: intddraw.h:62
DWORD(APIENTRY * PGD_DXDVPGETVIDEOPORTFIELD)(HANDLE, PDD_GETVPORTFIELDDATA)
Definition: intddraw.h:66
DWORD(APIENTRY * PGD_DVPDESTROYVIDEOPORT)(HANDLE, PDD_DESTROYVPORTDATA)
Definition: intddraw.h:53
DWORD(APIENTRY * PGD_DVPCANCREATEVIDEOPORT)(HANDLE, PDD_CANCREATEVPORTDATA)
Definition: intddraw.h:50
HANDLE(APIENTRY * PGD_DVPCREATEVIDEOPORT)(HANDLE, PDD_CREATEVPORTDATA)
Definition: intddraw.h:52
static HANDLE hEvent
Definition: comm.c:54
DRVFN gpDxFuncs[DXG_INDEX_DxDdIoctl+1]
Definition: ddraw.c:23