VirtualBox

Changeset 96177 in vbox


Ignore:
Timestamp:
Aug 12, 2022 2:27:58 PM (2 years ago)
Author:
vboxsync
Message:

Recording: Implemented support for Vorbis codec (provided by libvorbis, not enabled by default yet). This also makes all the codec handling more abstract by using a simple codec wrapper, to keep other places free from codec-specific as much as possible. Initial implementation works and output files are being recognized by media players, but there still are some timing bugs to resolve, as well as optimizing the performance [build fix]. bugref:10275

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

Legend:

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

    r96176 r96177  
    289289    /** Timestamp (in ms) of the last frame was encoded. */
    290290    uint64_t            uLastTimeStampMs;
     291    /** Number of encoding errors. */
     292    uint64_t            cEncErrors;
    291293
    292294#ifdef VBOX_WITH_STATISTICS /** @todo Register these values with STAM. */
    293295    struct
    294296    {
    295         /** Number of encoding errors. */
    296         uint64_t        cEncErrors;
    297297        /** Number of frames encoded. */
    298298        uint64_t        cEncBlocks;
  • trunk/src/VBox/Main/src-client/RecordingCodec.cpp

    r96176 r96177  
    157157    if (rcv != VPX_CODEC_OK)
    158158    {
    159         if (pCodec->Stats.cEncErrors++ < 64) /** @todo Make this configurable. */
     159        if (pCodec->cEncErrors++ < 64) /** @todo Make this configurable. */
    160160            LogRel(("Recording: Failed to encode video frame: %s\n", vpx_codec_err_to_string(rcv)));
    161161        return VERR_RECORDING_ENCODING_FAILED;
    162162    }
    163163
    164     pCodec->Stats.cEncErrors = 0;
     164    pCodec->cEncErrors = 0;
    165165
    166166    vpx_codec_iter_t iter = NULL;
     
    775775        pCodec->Parms.enmType       = RECORDINGCODECTYPE_VIDEO;
    776776        pCodec->Parms.enmVideoCodec = enmVideoCodec;
    777 
    778 #ifdef VBOX_WITH_STATISTICS
    779         pCodec->Stats.cEncBlocks = 0;
    780         pCodec->Stats.msEncTotal = 0;
    781 #endif
    782777    }
    783778
     
    802797    else
    803798        AssertFailedStmt(vrc = VERR_NOT_SUPPORTED);
     799
     800    if (RT_SUCCESS(vrc))
     801    {
     802        pCodec->cEncErrors       = 0;
     803#ifdef VBOX_WITH_STATISTICS
     804        pCodec->Stats.cEncBlocks = 0;
     805        pCodec->Stats.msEncTotal = 0;
     806#endif
     807    }
     808
    804809    return vrc;
    805810}
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