MCPcopy Create free account
hub / github.com/ClassicOldSong/Apollo / videoThread

Function videoThread

src/stream.cpp:1902–1921  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1900 }
1901
1902 void videoThread(session_t *session) {
1903 auto fg = util::fail_guard([&]() {
1904 session::stop(*session);
1905 });
1906
1907 while_starting_do_nothing(session->state);
1908
1909 auto ref = broadcast.ref();
1910 auto error = recv_ping(session, ref, socket_e::video, session->video.ping_payload, session->video.peer, config::stream.ping_timeout);
1911 if (error < 0) {
1912 return;
1913 }
1914
1915 // Enable local prioritization and QoS tagging on video traffic if requested by the client
1916 auto address = session->video.peer.address();
1917 session->video.qos = platf::enable_socket_qos(ref->video_sock.native_handle(), address, session->video.peer.port(), platf::qos_data_type_e::video, session->config.videoQosType != 0);
1918
1919 BOOST_LOG(debug) << "Start capturing Video"sv;
1920 video::capture(session->mail, session->config.monitor, session);
1921 }
1922
1923 void audioThread(session_t *session) {
1924 auto fg = util::fail_guard([&]() {

Callers

nothing calls this directly

Calls 7

fail_guardFunction · 0.85
stopFunction · 0.85
recv_pingFunction · 0.85
refMethod · 0.80
captureFunction · 0.70
enable_socket_qosFunction · 0.50

Tested by

no test coverage detected