mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
node-webrtc: remove dead code and comments
Signed-off-by: Philipp Jungkamp <Philipp.Jungkamp@opal-rt.com>
This commit is contained in:
parent
d94d668d34
commit
ebeea91bc8
2 changed files with 25 additions and 29 deletions
|
@ -49,10 +49,6 @@ protected:
|
|||
public:
|
||||
WebRTCNode(const std::string &name = "");
|
||||
|
||||
/* All of the following virtual-declared functions are optional.
|
||||
* Have a look at node.hpp/node.cpp for the default behaviour.
|
||||
*/
|
||||
|
||||
virtual
|
||||
~WebRTCNode();
|
||||
|
||||
|
@ -62,7 +58,6 @@ public:
|
|||
virtual
|
||||
int parse(json_t *json, const uuid_t sn_uuid);
|
||||
|
||||
/** Validate node configuration. */
|
||||
virtual
|
||||
int check();
|
||||
|
||||
|
@ -72,27 +67,9 @@ public:
|
|||
virtual
|
||||
int stop();
|
||||
|
||||
// virtual
|
||||
// int pause();
|
||||
|
||||
// virtual
|
||||
// int resume();
|
||||
|
||||
// virtual
|
||||
// int restart();
|
||||
|
||||
// virtual
|
||||
// int reverse();
|
||||
|
||||
virtual
|
||||
std::vector<int> getPollFDs();
|
||||
|
||||
// virtual
|
||||
// std::vector<int> getNetemFDs();
|
||||
|
||||
// virtual
|
||||
// struct villas::node::memory::Type * getMemoryType();
|
||||
|
||||
virtual
|
||||
const std::string & getDetails();
|
||||
};
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
|
||||
#include <chrono>
|
||||
#include <thread>
|
||||
#include <fmt/core.h>
|
||||
#include <fmt/ostream.h>
|
||||
#include <fmt/chrono.h>
|
||||
#include <villas/utils.hpp>
|
||||
|
@ -22,6 +23,22 @@ using namespace villas;
|
|||
using namespace villas::node;
|
||||
using namespace villas::node::webrtc;
|
||||
|
||||
/*
|
||||
* libdatachannel defines the operator<< overloads required to format
|
||||
* rtc::PeerConnection::State and similar in the global namespace.
|
||||
* But C++ ADL based overload set construction does not find these operators,
|
||||
* if these are invoked in the spdlog/fmt libraries.
|
||||
*
|
||||
* See this issue for a short explaination of ADL errors:
|
||||
* https://github.com/gabime/spdlog/issues/1227#issuecomment-532009129
|
||||
*
|
||||
* Adding the global ::operator<< overload set to the namespace rtc where
|
||||
* the data structures are defined, allows ADL to pick these up in spdlog/fmt.
|
||||
*/
|
||||
namespace rtc {
|
||||
using ::operator<<;
|
||||
}
|
||||
|
||||
PeerConnection::PeerConnection(const std::string &server, const std::string &session, rtc::Configuration cfg, Web *w, rtc::DataChannelInit d) :
|
||||
web(w),
|
||||
dataChannelInit(d),
|
||||
|
@ -163,7 +180,7 @@ void PeerConnection::onLocalCandidate(rtc::Candidate cand)
|
|||
|
||||
void PeerConnection::onConnectionStateChange(rtc::PeerConnection::State state)
|
||||
{
|
||||
//logger->debug("Connection State changed: {}", state);
|
||||
logger->debug("Connection State changed: {}", state);
|
||||
|
||||
auto lock = std::unique_lock { mutex };
|
||||
|
||||
|
@ -334,13 +351,15 @@ void PeerConnection::onSignalingMessage(SignalingMessage msg)
|
|||
|
||||
void PeerConnection::onDataChannel(std::shared_ptr<rtc::DataChannel> dc)
|
||||
{
|
||||
/*logger->debug("New data channel: id={}, stream={}, protocol={}, max_msg_size={}, label={}",
|
||||
dc->id(),
|
||||
dc->stream(),
|
||||
logger->debug("New data channel: {}protocol={}, max_msg_size={}, label={}",
|
||||
dc->id() && dc->stream() ? fmt::format("id={}, stream={}, ",
|
||||
*(dc->id()),
|
||||
*(dc->stream())
|
||||
) : "",
|
||||
dc->protocol(),
|
||||
dc->maxMessageSize(),
|
||||
dc->label());
|
||||
*/
|
||||
dc->label()
|
||||
);
|
||||
|
||||
auto lock = std::unique_lock { mutex };
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue