VirtualBox

Changeset 74848 in vbox for trunk/src/VBox/Main/src-client


Ignore:
Timestamp:
Oct 15, 2018 4:18:13 PM (6 years ago)
Author:
vboxsync
Message:

VideoRec/Main: Use VBR for Opus encoder by default.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/DrvAudioVideoRec.cpp

    r74841 r74848  
    324324
    325325        LogRel(("VideoRec: Audio codec failed to set bitrate (%RU32): %s\n", uBitrate, opus_strerror(orc)));
     326        return VERR_AUDIO_BACKEND_INIT_FAILED;
     327    }
     328
     329    const bool fUseVBR = true; /** Use Variable Bit Rate (VBR) by default. @todo Make this configurable? */
     330
     331    orc = opus_encoder_ctl(pEnc, OPUS_SET_VBR(fUseVBR ? 1 : 0));
     332    if (orc != OPUS_OK)
     333    {
     334        opus_encoder_destroy(pEnc);
     335        pEnc = NULL;
     336
     337        LogRel(("VideoRec: Audio codec failed to %s VBR mode: %s\n", fUseVBR ? "enable" : "disable", opus_strerror(orc)));
    326338        return VERR_AUDIO_BACKEND_INIT_FAILED;
    327339    }
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