1 | /* $Id: pdmwebcaminfs.h 47416 2013-07-26 06:55:18Z vboxsync $ */
|
---|
2 |
|
---|
3 | /** @file
|
---|
4 | * webcaminfs - interfaces between dev and driver.
|
---|
5 | */
|
---|
6 |
|
---|
7 | /*
|
---|
8 | * Copyright (C) 2011-2013 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 | * The contents of this file may alternatively be used under the terms
|
---|
19 | * of the Common Development and Distribution License Version 1.0
|
---|
20 | * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
|
---|
21 | * VirtualBox OSE distribution, in which case the provisions of the
|
---|
22 | * CDDL are applicable instead of those of the GPL.
|
---|
23 | *
|
---|
24 | * You may elect to license modified versions of this file under the
|
---|
25 | * terms and conditions of either the GPL or the CDDL or both.
|
---|
26 | */
|
---|
27 |
|
---|
28 | #ifndef ___VBox_vmm_pdmwebcaminfs_h
|
---|
29 | #define ___VBox_vmm_pdmwebcaminfs_h
|
---|
30 |
|
---|
31 |
|
---|
32 | typedef struct PDMIWEBCAM_DEVICEDESC PDMIWEBCAM_DEVICEDESC;
|
---|
33 | typedef struct PDMIWEBCAM_CTRLHDR PDMIWEBCAM_CTRLHDR;
|
---|
34 | typedef struct PDMIWEBCAM_FRAMEHDR PDMIWEBCAM_FRAMEHDR;
|
---|
35 |
|
---|
36 |
|
---|
37 | #define PDMIWEBCAMDOWN_IID "0d29b9a1-f4cd-4719-a564-38d5634ba9f8"
|
---|
38 | typedef struct PDMIWEBCAMDOWN *PPDMIWEBCAMDOWN;
|
---|
39 | typedef struct PDMIWEBCAMDOWN
|
---|
40 | {
|
---|
41 | /*
|
---|
42 | * The PDM device is ready to get webcam notifications.
|
---|
43 | *
|
---|
44 | * @param pInterface Pointer to the interface.
|
---|
45 | * @param fReady Whether the device is ready.
|
---|
46 | */
|
---|
47 | DECLR3CALLBACKMEMBER(void, pfnWebcamDownReady, (PPDMIWEBCAMDOWN pInterface,
|
---|
48 | bool fReady));
|
---|
49 |
|
---|
50 | /*
|
---|
51 | * Send a control request to the webcam.
|
---|
52 | * Async response will be returned by pfnWebcamUpControl callback.
|
---|
53 | *
|
---|
54 | * @param pInterface Pointer to the interface.
|
---|
55 | * @param pvUser The callers context.
|
---|
56 | * @param u64DeviceId Unique id for the reported webcam assigned by the driver.
|
---|
57 | * @param pCtrl The control data.
|
---|
58 | * @param cbCtrl The size of the control data.
|
---|
59 | */
|
---|
60 | DECLR3CALLBACKMEMBER(int, pfnWebcamDownControl, (PPDMIWEBCAMDOWN pInterface,
|
---|
61 | void *pvUser,
|
---|
62 | uint64_t u64DeviceId,
|
---|
63 | const PDMIWEBCAM_CTRLHDR *pCtrl,
|
---|
64 | uint32_t cbCtrl));
|
---|
65 | } PDMIWEBCAMDOWN;
|
---|
66 |
|
---|
67 |
|
---|
68 | #define PDMIWEBCAMUP_IID "6ac03e3c-f56c-4a35-80af-c13ce47a9dd7"
|
---|
69 | typedef struct PDMIWEBCAMUP *PPDMIWEBCAMUP;
|
---|
70 | typedef struct PDMIWEBCAMUP
|
---|
71 | {
|
---|
72 | /*
|
---|
73 | * A webcam is available.
|
---|
74 | *
|
---|
75 | * @param pInterface Pointer to the interface.
|
---|
76 | * @param u64DeviceId Unique id for the reported webcam assigned by the driver.
|
---|
77 | * @param pDeviceDesc The device description.
|
---|
78 | * @param cbDeviceDesc The size of the device description.
|
---|
79 | * @param u32Version The remote video input protocol version.
|
---|
80 | * @param fu32Capabilities The remote video input protocol capabilities.
|
---|
81 | */
|
---|
82 | DECLR3CALLBACKMEMBER(int, pfnWebcamUpAttached,(PPDMIWEBCAMUP pInterface,
|
---|
83 | uint64_t u64DeviceId,
|
---|
84 | const PDMIWEBCAM_DEVICEDESC *pDeviceDesc,
|
---|
85 | uint32_t cbDeviceDesc,
|
---|
86 | uint32_t u32Version,
|
---|
87 | uint32_t fu32Capabilities));
|
---|
88 |
|
---|
89 | /*
|
---|
90 | * The webcam is not available anymore.
|
---|
91 | *
|
---|
92 | * @param pInterface Pointer to the interface.
|
---|
93 | * @param u64DeviceId Unique id for the reported webcam assigned by the driver.
|
---|
94 | */
|
---|
95 | DECLR3CALLBACKMEMBER(void, pfnWebcamUpDetached,(PPDMIWEBCAMUP pInterface,
|
---|
96 | uint64_t u64DeviceId));
|
---|
97 |
|
---|
98 | /*
|
---|
99 | * There is a control response or a control change for the webcam.
|
---|
100 | *
|
---|
101 | * @param pInterface Pointer to the interface.
|
---|
102 | * @param fResponse True if this is a response for a previous pfnWebcamDownControl call.
|
---|
103 | * @param pvUser The pvUser parameter of the pfnWebcamDownControl call. Undefined if fResponse == false.
|
---|
104 | * @param u64DeviceId Unique id for the reported webcam assigned by the driver.
|
---|
105 | * @param pCtrl The control data.
|
---|
106 | * @param cbCtrl The size of the control data.
|
---|
107 | */
|
---|
108 | DECLR3CALLBACKMEMBER(void, pfnWebcamUpControl,(PPDMIWEBCAMUP pInterface,
|
---|
109 | bool fResponse,
|
---|
110 | void *pvUser,
|
---|
111 | uint64_t u64DeviceId,
|
---|
112 | const PDMIWEBCAM_CTRLHDR *pCtrl,
|
---|
113 | uint32_t cbCtrl));
|
---|
114 |
|
---|
115 | /*
|
---|
116 | * A new frame.
|
---|
117 | *
|
---|
118 | * @param pInterface Pointer to the interface.
|
---|
119 | * @param u64DeviceId Unique id for the reported webcam assigned by the driver.
|
---|
120 | * @param pHeader Payload header.
|
---|
121 | * @param cbHeader Size of the payload header.
|
---|
122 | * @param pvFrame Frame (image) data.
|
---|
123 | * @param cbFrame Size of the image data.
|
---|
124 | */
|
---|
125 | DECLR3CALLBACKMEMBER(void, pfnWebcamUpFrame,(PPDMIWEBCAMUP pInterface,
|
---|
126 | uint64_t u64DeviceId,
|
---|
127 | PDMIWEBCAM_FRAMEHDR *pHeader,
|
---|
128 | uint32_t cbHeader,
|
---|
129 | const void *pvFrame,
|
---|
130 | uint32_t cbFrame));
|
---|
131 | } PDMIWEBCAMUP;
|
---|
132 |
|
---|
133 | #endif
|
---|