VirtualBox

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


Ignore:
Timestamp:
Nov 15, 2018 4:12:07 PM (6 years ago)
Author:
vboxsync
Message:

Recording/Main: Implemented better support for recording limits (also now configurable per screen).

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

Legend:

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

    r75380 r75488  
    146146    int i_recordingEnable(BOOL fEnable, util::AutoWriteLock *pAutoLock);
    147147    int i_recordingGetSettings(settings::RecordingSettings &Settings);
    148     int i_recordingStart(void);
    149     int i_recordingStop(void);
     148    int i_recordingStart(util::AutoWriteLock *pAutoLock = NULL);
     149    int i_recordingStop(util::AutoWriteLock *pAutoLock = NULL);
    150150    AudioVideoRec *i_recordingGetAudioDrv(void) const { return Recording.mAudioRec; }
    151151    RecordingContext *i_recordingGetContext(void) const { return Recording.mpCtx; }
     
    179179    HRESULT i_onDnDModeChange(DnDMode_T aDnDMode);
    180180    HRESULT i_onVRDEServerChange(BOOL aRestart);
    181     HRESULT i_onRecordingChange();
     181    HRESULT i_onRecordingChange(BOOL fEnable);
    182182    HRESULT i_onUSBControllerChange();
    183183    HRESULT i_onSharedFolderChange(BOOL aGlobal);
     
    10421042
    10431043        /** The recording context. */
    1044         RecordingContext       *mpCtx;
     1044        RecordingContext     *mpCtx;
    10451045# ifdef VBOX_WITH_AUDIO_RECORDING
    10461046        /** Pointer to capturing audio backend. */
  • trunk/src/VBox/Main/include/MachineImpl.h

    r75455 r75488  
    524524    virtual HRESULT i_onStorageDeviceChange(IMediumAttachment * /* mediumAttachment */, BOOL /* remove */,
    525525                                            BOOL /* silent */) { return S_OK; }
    526     virtual HRESULT i_onRecordingChange() { return S_OK; }
     526    virtual HRESULT i_onRecordingChange(BOOL /* aEnable */) { return S_OK; }
    527527
    528528    HRESULT i_saveRegistryEntry(settings::MachineRegistryEntry &data);
     
    13271327    HRESULT i_onCPUChange(ULONG aCPU, BOOL aRemove);
    13281328    HRESULT i_onVRDEServerChange(BOOL aRestart);
    1329     HRESULT i_onRecordingChange();
     1329    HRESULT i_onRecordingChange(BOOL aEnable);
    13301330    HRESULT i_onUSBControllerChange();
    13311331    HRESULT i_onUSBDeviceAttach(IUSBDevice *aDevice,
  • trunk/src/VBox/Main/include/Recording.h

    r75441 r75488  
    3939public:
    4040
    41     RecordingContext(Console *pConsole);
    42 
    4341    RecordingContext(Console *pConsole, const settings::RecordingSettings &a_Settings);
    4442
     
    6462public:
    6563
    66     bool IsFeatureEnabled(RecordingFeature_T enmFeature) const;
     64    bool IsFeatureEnabled(RecordingFeature_T enmFeature);
    6765    bool IsReady(void) const;
    68     bool IsReady(uint32_t uScreen, uint64_t uTimeStampMs) const;
    69     bool IsStarted(void) const;
    70     bool IsLimitReached(uint32_t uScreen, uint64_t tsNowMs) const;
     66    bool IsReady(uint32_t uScreen, uint64_t uTimeStampMs);
     67    bool IsStarted(void);
     68    bool IsLimitReached(void);
     69    bool IsLimitReached(uint32_t uScreen, uint64_t uTimeStampMs);
     70
     71    DECLCALLBACK(int) OnLimitReached(uint32_t uScreen, int rc);
    7172
    7273protected:
     
    7980
    8081    RecordingStream *getStreamInternal(unsigned uScreen) const;
     82
     83    int lock(void);
     84    int unlock(void);
    8185
    8286    static DECLCALLBACK(int) threadMain(RTTHREAD hThreadSelf, void *pvUser);
     
    102106
    103107    /** Pointer to the console object. */
    104     Console                  *pConsole;
     108    Console                     *pConsole;
    105109    /** Used recording configuration. */
    106110    settings::RecordingSettings  Settings;
    107111    /** The current state. */
    108     RECORDINGSTS              enmState;
     112    RECORDINGSTS                 enmState;
    109113    /** Critical section to serialize access. */
    110     RTCRITSECT                CritSect;
     114    RTCRITSECT                   CritSect;
    111115    /** Semaphore to signal the encoding worker thread. */
    112     RTSEMEVENT                WaitEvent;
     116    RTSEMEVENT                   WaitEvent;
    113117    /** Shutdown indicator. */
    114     bool                      fShutdown;
     118    bool                         fShutdown;
    115119    /** Worker thread. */
    116     RTTHREAD                  Thread;
     120    RTTHREAD                     Thread;
    117121    /** Vector of current recording streams.
    118122     *  Per VM screen (display) one recording stream is being used. */
    119     RecordingStreams          vecStreams;
     123    RecordingStreams             vecStreams;
    120124    /** Number of streams in vecStreams which currently are enabled for recording. */
    121     uint16_t                  cStreamsEnabled;
     125    uint16_t                     cStreamsEnabled;
    122126    /** Timestamp (in ms) of when recording has been started. */
    123     uint64_t                  tsStartMs;
     127    uint64_t                     tsStartMs;
    124128    /** Block map of common blocks which need to get multiplexed
    125129     *  to all recording streams. This common block maps should help
     
    129133     *  For now this only affects audio, e.g. all recording streams
    130134     *  need to have the same audio data at a specific point in time. */
    131     RecordingBlockMap         mapBlocksCommon;
     135    RecordingBlockMap            mapBlocksCommon;
    132136};
    133137#endif /* !____H_RECORDING */
  • trunk/src/VBox/Main/include/RecordingInternals.h

    r75441 r75488  
    4848            /** Pointer to the codec's internal YUV buffer. */
    4949            uint8_t            *pu8YuvBuf;
     50            /** The encoder's deadline (in ms).
     51             *  The more time the encoder is allowed to spend encoding, the better the encoded
     52             *  result, in exchange for higher CPU usage and time spent encoding. */
    5053            unsigned int        uEncoderDeadline;
    5154        } VPX;
  • trunk/src/VBox/Main/include/RecordingStream.h

    r75441 r75488  
    126126    const settings::RecordingScreenSettings &GetConfig(void) const;
    127127    uint16_t GetID(void) const { return this->uScreenID; };
    128     bool IsLimitReached(uint64_t tsNowMs) const;
     128    bool IsLimitReached(uint64_t uTimeStampMs) const;
    129129    bool IsReady(void) const;
    130130
     
    141141
    142142    int initAudio(void);
     143
     144    bool isLimitReachedInternal(uint64_t uTimeStampMs) const;
     145    int iterateInternal(uint64_t uTimeStampMs);
    143146
    144147#ifdef VBOX_WITH_LIBVPX
  • trunk/src/VBox/Main/include/SessionImpl.h

    r75361 r75488  
    102102    HRESULT onCPUExecutionCapChange(ULONG aExecutionCap);
    103103    HRESULT onVRDEServerChange(BOOL aRestart);
    104     HRESULT onRecordingChange();
     104    HRESULT onRecordingChange(BOOL aEnable);
    105105    HRESULT onUSBControllerChange();
    106106    HRESULT onSharedFolderChange(BOOL aGlobal);
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