VirtualBox

Changeset 68387 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Aug 11, 2017 11:27:25 AM (7 years ago)
Author:
vboxsync
Message:

Audio/DrvAudio.cpp: Logging: Retrieve host driver name for easier identification.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/DrvAudio.cpp

    r68384 r68387  
    25162516        pGstStrm->enmDir = pCfgGuest->enmDir;
    25172517
     2518        /* Retrieve host driver name for easier identification. */
     2519        AssertPtr(pThis->pHostDrvAudio);
     2520        PPDMDRVINS pDrvAudioInst = PDMIBASE_2_PDMDRV(pThis->pDrvIns->pDownBase);
     2521        AssertPtr(pDrvAudioInst);
     2522        AssertPtr(pDrvAudioInst->pReg);
     2523
     2524        char szDriver[64];
     2525        RTStrPrintf(szDriver, RT_ELEMENTS(szDriver), "%s", pDrvAudioInst->pReg->szName);
     2526        if (!strlen(szDriver))
     2527        {
     2528            RTStrPrintf(szDriver, RT_ELEMENTS(szDriver), "Untitled");
     2529            AssertFailed(); /* Should never happen. */
     2530        }
     2531
    25182532        /*
    25192533         * Init host stream.
    25202534         */
    2521         RTStrPrintf(pHstStrm->szName, RT_ELEMENTS(pHstStrm->szName), "%s (Host)",
    2522                     strlen(pCfgHost->szName) ? pCfgHost->szName : "<Untitled>");
     2535        RTStrPrintf(pHstStrm->szName, RT_ELEMENTS(pHstStrm->szName), "[%s] %s (Host)",
     2536                    szDriver, strlen(pCfgHost->szName) ? pCfgHost->szName : "<Untitled>");
    25232537
    25242538        rc = drvAudioStreamLinkToInternal(pHstStrm, pGstStrm);
     
    25282542         * Init guest stream.
    25292543         */
    2530         RTStrPrintf(pGstStrm->szName, RT_ELEMENTS(pGstStrm->szName), "%s (Guest)",
    2531                     strlen(pCfgGuest->szName) ? pCfgGuest->szName : "<Untitled>");
     2544        RTStrPrintf(pGstStrm->szName, RT_ELEMENTS(pGstStrm->szName), "[%s] %s (Guest)",
     2545                    szDriver, strlen(pCfgGuest->szName) ? pCfgGuest->szName : "<Untitled>");
    25322546
    25332547        pGstStrm->fStatus = pHstStrm->fStatus; /* Reflect the host stream's status. */
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