diff options
author | Robert Adam <dev@robert-adam.de> | 2022-01-23 17:24:06 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-23 17:24:06 +0300 |
commit | 5a93c1d5ec8b6e8325068512d3d7296aae5e9927 (patch) | |
tree | dcf527f06903be82032376a34cec1b392fc86cc6 | |
parent | 6571d0cb03e5587d3f2d20982763345400e53138 (diff) | |
parent | bceec3dbfe81570b1de7809216d1d5ed8cb4d110 (diff) |
Merge PR #5504: MAINT(client): Remove SBCELT leftovers
This is dead code since c5644c7.
-rwxr-xr-x | macx/scripts/osxdist.py | 2 | ||||
-rw-r--r-- | src/mumble/Audio.cpp | 10 | ||||
-rw-r--r-- | src/mumble/CELTCodec.h | 13 | ||||
-rw-r--r-- | src/mumble/CELTCodec_sbcelt.cpp | 72 | ||||
-rw-r--r-- | src/mumble/main.cpp | 8 | ||||
-rw-r--r-- | src/mumble/mumble_pch.hpp | 3 |
6 files changed, 0 insertions, 108 deletions
diff --git a/macx/scripts/osxdist.py b/macx/scripts/osxdist.py index 4658c4828..432600c38 100755 --- a/macx/scripts/osxdist.py +++ b/macx/scripts/osxdist.py @@ -281,7 +281,6 @@ def package_client(): # Do the finishing touches to our Application bundle before release a = AppBundle(os.path.join(options.binary_dir, 'Mumble.app'), ver) a.copy_helper('mumble-g15-helper') - a.copy_helper('sbcelt-helper') a.copy_codecs() a.copy_plugins() a.copy_resources([os.path.join(options.source_dir, 'icons/mumble.icns')]) @@ -302,7 +301,6 @@ def package_client(): os.path.join(options.binary_dir, 'Mumble.app/Contents/Codecs/libcelt0.0.7.0.dylib'), os.path.join(options.binary_dir, 'Mumble.app/Contents/Codecs/libopus.dylib'), os.path.join(options.binary_dir, 'Mumble.app/Contents/MacOS/mumble-g15-helper'), - os.path.join(options.binary_dir, 'Mumble.app/Contents/MacOS/sbcelt-helper'), ) availableBinaries = [bin for bin in binaries if os.path.exists(bin)] codesign(availableBinaries) diff --git a/src/mumble/Audio.cpp b/src/mumble/Audio.cpp index 263464cb6..446621b67 100644 --- a/src/mumble/Audio.cpp +++ b/src/mumble/Audio.cpp @@ -51,15 +51,6 @@ void CodecInit::initialize() { CELTCodec *codec = nullptr; -#ifdef USE_SBCELT - codec = new CELTCodecSBCELT(); - if (codec->isValid()) { - codec->report(); - Global::get().qmCodecs.insert(codec->bitstreamVersion(), codec); - } else { - delete codec; - } -#else codec = new CELTCodec070(QLatin1String("0.7.0")); if (codec->isValid()) { codec->report(); @@ -74,7 +65,6 @@ void CodecInit::initialize() { delete codec; } } -#endif } void CodecInit::destroy() { diff --git a/src/mumble/CELTCodec.h b/src/mumble/CELTCodec.h index 815497b6c..22717b4f7 100644 --- a/src/mumble/CELTCodec.h +++ b/src/mumble/CELTCodec.h @@ -71,17 +71,4 @@ public: int decode_float(CELTDecoder *st, const unsigned char *data, int len, float *pcm) Q_DECL_OVERRIDE; }; -class CELTCodecSBCELT : public CELTCodec { -protected: - const CELTMode *cmSBCELTMode; - -public: - CELTCodecSBCELT(); - CELTEncoder *encoderCreate() Q_DECL_OVERRIDE; - CELTDecoder *decoderCreate() Q_DECL_OVERRIDE; - int encode(CELTEncoder *st, const celt_int16 *pcm, unsigned char *compressed, - int nbCompressedBytes) Q_DECL_OVERRIDE; - int decode_float(CELTDecoder *st, const unsigned char *data, int len, float *pcm) Q_DECL_OVERRIDE; -}; - #endif // CELTCODEC_H_ diff --git a/src/mumble/CELTCodec_sbcelt.cpp b/src/mumble/CELTCodec_sbcelt.cpp deleted file mode 100644 index b29b87e1e..000000000 --- a/src/mumble/CELTCodec_sbcelt.cpp +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2012-2022 The Mumble Developers. All rights reserved. -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file at the root of the -// Mumble source tree or at <https://www.mumble.info/LICENSE>. - -#include "CELTCodec.h" - -#include "Audio.h" -#include "Version.h" - -CELTCodec::CELTCodec(const QString &version) { - bValid = true; - cmMode = nullptr; - qsVersion = version; - iBitstreamVersion = INT_MIN; - - this->celt_encoder_destroy = ::celt_encoder_destroy; - this->celt_encoder_ctl = ::celt_encoder_ctl; - - this->celt_decoder_destroy = ::celt_decoder_destroy; - this->celt_decoder_ctl = ::celt_decoder_ctl; -} - -CELTCodec::~CELTCodec() { - if (cmMode) - ::celt_mode_destroy(const_cast< CELTMode * >(cmMode)); -} - -bool CELTCodec::isValid() const { - return bValid; -} - -int CELTCodec::bitstreamVersion() const { - if (cmMode && iBitstreamVersion == INT_MIN) - ::celt_mode_info(cmMode, CELT_GET_BITSTREAM_VERSION, reinterpret_cast< celt_int32 * >(&iBitstreamVersion)); - - return iBitstreamVersion; -} - -QString CELTCodec::version() const { - return qsVersion; -} - -void CELTCodec::report() const { - qWarning("CELT bitstream %08x from internal CELT with SBCELT decoding", bitstreamVersion()); -} - -CELTCodecSBCELT::CELTCodecSBCELT() : CELTCodec(QLatin1String("0.7.0")) { - if (bValid) { - cmMode = ::celt_mode_create(SAMPLE_RATE, SAMPLE_RATE / 100, nullptr); - cmSBCELTMode = ::sbcelt_mode_create(SAMPLE_RATE, SAMPLE_RATE / 100, nullptr); - - this->celt_decoder_destroy = ::sbcelt_decoder_destroy; - this->celt_decoder_ctl = ::sbcelt_decoder_ctl; - } -} - -CELTEncoder *CELTCodecSBCELT::encoderCreate() { - return ::celt_encoder_create(cmMode, 1, nullptr); -} - -CELTDecoder *CELTCodecSBCELT::decoderCreate() { - return ::sbcelt_decoder_create(cmSBCELTMode, 1, nullptr); -} - -int CELTCodecSBCELT::encode(CELTEncoder *st, const celt_int16 *pcm, unsigned char *compressed, int nbCompressedBytes) { - return ::celt_encode(st, pcm, nullptr, compressed, nbCompressedBytes); -} - -int CELTCodecSBCELT::decode_float(CELTDecoder *st, const unsigned char *data, int len, float *pcm) { - return ::sbcelt_decode_float(st, data, len, pcm); -} diff --git a/src/mumble/main.cpp b/src/mumble/main.cpp index 868f65fac..3e4620f27 100644 --- a/src/mumble/main.cpp +++ b/src/mumble/main.cpp @@ -167,14 +167,6 @@ int main(int argc, char **argv) { MumbleSSL::initialize(); -#ifdef USE_SBCELT - { - QDir d(a.applicationVersionRootPath()); - QString helper = d.absoluteFilePath(QString::fromLatin1("sbcelt-helper")); - EnvUtils::setenv(QLatin1String("SBCELT_HELPER_BINARY"), helper.toUtf8().constData()); - } -#endif - // This argument has to be parsed first, since it's value is needed to create the global struct, // which other switches are modifying. If it is parsed first, the order of the arguments does not matter. QStringList args = a.arguments(); diff --git a/src/mumble/mumble_pch.hpp b/src/mumble/mumble_pch.hpp index cb3474a54..abe9168ff 100644 --- a/src/mumble/mumble_pch.hpp +++ b/src/mumble/mumble_pch.hpp @@ -46,9 +46,6 @@ # endif # include <celt.h> # include <sndfile.h> -# ifdef USE_SBCELT -# include <sbcelt.h> -# endif # include <speex/speex.h> # include <speex/speex_echo.h> # include <speex/speex_jitter.h> |