- Timestamp:
- Jan 11, 2018 1:33:05 PM (7 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/DrvAudioVRDE.h
r69500 r70535 5 5 6 6 /* 7 * Copyright (C) 2014-201 7Oracle Corporation7 * Copyright (C) 2014-2018 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 20 20 21 21 #include <VBox/com/ptr.h> 22 #include <VBox/com/string.h> 23 22 24 #include <VBox/RemoteDesktop/VRDE.h> 25 23 26 #include <VBox/vmm/pdmdrv.h> 24 27 #include <VBox/vmm/pdmifs.h> 25 28 29 #include "AudioDriver.h" 30 31 using namespace com; 32 26 33 class Console; 27 34 28 class AudioVRDE 35 class AudioVRDE : public AudioDriver 29 36 { 30 37 … … 37 44 38 45 static const PDMDRVREG DrvReg; 39 40 Console *getParent(void) { return mParent; }41 46 42 47 public: … … 55 60 private: 56 61 62 void configureDriver(PCFGMNODE pLunCfg); 63 57 64 /** Pointer to the associated VRDE audio driver. */ 58 65 struct DRVAUDIOVRDE *mpDrv; 59 /** Pointer to parent. */60 Console * const mParent;61 66 }; 62 67 -
trunk/src/VBox/Main/src-client/ConsoleImpl.cpp
r70496 r70535 5405 5405 mConsoleVRDPServer->Stop(); 5406 5406 5407 int vrc = mConsoleVRDPServer->Launch(); 5407 int vrc; 5408 #ifdef VBOX_WITH_AUDIO_VRDE 5409 if (!mAudioVRDE->IsAttached()) 5410 { 5411 vrc = VMR3ReqCallWaitU(ptrVM.rawUVM(), VMCPUID_ANY /*idDstCpu*/, 5412 (PFNRT)AudioVRDE::Attach, 2, 5413 mAudioVRDE, mAudioVRDE->GetConfig()); 5414 AssertRC(vrc); 5415 } 5416 #endif 5417 vrc = mConsoleVRDPServer->Launch(); 5408 5418 if (vrc != VINF_SUCCESS) 5409 5419 { … … 5415 5425 } 5416 5426 else 5427 { 5417 5428 mConsoleVRDPServer->Stop(); 5429 #ifdef VBOX_WITH_AUDIO_VRDE 5430 if (mAudioVRDE->IsAttached()) 5431 { 5432 int vrc2 = VMR3ReqCallWaitU(ptrVM.rawUVM(), VMCPUID_ANY /*idDstCpu*/, 5433 (PFNRT)AudioVRDE::Detach, 1, 5434 mAudioVRDE); 5435 AssertRC(vrc2); 5436 } 5437 #endif 5438 } 5418 5439 5419 5440 alock.acquire(); -
trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp
r70496 r70535 122 122 #endif /* VBOX_WITH_NETFLT */ 123 123 124 #ifdef VBOX_WITH_AUDIO_VRDE 125 # include "DrvAudioVRDE.h" 126 #endif 124 127 #include "NetworkServiceRunner.h" 125 128 #include "BusAssignmentManager.h" … … 2964 2967 2965 2968 #ifdef VBOX_WITH_AUDIO_VRDE 2966 /* 2967 * The VRDE audio backend driver. 2968 */ 2969 CFGMR3InsertNodeF(pInst, &pLunL0, "LUN#%RU8", uAudioLUN++); 2970 InsertConfigString(pLunL0, "Driver", "AUDIO"); 2971 2972 InsertConfigNode(pLunL0, "Config", &pCfg); 2973 InsertConfigString (pCfg, "DriverName", "AudioVRDE"); 2974 InsertConfigInteger(pCfg, "InputEnabled", fAudioEnabledIn); 2975 InsertConfigInteger(pCfg, "OutputEnabled", fAudioEnabledOut); 2976 InsertConfigInteger(pCfg, "DebugEnabled", fDebugEnabled); 2977 InsertConfigString (pCfg, "DebugPathOut", strDebugPathOut); 2978 2979 InsertConfigNode(pLunL0, "AttachedDriver", &pLunL1); 2980 InsertConfigString(pLunL1, "Driver", "AudioVRDE"); 2981 2982 InsertConfigNode(pLunL1, "Config", &pCfg); 2983 InsertConfigString (pCfg, "StreamName", bstr); 2984 InsertConfigInteger(pCfg, "Object", (uintptr_t)mAudioVRDE); 2985 InsertConfigInteger(pCfg, "ObjectVRDPServer", (uintptr_t)mConsoleVRDPServer); 2969 BOOL fVRDEEnabled = FALSE; 2970 2971 if (mVRDEServer) 2972 { 2973 hrc = mVRDEServer->COMGETTER(Enabled)(&fVRDEEnabled); 2974 ComAssertComRC(hrc); 2975 } 2976 2977 AudioDriverCfg Cfg(strAudioDevice, 0 /* Instance */, uAudioLUN); 2978 rc = mAudioVRDE->Configure(&Cfg, fVRDEEnabled /* Attach */); 2979 if ( RT_SUCCESS(rc) 2980 && fVRDEEnabled) /* Successfully configured, use next LUN for drivers below. */ 2981 { 2982 uAudioLUN++; 2983 } 2986 2984 #endif /* VBOX_WITH_AUDIO_VRDE */ 2987 2985 -
trunk/src/VBox/Main/src-client/DrvAudioVRDE.cpp
r68393 r70535 570 570 571 571 AudioVRDE::AudioVRDE(Console *pConsole) 572 : mpDrv(NULL),573 mParent(pConsole)572 : AudioDriver(pConsole) 573 , mpDrv(NULL) 574 574 { 575 575 } … … 585 585 } 586 586 587 588 void AudioVRDE::configureDriver(PCFGMNODE pLunCfg) 589 { 590 CFGMR3InsertInteger(pLunCfg, "Object", (uintptr_t)this); 591 CFGMR3InsertInteger(pLunCfg, "ObjectVRDPServer", (uintptr_t)mpConsole->i_consoleVRDPServer()); 592 } 587 593 588 594 int AudioVRDE::onVRDEControl(bool fEnable, uint32_t uFlags)
Note:
See TracChangeset
for help on using the changeset viewer.