VirtualBox

Changeset 70563 in vbox for trunk/src/VBox/Main/include


Ignore:
Timestamp:
Jan 12, 2018 5:52:10 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
120250
Message:

Audio/Main: Also made the video recording driver use the new AudioDriver base class, more bugfixing and clearer abstraction for the AudioDriver API.

Location:
trunk/src/VBox/Main/include
Files:
3 edited

Legend:

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

    r70544 r70563  
    3030struct AudioDriverCfg
    3131{
    32     AudioDriverCfg(Utf8Str a_strDev = "", unsigned a_uInst = 0, unsigned a_uLUN = 0,
    33                    Utf8Str a_strName = "")
     32    AudioDriverCfg(Utf8Str a_strDev = "", unsigned a_uInst = 0, Utf8Str a_strName = "")
    3433        : strDev(a_strDev)
    3534        , uInst(a_uInst)
    36         , uLUN(a_uLUN)
    3735        , strName(a_strName) { }
    3836
     
    4139        this->strDev  = that.strDev;
    4240        this->uInst   = that.uInst;
    43         this->uLUN    = that.uLUN;
    4441        this->strName = that.strName;
    4542
     
    5148    /** The device instance. */
    5249    unsigned             uInst;
    53     /** The LUN the driver is attached to.
    54      *  Set the UINT8_MAX if not attached. */
    55     unsigned             uLUN;
    5650    /** The driver name. */
    5751    Utf8Str              strName;
     
    7670    Console *GetParent(void) { return mpConsole; }
    7771
     72    int Initialize(AudioDriverCfg *pCfg);
     73
    7874    bool IsAttached(void) { return mfAttached; }
    7975
    80     static DECLCALLBACK(int) Attach(AudioDriver *pThis, AudioDriverCfg *pCfg);
     76    static DECLCALLBACK(int) Attach(AudioDriver *pThis);
    8177
    8278    static DECLCALLBACK(int) Detach(AudioDriver *pThis);
    8379
    84     int Configure(AudioDriverCfg *pCfg, bool fAttach);
     80protected:
    8581
    86 protected:
     82    int configure(unsigned uLUN, bool fAttach);
    8783
    8884    /**
     
    105101    /** Whether the driver is attached or not. */
    106102    bool                 mfAttached;
     103    /** The LUN the driver is attached to.
     104     *  Set the UINT8_MAX if not attached. */
     105    unsigned             muLUN;
    107106};
    108107
  • trunk/src/VBox/Main/include/DisplayImpl.h

    r70075 r70563  
    212212    VIDEORECFEATURES         i_videoRecGetEnabled(void);
    213213    bool                     i_videoRecStarted(void);
    214 # ifdef VBOX_WITH_AUDIO_VIDEOREC
    215     int                      i_videoRecConfigureAudioDriver(const Utf8Str& strAdapter, unsigned uInstance, unsigned uLUN, bool fAttach);
    216 # endif
    217     static DECLCALLBACK(int) i_videoRecConfigure(Display *pThis, PVIDEORECCFG pCfg, bool fAttachDetach, unsigned *puLUN);
     214    void                     i_videoRecInvalidate();
    218215    int                      i_videoRecSendAudio(const void *pvData, size_t cbData, uint64_t uDurationMs);
    219216    int                      i_videoRecStart(void);
  • trunk/src/VBox/Main/include/DrvAudioVideoRec.h

    r68895 r70563  
    55
    66/*
    7  * Copyright (C) 2017 Oracle Corporation
     7 * Copyright (C) 2017-2018 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    2323#include <VBox/vmm/pdmifs.h>
    2424
     25#include "AudioDriver.h"
     26
     27using namespace com;
     28
    2529class Console;
    2630
    27 class AudioVideoRec
     31class AudioVideoRec : public AudioDriver
    2832{
    2933
     
    3741    static const PDMDRVREG DrvReg;
    3842
    39     Console *getParent(void) { return mpConsole; }
    40 
    4143public:
    4244
     
    4850private:
    4951
     52    void configureDriver(PCFGMNODE pLunCfg);
     53
    5054    /** Pointer to the associated video recording audio driver. */
    5155    struct DRVAUDIOVIDEOREC *mpDrv;
    52     /** Pointer to parent. */
    53     Console * const          mpConsole;
    5456};
    5557
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette