MCPcopy Create free account
hub / github.com/RGAA-Software/GoDesk / EncoderThread

Method EncoderThread

src/render/app/encoder_thread.cpp:41–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39 }
40
41 EncoderThread::EncoderThread(const std::shared_ptr<RdApplication>& app) {
42 app_ = app;
43 stat_ = RdStatistics::Instance();
44 context_ = app->GetContext();
45 settings_ = RdSettings::Instance();
46 plugin_manager_ = context_->GetPluginManager();
47 enc_thread_ = Thread::Make("encoder_thread", 5);
48 enc_thread_->Poll();
49
50 // frame carrier
51 frame_carrier_plugin_ = plugin_manager_->GetFrameCarrierPlugin();
52
53 msg_listener_ = context_->CreateMessageListener();
54 msg_listener_->Listen<MsgInsertKeyFrame>([=, this](const MsgInsertKeyFrame& msg) {
55 // plugins: InsertIdr
56 plugin_manager_->VisitEncoderPlugins([=](GrVideoEncoderPlugin* plugin) {
57 plugin->InsertIdr();
58 });
59 });
60 }
61
62 void EncoderThread::Encode(const CaptureVideoFrame& cap_video_msg) {
63 if (!frame_carrier_plugin_) {

Callers

nothing calls this directly

Calls 6

GetFrameCarrierPluginMethod · 0.80
VisitEncoderPluginsMethod · 0.80
GetContextMethod · 0.45
GetPluginManagerMethod · 0.45
CreateMessageListenerMethod · 0.45
InsertIdrMethod · 0.45

Tested by

no test coverage detected