VirtualBox

Ignore:
Timestamp:
Aug 17, 2022 12:02:46 PM (2 years ago)
Author:
vboxsync
Message:

Recording/Main: Greatly reduced workload spent in the recording driver's async I/O thread by also encoding the audio data in the dedicated recording thread (using two different block maps, see comments for details). bugref:10275

File:
1 edited

Legend:

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

    r96229 r96260  
    8383    RecordingStream *getStreamInternal(unsigned uScreen) const;
    8484
    85     int writeCommonData(PRECORDINGCODEC pCodec, const void *pvData, size_t cbData, uint64_t msAbsPTS, uint32_t uFlags);
     85    int processCommonData(RecordingBlockMap &mapCommon, RTMSINTERVAL msTimeout);
     86    int writeCommonData(RecordingBlockMap &mapCommon, PRECORDINGCODEC pCodec, const void *pvData, size_t cbData, uint64_t msAbsPTS, uint32_t uFlags);
    8687
    8788    int lock(void);
     
    145146    RECORDINGCODEC               CodecAudio;
    146147#endif /* VBOX_WITH_AUDIO_RECORDING */
    147     /** Block map of common blocks which need to get multiplexed
    148      *  to all recording streams. This common block maps should help
    149      *  reducing the time spent in EMT and avoid doing the (expensive)
    150      *  multiplexing work in there.
     148    /** Block map of raw common data blocks which need to get encoded first. */
     149    RecordingBlockMap            mapBlocksRaw;
     150    /** Block map of encoded common blocks.
     151     *
     152     *  Only do the encoding of common data blocks only once and then multiplex
     153     *  the encoded data to all affected recording streams.
     154     *
     155     *  This avoids doing the (expensive) encoding + multiplexing work in other
     156     *  threads like EMT / audio async I/O..
    151157     *
    152158     *  For now this only affects audio, e.g. all recording streams
    153159     *  need to have the same audio data at a specific point in time. */
    154     RecordingBlockMap            mapBlocksCommon;
     160    RecordingBlockMap            mapBlocksEncoded;
    155161};
    156162#endif /* !MAIN_INCLUDED_Recording_h */
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