Changeset 68323 in vbox
- Timestamp:
- Aug 7, 2017 3:32:13 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/DrvAudioVideoRec.cpp
r68322 r68323 53 53 # include <opus.h> 54 54 #endif 55 56 57 /********************************************************************************************************************************* 58 * Defines * 59 *********************************************************************************************************************************/ 60 61 #define AVREC_OPUS_HZ_MAX 48000 /** Maximum sample rate (in Hz) Opus can handle. */ 62 55 63 56 64 /********************************************************************************************************************************* … … 229 237 /* Opus only supports certain input sample rates in an efficient manner. 230 238 * So make sure that we use those by resampling the data to the requested rate. */ 231 if (uHz > 24000) uHz = 48000;239 if (uHz > 24000) uHz = AVREC_OPUS_HZ_MAX; 232 240 else if (uHz > 16000) uHz = 24000; 233 241 else if (uHz > 12000) uHz = 16000; … … 304 312 305 313 /* Calculate the maximum frame size. */ 306 pSink->Codec.Opus.csFrameMax = 48000/* Maximum sample rate Opus can handle */314 pSink->Codec.Opus.csFrameMax = AVREC_OPUS_HZ_MAX /* Maximum sample rate Opus can handle */ 307 315 * pCodecParms->cChannels; /* Number of channels */ 308 316 } … … 489 497 490 498 AVRECCODECPARMS CodecParms; 491 CodecParms.uHz = 48000; /** @todo Make this configurable. */492 CodecParms.cChannels = 2; /** @todo Make this configurable. */493 CodecParms.uBitrate = 196000; /** @todo Make this configurable. */499 CodecParms.uHz = AVREC_OPUS_HZ_MAX; /** @todo Make this configurable. */ 500 CodecParms.cChannels = 2; /** @todo Make this configurable. */ 501 CodecParms.uBitrate = 196000; /** @todo Make this configurable. */ 494 502 495 503 int rc = avRecSinkInit(pThis, &pThis->Sink, &ContainerParms, &CodecParms);
Note:
See TracChangeset
for help on using the changeset viewer.

