Changeset 70035 in vbox
- Timestamp:
- Dec 8, 2017 3:50:01 PM (7 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 5 edited
-
include/DisplayImpl.h (modified) (1 diff)
-
src-client/ConsoleImpl.cpp (modified) (1 diff)
-
src-client/ConsoleImpl2.cpp (modified) (6 diffs)
-
src-client/DisplayImpl.cpp (modified) (11 diffs)
-
src-client/VideoRec.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/DisplayImpl.h
r68975 r70035 213 213 bool i_videoRecStarted(void); 214 214 # ifdef VBOX_WITH_AUDIO_VIDEOREC 215 int i_videoRecConfigureAudioDriver(const Utf8Str& strAdapter, unsigned uInstance, unsigned uL un, bool fAttach);215 int i_videoRecConfigureAudioDriver(const Utf8Str& strAdapter, unsigned uInstance, unsigned uLUN, bool fAttach); 216 216 # endif 217 static DECLCALLBACK(int) i_videoRecConfigure(Display *pThis, PVIDEORECCFG pCfg, bool fAttachDetach );217 static DECLCALLBACK(int) i_videoRecConfigure(Display *pThis, PVIDEORECCFG pCfg, bool fAttachDetach, unsigned *puLUN); 218 218 int i_videoRecSendAudio(const void *pvData, size_t cbData, uint64_t uDurationMs); 219 219 int i_videoRecStart(void); -
trunk/src/VBox/Main/src-client/ConsoleImpl.cpp
r69749 r70035 5517 5517 alock.release(); 5518 5518 5519 const PVIDEORECCFG pCfg = pDisplay->i_videoRecGetConfig(); 5520 const unsigned uLUN = pCfg->Audio.uLUN; /* Get the currently configured LUN. */ 5521 5519 5522 int vrc = VMR3ReqCallWaitU(ptrVM.rawUVM(), VMCPUID_ANY /*idDstCpu*/, 5520 (PFNRT)Display::i_videoRecConfigure, 3,5521 pDisplay, p Display->i_videoRecGetConfig(), true /* fAttachDetach */);5523 (PFNRT)Display::i_videoRecConfigure, 4, 5524 pDisplay, pCfg, true /* fAttachDetach */, &pCfg->Audio.uLUN); 5522 5525 if (RT_SUCCESS(vrc)) 5523 5526 { 5524 5527 /* Make sure to acquire the lock again after we're done running in EMT. */ 5525 5528 alock.acquire(); 5529 5530 /* We don't support dynamic LUNs for this stuff yet. */ 5531 Assert(uLUN == pCfg->Audio.uLUN); 5526 5532 5527 5533 if (!mDisplay->i_videoRecStarted()) -
trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp
r70021 r70035 2987 2987 } 2988 2988 2989 u int8_t u8AudioLUN = 0;2989 unsigned uAudioLUN = 0; 2990 2990 2991 2991 BOOL fAudioEnabledIn = FALSE; … … 2994 2994 hrc = audioAdapter->COMGETTER(EnabledOut)(&fAudioEnabledOut); H(); 2995 2995 2996 CFGMR3InsertNodeF(pInst, &pLunL0, "LUN#%RU8", u 8AudioLUN++);2996 CFGMR3InsertNodeF(pInst, &pLunL0, "LUN#%RU8", uAudioLUN++); 2997 2997 InsertConfigString(pLunL0, "Driver", "AUDIO"); 2998 2998 … … 3017 3017 * The VRDE audio backend driver. 3018 3018 */ 3019 CFGMR3InsertNodeF(pInst, &pLunL0, "LUN#%RU8", u 8AudioLUN++);3019 CFGMR3InsertNodeF(pInst, &pLunL0, "LUN#%RU8", uAudioLUN++); 3020 3020 InsertConfigString(pLunL0, "Driver", "AUDIO"); 3021 3021 … … 3042 3042 /* Note: Don't do any driver attaching (fAttachDetach) here, as this will 3043 3043 * be done automatically as part of the VM startup process. */ 3044 rc = pDisplay->i_videoRecConfigure(pDisplay, pDisplay->i_videoRecGetConfig(), false /* fAttachDetach */ );3045 3046 /** @todo Fix this: Figure out what the next LUN might be. */3047 u8AudioLUN = 3;3044 rc = pDisplay->i_videoRecConfigure(pDisplay, pDisplay->i_videoRecGetConfig(), false /* fAttachDetach */, 3045 &uAudioLUN); 3046 if (RT_SUCCESS(rc)) /* Successfully configured, use next LUN for drivers below. */ 3047 uAudioLUN++; 3048 3048 } 3049 3049 #endif /* VBOX_WITH_AUDIO_VIDEOREC */ … … 3055 3055 * The audio debugging backend. 3056 3056 */ 3057 CFGMR3InsertNodeF(pInst, &pLunL0, "LUN#%RU8", u 8AudioLUN++);3057 CFGMR3InsertNodeF(pInst, &pLunL0, "LUN#%RU8", uAudioLUN++); 3058 3058 InsertConfigString(pLunL0, "Driver", "AUDIO"); 3059 3059 … … 3093 3093 * The ValidationKit backend. 3094 3094 */ 3095 CFGMR3InsertNodeF(pInst, &pLunL0, "LUN#%RU8", u 8AudioLUN++);3095 CFGMR3InsertNodeF(pInst, &pLunL0, "LUN#%RU8", uAudioLUN++); 3096 3096 InsertConfigString(pLunL0, "Driver", "AUDIO"); 3097 3097 InsertConfigNode(pLunL0, "Config", &pCfg); -
trunk/src/VBox/Main/src-client/DisplayImpl.cpp
r69725 r70035 2424 2424 * @param strDevice The PDM device name. 2425 2425 * @param uInstance The PDM device instance. 2426 * @param uL un The PDM LUN number of the drive.2426 * @param uLUN The PDM LUN number of the driver. 2427 2427 * @param fAttach Whether to attach or detach the driver configuration to CFGM. 2428 2428 * … … 2430 2430 */ 2431 2431 int Display::i_videoRecConfigureAudioDriver(const Utf8Str& strDevice, 2432 unsigned uInstance,2433 unsigned uLun,2434 bool fAttach)2432 unsigned uInstance, 2433 unsigned uLUN, 2434 bool fAttach) 2435 2435 { 2436 2436 if (strDevice.isEmpty()) /* No audio device configured. Bail out. */ … … 2453 2453 AssertPtr(pDev0); 2454 2454 2455 PCFGMNODE pDevLun = CFGMR3GetChildF(pDev0, "LUN#%u/", uL un);2455 PCFGMNODE pDevLun = CFGMR3GetChildF(pDev0, "LUN#%u/", uLUN); 2456 2456 2457 2457 if (fAttach) … … 2462 2462 2463 2463 PCFGMNODE pLunL0; 2464 CFGMR3InsertNodeF(pDev0, &pLunL0, "LUN#%RU8", uL un);2464 CFGMR3InsertNodeF(pDev0, &pLunL0, "LUN#%RU8", uLUN); 2465 2465 CFGMR3InsertString(pLunL0, "Driver", "AUDIO"); 2466 2466 … … 2494 2494 2495 2495 /** 2496 * Configures video capturing and attaches / detaches the associated driver(s). 2496 * Configures video capturing (via CFGM) and attaches / detaches the associated driver. 2497 * Currently this only is the audio driver (if available). 2497 2498 * 2498 2499 * @returns IPRT status code. … … 2500 2501 * @param pCfg Where to store the configuration into. 2501 2502 * @param fAttachDetach Whether to attach/detach associated drivers or not. 2503 * @param puLUN On input, this defines the LUN to which the audio driver shall be assigned to. 2504 * On output, this returns the LUN the audio driver was assigned to. 2502 2505 */ 2503 2506 /* static */ 2504 DECLCALLBACK(int) Display::i_videoRecConfigure(Display *pThis, PVIDEORECCFG pCfg, bool fAttachDetach )2507 DECLCALLBACK(int) Display::i_videoRecConfigure(Display *pThis, PVIDEORECCFG pCfg, bool fAttachDetach, unsigned *puLUN) 2505 2508 { 2506 2509 AssertPtrReturn(pThis, VERR_INVALID_POINTER); 2507 2510 AssertPtrReturn(pCfg, VERR_INVALID_POINTER); 2511 AssertPtrReturn(puLUN, VERR_INVALID_POINTER); 2508 2512 2509 2513 AssertPtr(pThis->mParent); … … 2646 2650 AssertComRC(rc); 2647 2651 2652 unsigned uInstance = 0; 2653 unsigned uLUN = *puLUN; 2654 2648 2655 Utf8Str strAudioDev = pThis->mParent->i_getAudioAdapterDeviceName(audioAdapter); 2649 2656 if (!strAudioDev.isEmpty()) … … 2651 2658 Console::SafeVMPtr ptrVM(pThis->mParent); 2652 2659 Assert(ptrVM.isOk()); 2653 2654 unsigned uInstance = 0;2655 unsigned uLun = 2; /** @todo Make this configurable. */2656 2660 2657 2661 /* … … 2664 2668 if (pCfg->Audio.fEnabled) /* Enable */ 2665 2669 { 2666 vrc2 = pThis->i_videoRecConfigureAudioDriver(strAudioDev, uInstance, uL un, true /* fAttach */);2670 vrc2 = pThis->i_videoRecConfigureAudioDriver(strAudioDev, uInstance, uLUN, true /* fAttach */); 2667 2671 if ( RT_SUCCESS(vrc2) 2668 2672 && fAttachDetach) 2669 2673 { 2670 vrc2 = PDMR3DriverAttach(ptrVM.rawUVM(), strAudioDev.c_str(), uInstance, uL un, 0 /* fFlags */, NULL /* ppBase */);2674 vrc2 = PDMR3DriverAttach(ptrVM.rawUVM(), strAudioDev.c_str(), uInstance, uLUN, 0 /* fFlags */, NULL /* ppBase */); 2671 2675 } 2672 2676 … … 2677 2681 { 2678 2682 if (fAttachDetach) 2679 vrc2 = PDMR3DriverDetach(ptrVM.rawUVM(), strAudioDev.c_str(), uInstance, uL un, "AUDIO",2683 vrc2 = PDMR3DriverDetach(ptrVM.rawUVM(), strAudioDev.c_str(), uInstance, uLUN, "AUDIO", 2680 2684 0 /* iOccurance */, 0 /* fFlags */); 2681 2685 2682 2686 if (RT_SUCCESS(vrc2)) 2683 2687 { 2684 vrc2 = pThis->i_videoRecConfigureAudioDriver(strAudioDev, uInstance, uL un, false /* fAttach */);2688 vrc2 = pThis->i_videoRecConfigureAudioDriver(strAudioDev, uInstance, uLUN, false /* fAttach */); 2685 2689 } 2686 2690 … … 2710 2714 2711 2715 } 2716 2717 if (puLUN) 2718 *puLUN = uLUN; 2712 2719 2713 2720 return S_OK; -
trunk/src/VBox/Main/src-client/VideoRec.h
r68990 r70035 96 96 /** Whether audio recording is enabled or not. */ 97 97 bool fEnabled; 98 /** The device LUN the audio driver is attached / configured to. */ 99 unsigned uLUN; 98 100 /** Hertz (Hz) rate. */ 99 101 uint16_t uHz;
Note:
See TracChangeset
for help on using the changeset viewer.

