diff options
author | Thorvald Natvig <slicer@users.sourceforge.net> | 2007-07-08 02:45:44 +0400 |
---|---|---|
committer | Thorvald Natvig <slicer@users.sourceforge.net> | 2007-07-08 02:45:44 +0400 |
commit | c0aa51ac47450d9d317f47e22c7b5b6635a07da1 (patch) | |
tree | d46e52f8dc51a375a43be4d0651f14896368ad8d /src/Message.h | |
parent | de744a883b9ffab633fdb3344a14e2c15fc8c966 (diff) |
Part #1 of Speex Packet merging and Jitter updates.
git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@567 05730e5d-ab1b-0410-a4ac-84af385074fa
Diffstat (limited to 'src/Message.h')
-rw-r--r-- | src/Message.h | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/src/Message.h b/src/Message.h index b65a3a7ce..389c07726 100644 --- a/src/Message.h +++ b/src/Message.h @@ -31,7 +31,7 @@ #ifndef _MESSAGE_H #define _MESSAGE_H -#define MESSAGE_STREAM_VERSION 1 +#define MESSAGE_STREAM_VERSION 2 #include "ACL.h" @@ -43,7 +43,7 @@ class Message { virtual void saveStream(PacketDataStream &) const; virtual void restoreStream(PacketDataStream &); public: - enum MessageType { Speex, MultiSpeex, ServerAuthenticate, ServerReject, ServerSync, ServerJoin, ServerLeave, ServerBanList, PlayerMute, PlayerDeaf, PlayerKick, PlayerRename, PlayerBan, PlayerMove, PlayerSelfMuteDeaf, ChannelAdd, ChannelRemove, ChannelMove, ChannelLink, PermissionDenied, EditACL, QueryUsers, Ping, TextMessage, PlayerTexture }; + enum MessageType { Speex, ServerAuthenticate, ServerReject, ServerSync, ServerJoin, ServerLeave, ServerBanList, PlayerMute, PlayerDeaf, PlayerKick, PlayerRename, PlayerBan, PlayerMove, PlayerSelfMuteDeaf, ChannelAdd, ChannelRemove, ChannelMove, ChannelLink, PermissionDenied, EditACL, QueryUsers, Ping, TextMessage, PlayerTexture }; unsigned short sPlayerId; Message(); @@ -62,29 +62,16 @@ class MessageSpeex : public Message { void saveStream(PacketDataStream &) const; void restoreStream(PacketDataStream &); public: - unsigned short iSeq; + enum { AltSpeak = 0x01, LoopBack = 0x02, EndSpeech = 0x04, FrameCountMask = 0x50 }; + unsigned int iSeq; + // Flags is in first byte of packet. QByteArray qbaSpeexPacket; - unsigned char ucFlags; MessageSpeex(); Message::MessageType messageType() const { return Speex; }; void process(Connection *); bool isValid() const; }; -class MessageMultiSpeex : public Message { - protected: - void saveStream(PacketDataStream &) const; - void restoreStream(PacketDataStream &); - public: - unsigned short iSeq; - unsigned char ucFlags; - QList<QByteArray> qlFrames; - MessageMultiSpeex(); - Message::MessageType messageType() const { return MultiSpeex; }; - void process(Connection *); -}; - - class MessageServerAuthenticate : public Message { protected: void saveStream(PacketDataStream &) const; |