mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-18 06:37:12 +02:00
Add metavoxel bandwidth to details.
This commit is contained in:
parent
a157c67901
commit
5a61009099
3 changed files with 6 additions and 3 deletions
|
@ -295,11 +295,13 @@ void MetavoxelClient::simulate(float deltaTime) {
|
|||
int MetavoxelClient::parseData(const QByteArray& packet) {
|
||||
// process through sequencer
|
||||
QMetaObject::invokeMethod(&_sequencer, "receivedDatagram", Q_ARG(const QByteArray&, packet));
|
||||
Application::getInstance()->getBandwidthMeter()->inputStream(BandwidthMeter::METAVOXELS).updateValue(packet.size());
|
||||
return packet.size();
|
||||
}
|
||||
|
||||
void MetavoxelClient::sendData(const QByteArray& data) {
|
||||
NodeList::getInstance()->writeDatagram(data, _node);
|
||||
Application::getInstance()->getBandwidthMeter()->outputStream(BandwidthMeter::METAVOXELS).updateValue(data.size());
|
||||
}
|
||||
|
||||
void MetavoxelClient::readPacket(Bitstream& in) {
|
||||
|
|
|
@ -42,7 +42,8 @@ namespace { // .cpp-local
|
|||
BandwidthMeter::ChannelInfo BandwidthMeter::_CHANNELS[] = {
|
||||
{ "Audio" , "Kbps", 8000.0 / 1024.0, 0x33cc99ff },
|
||||
{ "Avatars" , "Kbps", 8000.0 / 1024.0, 0xffef40c0 },
|
||||
{ "Voxels" , "Kbps", 8000.0 / 1024.0, 0xd0d0d0a0 }
|
||||
{ "Voxels" , "Kbps", 8000.0 / 1024.0, 0xd0d0d0a0 },
|
||||
{ "Metavoxels", "Kbps", 8000.0 / 1024.0, 0xd0d0d0a0 }
|
||||
};
|
||||
|
||||
BandwidthMeter::BandwidthMeter() :
|
||||
|
|
|
@ -30,11 +30,11 @@ public:
|
|||
bool isWithinArea(int x, int y, int screenWidth, int screenHeight);
|
||||
|
||||
// Number of channels / streams.
|
||||
static size_t const N_CHANNELS = 3;
|
||||
static size_t const N_CHANNELS = 4;
|
||||
static size_t const N_STREAMS = N_CHANNELS * 2;
|
||||
|
||||
// Channel usage.
|
||||
enum ChannelIndex { AUDIO, AVATARS, VOXELS };
|
||||
enum ChannelIndex { AUDIO, AVATARS, VOXELS, METAVOXELS };
|
||||
|
||||
// Meta information held for a communication channel (bidirectional).
|
||||
struct ChannelInfo {
|
||||
|
|
Loading…
Reference in a new issue