MCPcopy Create free account
hub / github.com/WiVRn/WiVRn / encoder_work

Method encoder_work

server/compositor/compositor.cpp:623–651  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

621}
622
623void compositor::encoder_work(std::stop_token tok)
624{
625 while (not tok.stop_requested())
626 {
627 auto req = encode_request.exchange(-1);
628 if (req < 0)
629 {
630 encode_request.wait(req);
631 continue;
632 }
633
634 assert(req < images.size());
635 auto & image = images[req];
636
637 try
638 {
639 for (auto & encoder: encoders)
640 {
641 if (encoder->stream_idx < 2 or image.view_info.alpha)
642 encoder->encode(session, image.view_info, image.frame_index);
643 }
644 }
645 catch (std::exception & e)
646 {
647 U_LOG_W("encode error: %s", e.what());
648 }
649 image.busy = false;
650 }
651}
652
653void compositor::send_video_stream_description()
654

Callers

nothing calls this directly

Calls 4

waitMethod · 0.45
sizeMethod · 0.45
encodeMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected