Closed grz0zrg closed 7 years ago
You're right.. It should change the interval but it doesnt. This is a simple fix.
Fixed on master. You can change the interval at runtime and it will work as expected now
Thank, i have some troubles compiling now though :
[ 9%] Building CXX object src/CMakeFiles/libScreen_Capture.dir/ScreenCapture.cpp.o
In file included from /home/julien/Projets/fs/native/Screen_Capture/src/ScreenCapture.cpp:1:0:
/home/julien/Projets/fs/native/Screen_Capture/src/../include/ScreenCapture.h: In member function ‘virtual void SL::Screen_Capture::Timer<Rep, Period>::wait()’:
/home/julien/Projets/fs/native/Screen_Capture/src/../include/ScreenCapture.h:131:30: error: ‘std::this_thread’ has not been declared
std::this_thread::sleep_for(timetowait);
^
In file included from /home/julien/Projets/fs/native/Screen_Capture/src/ScreenCapture.cpp:2:0:
/home/julien/Projets/fs/native/Screen_Capture/src/../include/Internal/SCCommon.h: At global scope:
/home/julien/Projets/fs/native/Screen_Capture/src/../include/Internal/SCCommon.h:29:40: error: use of deleted function ‘std::atomic<bool>::atomic(const std::atomic<bool>&)’
std::atomic<bool> Paused = false;
^
In file included from /home/julien/Projets/fs/native/Screen_Capture/src/../include/Internal/SCCommon.h:4:0,
from /home/julien/Projets/fs/native/Screen_Capture/src/ScreenCapture.cpp:2:
/usr/include/c++/5/atomic:66:5: note: declared here
atomic(const atomic&) = delete;
^
/usr/include/c++/5/atomic:70:15: note: after user-defined conversion: constexpr std::atomic<bool>::atomic(bool)
constexpr atomic(bool __i) noexcept : _M_base(__i) { }
^
In file included from /home/julien/Projets/fs/native/Screen_Capture/src/ScreenCapture.cpp:3:0:
/home/julien/Projets/fs/native/Screen_Capture/src/../include/Internal/ThreadManager.h: In function ‘SL::Screen_Capture::DUPL_RETURN SL::Screen_Capture::RunThread(const F&)’:
/home/julien/Projets/fs/native/Screen_Capture/src/../include/Internal/ThreadManager.h:34:28: error: ‘frameprocessor’ was not declared in this scope
auto Ret = frameprocessor.ProcessFrame();
This was just fixed
I just tested the build on linux and fixed these :)
These were good ideas btw, Initially, I thought it would be alot of internal work, but it turned out to be excellent additions and pretty easy to implement
A call to setFrameChangeInterval multiple times to change the interval does not do anything, this could be useful.