1 | /* $Id: VBoxMPCm.h 38112 2011-07-22 13:26:19Z 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 | NTSTATUS vboxVideoCmCmdSubmitCompleteEvent(PVBOXVIDEOCM_CTX pContext, PKEVENT pEvent);
|
---|
45 | void* vboxVideoCmCmdCreate(PVBOXVIDEOCM_CTX pContext, uint32_t cbSize);
|
---|
46 | void* vboxVideoCmCmdReinitForContext(void *pvCmd, PVBOXVIDEOCM_CTX pContext);
|
---|
47 | void vboxVideoCmCmdRetain(void *pvCmd);
|
---|
48 | void vboxVideoCmCmdRelease(void *pvCmd);
|
---|
49 | #define VBOXVIDEOCM_SUBMITSIZE_DEFAULT (~0UL)
|
---|
50 | void vboxVideoCmCmdSubmit(void *pvCmd, uint32_t cbSize);
|
---|
51 |
|
---|
52 | #define VBOXVIDEOCMCMDVISITOR_RETURN_BREAK 0x00000001
|
---|
53 | #define VBOXVIDEOCMCMDVISITOR_RETURN_RMCMD 0x00000002
|
---|
54 | typedef DECLCALLBACK(UINT) FNVBOXVIDEOCMCMDVISITOR(PVBOXVIDEOCM_CTX pContext, PVOID pvCmd, uint32_t cbCmd, PVOID pvVisitor);
|
---|
55 | typedef FNVBOXVIDEOCMCMDVISITOR *PFNVBOXVIDEOCMCMDVISITOR;
|
---|
56 | NTSTATUS vboxVideoCmCmdVisit(PVBOXVIDEOCM_CTX pContext, BOOLEAN bEntireSession, PFNVBOXVIDEOCMCMDVISITOR pfnVisitor, PVOID pvVisitor);
|
---|
57 |
|
---|
58 | NTSTATUS vboxVideoCmEscape(PVBOXVIDEOCM_CTX pContext, PVBOXDISPIFESCAPE_GETVBOXVIDEOCMCMD pCmd, uint32_t cbCmd);
|
---|
59 |
|
---|
60 | NTSTATUS vboxVideoCmWaitCompletedCmds(PVBOXVIDEOCM_MGR pMgr, uint32_t msTimeout);
|
---|
61 |
|
---|
62 | VOID vboxVideoCmLock(PVBOXVIDEOCM_CTX pContext);
|
---|
63 | VOID vboxVideoCmUnlock(PVBOXVIDEOCM_CTX pContext);
|
---|
64 |
|
---|
65 | #endif /* #ifndef ___VBoxMPCm_h___ */
|
---|