Add debug msg when receiving messages over utp for video and audio
This commit is contained in:
@@ -172,7 +172,7 @@ public:
|
|||||||
|
|
||||||
REFERENCE_TIME default_latency;
|
REFERENCE_TIME default_latency;
|
||||||
audio_client->GetDevicePeriod(&default_latency, nullptr);
|
audio_client->GetDevicePeriod(&default_latency, nullptr);
|
||||||
default_latency_ms = default_latency / 10;
|
default_latency_ms = default_latency / 1000;
|
||||||
|
|
||||||
status = audio_client->Initialize(
|
status = audio_client->Initialize(
|
||||||
AUDCLNT_SHAREMODE_SHARED,
|
AUDCLNT_SHAREMODE_SHARED,
|
||||||
@@ -249,7 +249,6 @@ private:
|
|||||||
case WAIT_OBJECT_0:
|
case WAIT_OBJECT_0:
|
||||||
break;
|
break;
|
||||||
case WAIT_TIMEOUT:
|
case WAIT_TIMEOUT:
|
||||||
std::fill_n(std::begin(sample_buf), sample_buf.size(), 0);
|
|
||||||
return capture_e::timeout;
|
return capture_e::timeout;
|
||||||
default:
|
default:
|
||||||
BOOST_LOG(error) << "Couldn't wait for audio event: [0x"sv << util::hex(status).to_string_view() << ']';
|
BOOST_LOG(error) << "Couldn't wait for audio event: [0x"sv << util::hex(status).to_string_view() << ']';
|
||||||
|
|||||||
@@ -539,6 +539,8 @@ void recvThread(broadcast_ctx_t &ctx) {
|
|||||||
auto recv_func_init = [&](udp::socket &sock, int buf_elem, std::map<asio::ip::address, message_queue_t> &peer_to_session) {
|
auto recv_func_init = [&](udp::socket &sock, int buf_elem, std::map<asio::ip::address, message_queue_t> &peer_to_session) {
|
||||||
recv_func[buf_elem] = [&,buf_elem](const boost::system::error_code &ec, size_t bytes) {
|
recv_func[buf_elem] = [&,buf_elem](const boost::system::error_code &ec, size_t bytes) {
|
||||||
auto type_str = buf_elem ? "AUDIO"sv : "VIDEO"sv;
|
auto type_str = buf_elem ? "AUDIO"sv : "VIDEO"sv;
|
||||||
|
BOOST_LOG(debug) << "Recv: "sv << peer.address().to_string() << ":"sv << peer.port() << " :: " << type_str;
|
||||||
|
|
||||||
|
|
||||||
populate_peer_to_session();
|
populate_peer_to_session();
|
||||||
|
|
||||||
@@ -841,6 +843,7 @@ void join(session_t &session) {
|
|||||||
session.videoThread.join();
|
session.videoThread.join();
|
||||||
BOOST_LOG(debug) << "Waiting for audio to end..."sv;
|
BOOST_LOG(debug) << "Waiting for audio to end..."sv;
|
||||||
session.audioThread.join();
|
session.audioThread.join();
|
||||||
|
BOOST_LG(debug) << "Session ended"sv;
|
||||||
}
|
}
|
||||||
|
|
||||||
void start(session_t &session, const std::string &addr_string) {
|
void start(session_t &session, const std::string &addr_string) {
|
||||||
|
|||||||
Reference in New Issue
Block a user