34 class SVISSRImageDecoderModule :
public satdump::pipeline::base::FileStreamToFileStreamModule
36 struct SVISSRSubcommunicationBlock
52 bool writingImage =
false;
55 bool apply_correction;
57 bool counter_locked =
false;
69 std::string directory;
76 std::mutex images_queue_mtx;
77 std::vector<std::shared_ptr<SVISSRBuffer>> images_queue;
78 std::thread images_queue_thread;
80 bool images_thread_should_run;
81 void image_saving_thread_f()
83 while (images_thread_should_run || images_queue.size() > 0)
85 images_queue_mtx.lock();
86 bool has_images = images_queue.size() > 0;
87 images_queue_mtx.unlock();
91 images_queue_mtx.lock();
92 auto img = images_queue[0];
93 images_queue.erase(images_queue.begin());
94 images_queue_mtx.unlock();
99 std::this_thread::sleep_for(std::chrono::seconds(1));
103 std::string getSvissrFilename(std::tm *timeReadable, std::string channel);
107 std::vector<int> scid_stats;
111 std::vector<MinorFrame> subcommunication_frames;
112 MinorFrame current_subcom_frame;
113 std::vector<Group> group_retransmissions;
116 float corr_history_ca[200];
117 unsigned int textureID = 0;
118 uint32_t *textureBuffer;
121 SVISSRImageDecoderModule(std::string input_file, std::string output_file_hint, nlohmann::json parameters);
122 ~SVISSRImageDecoderModule();
124 void drawUI(
bool window);
126 nlohmann::json getModuleStats();
129 static std::string getID();
130 virtual std::string getIDM() {
return getID(); };
131 static nlohmann::json getParams() {
return {}; }
132 static std::shared_ptr<ProcessingModule> getInstance(std::string input_file, std::string output_file_hint, nlohmann::json parameters);