mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 15:23:05 +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) {
|
int MetavoxelClient::parseData(const QByteArray& packet) {
|
||||||
// process through sequencer
|
// process through sequencer
|
||||||
QMetaObject::invokeMethod(&_sequencer, "receivedDatagram", Q_ARG(const QByteArray&, packet));
|
QMetaObject::invokeMethod(&_sequencer, "receivedDatagram", Q_ARG(const QByteArray&, packet));
|
||||||
|
Application::getInstance()->getBandwidthMeter()->inputStream(BandwidthMeter::METAVOXELS).updateValue(packet.size());
|
||||||
return packet.size();
|
return packet.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MetavoxelClient::sendData(const QByteArray& data) {
|
void MetavoxelClient::sendData(const QByteArray& data) {
|
||||||
NodeList::getInstance()->writeDatagram(data, _node);
|
NodeList::getInstance()->writeDatagram(data, _node);
|
||||||
|
Application::getInstance()->getBandwidthMeter()->outputStream(BandwidthMeter::METAVOXELS).updateValue(data.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
void MetavoxelClient::readPacket(Bitstream& in) {
|
void MetavoxelClient::readPacket(Bitstream& in) {
|
||||||
|
|
|
@ -42,7 +42,8 @@ namespace { // .cpp-local
|
||||||
BandwidthMeter::ChannelInfo BandwidthMeter::_CHANNELS[] = {
|
BandwidthMeter::ChannelInfo BandwidthMeter::_CHANNELS[] = {
|
||||||
{ "Audio" , "Kbps", 8000.0 / 1024.0, 0x33cc99ff },
|
{ "Audio" , "Kbps", 8000.0 / 1024.0, 0x33cc99ff },
|
||||||
{ "Avatars" , "Kbps", 8000.0 / 1024.0, 0xffef40c0 },
|
{ "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() :
|
BandwidthMeter::BandwidthMeter() :
|
||||||
|
|
|
@ -30,11 +30,11 @@ public:
|
||||||
bool isWithinArea(int x, int y, int screenWidth, int screenHeight);
|
bool isWithinArea(int x, int y, int screenWidth, int screenHeight);
|
||||||
|
|
||||||
// Number of channels / streams.
|
// 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;
|
static size_t const N_STREAMS = N_CHANNELS * 2;
|
||||||
|
|
||||||
// Channel usage.
|
// Channel usage.
|
||||||
enum ChannelIndex { AUDIO, AVATARS, VOXELS };
|
enum ChannelIndex { AUDIO, AVATARS, VOXELS, METAVOXELS };
|
||||||
|
|
||||||
// Meta information held for a communication channel (bidirectional).
|
// Meta information held for a communication channel (bidirectional).
|
||||||
struct ChannelInfo {
|
struct ChannelInfo {
|
||||||
|
|
Loading…
Reference in a new issue