VirtualBox

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

Last change on this file since 76553 was 76553, checked in by vboxsync, 6 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 76553 2019-01-01 01:45:53Z vboxsync $ */
2/** @file
3 * VirtualBox PDM Driver for Emulated USB Webcam
4 */
5
6/*
7 * Copyright (C) 2011-2019 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#ifndef RT_WITHOUT_PRAGMA_ONCE
21# pragma once
22#endif
23
24#include <VBox/vmm/pdmdrv.h>
25#define VRDE_VIDEOIN_WITH_VRDEINTERFACE /* Get the VRDE interface definitions. */
26#include <VBox/RemoteDesktop/VRDEVideoIn.h>
27
28class ConsoleVRDPServer;
29typedef struct EMWEBCAMDRV EMWEBCAMDRV;
30typedef struct EMWEBCAMREMOTE EMWEBCAMREMOTE;
31
32class EmWebcam
33{
34 public:
35 EmWebcam(ConsoleVRDPServer *pServer);
36 virtual ~EmWebcam();
37
38 static const PDMDRVREG DrvReg;
39
40 void EmWebcamConstruct(EMWEBCAMDRV *pDrv);
41 void EmWebcamDestruct(EMWEBCAMDRV *pDrv);
42
43 /* Callbacks. */
44 void EmWebcamCbNotify(uint32_t u32Id, const void *pvData, uint32_t cbData);
45 void EmWebcamCbDeviceDesc(int rcRequest, void *pDeviceCtx, void *pvUser,
46 const VRDEVIDEOINDEVICEDESC *pDeviceDesc, uint32_t cbDeviceDesc);
47 void EmWebcamCbControl(int rcRequest, void *pDeviceCtx, void *pvUser,
48 const VRDEVIDEOINCTRLHDR *pControl, uint32_t cbControl);
49 void EmWebcamCbFrame(int rcRequest, void *pDeviceCtx,
50 const VRDEVIDEOINPAYLOADHDR *pFrame, uint32_t cbFrame);
51
52 /* Methods for the PDM driver. */
53 int SendControl(EMWEBCAMDRV *pDrv, void *pvUser, uint64_t u64DeviceId,
54 const VRDEVIDEOINCTRLHDR *pControl, uint32_t cbControl);
55
56 private:
57 static DECLCALLBACK(void *) drvQueryInterface(PPDMIBASE pInterface, const char *pszIID);
58 static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags);
59 static DECLCALLBACK(void) drvDestruct(PPDMDRVINS pDrvIns);
60
61 ConsoleVRDPServer * const mParent;
62
63 EMWEBCAMDRV *mpDrv;
64 EMWEBCAMREMOTE *mpRemote;
65 uint64_t volatile mu64DeviceIdSrc;
66};
67
68#endif /* !____H_USBWEBCAMINTERFACE */
69/* 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