1 | /* $Id: VBoxMPCm.h 37734 2011-07-01 16:36:39Z vboxsync $ */
|
---|
2 |
|
---|
3 | /** @file
|
---|
4 | * VBox WDDM Miniport driver
|
---|
5 | */
|
---|
6 |
|
---|
7 | /*
|
---|
8 | * Copyright (C) 2011 Oracle Corporation
|
---|
9 | *
|
---|
10 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
11 | * available from http://www.virtualbox.org. This file is free software;
|
---|
12 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
13 | * General Public License (GPL) as published by the Free Software
|
---|
14 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
15 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
16 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
17 | */
|
---|
18 |
|
---|
19 | #ifndef ___VBoxMPCm_h___
|
---|
20 | #define ___VBoxMPCm_h___
|
---|
21 |
|
---|
22 | typedef struct VBOXVIDEOCM_MGR
|
---|
23 | {
|
---|
24 | KEVENT SynchEvent;
|
---|
25 | /* session list */
|
---|
26 | LIST_ENTRY SessionList;
|
---|
27 | } VBOXVIDEOCM_MGR, *PVBOXVIDEOCM_MGR;
|
---|
28 |
|
---|
29 | typedef struct VBOXVIDEOCM_CTX
|
---|
30 | {
|
---|
31 | LIST_ENTRY SessionEntry;
|
---|
32 | struct VBOXVIDEOCM_SESSION *pSession;
|
---|
33 | uint64_t u64UmData;
|
---|
34 | VBOXWDDM_HTABLE AllocTable;
|
---|
35 | } VBOXVIDEOCM_CTX, *PVBOXVIDEOCM_CTX;
|
---|
36 |
|
---|
37 | void vboxVideoCmCtxInitEmpty(PVBOXVIDEOCM_CTX pContext);
|
---|
38 |
|
---|
39 | NTSTATUS vboxVideoCmCtxAdd(PVBOXVIDEOCM_MGR pMgr, PVBOXVIDEOCM_CTX pContext, HANDLE hUmEvent, uint64_t u64UmData);
|
---|
40 | NTSTATUS vboxVideoCmCtxRemove(PVBOXVIDEOCM_MGR pMgr, PVBOXVIDEOCM_CTX pContext);
|
---|
41 | NTSTATUS vboxVideoCmInit(PVBOXVIDEOCM_MGR pMgr);
|
---|
42 | NTSTATUS vboxVideoCmTerm(PVBOXVIDEOCM_MGR pMgr);
|
---|
43 |
|
---|
44 | void* vboxVideoCmCmdCreate(PVBOXVIDEOCM_CTX pContext, uint32_t cbSize);
|
---|
45 | void* vboxVideoCmCmdReinitForContext(void *pvCmd, PVBOXVIDEOCM_CTX pContext);
|
---|
46 | void vboxVideoCmCmdRetain(void *pvCmd);
|
---|
47 | void vboxVideoCmCmdRelease(void *pvCmd);
|
---|
48 | #define VBOXVIDEOCM_SUBMITSIZE_DEFAULT (~0UL)
|
---|
49 | void vboxVideoCmCmdSubmit(void *pvCmd, uint32_t cbSize);
|
---|
50 |
|
---|
51 | #define VBOXVIDEOCMCMDVISITOR_RETURN_CONTINUE 0x00000001
|
---|
52 | #define VBOXVIDEOCMCMDVISITOR_RETURN_RMCMD 0x00000002
|
---|
53 | typedef DECLCALLBACK(UINT) FNVBOXVIDEOCMCMDVISITOR(PVBOXVIDEOCM_CTX pContext, PVOID pvCmd, uint32_t cbCmd, PVOID pvVisitor);
|
---|
54 | typedef FNVBOXVIDEOCMCMDVISITOR *PFNVBOXVIDEOCMCMDVISITOR;
|
---|
55 | NTSTATUS vboxVideoCmCmdVisit(PVBOXVIDEOCM_CTX pContext, BOOL bEntireSession, PFNVBOXVIDEOCMCMDVISITOR pfnVisitor, PVOID pvVisitor);
|
---|
56 |
|
---|
57 | NTSTATUS vboxVideoCmEscape(PVBOXVIDEOCM_CTX pContext, PVBOXDISPIFESCAPE_GETVBOXVIDEOCMCMD pCmd, uint32_t cbCmd);
|
---|
58 |
|
---|
59 | NTSTATUS vboxVideoCmWaitCompletedCmds(PVBOXVIDEOCM_MGR pMgr, uint32_t msTimeout);
|
---|
60 |
|
---|
61 | VOID vboxVideoCmLock(PVBOXVIDEOCM_CTX pContext);
|
---|
62 | VOID vboxVideoCmUnlock(PVBOXVIDEOCM_CTX pContext);
|
---|
63 |
|
---|
64 | #endif /* #ifndef ___VBoxMPCm_h___ */
|
---|