VirtualBox

Changeset 96285 in vbox for trunk/src/VBox/Main/include


Ignore:
Timestamp:
Aug 18, 2022 8:01:23 AM (2 years ago)
Author:
vboxsync
Message:

Recording: Removed support for Opus. bugref:10275

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

Legend:

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

    r96284 r96285  
    3939#endif /* VBOX_WITH_LIBVPX */
    4040
    41 #ifdef VBOX_WITH_LIBOPUS
    42 # include <opus.h>
    43 #endif
    44 
    4541#ifdef VBOX_WITH_LIBVORBIS
    4642# include "vorbis/vorbisenc.h"
     
    5147*   Defines                                                                                                                      *
    5248*********************************************************************************************************************************/
    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 
    5649#define VBOX_RECORDING_VORBIS_HZ_MAX             48000   /**< Maximum sample rate (in Hz) Vorbis can handle. */
    5750#define VBOX_RECORDING_VORBIS_FRAME_MS_DEFAULT   20      /**< Default Vorbis frame size (in ms). */
     
    206199    /** Time (in ms) the encoder expects us to send data to encode.
    207200     *
    208      *  For Opus, valid frame sizes are:
    209      *  ms           Frame size
    210      *  2.5          120
    211      *  5            240
    212      *  10           480
    213      *  20 (Default) 960
    214      *  40           1920
    215      *  60           2880
    216      *
    217201     *  For Vorbis, valid frame sizes are powers of two from 64 to 8192 bytes.
    218202     */
     
    247231#endif /* VBOX_WITH_LIBVPX */
    248232
    249 #ifdef VBOX_WITH_LIBOPUS
    250 /**
    251  * Opus encoder state (needs libvorbis).
    252  */
    253 typedef struct RECORDINGCODECOPUS
    254 {
    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 
    262233#ifdef VBOX_WITH_LIBVORBIS
    263234/**
     
    314285    union
    315286    {
    316 # ifdef VBOX_WITH_LIBOPUS
    317         RECORDINGCODECOPUS      Opus;
    318 # endif /* VBOX_WITH_LIBOPUS */
    319287# ifdef VBOX_WITH_LIBVORBIS
    320288        RECORDINGCODECVORBIS    Vorbis;
     
    488456uint32_t recordingCodecGetWritable(PRECORDINGCODEC pCodec, uint64_t msTimestamp);
    489457#endif /* !MAIN_INCLUDED_RecordingInternals_h */
    490 
  • trunk/src/VBox/Main/include/WebMWriter.h

    r96230 r96285  
    6565 *  With signed 16-bit timecodes and a default timecode scale of 1ms per unit this makes 65536ms. */
    6666#define VBOX_WEBM_BLOCK_MAX_LEN_MS          UINT16_MAX
    67 
    68 #ifdef VBOX_WITH_LIBOPUS
    69 # 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 WEBMOPUSPRIVDATA
    74     {
    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 appended
    95          *  right after this header. */
    96         uint8_t  u8MappingFamily;
    97     } WEBMOPUSPRIVDATA, *PWEBMOPUSPRIVDATA;
    98     AssertCompileSize(WEBMOPUSPRIVDATA, 19);
    99 # pragma pack(pop)
    100 #endif /* VBOX_WITH_LIBOPUS */
    10167
    10268#ifdef VBOX_WITH_LIBVORBIS
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