VirtualBox

Changeset 37282 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jun 1, 2011 2:56:05 AM (14 years ago)
Author:
vboxsync
Message:

Main,ExtPacks/Puel/UsbWebcam: UsbWebcam intergration.

Location:
trunk/src/VBox/Main
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/Makefile.kmk

    r37200 r37282  
    6262        $(if $(VBOX_WITH_GUEST_PROPS_RDONLY_GUEST),VBOX_WITH_GUEST_PROPS_RDONLY_GUEST,) \
    6363        $(if $(VBOX_WITH_GUEST_CONTROL),VBOX_WITH_GUEST_CONTROL,) \
     64        $(if $(VBOX_WITH_USB_VIDEO),VBOX_WITH_USB_VIDEO,) \
    6465        $(if $(VBOX_WITH_HOSTNETIF_API),VBOX_WITH_HOSTNETIF_API,)
    6566
     
    632633        src-all/VirtualBoxErrorInfoImpl.cpp \
    633634        $(if $(VBOX_WITH_EXTPACK),src-all/ExtPackManagerImpl.cpp src-all/ExtPackUtil.cpp,) \
     635        $(if $(VBOX_WITH_USB_VIDEO),src-client/UsbWebcamInterface.cpp,) \
    634636        src-client/AdditionsFacilityImpl.cpp \
    635637        src-client/AudioSnifferInterface.cpp \
  • trunk/src/VBox/Main/include/ConsoleImpl.h

    r36991 r37282  
    3535class VRDEServerInfo;
    3636class AudioSniffer;
     37#ifdef VBOX_WITH_USB_VIDEO
     38class UsbWebcamInterface;
     39#endif
    3740class ConsoleVRDPServer;
    3841class VMMDev;
     
    719722    VMMDev * m_pVMMDev;
    720723    AudioSniffer * const mAudioSniffer;
     724#ifdef VBOX_WITH_USB_VIDEO
     725    UsbWebcamInterface * const mUsbWebcamInterface;
     726#endif
    721727    BusAssignmentManager* mBusMgr;
    722728
  • trunk/src/VBox/Main/include/ConsoleVRDPServer.h

    r36843 r37282  
    136136
    137137    void SendAudioInputEnd(void *pvUserCtx);
     138#ifdef VBOX_WITH_USB_VIDEO
     139    int GetVideoFrameDimensions(uint16_t *pu16Heigh, uint16_t *pu16Width);
     140    int SendVideoSreamOn(bool fFetch);
     141#endif
    138142
    139143private:
  • trunk/src/VBox/Main/src-client/ConsoleImpl.cpp

    r37201 r37282  
    5757#include "SharedFolderImpl.h"
    5858#include "AudioSnifferInterface.h"
     59#include "UsbWebcamInterface.h"
    5960#include "ProgressCombinedImpl.h"
    6061#include "ConsoleVRDPServer.h"
     
    368369    , m_pVMMDev(NULL)
    369370    , mAudioSniffer(NULL)
     371#ifdef VBOX_WITH_USB_VIDEO
     372    , mUsbWebcamInterface(NULL)
     373#endif
    370374    , mBusMgr(NULL)
    371375    , mVMStateChangeCallbackDisabled(false)
     
    504508    unconst(mAudioSniffer) = new AudioSniffer(this);
    505509    AssertReturn(mAudioSniffer, E_FAIL);
     510#ifdef VBOX_WITH_USB_VIDEO
     511    unconst(mUsbWebcamInterface) = new UsbWebcamInterface(this);
     512    AssertReturn(mUsbWebcamInterface, E_FAIL);
     513#endif
    506514
    507515    /* VirtualBox events registration. */
     
    594602        mpVmm2UserMethods = NULL;
    595603    }
     604
     605#ifdef VBOX_WITH_USB_VIDEO
     606    if (mUsbWebcamInterface)
     607    {
     608        delete mUsbWebcamInterface;
     609        unconst(mUsbWebcamInterface) = NULL;
     610    }
     611#endif
    596612
    597613    if (mAudioSniffer)
  • trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp

    r37241 r37282  
    22732273#endif
    22742274
    2275 # if 0  /* Virtual Webcam */
     2275#ifdef VBOX_WITH_USB_VIDEO
    22762276
    22772277                InsertConfigNode(pUsbDevices, "Webcam", &pDev);
     
    22822282# endif
    22832283                InsertConfigNode(pInst,    "LUN#0", &pLunL0);
     2284# ifdef VBOX_WITH_USB_VIDEO_TEST
    22842285                InsertConfigString(pLunL0,    "Driver", "WebcamFileFeeder");
    22852286                InsertConfigNode(pLunL0,    "Config", &pCfg);
    2286 # if 1
    22872287                InsertConfigString(pCfg,   "DirToFeed", "out");
     2288# else
     2289                InsertConfigString(pLunL0,    "Driver", "UsbWebcamInterface");
     2290                InsertConfigNode(pLunL0,    "Config", &pCfg);
     2291                InsertConfigInteger(pCfg,   "Object", &mUsbWebcamInterface);
    22882292# endif
    2289 # endif
     2293#endif
    22902294# if 0  /* Virtual MSD*/
    22912295
  • trunk/src/VBox/Main/src-client/ConsoleVRDPServer.cpp

    r36925 r37282  
    27702770    }
    27712771}
     2772
     2773#ifdef VBOX_WITH_USB_VIDEO
     2774int ConsoleVRDPServer::GetVideoFrameDimensions(uint16_t *pu16Heigh, uint16_t *pu16Width)
     2775{
     2776    *pu16Heigh = 640;
     2777    *pu16Width = 480;
     2778    return VINF_SUCCESS;
     2779}
     2780
     2781int ConsoleVRDPServer::SendVideoSreamOn(bool fFetch)
     2782{
     2783    /* Here we inform server that guest is starting/stopping
     2784     * the stream
     2785     */
     2786    return VINF_SUCCESS;
     2787}
     2788#endif
    27722789
    27732790
  • trunk/src/VBox/Main/src-client/VBoxDriversRegister.cpp

    r35753 r37282  
    2525#include "VMMDev.h"
    2626#include "AudioSnifferInterface.h"
     27#ifdef VBOX_WITH_USB_VIDEO
     28# include "UsbWebcamInterface.h"
     29#endif
    2730#include "ConsoleImpl.h"
    2831#ifdef VBOX_WITH_PCI_PASSTHROUGH
     
    6770        return rc;
    6871
     72#ifdef VBOX_WITH_USB_VIDEO
     73    rc = pCallbacks->pfnRegister(pCallbacks, &UsbWebcamInterface::DrvReg);
     74    if (RT_FAILURE(rc))
     75        return rc;
     76#endif
     77
    6978    rc = pCallbacks->pfnRegister(pCallbacks, &Console::DrvStatusReg);
    7079    if (RT_FAILURE(rc))
Note: See TracChangeset for help on using the changeset viewer.

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