1 | /* $Id: pdmwebcaminfs.h 44758 2013-02-20 11:45: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 |
|
---|
35 |
|
---|
36 | #define PDMIWEBCAMDOWN_IID "0846959f-8b4a-4b2c-be78-9903b2ae9de5"
|
---|
37 | typedef struct PDMIWEBCAMDOWN *PPDMIWEBCAMDOWN;
|
---|
38 | typedef struct PDMIWEBCAMDOWN
|
---|
39 | {
|
---|
40 | /*
|
---|
41 | * Send a control request to the webcam.
|
---|
42 | * Async response will be returned by pfnWebcamUpControl callback.
|
---|
43 | *
|
---|
44 | * @param pInterface Pointer to the interface.
|
---|
45 | * @param pvUser The callers context.
|
---|
46 | * @param u64DeviceId Unique id for the reported webcam assigned by the driver.
|
---|
47 | * @param pCtrl The control data.
|
---|
48 | * @param cbCtrl The size of the control data.
|
---|
49 | */
|
---|
50 | DECLR3CALLBACKMEMBER(int, pfnWebcamDownControl, (PPDMIWEBCAMDOWN pInterface,
|
---|
51 | void *pvUser,
|
---|
52 | uint64_t u64DeviceId,
|
---|
53 | const PDMIWEBCAM_CTRLHDR *pCtrl,
|
---|
54 | uint32_t cbCtrl));
|
---|
55 | } PDMIWEBCAMDOWN;
|
---|
56 |
|
---|
57 |
|
---|
58 | #define PDMIWEBCAMUP_IID "476c5d41-7bd1-4997-825e-722a72577af3"
|
---|
59 | typedef struct PDMIWEBCAMUP *PPDMIWEBCAMUP;
|
---|
60 | typedef struct PDMIWEBCAMUP
|
---|
61 | {
|
---|
62 | /*
|
---|
63 | * A webcam is available.
|
---|
64 | *
|
---|
65 | * @param pInterface Pointer to the interface.
|
---|
66 | * @param u64DeviceId Unique id for the reported webcam assigned by the driver.
|
---|
67 | * @param pDeviceDesc The device description.
|
---|
68 | * @param cbDeviceDesc The size of the device description.
|
---|
69 | * @param u32Version The remote video input protocol version.
|
---|
70 | * @param fu32Capabilities The remote video input protocol capabilities.
|
---|
71 | */
|
---|
72 | DECLR3CALLBACKMEMBER(int, pfnWebcamUpAttached,(PPDMIWEBCAMUP pInterface,
|
---|
73 | uint64_t u64DeviceId,
|
---|
74 | const PDMIWEBCAM_DEVICEDESC *pDeviceDesc,
|
---|
75 | uint32_t cbDeviceDesc,
|
---|
76 | uint32_t u32Version,
|
---|
77 | uint32_t fu32Capabilities));
|
---|
78 |
|
---|
79 | /*
|
---|
80 | * The webcam is not available anymore.
|
---|
81 | *
|
---|
82 | * @param pInterface Pointer to the interface.
|
---|
83 | * @param u64DeviceId Unique id for the reported webcam assigned by the driver.
|
---|
84 | */
|
---|
85 | DECLR3CALLBACKMEMBER(void, pfnWebcamUpDetached,(PPDMIWEBCAMUP pInterface,
|
---|
86 | uint64_t u64DeviceId));
|
---|
87 |
|
---|
88 | /*
|
---|
89 | * There is a control response or a control change for the webcam.
|
---|
90 | *
|
---|
91 | * @param pInterface Pointer to the interface.
|
---|
92 | * @param fResponse True if this is a response for a previous pfnWebcamDownControl call.
|
---|
93 | * @param pvUser The pvUser parameter of the pfnWebcamDownControl call. Undefined if fResponse == false.
|
---|
94 | * @param u64DeviceId Unique id for the reported webcam assigned by the driver.
|
---|
95 | * @param pCtrl The control data.
|
---|
96 | * @param cbCtrl The size of the control data.
|
---|
97 | */
|
---|
98 | DECLR3CALLBACKMEMBER(void, pfnWebcamUpControl,(PPDMIWEBCAMUP pInterface,
|
---|
99 | bool fResponse,
|
---|
100 | void *pvUser,
|
---|
101 | uint64_t u64DeviceId,
|
---|
102 | const PDMIWEBCAM_CTRLHDR *pCtrl,
|
---|
103 | uint32_t cbCtrl));
|
---|
104 |
|
---|
105 | /*
|
---|
106 | * A new frame.
|
---|
107 | *
|
---|
108 | * @param pInterface Pointer to the interface.
|
---|
109 | * @param u64DeviceId Unique id for the reported webcam assigned by the driver.
|
---|
110 | * @param pu8Frame The frame data including the payload header and the image data.
|
---|
111 | * @param cbFrame The size of the frame data.
|
---|
112 | */
|
---|
113 | DECLR3CALLBACKMEMBER(void, pfnWebcamUpFrame,(PPDMIWEBCAMUP pInterface,
|
---|
114 | uint64_t u64DeviceId,
|
---|
115 | const uint8_t *pu8Frame,
|
---|
116 | uint32_t cbFrame));
|
---|
117 | } PDMIWEBCAMUP;
|
---|
118 |
|
---|
119 | #endif
|
---|