VirtualBox

source: vbox/trunk/include/VBox/vmm/pdmwebcaminfs.h@ 44374

Last change on this file since 44374 was 44337, checked in by vboxsync, 12 years ago

update

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.9 KB
Line 
1/* $Id: pdmwebcaminfs.h 44337 2013-01-23 13:51:46Z 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
32typedef struct PDMIWEBCAM_DEVICEDESC PDMIWEBCAM_DEVICEDESC;
33typedef struct PDMIWEBCAM_CTRLHDR PDMIWEBCAM_CTRLHDR;
34
35
36#define PDMIWEBCAMDOWN_IID "0846959f-8b4a-4b2c-be78-9903b2ae9de5"
37typedef struct PDMIWEBCAMDOWN *PPDMIWEBCAMDOWN;
38typedef 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 "7921e96b-b8e2-4173-a73d-787620fc3cab"
59typedef struct PDMIWEBCAMUP *PPDMIWEBCAMUP;
60typedef 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 */
70 DECLR3CALLBACKMEMBER(int, pfnWebcamUpAttached,(PPDMIWEBCAMUP pInterface,
71 uint64_t u64DeviceId,
72 const PDMIWEBCAM_DEVICEDESC *pDeviceDesc,
73 uint32_t cbDeviceDesc));
74
75 /*
76 * The webcam is not available anymore.
77 *
78 * @param pInterface Pointer to the interface.
79 * @param u64DeviceId Unique id for the reported webcam assigned by the driver.
80 */
81 DECLR3CALLBACKMEMBER(void, pfnWebcamUpDetached,(PPDMIWEBCAMUP pInterface,
82 uint64_t u64DeviceId));
83
84 /*
85 * There is a control response or a control change for the webcam.
86 *
87 * @param pInterface Pointer to the interface.
88 * @param fResponse True if this is a response for a previous pfnWebcamDownControl call.
89 * @param pvUser The pvUser parameter of the pfnWebcamDownControl call. Undefined if fResponse == false.
90 * @param u64DeviceId Unique id for the reported webcam assigned by the driver.
91 * @param pCtrl The control data.
92 * @param cbCtrl The size of the control data.
93 */
94 DECLR3CALLBACKMEMBER(void, pfnWebcamUpControl,(PPDMIWEBCAMUP pInterface,
95 bool fResponse,
96 void *pvUser,
97 uint64_t u64DeviceId,
98 const PDMIWEBCAM_CTRLHDR *pCtrl,
99 uint32_t cbCtrl));
100
101 /*
102 * A new frame.
103 *
104 * @param pInterface Pointer to the interface.
105 * @param u64DeviceId Unique id for the reported webcam assigned by the driver.
106 * @param pu8Frame The frame data including the payload header and the image data.
107 * @param cbFrame The size of the frame data.
108 */
109 DECLR3CALLBACKMEMBER(void, pfnWebcamUpFrame,(PPDMIWEBCAMUP pInterface,
110 uint64_t u64DeviceId,
111 const uint8_t *pu8Frame,
112 uint32_t cbFrame));
113} PDMIWEBCAMUP;
114
115#endif
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette