@@ -105,18 +105,20 @@ void createwindowgrabber()
105
105
auto s = std::to_string (r) + std::string (" WINDIF_" ) + std::string (" .jpg" );
106
106
auto size = RowStride (img) * Height (img);
107
107
108
- /* auto imgbuffer(std::make_unique<unsigned char[]>(size));
108
+ /* auto imgbuffer(std::make_unique<unsigned char[]>(size));
109
109
ExtractAndConvertToRGBA(img, imgbuffer.get(), size);
110
- tje_encode_to_file(s.c_str(), Width(img), Height(img), 4, (const unsigned char*)imgbuffer.get());*/
110
+ tje_encode_to_file(s.c_str(), Width(img), Height(img), 4, (const unsigned char*)imgbuffer.get());
111
+ */
111
112
})->onNewFrame ([&](const SL::Screen_Capture::Image& img, const SL::Screen_Capture::Window& window) {
112
113
113
114
auto r = realcounter.fetch_add (1 );
114
115
auto s = std::to_string (r) + std::string (" WINNEW_" ) + std::string (" .jpg" );
115
-
116
- auto size = RowStride (img) * Height (img); /*
117
- auto imgbuffer(std::make_unique<unsigned char[]>(size));
116
+ auto size = RowStride (img) * Height (img);
117
+
118
+ /* auto imgbuffer(std::make_unique<unsigned char[]>(size));
118
119
ExtractAndConvertToRGBA(img, imgbuffer.get(), size);
119
- tje_encode_to_file(s.c_str(), Width(img), Height(img), 4, (const unsigned char*)imgbuffer.get());*/
120
+ tje_encode_to_file(s.c_str(), Width(img), Height(img), 4, (const unsigned char*)imgbuffer.get());
121
+ */
120
122
if (std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::high_resolution_clock::now () - onNewFramestart).count () >= 1000 ) {
121
123
std::cout << " onNewFrame fps" << onNewFramecounter << std::endl;
122
124
onNewFramecounter = 0 ;
0 commit comments