VirtualBox

Changeset 68895 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Sep 27, 2017 4:38:54 PM (7 years ago)
Author:
vboxsync
Message:

VideoRec: Made the audio driver hot pluggable.

Location:
trunk/src/VBox/Main
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/DrvAudioVideoRec.h

    r65410 r68895  
    4141public:
    4242
    43     static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags);
     43    static DECLCALLBACK(int)  drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags);
    4444    static DECLCALLBACK(void) drvDestruct(PPDMDRVINS pDrvIns);
     45    static DECLCALLBACK(int)  drvAttach(PPDMDRVINS pDrvIns, uint32_t fFlags);
     46    static DECLCALLBACK(void) drvDetach(PPDMDRVINS pDrvIns, uint32_t fFlags);
    4547
    4648private:
  • trunk/src/VBox/Main/src-client/DrvAudioVideoRec.cpp

    r68882 r68895  
    10191019
    10201020/**
    1021  * @interface_method_impl{PDMDRVREG,pfnDestruct}
    1022  */
    1023 /* static */
    1024 DECLCALLBACK(void) AudioVideoRec::drvDestruct(PPDMDRVINS pDrvIns)
    1025 {
    1026     PDMDRV_CHECK_VERSIONS_RETURN_VOID(pDrvIns);
    1027     PDRVAUDIOVIDEOREC pThis = PDMINS_2_DATA(pDrvIns, PDRVAUDIOVIDEOREC);
    1028     LogFlowFuncEnter();
    1029 
    1030     /*
    1031      * If the AudioVideoRec object is still alive, we must clear it's reference to
    1032      * us since we'll be invalid when we return from this method.
    1033      */
    1034     if (pThis->pAudioVideoRec)
    1035     {
    1036         pThis->pAudioVideoRec->mpDrv = NULL;
    1037         pThis->pAudioVideoRec = NULL;
    1038     }
    1039 }
    1040 
    1041 
    1042 /**
    10431021 * Construct a audio video recording driver instance.
    10441022 *
     
    11051083}
    11061084
     1085
     1086/**
     1087 * @interface_method_impl{PDMDRVREG,pfnDestruct}
     1088 */
     1089/* static */
     1090DECLCALLBACK(void) AudioVideoRec::drvDestruct(PPDMDRVINS pDrvIns)
     1091{
     1092    PDMDRV_CHECK_VERSIONS_RETURN_VOID(pDrvIns);
     1093    PDRVAUDIOVIDEOREC pThis = PDMINS_2_DATA(pDrvIns, PDRVAUDIOVIDEOREC);
     1094    LogFlowFuncEnter();
     1095
     1096    /*
     1097     * If the AudioVideoRec object is still alive, we must clear it's reference to
     1098     * us since we'll be invalid when we return from this method.
     1099     */
     1100    if (pThis->pAudioVideoRec)
     1101    {
     1102        pThis->pAudioVideoRec->mpDrv = NULL;
     1103        pThis->pAudioVideoRec = NULL;
     1104    }
     1105}
     1106
     1107
     1108/**
     1109 * @interface_method_impl{PDMDRVREG,pfnAttach}
     1110 */
     1111/* static */
     1112DECLCALLBACK(int) AudioVideoRec::drvAttach(PPDMDRVINS pDrvIns, uint32_t fFlags)
     1113{
     1114    RT_NOREF(pDrvIns, fFlags);
     1115
     1116    LogFlowFuncEnter();
     1117
     1118    return VINF_SUCCESS;
     1119}
     1120
     1121/**
     1122 * @interface_method_impl{PDMDRVREG,pfnDetach}
     1123 */
     1124/* static */
     1125DECLCALLBACK(void) AudioVideoRec::drvDetach(PPDMDRVINS pDrvIns, uint32_t fFlags)
     1126{
     1127    RT_NOREF(pDrvIns, fFlags);
     1128
     1129    LogFlowFuncEnter();
     1130}
    11071131
    11081132/**
     
    11451169    NULL,
    11461170    /* pfnAttach */
    1147     NULL,
     1171    AudioVideoRec::drvAttach,
    11481172    /* pfnDetach */
    1149     NULL,
     1173    AudioVideoRec::drvDetach,
    11501174    /* pfnPowerOff */
    11511175    NULL,
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