Changeset 96285 in vbox for trunk/src/VBox/Main/include
- Timestamp:
- Aug 18, 2022 8:01:23 AM (2 years ago)
- Location:
- trunk/src/VBox/Main/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/RecordingInternals.h
r96284 r96285 39 39 #endif /* VBOX_WITH_LIBVPX */ 40 40 41 #ifdef VBOX_WITH_LIBOPUS42 # include <opus.h>43 #endif44 45 41 #ifdef VBOX_WITH_LIBVORBIS 46 42 # include "vorbis/vorbisenc.h" … … 51 47 * Defines * 52 48 *********************************************************************************************************************************/ 53 #define VBOX_RECORDING_OPUS_HZ_MAX 48000 /**< Maximum sample rate (in Hz) Opus can handle. */54 #define VBOX_RECORDING_OPUS_FRAME_MS_DEFAULT 20 /**< Default Opus frame size (in ms). */55 56 49 #define VBOX_RECORDING_VORBIS_HZ_MAX 48000 /**< Maximum sample rate (in Hz) Vorbis can handle. */ 57 50 #define VBOX_RECORDING_VORBIS_FRAME_MS_DEFAULT 20 /**< Default Vorbis frame size (in ms). */ … … 206 199 /** Time (in ms) the encoder expects us to send data to encode. 207 200 * 208 * For Opus, valid frame sizes are:209 * ms Frame size210 * 2.5 120211 * 5 240212 * 10 480213 * 20 (Default) 960214 * 40 1920215 * 60 2880216 *217 201 * For Vorbis, valid frame sizes are powers of two from 64 to 8192 bytes. 218 202 */ … … 247 231 #endif /* VBOX_WITH_LIBVPX */ 248 232 249 #ifdef VBOX_WITH_LIBOPUS250 /**251 * Opus encoder state (needs libvorbis).252 */253 typedef struct RECORDINGCODECOPUS254 {255 /** Encoder we're going to use. */256 OpusEncoder *pEnc;257 } RECORDINGCODECOPUS;258 /** Pointer to an Opus encoder state. */259 typedef RECORDINGCODECOPUS *PRECORDINGCODECOPUS;260 #endif /* VBOX_WITH_LIBOPUS */261 262 233 #ifdef VBOX_WITH_LIBVORBIS 263 234 /** … … 314 285 union 315 286 { 316 # ifdef VBOX_WITH_LIBOPUS317 RECORDINGCODECOPUS Opus;318 # endif /* VBOX_WITH_LIBOPUS */319 287 # ifdef VBOX_WITH_LIBVORBIS 320 288 RECORDINGCODECVORBIS Vorbis; … … 488 456 uint32_t recordingCodecGetWritable(PRECORDINGCODEC pCodec, uint64_t msTimestamp); 489 457 #endif /* !MAIN_INCLUDED_RecordingInternals_h */ 490 -
trunk/src/VBox/Main/include/WebMWriter.h
r96230 r96285 65 65 * With signed 16-bit timecodes and a default timecode scale of 1ms per unit this makes 65536ms. */ 66 66 #define VBOX_WEBM_BLOCK_MAX_LEN_MS UINT16_MAX 67 68 #ifdef VBOX_WITH_LIBOPUS69 # pragma pack(push)70 # pragma pack(1)71 /** Opus codec private data within the MKV (WEBM) container.72 * Taken from: https://wiki.xiph.org/MatroskaOpus */73 typedef struct WEBMOPUSPRIVDATA74 {75 WEBMOPUSPRIVDATA(uint32_t a_u32SampleRate, uint8_t a_u8Channels)76 {77 au64Head = RT_MAKE_U64_FROM_U8('O', 'p', 'u', 's', 'H', 'e', 'a', 'd');78 u8Version = 1;79 u8Channels = a_u8Channels;80 u16PreSkip = 0;81 u32SampleRate = a_u32SampleRate;82 u16Gain = 0;83 u8MappingFamily = 0;84 }85 86 uint64_t au64Head; /**< Defaults to "OpusHead". */87 uint8_t u8Version; /**< Must be set to 1. */88 uint8_t u8Channels;89 uint16_t u16PreSkip;90 /** Sample rate *before* encoding to Opus.91 * Note: This rate has nothing to do with the playback rate later! */92 uint32_t u32SampleRate;93 uint16_t u16Gain;94 /** Must stay 0 -- otherwise a mapping table must be appended95 * right after this header. */96 uint8_t u8MappingFamily;97 } WEBMOPUSPRIVDATA, *PWEBMOPUSPRIVDATA;98 AssertCompileSize(WEBMOPUSPRIVDATA, 19);99 # pragma pack(pop)100 #endif /* VBOX_WITH_LIBOPUS */101 67 102 68 #ifdef VBOX_WITH_LIBVORBIS
Note:
See TracChangeset
for help on using the changeset viewer.