Changeset 88382 in vbox for trunk/src/VBox/Main
- Timestamp:
- Apr 7, 2021 9:16:12 AM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 143629
- Location:
- trunk/src/VBox/Main
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/DrvAudioRec.h
r82968 r88382 54 54 static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags); 55 55 static DECLCALLBACK(void) drvDestruct(PPDMDRVINS pDrvIns); 56 static DECLCALLBACK(int) drvAttach(PPDMDRVINS pDrvIns, uint32_t fFlags); 57 static DECLCALLBACK(void) drvDetach(PPDMDRVINS pDrvIns, uint32_t fFlags); 56 static DECLCALLBACK(void) drvPowerOff(PPDMDRVINS pDrvIns); 58 57 59 58 private: -
trunk/src/VBox/Main/include/DrvAudioVRDE.h
r82968 r88382 62 62 static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags); 63 63 static DECLCALLBACK(void) drvDestruct(PPDMDRVINS pDrvIns); 64 static DECLCALLBACK(int) drvAttach(PPDMDRVINS pDrvIns, uint32_t fFlags); 65 static DECLCALLBACK(void) drvDetach(PPDMDRVINS pDrvIns, uint32_t fFlags); 64 static DECLCALLBACK(void) drvPowerOff(PPDMDRVINS pDrvIns); 66 65 67 66 private: -
trunk/src/VBox/Main/src-client/DrvAudioRec.cpp
r88381 r88382 856 856 857 857 /** 858 * @interface_method_impl{PDMIHOSTAUDIO,pfnShutdown}859 */860 static DECLCALLBACK(void) drvAudioVideoRecHA_Shutdown(PPDMIHOSTAUDIO pInterface)861 {862 LogFlowFuncEnter();863 864 PDRVAUDIORECORDING pThis = PDMIHOSTAUDIO_2_DRVAUDIORECORDING(pInterface);865 866 avRecSinkShutdown(&pThis->Sink);867 }868 869 870 /**871 858 * @interface_method_impl{PDMIHOSTAUDIO,pfnGetStatus} 872 859 */ … … 1078 1065 1079 1066 /** 1067 * @interface_method_impl{PDMDRVREG,pfnPowerOff} 1068 */ 1069 /*static*/ DECLCALLBACK(void) AudioVideoRec::drvPowerOff(PPDMDRVINS pDrvIns) 1070 { 1071 PDRVAUDIORECORDING pThis = PDMINS_2_DATA(pDrvIns, PDRVAUDIORECORDING); 1072 LogFlowFuncEnter(); 1073 avRecSinkShutdown(&pThis->Sink); 1074 } 1075 1076 1077 /** 1078 * @interface_method_impl{PDMDRVREG,pfnDestruct} 1079 */ 1080 /*static*/ DECLCALLBACK(void) AudioVideoRec::drvDestruct(PPDMDRVINS pDrvIns) 1081 { 1082 PDMDRV_CHECK_VERSIONS_RETURN_VOID(pDrvIns); 1083 PDRVAUDIORECORDING pThis = PDMINS_2_DATA(pDrvIns, PDRVAUDIORECORDING); 1084 1085 LogFlowFuncEnter(); 1086 1087 switch (pThis->ContainerParms.enmType) 1088 { 1089 case AVRECCONTAINERTYPE_WEBM: 1090 { 1091 avRecSinkShutdown(&pThis->Sink); 1092 RTStrFree(pThis->ContainerParms.WebM.pszFile); 1093 break; 1094 } 1095 1096 default: 1097 break; 1098 } 1099 1100 /* 1101 * If the AudioVideoRec object is still alive, we must clear it's reference to 1102 * us since we'll be invalid when we return from this method. 1103 */ 1104 if (pThis->pAudioVideoRec) 1105 { 1106 pThis->pAudioVideoRec->mpDrv = NULL; 1107 pThis->pAudioVideoRec = NULL; 1108 } 1109 1110 LogFlowFuncLeave(); 1111 } 1112 1113 1114 /** 1080 1115 * Construct a audio video recording driver instance. 1081 1116 * 1082 1117 * @copydoc FNPDMDRVCONSTRUCT 1083 1118 */ 1084 /* static */ 1085 DECLCALLBACK(int) AudioVideoRec::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags) 1119 /*static*/ DECLCALLBACK(int) AudioVideoRec::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags) 1086 1120 { 1087 1121 PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns); … … 1104 1138 /* IHostAudio */ 1105 1139 pThis->IHostAudio.pfnInit = NULL; 1106 pThis->IHostAudio.pfnShutdown = drvAudioVideoRecHA_Shutdown;1140 pThis->IHostAudio.pfnShutdown = NULL; 1107 1141 pThis->IHostAudio.pfnGetConfig = drvAudioVideoRecHA_GetConfig; 1108 1142 pThis->IHostAudio.pfnGetStatus = drvAudioVideoRecHA_GetStatus; … … 1215 1249 } 1216 1250 1217 1218 /**1219 * @interface_method_impl{PDMDRVREG,pfnDestruct}1220 */1221 /* static */1222 DECLCALLBACK(void) AudioVideoRec::drvDestruct(PPDMDRVINS pDrvIns)1223 {1224 PDMDRV_CHECK_VERSIONS_RETURN_VOID(pDrvIns);1225 PDRVAUDIORECORDING pThis = PDMINS_2_DATA(pDrvIns, PDRVAUDIORECORDING);1226 1227 LogFlowFuncEnter();1228 1229 switch (pThis->ContainerParms.enmType)1230 {1231 case AVRECCONTAINERTYPE_WEBM:1232 {1233 avRecSinkShutdown(&pThis->Sink);1234 RTStrFree(pThis->ContainerParms.WebM.pszFile);1235 break;1236 }1237 1238 default:1239 break;1240 }1241 1242 /*1243 * If the AudioVideoRec object is still alive, we must clear it's reference to1244 * us since we'll be invalid when we return from this method.1245 */1246 if (pThis->pAudioVideoRec)1247 {1248 pThis->pAudioVideoRec->mpDrv = NULL;1249 pThis->pAudioVideoRec = NULL;1250 }1251 1252 LogFlowFuncLeave();1253 }1254 1255 1256 /**1257 * @interface_method_impl{PDMDRVREG,pfnAttach}1258 */1259 /* static */1260 DECLCALLBACK(int) AudioVideoRec::drvAttach(PPDMDRVINS pDrvIns, uint32_t fFlags)1261 {1262 RT_NOREF(pDrvIns, fFlags);1263 1264 LogFlowFuncEnter();1265 1266 return VINF_SUCCESS;1267 }1268 1269 /**1270 * @interface_method_impl{PDMDRVREG,pfnDetach}1271 */1272 /* static */1273 DECLCALLBACK(void) AudioVideoRec::drvDetach(PPDMDRVINS pDrvIns, uint32_t fFlags)1274 {1275 RT_NOREF(pDrvIns, fFlags);1276 1277 LogFlowFuncEnter();1278 }1279 1251 1280 1252 /** … … 1317 1289 NULL, 1318 1290 /* pfnAttach */ 1319 AudioVideoRec::drvAttach,1291 NULL, 1320 1292 /* pfnDetach */ 1321 AudioVideoRec::drvDetach,1293 NULL, 1322 1294 /* pfnPowerOff */ 1323 NULL,1295 AudioVideoRec::drvPowerOff, 1324 1296 /* pfnSoftReset */ 1325 1297 NULL, -
trunk/src/VBox/Main/src-client/DrvAudioVRDE.cpp
r88381 r88382 350 350 351 351 /** 352 * @interface_method_impl{PDMIHOSTAUDIO,pfnShutdown}353 */354 static DECLCALLBACK(void) drvAudioVrdeHA_Shutdown(PPDMIHOSTAUDIO pInterface)355 {356 PDRVAUDIOVRDE pDrv = RT_FROM_MEMBER(pInterface, DRVAUDIOVRDE, IHostAudio);357 AssertPtrReturnVoid(pDrv);358 359 if (pDrv->pConsoleVRDPServer)360 pDrv->pConsoleVRDPServer->SendAudioInputEnd(NULL);361 }362 363 364 /**365 352 * @interface_method_impl{PDMIHOSTAUDIO,pfnGetStatus} 366 353 */ … … 658 645 RT_NOREF(fEnabled); 659 646 return VINF_SUCCESS; /* Never veto. */ 647 } 648 649 650 /** 651 * @interface_method_impl{PDMDRVREG,pfnPowerOff} 652 */ 653 /*static*/ DECLCALLBACK(void) AudioVRDE::drvPowerOff(PPDMDRVINS pDrvIns) 654 { 655 PDRVAUDIOVRDE pThis = PDMINS_2_DATA(pDrvIns, PDRVAUDIOVRDE); 656 LogFlowFuncEnter(); 657 658 if (pThis->pConsoleVRDPServer) 659 pThis->pConsoleVRDPServer->SendAudioInputEnd(NULL); 660 } 661 662 663 /** 664 * @interface_method_impl{PDMDRVREG,pfnDestruct} 665 */ 666 /*static*/ DECLCALLBACK(void) AudioVRDE::drvDestruct(PPDMDRVINS pDrvIns) 667 { 668 PDMDRV_CHECK_VERSIONS_RETURN_VOID(pDrvIns); 669 PDRVAUDIOVRDE pThis = PDMINS_2_DATA(pDrvIns, PDRVAUDIOVRDE); 670 LogFlowFuncEnter(); 671 672 /** @todo For runtime detach maybe: 673 if (pThis->pConsoleVRDPServer) 674 pThis->pConsoleVRDPServer->SendAudioInputEnd(NULL); */ 675 676 /* 677 * If the AudioVRDE object is still alive, we must clear it's reference to 678 * us since we'll be invalid when we return from this method. 679 */ 680 if (pThis->pAudioVRDE) 681 { 682 pThis->pAudioVRDE->mpDrv = NULL; 683 pThis->pAudioVRDE = NULL; 684 } 660 685 } 661 686 … … 691 716 /* IHostAudio */ 692 717 pThis->IHostAudio.pfnInit = NULL; 693 pThis->IHostAudio.pfnShutdown = drvAudioVrdeHA_Shutdown;718 pThis->IHostAudio.pfnShutdown = NULL; 694 719 pThis->IHostAudio.pfnGetConfig = drvAudioVrdeHA_GetConfig; 695 720 pThis->IHostAudio.pfnGetDevices = NULL; … … 734 759 735 760 return VINF_SUCCESS; 736 }737 738 739 /**740 * @interface_method_impl{PDMDRVREG,pfnDestruct}741 */742 /* static */743 DECLCALLBACK(void) AudioVRDE::drvDestruct(PPDMDRVINS pDrvIns)744 {745 PDMDRV_CHECK_VERSIONS_RETURN_VOID(pDrvIns);746 PDRVAUDIOVRDE pThis = PDMINS_2_DATA(pDrvIns, PDRVAUDIOVRDE);747 LogFlowFuncEnter();748 749 /*750 * If the AudioVRDE object is still alive, we must clear it's reference to751 * us since we'll be invalid when we return from this method.752 */753 if (pThis->pAudioVRDE)754 {755 pThis->pAudioVRDE->mpDrv = NULL;756 pThis->pAudioVRDE = NULL;757 }758 }759 760 /**761 * @interface_method_impl{PDMDRVREG,pfnAttach}762 */763 /* static */764 DECLCALLBACK(int) AudioVRDE::drvAttach(PPDMDRVINS pDrvIns, uint32_t fFlags)765 {766 RT_NOREF(pDrvIns, fFlags);767 768 LogFlowFuncEnter();769 770 return VINF_SUCCESS;771 }772 773 /**774 * @interface_method_impl{PDMDRVREG,pfnDetach}775 */776 /* static */777 DECLCALLBACK(void) AudioVRDE::drvDetach(PPDMDRVINS pDrvIns, uint32_t fFlags)778 {779 RT_NOREF(pDrvIns, fFlags);780 781 LogFlowFuncEnter();782 761 } 783 762 … … 822 801 NULL, 823 802 /* pfnAttach */ 824 AudioVRDE::drvAttach,803 NULL, 825 804 /* pfnDetach */ 826 AudioVRDE::drvDetach,805 NULL, 827 806 /* pfnPowerOff */ 828 NULL,807 AudioVRDE::drvPowerOff, 829 808 /* pfnSoftReset */ 830 809 NULL,
Note:
See TracChangeset
for help on using the changeset viewer.