smasherprog / screen_capture_lite

cross platform screen/window capturing library
MIT License
619 stars 156 forks source link

setFrameChangeInterval multime times doesn't change the interval #24

Closed grz0zrg closed 7 years ago

grz0zrg commented 7 years ago

A call to setFrameChangeInterval multiple times to change the interval does not do anything, this could be useful.

smasherprog commented 7 years ago

You're right.. It should change the interval but it doesnt. This is a simple fix.

smasherprog commented 7 years ago

Fixed on master. You can change the interval at runtime and it will work as expected now

grz0zrg commented 7 years ago

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();
smasherprog commented 7 years ago

This was just fixed

smasherprog commented 7 years ago

I just tested the build on linux and fixed these :)

smasherprog commented 7 years ago

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