mirror of
https://github.com/overte-org/overte.git
synced 2025-08-11 03:28:48 +02:00
use new downstream/upstream nomeclature
This commit is contained in:
parent
a4aa9689a6
commit
88af8b5842
6 changed files with 9 additions and 11 deletions
|
@ -119,7 +119,7 @@ void AudioMixer::queueReplicatedAudioPacket(QSharedPointer<ReceivedMessage> mess
|
||||||
|
|
||||||
QUuid nodeID = QUuid::fromRfc4122(message->readWithoutCopy(NUM_BYTES_RFC4122_UUID));
|
QUuid nodeID = QUuid::fromRfc4122(message->readWithoutCopy(NUM_BYTES_RFC4122_UUID));
|
||||||
|
|
||||||
auto node = nodeList->addOrUpdateNode(nodeID, NodeType::ReplicatedAgent,
|
auto node = nodeList->addOrUpdateNode(nodeID, NodeType::Agent,
|
||||||
message->getSenderSockAddr(), message->getSenderSockAddr(),
|
message->getSenderSockAddr(), message->getSenderSockAddr(),
|
||||||
DEFAULT_AGENT_PERMISSIONS, true);
|
DEFAULT_AGENT_PERMISSIONS, true);
|
||||||
node->setIsUpstream(true);
|
node->setIsUpstream(true);
|
||||||
|
|
|
@ -74,7 +74,7 @@ void AudioMixerClientData::processPackets() {
|
||||||
case PacketType::ReplicatedInjectAudio:
|
case PacketType::ReplicatedInjectAudio:
|
||||||
case PacketType::ReplicatedSilentAudioFrame: {
|
case PacketType::ReplicatedSilentAudioFrame: {
|
||||||
|
|
||||||
if (node->getType() == NodeType::ReplicatedAgent && !_codec) {
|
if (node->isUpstream() && !_codec) {
|
||||||
setupCodecForReplicatedAgent(packet);
|
setupCodecForReplicatedAgent(packet);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ void AudioMixerClientData::replicatePacket(ReceivedMessage& message) {
|
||||||
|
|
||||||
// enumerate the replicant audio mixers and send them the replicated version of this packet
|
// enumerate the replicant audio mixers and send them the replicated version of this packet
|
||||||
nodeList->eachMatchingNode([&](const SharedNodePointer& node)->bool {
|
nodeList->eachMatchingNode([&](const SharedNodePointer& node)->bool {
|
||||||
return node->getType() == NodeType::ReplicantAudioMixer;
|
return node->getType() == NodeType::DownstreamAudioMixer;
|
||||||
}, [&](const SharedNodePointer& node) {
|
}, [&](const SharedNodePointer& node) {
|
||||||
nodeList->sendUnreliablePacket(*packet, node->getPublicSocket());
|
nodeList->sendUnreliablePacket(*packet, node->getPublicSocket());
|
||||||
});
|
});
|
||||||
|
|
|
@ -744,7 +744,7 @@ void LimitedNodeList::removeSilentNodes() {
|
||||||
SharedNodePointer node = it->second;
|
SharedNodePointer node = it->second;
|
||||||
node->getMutex().lock();
|
node->getMutex().lock();
|
||||||
|
|
||||||
if (node->getType() != NodeType::ReplicantAudioMixer && node->getType() != NodeType::ReplicantAvatarMixer
|
if (node->getType() != NodeType::DownstreamAudioMixer && node->getType() != NodeType::DownstreamAvatarMixer
|
||||||
&& (usecTimestampNow() - node->getLastHeardMicrostamp()) > (NODE_SILENCE_THRESHOLD_MSECS * USECS_PER_MSEC)) {
|
&& (usecTimestampNow() - node->getLastHeardMicrostamp()) > (NODE_SILENCE_THRESHOLD_MSECS * USECS_PER_MSEC)) {
|
||||||
// call the NodeHash erase to get rid of this node
|
// call the NodeHash erase to get rid of this node
|
||||||
it = _nodeHash.unsafe_erase(it);
|
it = _nodeHash.unsafe_erase(it);
|
||||||
|
|
|
@ -42,9 +42,8 @@ void NodeType::init() {
|
||||||
TypeNameHash.insert(NodeType::MessagesMixer, "Messages Mixer");
|
TypeNameHash.insert(NodeType::MessagesMixer, "Messages Mixer");
|
||||||
TypeNameHash.insert(NodeType::AssetServer, "Asset Server");
|
TypeNameHash.insert(NodeType::AssetServer, "Asset Server");
|
||||||
TypeNameHash.insert(NodeType::EntityScriptServer, "Entity Script Server");
|
TypeNameHash.insert(NodeType::EntityScriptServer, "Entity Script Server");
|
||||||
TypeNameHash.insert(NodeType::ReplicantAudioMixer, "Replicant Audio Mixer");
|
TypeNameHash.insert(NodeType::DownstreamAudioMixer, "Downstream Audio Mixer");
|
||||||
TypeNameHash.insert(NodeType::ReplicantAvatarMixer, "Replicant Avatar Mixer");
|
TypeNameHash.insert(NodeType::DownstreamAvatarMixer, "Downstream Avatar Mixer");
|
||||||
TypeNameHash.insert(NodeType::ReplicatedAgent, "Replicated Agent");
|
|
||||||
TypeNameHash.insert(NodeType::Unassigned, "Unassigned");
|
TypeNameHash.insert(NodeType::Unassigned, "Unassigned");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -714,7 +714,7 @@ void NodeList::pingPunchForInactiveNode(const SharedNodePointer& node) {
|
||||||
void NodeList::startNodeHolePunch(const SharedNodePointer& node) {
|
void NodeList::startNodeHolePunch(const SharedNodePointer& node) {
|
||||||
|
|
||||||
// we don't hole punch to replicants, since it is assumed that we have a direct line to them
|
// we don't hole punch to replicants, since it is assumed that we have a direct line to them
|
||||||
if (node->getType() != NodeType::ReplicantAudioMixer && node->getType() != NodeType::ReplicantAvatarMixer) {
|
if (node->getType() != NodeType::DownstreamAudioMixer && node->getType() != NodeType::DownstreamAvatarMixer) {
|
||||||
// connect to the correct signal on this node so we know when to ping it
|
// connect to the correct signal on this node so we know when to ping it
|
||||||
connect(node.data(), &Node::pingTimerTimeout, this, &NodeList::handleNodePingTimeout);
|
connect(node.data(), &Node::pingTimerTimeout, this, &NodeList::handleNodePingTimeout);
|
||||||
|
|
||||||
|
|
|
@ -25,9 +25,8 @@ namespace NodeType {
|
||||||
const NodeType_t AssetServer = 'A';
|
const NodeType_t AssetServer = 'A';
|
||||||
const NodeType_t MessagesMixer = 'm';
|
const NodeType_t MessagesMixer = 'm';
|
||||||
const NodeType_t EntityScriptServer = 'S';
|
const NodeType_t EntityScriptServer = 'S';
|
||||||
const NodeType_t ReplicantAudioMixer = 'a';
|
const NodeType_t DownstreamAudioMixer = 'a';
|
||||||
const NodeType_t ReplicantAvatarMixer = 'w';
|
const NodeType_t DownstreamAvatarMixer = 'w';
|
||||||
const NodeType_t ReplicatedAgent = 'z';
|
|
||||||
const NodeType_t Unassigned = 1;
|
const NodeType_t Unassigned = 1;
|
||||||
|
|
||||||
void init();
|
void init();
|
||||||
|
|
Loading…
Reference in a new issue