Changeset 54996 in vbox
- Timestamp:
- Mar 27, 2015 7:27:55 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/DrvAudioVRDE.cpp
r54493 r54996 15 15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. 16 16 */ 17 18 19 /******************************************************************************* 20 * Header Files * 21 *******************************************************************************/ 17 22 #include "DrvAudioVRDE.h" 18 23 #include "ConsoleImpl.h" … … 34 39 #include <VBox/err.h> 35 40 36 #ifdef LOG_GROUP 37 #undef LOG_GROUP 38 #endif 41 #undef LOG_GROUP 39 42 #define LOG_GROUP LOG_GROUP_DEV_AUDIO 40 43 #include <VBox/log.h> 41 44 45 46 /******************************************************************************* 47 * Structures and Typedefs * 48 *******************************************************************************/ 42 49 /** 43 50 * Audio VRDE driver instance data. … … 77 84 } VRDESTREAMOUT, *PVRDESTREAMOUT; 78 85 86 87 79 88 static DECLCALLBACK(int) drvAudioVRDEInit(PPDMIHOSTAUDIO pInterface) 80 89 { … … 133 142 134 143 /** 144 * <Missing brief description> 145 * 135 146 * Transfers audio input formerly sent by a connected RDP client / VRDE backend 136 147 * (using the onVRDEInputXXX methods) over to the VRDE host (VM). The audio device … … 182 193 183 194 /** 195 * Transfers VM audio output to remote client. 196 * 184 197 * Transfers VM audio output over to the VRDE instance for playing remotely 185 198 * on the client. … … 474 487 DECLCALLBACK(int) AudioVRDE::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags) 475 488 { 489 PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns); 490 PDRVAUDIOVRDE pThis = PDMINS_2_DATA(pDrvIns, PDRVAUDIOVRDE); 476 491 AssertPtrReturn(pDrvIns, VERR_INVALID_POINTER); 477 492 AssertPtrReturn(pCfg, VERR_INVALID_POINTER); 478 479 PDRVAUDIOVRDE pThis = PDMINS_2_DATA(pDrvIns, PDRVAUDIOVRDE);480 493 481 494 LogRel(("Audio: Initializing VRDE driver\n")); … … 503 516 void *pvUser; 504 517 int rc = CFGMR3QueryPtr(pCfg, "ObjectVRDPServer", &pvUser); 505 if (RT_FAILURE(rc)) 506 { 507 AssertMsgFailed(("Confguration error: No/bad \"ObjectVRDPServer\" value, rc=%Rrc\n", rc)); 508 return rc; 509 } 518 AssertMsgRCReturn(rc, ("Confguration error: No/bad \"ObjectVRDPServer\" value, rc=%Rrc\n", rc), rc); 510 519 511 520 /* CFGM tree saves the pointer to ConsoleVRDPServer in the Object node of AudioVRDE. */ … … 517 526 pvUser = NULL; 518 527 rc = CFGMR3QueryPtr(pCfg, "Object", &pvUser); 519 if (RT_FAILURE(rc)) 520 { 521 AssertMsgFailed(("Confguration error: No/bad \"Object\" value, rc=%Rrc\n", rc)); 522 return rc; 523 } 528 AssertMsgRCReturn(rc, ("Confguration error: No/bad \"Object\" value, rc=%Rrc\n", rc), rc); 524 529 525 530 pThis->pAudioVRDE = (AudioVRDE *)pvUser; … … 531 536 */ 532 537 pThis->pDrvAudio = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMIAUDIOCONNECTOR); 533 if (!pThis->pDrvAudio)534 { 535 AssertMsgFailed(("Configuration error: No upper interface specified!\n"));536 return VERR_PDM_MISSING_INTERFACE_ABOVE; 537 } 538 539 return VINF_SUCCESS; 540 }541 538 AssertMsgReturn(pThis->pDrvAudio, ("Configuration error: No upper interface specified!\n"), VERR_PDM_MISSING_INTERFACE_ABOVE); 539 540 return VINF_SUCCESS; 541 } 542 543 544 /** 545 * @interface_method_impl{PDMDRVREG,pfnDestruct} 546 */ 542 547 /* static */ 543 548 DECLCALLBACK(void) AudioVRDE::drvDestruct(PPDMDRVINS pDrvIns) 544 549 { 550 PDMDRV_CHECK_VERSIONS_RETURN_VOID(pDrvIns); 551 PDRVAUDIOVRDE pThis = PDMINS_2_DATA(pDrvIns, PDRVAUDIOVRDE); 545 552 LogFlowFuncEnter(); 546 } 553 554 /* 555 * If the AudioVRDE object is still alive, we must clear it's reference to 556 * us since we'll be invalid when we return from this method. 557 */ 558 if (pThis->pAudioVRDE) 559 { 560 pThis->pAudioVRDE->mpDrv = NULL; 561 pThis->pAudioVRDE = NULL; 562 } 563 } 564 547 565 548 566 /**
Note:
See TracChangeset
for help on using the changeset viewer.