diff --git a/CHANGES b/CHANGES index c3f0677b5..ec5c907bb 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,50 @@ +2009-10-19 + Benjamin Jemlich + 5917312 Don't allow to disable the temporary checkbox + + Thorvald Natvig + d655742 Default codec to 0x800000a on client + 53bb306 Clientside celt codec juggling + 73388f3 Force alpha-preference for bitstream 8000000a + +2009-10-18 + Thorvald Natvig + 7dbaf74 Use full version filenames for celt lib + 925dd22 Serverside alpha/beta celt version choice + 5f8c841 Use int instead of uint to represent version + f00341b Set permission value to heuristic to avoid quadruple query + a3aea25 Send celt version on login + 2abfacf Multicelt build fixes on nix + 5247bf7 Clientside celt juggling library load + b8813f3 Build CELT dynamic + +2009-10-17 + Stefan Hacker + a879bf8 Fix 2880700 : [8af721] wrong chat line text + fe8789c Fix behavior if we don't get permission query replies. + aa88607 Fix permission poll on connect + docs for involved functions + + Thorvald Natvig + 465cbbd Use 0 to express missing permissions + 94035cf Add CELT version vector to authenticate packet + d9335a5 Move user before clearing cache, not after + +2009-10-16 + Thorvald Natvig + 20ec12c Don't query channel permissions when disconnected + 1ba7c2d Clear permission cache on root on connect + +2009-10-15 + Thorvald Natvig + 696bfed Avoid overcopy for multichannel echo + d1e5d7f English source strings + 8fdfabe Include image dimensions in document size + 7a8ca97 Remove texture option and fix chantemp default + 2009-10-14 + Stefan Hacker + 62c3531 Disable chatbar if it is not usable anyway. + Benjamin Jemlich d0b371c fix text cursor in chatbar @@ -6,6 +52,9 @@ 5ae7c8c SuperUser can't query permissions 2c92c17 Clientside permission query + Tuck Therebelos + 7eee5f5 Source plugins update + 2009-10-13 Chosi f75ae8b L4D plugin update to rev 3986 diff --git a/src/mumble/Audio.cpp b/src/mumble/Audio.cpp index 3d92dd07f..9e1554e37 100644 --- a/src/mumble/Audio.cpp +++ b/src/mumble/Audio.cpp @@ -48,7 +48,7 @@ CodecInit ciInit; void CodecInit::initialize() { CELTCodec *codec = NULL; - + codec = new CELTCodec061(QLatin1String("0.6.1")); if (codec->isValid()) { codec->report(); @@ -56,7 +56,7 @@ void CodecInit::initialize() { } else { delete codec; } - + codec = new CELTCodec061(QLatin1String("0.6.2")); if (codec->isValid()) { codec->report(); @@ -87,7 +87,7 @@ CELTCodec::CELTCodec(const QString &version) { bValid = false; cmMode = NULL; qlCELT.setLoadHints(QLibrary::ResolveAllSymbolsHint); - + QStringList alternatives; #if defined(Q_OS_MAC) alternatives << QString::fromLatin1("celt.%1.dylib").arg(version); @@ -160,9 +160,9 @@ CELTCodec061::CELTCodec061(const QString &version) : CELTCodec(version) { RESOLVE(celt_mode_create); RESOLVE(celt_encoder_create); - + RESOLVE(celt_decoder_create); - + if (bValid) { cmMode = celt_mode_create(SAMPLE_RATE, 1, SAMPLE_RATE / 100, NULL); } @@ -180,7 +180,7 @@ CELTCodec070::CELTCodec070(const QString &version) : CELTCodec(version) { RESOLVE(celt_mode_create); RESOLVE(celt_encoder_create); RESOLVE(celt_decoder_create); - + if (bValid) { cmMode = celt_mode_create(SAMPLE_RATE, SAMPLE_RATE / 100, NULL); } diff --git a/src/mumble/Audio.h b/src/mumble/Audio.h index cf1548a6f..df5a17f89 100644 --- a/src/mumble/Audio.h +++ b/src/mumble/Audio.h @@ -64,9 +64,9 @@ class CELTCodec { virtual ~CELTCodec(); bool isValid() const; int bitstreamVersion() const; - + virtual void report() const; - + virtual CELTEncoder *encoderCreate() = 0; virtual CELTDecoder *decoderCreate() = 0; }; diff --git a/src/mumble/AudioInput.cpp b/src/mumble/AudioInput.cpp index 8a79146eb..061ce26a6 100644 --- a/src/mumble/AudioInput.cpp +++ b/src/mumble/AudioInput.cpp @@ -99,7 +99,7 @@ AudioInput::AudioInput() { if (umtType != MessageHandler::UDPVoiceSpeex) { iSampleRate = SAMPLE_RATE; iFrameSize = SAMPLE_RATE / 100; - + esSpeex = NULL; qWarning("AudioInput: %d bits/s, %d hz, %d sample CELT", iAudioQuality, iSampleRate, iFrameSize); } else { @@ -799,10 +799,10 @@ void AudioInput::encodeAudioFrame() { ceEncoder = cCodec->encoderCreate(); } } - + if (! cCodec) return; - + cCodec->celt_encoder_ctl(ceEncoder,CELT_SET_VBR_RATE(iAudioQuality)); len = cCodec->celt_encode(ceEncoder, psSource, NULL, buffer, qMin(iAudioQuality / 800, 127)); } else { diff --git a/src/mumble/Global.cpp b/src/mumble/Global.cpp index c3f415245..84c646a4b 100644 --- a/src/mumble/Global.cpp +++ b/src/mumble/Global.cpp @@ -47,7 +47,7 @@ Global::Global() { bPosTest = false; iAudioPathTime = 0; iMaxBandwidth = -1; - + iCodecAlpha = 0; iCodecBeta = 0; bPreferAlpha = true; diff --git a/src/mumble/Log.cpp b/src/mumble/Log.cpp index f85d6fd09..c6265c5dd 100644 --- a/src/mumble/Log.cpp +++ b/src/mumble/Log.cpp @@ -341,7 +341,7 @@ QString Log::validHtml(const QString &html, bool allowReplacement) { qtd.adjustSize(); QSizeF s = qtd.size(); - + if (!valid || (s.width() > qr.width()) || (s.height() > qr.height())) { qtd.setPlainText(html); qtd.adjustSize(); diff --git a/src/mumble/MainWindow.cpp b/src/mumble/MainWindow.cpp index 8cc897fac..fc49c24ca 100644 --- a/src/mumble/MainWindow.cpp +++ b/src/mumble/MainWindow.cpp @@ -493,8 +493,7 @@ void MainWindow::findDesiredChannel() { g.sh->sendMessage(mpus); } qtvUsers->setCurrentIndex(pmModel->index(chan)); - } - else { + } else { qtvUsers->setCurrentIndex(pmModel->index(ClientUser::get(g.uiSession)->cChannel)); } updateMenuPermissions(); @@ -643,7 +642,7 @@ void MainWindow::on_qmServer_aboutToShow() { qaServerInformation->setEnabled(g.uiSession != 0); qaServerTexture->setEnabled(g.uiSession != 0); qaServerTokens->setEnabled(g.uiSession != 0); - + ClientUser *user = ClientUser::get(g.uiSession); qaServerTextureRemove->setEnabled(user && ! user->qbaTexture.isEmpty()); @@ -1298,7 +1297,7 @@ void MainWindow::updateMenuPermissions() { p = g.pPermissions; else p = ChanACL::All; - + c->uiPermissions = p; } @@ -1314,7 +1313,7 @@ void MainWindow::updateMenuPermissions() { homep = g.pPermissions; else homep = ChanACL::All; - + homec->uiPermissions = homep; } @@ -1675,7 +1674,7 @@ void MainWindow::serverConnected() { g.iCodecAlpha = 0x8000000a; g.bPreferAlpha = true; g.iCodecBeta = 0; - + g.l->clearIgnore(); g.l->setIgnore(Log::UserJoin); g.l->setIgnore(Log::OtherSelfMute); @@ -1714,7 +1713,7 @@ void MainWindow::serverDisconnected(QString reason) { QString uname, pw, host; unsigned short port; - g.sh->getConnectionInfo(host, port, uname, pw); + g.sh->getConnectionInfo(host, port, uname, pw); if (Database::setShortcuts(g.sh->qbaDigest, g.s.qlShortcuts)) GlobalShortcutEngine::engine->bNeedRemap = true; @@ -1907,8 +1906,7 @@ void MainWindow::qtvUserCurrentChanged(const QModelIndex &, const QModelIndex &) if (g.uiSession == 0) { qleChat->setDefaultText(tr("Not connected")); - } - else if (p == NULL || p->uiSession == g.uiSession) { + } else if (p == NULL || p->uiSession == g.uiSession) { // Channel tree target if (c == NULL) // If no channel selected fallback to current one c = ClientUser::get(g.uiSession)->cChannel; diff --git a/src/mumble/Messages.cpp b/src/mumble/Messages.cpp index dc7d31fb1..ffde2b8c6 100644 --- a/src/mumble/Messages.cpp +++ b/src/mumble/Messages.cpp @@ -542,7 +542,7 @@ void MainWindow::msgCodecVersion(const MumbleProto::CodecVersion &msg) { int alpha = msg.has_alpha() ? msg.alpha() : -1; int beta = msg.has_beta() ? msg.beta() : -1; bool pref = msg.prefer_alpha(); - + if ((alpha != -1) && (alpha != g.iCodecAlpha)) { g.iCodecAlpha = alpha; if (pref && ! g.qmCodecs.contains(alpha)) @@ -554,9 +554,9 @@ void MainWindow::msgCodecVersion(const MumbleProto::CodecVersion &msg) { pref = ! pref; } g.bPreferAlpha = pref; - + int willuse = pref ? g.iCodecAlpha : g.iCodecBeta; - + static bool warned = false; if (! g.qmCodecs.contains(willuse)) { diff --git a/src/mumble/ServerHandler.cpp b/src/mumble/ServerHandler.cpp index 192b7d9c3..59ba312e9 100644 --- a/src/mumble/ServerHandler.cpp +++ b/src/mumble/ServerHandler.cpp @@ -153,9 +153,8 @@ void ServerHandler::udpReady() { MessageHandler::UDPMessageType msgType = static_cast((buffer[0] >> 5) & 0x7); unsigned int msgFlags = buffer[0] & 0x1f; - switch(msgType) { - case MessageHandler::UDPPing: - { + switch (msgType) { + case MessageHandler::UDPPing: { quint64 t; pds >> t; accUDP(static_cast(tTimestamp.elapsed() - t) / 1000.0); @@ -341,8 +340,8 @@ void ServerHandler::message(unsigned int msgType, const QByteArray &qbaMsg) { MessageHandler::UDPMessageType msgType = static_cast((ptr[0] >> 5) & 0x7); unsigned int msgFlags = ptr[0] & 0x1f; PacketDataStream pds(qbaMsg.constData() + 1, qbaMsg.size()); - - switch(msgType) { + + switch (msgType) { case MessageHandler::UDPVoiceCELTAlpha: case MessageHandler::UDPVoiceCELTBeta: case MessageHandler::UDPVoiceSpeex: @@ -438,9 +437,9 @@ void ServerHandler::serverConnectionConnected() { QStringList tokens = Database::getTokens(qbaDigest); foreach(const QString &qs, tokens) mpa.add_tokens(u8(qs)); - + QMap::const_iterator i; - for(i=g.qmCodecs.constBegin(); i != g.qmCodecs.constEnd(); ++i) + for (i=g.qmCodecs.constBegin(); i != g.qmCodecs.constEnd(); ++i) mpa.add_celt_versions(i.key()); sendMessage(mpa); diff --git a/src/murmur/Messages.cpp b/src/murmur/Messages.cpp index 36c1799a4..77d566bd6 100644 --- a/src/murmur/Messages.cpp +++ b/src/murmur/Messages.cpp @@ -201,13 +201,13 @@ void Server::msgAuthenticate(ServerUser *uSource, MumbleProto::Authenticate &msg userEnterChannel(uSource, lc, true); if (msg.celt_versions_size() > 0) { - for(int i=0;i < msg.celt_versions_size(); ++i) + for (int i=0;i < msg.celt_versions_size(); ++i) uSource->qlCodecs.append(msg.celt_versions(i)); } else { uSource->qlCodecs.append(static_cast(0x8000000a)); } recheckCodecVersions(); - + MumbleProto::CodecVersion mpcv; mpcv.set_alpha(iCodecAlpha); mpcv.set_beta(iCodecBeta); @@ -256,7 +256,7 @@ void Server::msgAuthenticate(ServerUser *uSource, MumbleProto::Authenticate &msg // Transmit user profile MumbleProto::UserState mpus; - + uSource->sState = ServerUser::Authenticated; mpus.set_session(uSource->uiSession); mpus.set_name(u8(uSource->qsName)); diff --git a/src/murmur/Server.cpp b/src/murmur/Server.cpp index 228a16f72..d04beacc3 100644 --- a/src/murmur/Server.cpp +++ b/src/murmur/Server.cpp @@ -101,7 +101,7 @@ Server::Server(int snum, QObject *p) : QThread(p) { hNotify = NULL; #endif qtTimeout = new QTimer(this); - + iCodecAlpha = iCodecBeta = 0; bPreferAlpha = false; @@ -659,8 +659,7 @@ void Server::run() { switch (msgType) { case MessageHandler::UDPVoiceSpeex: case MessageHandler::UDPVoiceCELTAlpha: - case MessageHandler::UDPVoiceCELTBeta: - { + case MessageHandler::UDPVoiceCELTBeta: { u->bUdp = true; processMsg(u, buffer, len); break; @@ -1453,15 +1452,15 @@ void Server::recheckCodecVersions() { foreach(ServerUser *u, qhUsers) { if (u->qlCodecs.isEmpty()) continue; - + ++users; foreach(int version, u->qlCodecs) ++ qm[version]; } - + if (! users) return; - + int version = 0; int maxu = 0; i = qm.constEnd(); @@ -1472,11 +1471,11 @@ void Server::recheckCodecVersions() { maxu = i.value(); } } while (i != qm.constBegin()); - + int cversion = bPreferAlpha ? iCodecAlpha : iCodecBeta; if (cversion == version) return; - + MumbleProto::CodecVersion mpcv; if (version == 0x8000000a) @@ -1484,7 +1483,7 @@ void Server::recheckCodecVersions() { else bPreferAlpha = ! bPreferAlpha; - if (bPreferAlpha) + if (bPreferAlpha) iCodecAlpha = version; else iCodecBeta = version; @@ -1493,6 +1492,6 @@ void Server::recheckCodecVersions() { mpcv.set_beta(version); mpcv.set_prefer_alpha(bPreferAlpha); sendAll(mpcv); - + log(QString::fromLatin1("CELT codec switch %1 %2 (prefer %3)").arg(iCodecAlpha,0,16).arg(iCodecBeta,0,16).arg(bPreferAlpha ? iCodecAlpha : iCodecBeta,0,16)); } diff --git a/src/murmur/Server.h b/src/murmur/Server.h index 9d3fa68ad..0c185b1ad 100644 --- a/src/murmur/Server.h +++ b/src/murmur/Server.h @@ -146,7 +146,7 @@ class ServerUser : public Connection, public User { HostAddress haAddress; bool bUdp; - + QList qlCodecs; QStringList qslAccessTokens; @@ -212,7 +212,7 @@ class Server : public QThread { bool bValid; void readParams(); - + int iCodecAlpha; int iCodecBeta; bool bPreferAlpha;