MCPcopy Create free account
hub / github.com/Haivision/srt / InputRunner

Method InputRunner

testing/srt-test-relay.cpp:394–420  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

392}
393
394void SrtMainLoop::InputRunner()
395{
396 srt::ThreadName::set("InputRN");
397 // An extra thread with a loop that reads from the external input
398 // and writes into the SRT medium. When echoback mode is used,
399 // this thread isn't started at all and instead the SRT reading
400 // serves as both SRT reading and input reading.
401
402 auto on_return_set = OnReturnSet(m_input_running, false);
403
404 Verb() << VerbLock << "RUNNING INPUT LOOP";
405 for (;;)
406 {
407 applog.Debug() << "SrtMainLoop::InputRunner: extracting...";
408 auto data = m_input_medium.Extract();
409
410 if (data.payload.empty())
411 {
412 Verb() << "INPUT READING INTERRUPTED.";
413 break;
414 }
415
416 //Verb() << "INPUT [" << data.size() << "] " << VerbNoEOL;
417 applog.Debug() << "SrtMainLoop::InputRunner: [" << data.payload.size() << "] CLIENT -> SRT-RELAY";
418 m_srt_relay->Write(data);
419 }
420}
421
422void SrtMainLoop::run()
423{

Callers

nothing calls this directly

Calls 7

setFunction · 0.85
OnReturnSetFunction · 0.85
VerbFunction · 0.85
ExtractMethod · 0.80
emptyMethod · 0.45
sizeMethod · 0.45
WriteMethod · 0.45

Tested by

no test coverage detected