VirtualBox

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

Last change on this file since 69206 was 69107, checked in by vboxsync, 7 years ago

include/VBox/: (C) year

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.6 KB
Line 
1/* $Id: pdmwebcaminfs.h 69107 2017-10-17 10:53:48Z vboxsync $ */
2/** @file
3 * webcaminfs - interfaces between dev and driver.
4 */
5
6/*
7 * Copyright (C) 2011-2017 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 *
17 * The contents of this file may alternatively be used under the terms
18 * of the Common Development and Distribution License Version 1.0
19 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
20 * VirtualBox OSE distribution, in which case the provisions of the
21 * CDDL are applicable instead of those of the GPL.
22 *
23 * You may elect to license modified versions of this file under the
24 * terms and conditions of either the GPL or the CDDL or both.
25 */
26
27#ifndef ___VBox_vmm_pdmwebcaminfs_h
28#define ___VBox_vmm_pdmwebcaminfs_h
29
30#include <VBox/types.h>
31
32struct VRDEVIDEOINDEVICEDESC;
33struct VRDEVIDEOINPAYLOADHDR;
34struct VRDEVIDEOINCTRLHDR;
35
36
37/** @defgroup grp_pdm_ifs_webcam PDM Web Camera Interfaces
38 * @ingroup grp_pdm_interfaces
39 * @{
40 */
41
42/** Pointer to the web camera driver (up) interface. */
43typedef struct PDMIWEBCAMDRV *PPDMIWEBCAMDRV;
44/**
45 * Web camera interface driver provided by the driver to the device,
46 * i.e. facing upwards.
47 */
48typedef struct PDMIWEBCAMDRV
49{
50 /**
51 * The PDM device is ready to get webcam notifications.
52 *
53 * @param pInterface Pointer to the interface.
54 * @param fReady Whether the device is ready.
55 */
56 DECLR3CALLBACKMEMBER(void, pfnReady,(PPDMIWEBCAMDRV pInterface, bool fReady));
57
58 /**
59 * Send a control request to the webcam.
60 *
61 * Async response will be returned by pfnWebcamUpControl callback.
62 *
63 * @returns VBox status code.
64 * @param pInterface Pointer to the interface.
65 * @param pvUser The callers context.
66 * @param idDevice Unique id for the reported webcam assigned by the driver.
67 * @param pCtrl The control data.
68 * @param cbCtrl The size of the control data.
69 */
70 DECLR3CALLBACKMEMBER(int, pfnControl,(PPDMIWEBCAMDRV pInterface, void *pvUser, uint64_t idDevice,
71 struct VRDEVIDEOINCTRLHDR const *pCtrl, uint32_t cbCtrl));
72} PDMIWEBCAMDRV;
73/** Interface ID for PDMIWEBCAMDRV. */
74#define PDMIWEBCAMDRV_IID "0d29b9a1-f4cd-4719-a564-38d5634ba9f8"
75
76
77/** Pointer to the web camera driver/device (down) interface. */
78typedef struct PDMIWEBCAMDEV *PPDMIWEBCAMDEV;
79/**
80 * Web camera interface provided by the device(/driver) interface,
81 * i.e. facing downwards.
82 */
83typedef struct PDMIWEBCAMDEV
84{
85 /**
86 * A webcam is available.
87 *
88 * @returns VBox status code.
89 * @param pInterface Pointer to the interface.
90 * @param idDevice Unique id for the reported webcam assigned by the driver.
91 * @param pDeviceDesc The device description.
92 * @param cbDeviceDesc The size of the device description.
93 * @param uVersion The remote video input protocol version.
94 * @param fCapabilities The remote video input protocol capabilities.
95 */
96 DECLR3CALLBACKMEMBER(int, pfnAttached,(PPDMIWEBCAMDEV pInterface, uint64_t idDevice,
97 struct VRDEVIDEOINDEVICEDESC const *pDeviceDesc, uint32_t cbDeviceDesc,
98 uint32_t uVersion, uint32_t fCapabilities));
99
100 /**
101 * The webcam is not available anymore.
102 *
103 * @param pInterface Pointer to the interface.
104 * @param idDevice Unique id for the reported webcam assigned by the
105 * driver.
106 */
107 DECLR3CALLBACKMEMBER(void, pfnDetached,(PPDMIWEBCAMDEV pInterface, uint64_t idDevice));
108
109 /**
110 * There is a control response or a control change for the webcam.
111 *
112 * @param pInterface Pointer to the interface.
113 * @param fResponse True if this is a response for a previous pfnWebcamDownControl call.
114 * @param pvUser The pvUser parameter of the pfnWebcamDownControl call. Undefined if fResponse == false.
115 * @param idDevice Unique id for the reported webcam assigned by the
116 * driver.
117 * @param pCtrl The control data (defined in VRDE).
118 * @param cbCtrl The size of the control data.
119 */
120 DECLR3CALLBACKMEMBER(void, pfnControl,(PPDMIWEBCAMDEV pInterface, bool fResponse, void *pvUser,
121 uint64_t idDevice, struct VRDEVIDEOINCTRLHDR const *pCtrl, uint32_t cbCtrl));
122
123 /**
124 * A new frame.
125 *
126 * @param pInterface Pointer to the interface.
127 * @param idDevice Unique id for the reported webcam assigned by the driver.
128 * @param pHeader Payload header (defined in VRDE).
129 * @param cbHeader Size of the payload header.
130 * @param pvFrame Frame (image) data.
131 * @param cbFrame Size of the image data.
132 */
133 DECLR3CALLBACKMEMBER(void, pfnFrame,(PPDMIWEBCAMDEV pInterface, uint64_t idDevice,
134 struct VRDEVIDEOINPAYLOADHDR const *pHeader, uint32_t cbHeader,
135 const void *pvFrame, uint32_t cbFrame));
136} PDMIWEBCAMDEV;
137/** Interface ID for PDMIWEBCAMDEV. */
138#define PDMIWEBCAMDEV_IID "6ac03e3c-f56c-4a35-80af-c13ce47a9dd7"
139
140/** @} */
141
142#endif
143
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