VirtualBox

source: vbox/trunk/src/VBox/Main/include/UsbWebcamInterface.h@ 72436

Last change on this file since 72436 was 69500, checked in by vboxsync, 7 years ago

*: scm --update-copyright-year

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.5 KB
Line 
1/* $Id: UsbWebcamInterface.h 69500 2017-10-28 15:14:05Z vboxsync $ */
2/** @file
3 * VirtualBox PDM Driver for Emulated USB Webcam
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
18#ifndef ____H_USBWEBCAMINTERFACE
19#define ____H_USBWEBCAMINTERFACE
20
21#include <VBox/vmm/pdmdrv.h>
22#define VRDE_VIDEOIN_WITH_VRDEINTERFACE /* Get the VRDE interface definitions. */
23#include <VBox/RemoteDesktop/VRDEVideoIn.h>
24
25class ConsoleVRDPServer;
26typedef struct EMWEBCAMDRV EMWEBCAMDRV;
27typedef struct EMWEBCAMREMOTE EMWEBCAMREMOTE;
28
29class EmWebcam
30{
31 public:
32 EmWebcam(ConsoleVRDPServer *pServer);
33 virtual ~EmWebcam();
34
35 static const PDMDRVREG DrvReg;
36
37 void EmWebcamConstruct(EMWEBCAMDRV *pDrv);
38 void EmWebcamDestruct(EMWEBCAMDRV *pDrv);
39
40 /* Callbacks. */
41 void EmWebcamCbNotify(uint32_t u32Id, const void *pvData, uint32_t cbData);
42 void EmWebcamCbDeviceDesc(int rcRequest, void *pDeviceCtx, void *pvUser,
43 const VRDEVIDEOINDEVICEDESC *pDeviceDesc, uint32_t cbDeviceDesc);
44 void EmWebcamCbControl(int rcRequest, void *pDeviceCtx, void *pvUser,
45 const VRDEVIDEOINCTRLHDR *pControl, uint32_t cbControl);
46 void EmWebcamCbFrame(int rcRequest, void *pDeviceCtx,
47 const VRDEVIDEOINPAYLOADHDR *pFrame, uint32_t cbFrame);
48
49 /* Methods for the PDM driver. */
50 int SendControl(EMWEBCAMDRV *pDrv, void *pvUser, uint64_t u64DeviceId,
51 const VRDEVIDEOINCTRLHDR *pControl, uint32_t cbControl);
52
53 private:
54 static DECLCALLBACK(void *) drvQueryInterface(PPDMIBASE pInterface, const char *pszIID);
55 static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags);
56 static DECLCALLBACK(void) drvDestruct(PPDMDRVINS pDrvIns);
57
58 ConsoleVRDPServer * const mParent;
59
60 EMWEBCAMDRV *mpDrv;
61 EMWEBCAMREMOTE *mpRemote;
62 uint64_t volatile mu64DeviceIdSrc;
63};
64
65#endif /* !____H_USBWEBCAMINTERFACE */
66/* vi: set tabstop=4 shiftwidth=4 expandtab: */
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