| 1921 | } |
| 1922 | |
| 1923 | void audioThread(session_t *session) { |
| 1924 | auto fg = util::fail_guard([&]() { |
| 1925 | session::stop(*session); |
| 1926 | }); |
| 1927 | |
| 1928 | while_starting_do_nothing(session->state); |
| 1929 | |
| 1930 | auto ref = broadcast.ref(); |
| 1931 | auto error = recv_ping(session, ref, socket_e::audio, session->audio.ping_payload, session->audio.peer, config::stream.ping_timeout); |
| 1932 | if (error < 0) { |
| 1933 | return; |
| 1934 | } |
| 1935 | |
| 1936 | // Enable local prioritization and QoS tagging on audio traffic if requested by the client |
| 1937 | auto address = session->audio.peer.address(); |
| 1938 | session->audio.qos = platf::enable_socket_qos(ref->audio_sock.native_handle(), address, session->audio.peer.port(), platf::qos_data_type_e::audio, session->config.audioQosType != 0); |
| 1939 | |
| 1940 | BOOST_LOG(debug) << "Start capturing Audio"sv; |
| 1941 | audio::capture(session->mail, session->config.audio, session); |
| 1942 | } |
| 1943 | |
| 1944 | namespace session { |
| 1945 | std::atomic_uint running_sessions; |
nothing calls this directly
no test coverage detected