VirtualBox

Changeset 44191 in vbox for trunk/src/VBox/Main/src-client


Ignore:
Timestamp:
Dec 20, 2012 5:36:56 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
82916
Message:

include,ExtPacks\Puel\UsbWebcam,Main,VRDP,VBoxManage: emulated USB webcam.

Location:
trunk/src/VBox/Main/src-client
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/ConsoleImpl.cpp

    r44167 r44191  
    380380    , mNvram(NULL)
    381381#ifdef VBOX_WITH_USB_VIDEO
    382     , mUsbWebcamInterface(NULL)
     382    , mEmWebcam(NULL)
    383383#endif
    384384#ifdef VBOX_WITH_USB_CARDREADER
     
    550550
    551551#ifdef VBOX_WITH_USB_VIDEO
    552         unconst(mUsbWebcamInterface) = new UsbWebcamInterface(this);
    553         AssertReturn(mUsbWebcamInterface, E_FAIL);
     552        unconst(mEmWebcam) = new EmWebcam(this);
     553        AssertReturn(mEmWebcam, E_FAIL);
    554554#endif
    555555#ifdef VBOX_WITH_USB_CARDREADER
     
    651651
    652652#ifdef VBOX_WITH_USB_VIDEO
    653     if (mUsbWebcamInterface)
    654     {
    655         delete mUsbWebcamInterface;
    656         unconst(mUsbWebcamInterface) = NULL;
     653    if (mEmWebcam)
     654    {
     655        delete mEmWebcam;
     656        unconst(mEmWebcam) = NULL;
    657657    }
    658658#endif
  • trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp

    r44151 r44191  
    23962396
    23972397#ifdef VBOX_WITH_USB_VIDEO
    2398 
    2399                 InsertConfigNode(pUsbDevices, "Webcam", &pDev);
    2400                 InsertConfigNode(pDev,     "0", &pInst);
    2401                 InsertConfigNode(pInst,    "Config", &pCfg);
    2402 # if 0 /* Experiments with attaching */
    2403                 InsertConfigInteger(pCfg, "USBVER", RT_BIT(2));
     2398                BOOL aEmulatedUSBWebcamEnabled = FALSE;
     2399                hrc = pMachine->COMGETTER(EmulatedUSBWebcameraEnabled)(&aEmulatedUSBWebcamEnabled);    H();
     2400                if (aEmulatedUSBWebcamEnabled)
     2401                {
     2402                    InsertConfigNode(pUsbDevices, "Webcam", &pDev);
     2403                    InsertConfigNode(pDev,     "0", &pInst);
     2404                    InsertConfigNode(pInst,    "Config", &pCfg);
     2405                    InsertConfigNode(pInst,    "LUN#0", &pLunL0);
     2406# ifdef VBOX_WITH_USB_VIDEO_TEST
     2407                    InsertConfigString(pLunL0, "Driver", "WebcamFileFeeder");
     2408                    InsertConfigNode(pLunL0,   "Config", &pCfg);
     2409                    InsertConfigString(pCfg,   "DirToFeed", "out");
     2410# else
     2411                    InsertConfigString(pLunL0, "Driver", "EmWebcam");
     2412                    InsertConfigNode(pLunL0,   "Config", &pCfg);
     2413                    InsertConfigInteger(pCfg,  "Object", (uintptr_t)mEmWebcam);
    24042414# endif
    2405                 InsertConfigNode(pInst,    "LUN#0", &pLunL0);
    2406 # ifdef VBOX_WITH_USB_VIDEO_TEST
    2407                 InsertConfigString(pLunL0,    "Driver", "WebcamFileFeeder");
    2408                 InsertConfigNode(pLunL0,    "Config", &pCfg);
    2409                 InsertConfigString(pCfg,   "DirToFeed", "out");
    2410 # else
    2411                 InsertConfigString(pLunL0,    "Driver", "UsbWebcamInterface");
    2412                 InsertConfigNode(pLunL0,    "Config", &pCfg);
    2413                 InsertConfigInteger(pCfg,   "Object", mUsbWebcamInterface);
    2414 # endif
     2415                }
    24152416#endif
     2417
    24162418#ifdef VBOX_WITH_USB_CARDREADER
    24172419                BOOL aEmulatedUSBCardReaderEnabled = FALSE;
  • trunk/src/VBox/Main/src-client/ConsoleVRDPServer.cpp

    r43929 r44191  
    2828#ifdef VBOX_WITH_USB_CARDREADER
    2929# include "UsbCardReader.h"
     30#endif
     31#ifdef VBOX_WITH_USB_VIDEO
     32# include "UsbWebcamInterface.h"
    3033#endif
    3134
     
    25762579#ifdef VBOX_WITH_USB_VIDEO
    25772580    ConsoleVRDPServer *pThis = static_cast<ConsoleVRDPServer*>(pvCallback);
    2578     UsbWebcamInterface *pWebCam = pThis->mConsole->getUsbWebcamInterface();
    2579     return pWebCam->WebCamNotify(u32Id, pvData, cbData);
     2581    EmWebcam *pWebcam = pThis->mConsole->getEmWebcam();
     2582    pWebcam->EmWebcamCbNotify(u32Id, pvData, cbData);
    25802583#else
    25812584    NOREF(pvCallback);
     
    25952598#ifdef VBOX_WITH_USB_VIDEO
    25962599    ConsoleVRDPServer *pThis = static_cast<ConsoleVRDPServer*>(pvCallback);
    2597     UsbWebcamInterface *pWebCam = pThis->mConsole->getUsbWebcamInterface();
    2598     return pWebCam->WebCamDeviceDesc(rcRequest, pDeviceCtx, pvUser, pDeviceDesc, cbDevice);
     2600    EmWebcam *pWebcam = pThis->mConsole->getEmWebcam();
     2601    pWebcam->EmWebcamCbDeviceDesc(rcRequest, pDeviceCtx, pvUser, pDeviceDesc, cbDevice);
    25992602#else
    26002603    NOREF(pvCallback);
     
    26162619#ifdef VBOX_WITH_USB_VIDEO
    26172620    ConsoleVRDPServer *pThis = static_cast<ConsoleVRDPServer*>(pvCallback);
    2618     UsbWebcamInterface *pWebCam = pThis->mConsole->getUsbWebcamInterface();
    2619     return pWebCam->WebCamControl(rcRequest, pDeviceCtx, pvUser, pControl, cbControl);
     2621    EmWebcam *pWebcam = pThis->mConsole->getEmWebcam();
     2622    pWebcam->EmWebcamCbControl(rcRequest, pDeviceCtx, pvUser, pControl, cbControl);
    26202623#else
    26212624    NOREF(pvCallback);
     
    26362639#ifdef VBOX_WITH_USB_VIDEO
    26372640    ConsoleVRDPServer *pThis = static_cast<ConsoleVRDPServer*>(pvCallback);
    2638     UsbWebcamInterface *pWebCam = pThis->mConsole->getUsbWebcamInterface();
    2639     return pWebCam->WebCamFrame(rcRequest, pDeviceCtx, pvUser, pFrame, cbFrame);
     2641    EmWebcam *pWebcam = pThis->mConsole->getEmWebcam();
     2642    pWebcam->EmWebcamCbFrame(rcRequest, pDeviceCtx, pFrame, cbFrame);
    26402643#else
    26412644    NOREF(pvCallback);
     
    26962699
    26972700int ConsoleVRDPServer::VideoInControl(void *pvUser, const VRDEVIDEOINDEVICEHANDLE *pDeviceHandle,
    2698                                       VRDEVIDEOINCTRLHDR *pReq, uint32_t cbReq)
     2701                                      const VRDEVIDEOINCTRLHDR *pReq, uint32_t cbReq)
    26992702{
    27002703    int rc;
  • trunk/src/VBox/Main/src-client/VBoxDriversRegister.cpp

    r43131 r44191  
    7979
    8080#ifdef VBOX_WITH_USB_VIDEO
    81     rc = pCallbacks->pfnRegister(pCallbacks, &UsbWebcamInterface::DrvReg);
     81    rc = pCallbacks->pfnRegister(pCallbacks, &EmWebcam::DrvReg);
    8282    if (RT_FAILURE(rc))
    8383        return rc;
Note: See TracChangeset for help on using the changeset viewer.

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