VirtualBox

source: vbox/trunk/src/VBox/Main/src-client/VBoxDriversRegister.cpp@ 65171

Last change on this file since 65171 was 65171, checked in by vboxsync, 8 years ago

VideoRec: Register audio driver for video recording.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.3 KB
Line 
1/* $Id: VBoxDriversRegister.cpp 65171 2017-01-06 09:56:08Z vboxsync $ */
2/** @file
3 *
4 * Main driver registration.
5 */
6
7/*
8 * Copyright (C) 2006-2017 Oracle Corporation
9 *
10 * This file is part of VirtualBox Open Source Edition (OSE), as
11 * available from http://www.215389.xyz. This file is free software;
12 * you can redistribute it and/or modify it under the terms of the GNU
13 * General Public License (GPL) as published by the Free Software
14 * Foundation, in version 2 as it comes in the "COPYING" file of the
15 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
16 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
17 */
18
19
20/*********************************************************************************************************************************
21* Header Files *
22*********************************************************************************************************************************/
23#include "MouseImpl.h"
24#include "KeyboardImpl.h"
25#include "DisplayImpl.h"
26#include "VMMDev.h"
27#ifdef VBOX_WITH_VRDE_AUDIO
28# include "DrvAudioVRDE.h"
29#endif
30#ifdef VBOX_WITH_AUDIO_VIDEOREC
31# include "DrvAudioVideoRec.h"
32#endif
33#include "Nvram.h"
34#include "UsbWebcamInterface.h"
35#ifdef VBOX_WITH_USB_CARDREADER
36# include "UsbCardReader.h"
37#endif
38#include "ConsoleImpl.h"
39#ifdef VBOX_WITH_PCI_PASSTHROUGH
40# include "PCIRawDevImpl.h"
41#endif
42
43#include "Logging.h"
44
45#include <VBox/vmm/pdmdrv.h>
46#include <VBox/version.h>
47
48/**
49 * Register the main drivers.
50 *
51 * @returns VBox status code.
52 * @param pCallbacks Pointer to the callback table.
53 * @param u32Version VBox version number.
54 */
55extern "C" DECLEXPORT(int) VBoxDriversRegister(PCPDMDRVREGCB pCallbacks, uint32_t u32Version)
56{
57 LogFlow(("VBoxDriversRegister: u32Version=%#x\n", u32Version));
58 AssertReleaseMsg(u32Version == VBOX_VERSION, ("u32Version=%#x VBOX_VERSION=%#x\n", u32Version, VBOX_VERSION));
59
60 int rc = pCallbacks->pfnRegister(pCallbacks, &Mouse::DrvReg);
61 if (RT_FAILURE(rc))
62 return rc;
63
64 rc = pCallbacks->pfnRegister(pCallbacks, &Keyboard::DrvReg);
65 if (RT_FAILURE(rc))
66 return rc;
67
68 rc = pCallbacks->pfnRegister(pCallbacks, &Display::DrvReg);
69 if (RT_FAILURE(rc))
70 return rc;
71
72 rc = pCallbacks->pfnRegister(pCallbacks, &VMMDev::DrvReg);
73 if (RT_FAILURE(rc))
74 return rc;
75#ifdef VBOX_WITH_VRDE_AUDIO
76 rc = pCallbacks->pfnRegister(pCallbacks, &AudioVRDE::DrvReg);
77 if (RT_FAILURE(rc))
78 return rc;
79#endif
80#ifdef VBOX_WITH_AUDIO_VIDEOREC
81 rc = pCallbacks->pfnRegister(pCallbacks, &AudioVideoRec::DrvReg);
82 if (RT_FAILURE(rc))
83 return rc;
84#endif
85 rc = pCallbacks->pfnRegister(pCallbacks, &Nvram::DrvReg);
86 if (RT_FAILURE(rc))
87 return rc;
88
89 rc = pCallbacks->pfnRegister(pCallbacks, &EmWebcam::DrvReg);
90 if (RT_FAILURE(rc))
91 return rc;
92
93#ifdef VBOX_WITH_USB_CARDREADER
94 rc = pCallbacks->pfnRegister(pCallbacks, &UsbCardReader::DrvReg);
95 if (RT_FAILURE(rc))
96 return rc;
97#endif
98
99 rc = pCallbacks->pfnRegister(pCallbacks, &Console::DrvStatusReg);
100 if (RT_FAILURE(rc))
101 return rc;
102
103#ifdef VBOX_WITH_PCI_PASSTHROUGH
104 rc = pCallbacks->pfnRegister(pCallbacks, &PCIRawDev::DrvReg);
105 if (RT_FAILURE(rc))
106 return rc;
107#endif
108
109 return VINF_SUCCESS;
110}
111/* vi: set tabstop=4 shiftwidth=4 expandtab: */
Note: See TracBrowser for help on using the repository browser.

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