smasherprog / screen_capture_lite Goto Github PK
View Code? Open in Web Editor NEWcross platform screen/window capturing library
License: MIT License
cross platform screen/window capturing library
License: MIT License
There are cases where serious performance improvements can be gained in certain situations.
If the user is only interested in capturing the entire screen and the screen does not have pixel padding in the native image, then the native, raw image can be passed directly back to the user. This will avoid memory allocations, and skip a copy of the image.
Hi, build fails on Mac OS Sierra.
cmake generation passees ok, but on the build phase I'm getting:
bash-3.2$ cmake --build . Scanning dependencies of target screen_capture_lite [ 6%] Building CXX object CMakeFiles/screen_capture_lite.dir/src/ScreenCapture.cpp.o [ 13%] Building CXX object CMakeFiles/screen_capture_lite.dir/src/SCCommon.cpp.o [ 20%] Building CXX object CMakeFiles/screen_capture_lite.dir/src/ThreadManager.cpp.o [ 26%] Building CXX object CMakeFiles/screen_capture_lite.dir/src/ios/GetWindows.cpp.o [ 33%] Building C object CMakeFiles/screen_capture_lite.dir/src/ios/NSMouseCapture.m.o [ 40%] Building CXX object CMakeFiles/screen_capture_lite.dir/src/ios/NSFrameProcessor.cpp.o [ 46%] Building CXX object CMakeFiles/screen_capture_lite.dir/src/ios/NSFrameProcessor.mm.o /Users/admin/moba/screen_capture_lite/src/ios/NSFrameProcessor.mm:73:36: error: property 'enabled' not found on object of type 'id' self.output.connections[0].enabled = NO; ^ /Users/admin/moba/screen_capture_lite/src/ios/NSFrameProcessor.mm:80:36: error: property 'enabled' not found on object of type 'id' self.output.connections[0].enabled = YES; ^ 2 errors generated. make[2]: *** [CMakeFiles/screen_capture_lite.dir/src/ios/NSFrameProcessor.mm.o] Error 1 make[1]: *** [CMakeFiles/screen_capture_lite.dir/all] Error 2 make: *** [all] Error 2
bash-3.2$ c++ --version Apple LLVM version 9.0.0 (clang-900.0.39.2) Target: x86_64-apple-darwin16.0.0
Or am I doing something wrong?
Hi. There is bug with code for windows.
Problem at this line https://github.com/smasherprog/screen_capture_lite/blob/master/src/windows/GetWindows.cpp#L24
If lenght of window caption is bigger than 128 then code does try write '\n' character to w.Name[128];
P.S.: Why do you even need to write \n to caption? GetWindowTextA returns only null terminated string.
I want to record the screen in a video file So I need to pass the data which is received from framgrabber.onNewFrame() and framgrabber.onFrameChanged() callbacks to ffmpeg can you please tell in what formats I will receive data or should convert it to some other format
In onMouseChanged, the location of the cursor is provided, but xHotspot and yHotspot are not provided. Can it be provided?
Really waiting for any mobile devices version , It will, be so great framework and library .
Yours.
Hello!
Trying to use the example code I'm constantly receiving an expected error from ThreadManager:67
.
Starting Capture Demo
Exiting Thread due to expected error
Exiting Thread due to expected error
Exiting Thread due to expected error
...
I'm running the script using CLion 2016.3 and OS X 10.12.3.
I would appreciate any support on this issue!
It would be more consistent to have a stop_capturing
function.
Hello , please does the screen-capture lite support the Android Dev ? .
so many thanks ,
Yours,Randy
I'm trying to get capturing just a small area of the screen to work and I'm having some issues.
The example seams to have some code commented out that should do this but when I uncomment it I get an error at runtime.
SL::Screen_Capture::CreateCaptureConfiguration([]() {
auto mons = SL::Screen_Capture::GetMonitors();
std::cout << "Library is requesting the list of monitors to capture!" << std::endl;
for (auto &m : mons) {
// capture just a 512x512 square... USERS SHOULD MAKE SURE bounds are
// valid!!!!
m.OffsetX += 128;
m.OffsetY += 128;
m.Height = 128;
m.Width = 128;
std::cout << m << std::endl;
}
return mons;
})
I get this:
Id=69733378 Index=0 Height=2100 Width=3360 OffsetX=0 OffsetY=0 Name=Monitor 69733378
Id=69733378 Index=0 Height=128 Width=128 OffsetX=128 OffsetY=128 Name=Monitor 69733378
Exiting Thread due to expected error
Id=69733378 Index=0 Height=128 Width=128 OffsetX=128 OffsetY=128 Name=Monitor 69733378
Exiting Thread due to expected error
Id=69733378 Index=0 Height=128 Width=128 OffsetX=128 OffsetY=128 Name=Monitor 69733378
128x128 at 128x128 should be with in the bounds of the montior
I'm on Mac if it makes any difference.
Any suggestions as what I need to change?
I tried to capture sceenshots from League of Legends window and it works only in windowed mode, while fullscreen mode dumps black images.
Should I workaround fullscreen mode somehow or it should work out of the box? In the latter case I'll provide more info to reproduce the bug.
Hello!
I've tried this library in a project for of mine and really like it (simple, fast and cross platform). However, there is one thing that can't really put together. In the example and internal/SCCommon.h file it's written:
//DONT USE THIS HEADER IN PRODUCTION CODE!!!! ITS INTERNAL FOR A REASON IT WILL CHANGE!!! ITS HERE FOR TESTS ONLY!!!
But if I skip this header I get an error:
Error C2036 'SL::Screen_Capture::Monitor *const ': unknown size ScreenCapture
Which makes sense since structs Point
, Monitor
, Window
and Image
are defined only in SCCommon.h file. If skipped, included ScreenCapture.h only does forward declaration, hence compiler doesn't know the size of it.
So finally my question is, how to correctly use this library without SCCommon.h and successful compilation?
Thanks!
My environment: Win10 x64, VS2017 (currently doing only 32bit compilation).
Hi, I am a graphic designer, I want to help others in graphic design.
After I reviewed your project, you have no logo on this project. Therefore I want to contribute to this project by creating a new logo / icon. what do you think?
Hi,
The library is capturing the screen at 10fps on windows 10.Here is the code I am using in On onNewFrame I have also comment out the code but still getting 10fps and its stuck on this number.
onNewFrame([&](const SL::Screen_Capture::Image& img,
const SL::Screen_Capture::Monitor& monitor) {
if (closing == true) {
return;
}
//auto start = std::chrono::high_resolution_clock::now();
//auto r = realcounter.fetch_add(1);
auto size = RowStride(img) * Height(img);
unsigned char* imgbuffer = (unsigned char*)malloc(size);
Extract(img, imgbuffer, size);
std::shared_ptr<swapBufer> Swapimg = std::make_shared<swapBufer>();
Swapimg->buffer = imgbuffer;
Swapimg->len = size;
{
boost::mutex::scoped_lock lock(videMutex);
if (encoderQeue.size() > 2) {
auto ptr = encoderQeue.back();
encoderQeue.pop_back();
free(ptr->buffer);
ptr->buffer = NULL;
ptr.reset();
}
encoderQeue.push_back(Swapimg);
// //std::cout << std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::high_resolution_clock::now() - start).count() << std::endl;
}
//Sleep(1);
//tje_encode_to_file(s.c_str(), Width(img), Height(img), 4, (const unsigned char*)imgbuffer.get());
if (std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::high_resolution_clock::now() - onNewFramestart).count() >= 1000) {
std::cout << "onNewFrame fps" << onNewFramecounter << std::endl;
onNewFramecounter = 0;
onNewFramestart = std::chrono::high_resolution_clock::now();
}
onNewFramecounter += 1;
})->start_capturing();
`
The last set of updates seam to have broken Linux.
When I call ExtractAndConvertToRGB
or ExtractAndConvertToRGB565
I'm getting a sigsegv.
For a 128x128 image it looks like it's managing to process the first 2 lines (so the address returned for img.Data is at 256 bytes before somewhere it can't access) but falls over trying to access the first pixel of the 3rd line.
A call to setFrameChangeInterval multiple times to change the interval does not do anything, this could be useful.
May I ask a (stupid) question? Why does this library use 4 channels instead of just 3 for capturing screenshots?
When is the alpha channel not entirely filled with 255? I'm asking because I'm trying to push the boundary of the capture frame rate, and I thought maybe using just 3 channels would be more efficient, also out of curiosity.
I saw that you mentioned the alpha channel is used in onMouseChanged
, could you please elaborate what exactly the alpha channel represents in onMouseChanged
?
Thanks.
in ThreadRunner.cpp these logs should be debug only.
#ifdef _DEBUG
std::cout << "Starting to Capture on Monitor " << Name(monitor) << std::endl;
std::cout << "Trying DirectX Desktop Duplication " << std::endl;
#endif
#ifdef _DEBUG
std::cout << "DirectX Desktop Duplication not supprted, falling back to GDI Capturing . . ." << std::endl;
#endif
Hi again! :) I'm using your excellent library to build an always-on screen frame grabber for a personal project. I have a Qt application window outputting the captured frames, and I was displaying it on my second monitor while I tried to do some common tasks on my main display which was being captured.
I found that launching certain applications (example: "The Guild 2: Renaissance," which is an older game) resulted in the capture stopping until I started it up again. To be clear, the capture stopped as the application started up, but I could alt+tab away and re-start the capture once the game had loaded. I traced the problem to a DXGI_ERROR_INVALID_CALL
from _DuplLock->ReleaseFrame()
For my own purposes, adding DXGI_ERROR_INVALID_CALL
to FrameInfoExpectedErrors[]
screen_capture_lite/src/windows/DXFrameProcessor.cpp
Lines 57 to 62 in 5a82135
windows 10, msvc
Hello,
how can i select a single Monitor?
I have exported the library on a Windows machine, but when I try to use it, I get the following error:
Error LNK2019 unresolved external symbol __imp__DwmGetWindowAttribute@16 referenced in function "struct SL::Screen_Capture::WindowDimensions __cdecl SL::Screen_Capture::GetWindowRect(struct HWND__ *)" (?GetWindowRect@Screen_Capture@SL@@YA?AUWindowDimensions@12@PAUHWND__@@@Z)
Steps to reproduce:
cmake CMakeLists.txt
to produce Visual Studio project.Tested on commit (Edit: pasted wrong commit earlier)
5a82135
Running "Screen_Capture_Example" using VS2015, a stack corruption occurs in EnumWindowsProc
when the user has a window open with a long title (longer than 128 chars, presumably. In my case the window was a chrome page open to https://github.com/smasherprog/Projects_Setup):
BOOL CALLBACK EnumWindowsProc(_In_ HWND hwnd, _In_ LPARAM lParam)
{
char buffer[255];
GetWindowTextA(hwnd, buffer, sizeof(buffer));
srch *s = (srch *)lParam;
std::string name = buffer;
Window w;
w.Handle = reinterpret_cast<size_t>(hwnd);
auto windowrect = SL::Screen_Capture::GetWindowRect(hwnd);
w.Position.x = windowrect.ClientRect.left;
w.Position.y = windowrect.ClientRect.top;
w.Size.x = windowrect.ClientRect.right - windowrect.ClientRect.left;
w.Size.y = windowrect.ClientRect.bottom - windowrect.ClientRect.top;
memcpy(w.Name, name.c_str(), name.size() + 1);
s->Found.push_back(w);
return TRUE;
}
buffer
is a 255 char array but w.Name is only 128 chars. Re-organizing the code to:
BOOL CALLBACK EnumWindowsProc(_In_ HWND hwnd, _In_ LPARAM lParam)
{
Window w;
char buffer[sizeof(w.Name)];
GetWindowTextA(hwnd, buffer, sizeof(buffer));
...
fixes the issue and guards against changes to the size of w.Name
in the future.
Note also that a compilation issue occurred in GDIFrameProcessor.cpp at ImageRect rect = { 0 };
but presumably this is not a problem for VS2017.
Hi ,
I am trying to recode the screen into video file . The library capturescreen like 20 to 50 mins after that it stop calling onNewframe and on this state If I call ~ScreenCaptureManager() it hanged on
else if (Thread_.joinable()) {
Thread_.join(); //hangs here
}
ScreenCaptureManagerExists = false;
There is alot of code which is the same on all of the different platforms. It should be refactored
Hello,
i have updated the library in my project and my "old" code don't work as expected anymore, it seem that each call of "onNewFrame" switch between monitors instead of capturing all the monitors in one go. Any ideas on how to capture all monitors in one call of "onNewFrame" ?
SL::Screen_Capture::CreateCaptureConfiguration([&]() {
auto monitors = SL::Screen_Capture::GetMonitors();
for (auto &monitor : monitors) {
//capture_width += monitor.Width;
//capture_height = monitor.Height;
}
return monitors;
})
onNewFrame([&](const SL::Screen_Capture::Image& img, const SL::Screen_Capture::Monitor& monitor) {
auto startsrc = StartSrc(img);
auto capture_data_len = RowStride(img) * Height(img);
std::memcpy(capture_data, startsrc, capture_data_len);
}})
Thank you.
Hello!
Current implementation of CGFrameProcessor::ProcessFrame()
seems to be unreliable and, sometimes, completely broken.
Apple CG's documentation is far from complete, but here are some points i discovered while trying to make screenshot myself:
Here is how I deal with these problems:
// First, capture the image
CGImageRef const capturedImage = /* any way of capturing image, be it CGWindowListCreateImage or CGDisplayCreateImage */;
// Second, get bitmap and alpha data info
CGBitmapInfo const bitmapInfo = CGImageGetBitmapInfo(capturedImage);
CGImageAlphaInfo const alphaInfo = CGImageGetAlphaInfo(capturedImage);
In order to do screenshots on any platform, one must be ready to handle any combination of bitmap and alpha structures.
Now I will only look at 32-bit Little-Endian bitmap format with Alpha being the first byte.
Note that alpha is unused in screenshot capturing, so we should not care about its representation.
// Ensure 32-bit LE
assert(bitmapInfo & kCGBitmapByteOrder32Little);
// Ensure alpha is at the first byte and has any format (we'll just skip it while reading)
assert(
alphaInfo == kCGImageAlphaFirst ||
alphaInfo == kCGImageAlphaNoneSkipFirst ||
alphaInfo == kCGImageAlphaPremultipliedFirst);
Many implementations add padding at the end of each pixel row. In my case (1366x768 screen), it was 10 completely transparent pixels.
// Get real image width and height, this has NOTHING to do with size of image data provided
std::size_t const width = CGImageGetWidth(capturedImage);
std::size_t const height = CGImageGetHeight(capturedImage);
// This is the actual row size. Many implementations add some padding at the end of each row
std::size_t const bytesPerRow = CGImageGetBytesPerRow(capturedImage);
std::size_t const bytesPerPixel = CGImageGetBitsPerPixel(capturedImage) / 8u;
std::size_t const pixelsPerRow = bytesPerRow / bytesPerPixel;
Now let's get the data provider and copy all the data from it:
GDataProviderRef const dataProvider = CGImageGetDataProvider(capturedImage);
if (!dataProvider) {
// Handle this. I think that this can only happen if the passed CGImageRef was NULL
}
// As this will copy the data, it needs to be freed separately from the captured image.
CFDataRef const rawPixelData = CGDataProviderCopyData(dataProvider);
Then the data can be accessed as you like. Make sure to take into account bitmap and alpha info and perform all needed conversions for library's internal format
// Cast the byte pointer to whatever you like
uint32_t const * const dataPointer = reinterpret_cast<uint32_t const *>(CFDataGetBytePtr(rawPixelData));
// And access it like this:
for (unsigned row = 0; row < height; ++row) {
for (unsigned column = 0; column < width; ++column) {
// Note that pixelsPerRow includes padding pixels
/* whatever */ = dataPointer[row * pixelsPerRow + column];
}
}
Also note that src/ios/CGFrameProcessor.cpp is a mix of 4-space and tab-character indentation. This is an important issue, as tabulation character may be displayed as four, two or even eight spaces.
Unable to compile it please help
Screen_Capture_Example.obj : error LNK2019: unresolved external symbol "public: __cdecl SL::Screen_Capture::ScreenCaptureManager::ScreenCaptureManager(void)" (??0ScreenCaptureManager@Screen_Capture@SL@@qeaa@XZ) referenced in function main
While playing with the library I tried out the ExtractAndConvertToRGB565
method and it wasn't giving me the output I was expecting.
It looks like there is no bit width reduction going on and the shifting looked wrong. I'm going to have a go at fixing it and I'll stick in a pull request.
While capturing it is usually beneficial if the wallpaper changes to a color. I think this is a good feature to add in the future.
I was checked that OnNewFrame callback only calls when mouse change or desktop change. if everything does not change then it will not be called. that make my record data unable to continue if screen image not moving.
is there any change i can get a callback like OnFrameTick(Image img, .. ) if img not change then still use last frame.
What's the reason in src/windows/GetWindows.cpp
, the function EnumWindowsProc
puts a \n
at the beginning of the window title retrieved? When I use it to get window titles, every first char is somehow missing. For example, window title "Task Manager" is incorrectly set as "\nask Manager". The issue apparently can be solved by simply removing the line w.Name[textlen] = '\n';
.
Determining if the pthread_create exist failed with the following output:
Change Dir: /home/src/screen_capture_lite/Example/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/gmake" "cmTC_eb3eb/fast"
/usr/bin/gmake -f CMakeFiles/cmTC_eb3eb.dir/build.make CMakeFiles/cmTC_eb3eb.dir/build
gmake[1]: Entering directory '/home/src/screen_capture_lite/Example/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_eb3eb.dir/CheckSymbolExists.c.o
/usr/lib64/ccache/cc -o CMakeFiles/cmTC_eb3eb.dir/CheckSymbolExists.c.o -c /home/src/screen_capture_lite/Example/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTC_eb3eb
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_eb3eb.dir/link.txt --verbose=1
/usr/lib64/ccache/cc -rdynamic CMakeFiles/cmTC_eb3eb.dir/CheckSymbolExists.c.o -o cmTC_eb3eb
CMakeFiles/cmTC_eb3eb.dir/CheckSymbolExists.c.o: In function main': CheckSymbolExists.c:(.text+0x16): undefined reference to
pthread_create'
collect2: error: ld returned 1 exit status
gmake[1]: *** [CMakeFiles/cmTC_eb3eb.dir/build.make:87: cmTC_eb3eb] Error 1
gmake[1]: Leaving directory '/home/src/screen_capture_lite/Example/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:126: cmTC_eb3eb/fast] Error 2
File /home/src/screen_capture_lite/Example/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>
int main(int argc, char** argv)
{
(void)argv;
#ifndef pthread_create
return ((int*)(&pthread_create))[argc];
#else
(void)argc;
return 0;
#endif
}
Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /home/src/screen_capture_lite/Example/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/gmake" "cmTC_4dd6c/fast"
/usr/bin/gmake -f CMakeFiles/cmTC_4dd6c.dir/build.make CMakeFiles/cmTC_4dd6c.dir/build
gmake[1]: Entering directory '/home/src/screen_capture_lite/Example/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_4dd6c.dir/CheckFunctionExists.c.o
/usr/lib64/ccache/cc -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTC_4dd6c.dir/CheckFunctionExists.c.o -c /usr/share/cmake/Modules/CheckFunctionExists.c
Linking C executable cmTC_4dd6c
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_4dd6c.dir/link.txt --verbose=1
/usr/lib64/ccache/cc -DCHECK_FUNCTION_EXISTS=pthread_create -rdynamic CMakeFiles/cmTC_4dd6c.dir/CheckFunctionExists.c.o -o cmTC_4dd6c -lpthreads
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
gmake[1]: *** [CMakeFiles/cmTC_4dd6c.dir/build.make:87: cmTC_4dd6c] Error 1
gmake[1]: Leaving directory '/home/src/screen_capture_lite/Example/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:126: cmTC_4dd6c/fast] Error 2
libpthread is installed on my system (Fedora 27 64bit
/usr/lib/libpthread-2.26.so
/usr/lib/libpthread.so
/usr/lib/libpthread.so.0
/usr/lib/libpthread_nonshared.a
/usr/lib/debug/lib64/libpthread-2.20.so.debug
/usr/lib/debug/lib64/libpthread.so.0.debug
/usr/lib/debug/usr/lib64/libpthread.a
/usr/lib/debug/usr/lib64/libpthread_nonshared.a
/usr/lib/i686/nosegneg/libpthread-2.26.so
/usr/lib/i686/nosegneg/libpthread.so.0
/usr/lib64/libpthread-2.26.so
/usr/lib64/libpthread.a
/usr/lib64/libpthread.so
/usr/lib64/libpthread.so.0
/usr/lib64/libpthread_nonshared.a
it is possible to send you a PM? I would like to make you a proposition
thanks
Hello,
this is a great and very useful library, i would like to know if microseconds capture interval is possible ?
I would like to achieve < 1 millisecond intervals How would you achieve this ? Right now when capturing a single screen with 1 millisecond interval i am at 260 FPS which is around 4 milliseconds, this is already great but barely enough for my needs, i am just using onNewFrame
callback.
Also, i tried to capture a tiny part of the screen by implementing the CreateMonitor
function to see if that make a difference but it seem it crashed, how can i capture a specific part of the screen ? Will it make a speed difference ?
Thank you by advance.
my next point in my app is single window capture. Any ideas how to achieve that ?
On Visual Studio 2017, When I tried the GetWindowFrame example, at the point where the EnumWindows() enumerates through processes it encounters a weird title name which crashes the program.
Here is the weird name string:
I tested this part of the code seperately in CodeBlocks and it worked but it crashed in VS2017 but works on changing the type of name in Window struct from char[] to std::string.
What should I do if I don't want to simply change the type? Another possible fix I can think of is check if the int value of char is < 0 and then change the string.
Hi,
This look good, but it appears to be c++14 only, is this correct?
Any chance it could be 'fixed' to work with c++11?
Bye!
Mark
I have to do more bounds checking on the captured monitors...
Mac isnt implemented yet. Might be a performance looser for the mac platform.. need to do research on this.
Windows and linux are implemented. Windows could use a little more cleanup.
HI ,
I am getting following error when I try to capture screen on some systems .
Failed to get duplicate output in DUPLICATIONMANAGER Error
DirectX Desktop Duplication not supprted, falling back to GDI Capturing . . .
here is some more extract and convert would be useful to stream.
inline void ExtractAndConvertToRGB(const Image& img, char* dst, size_t dst_size)
{
auto totalsize = Width(img) * 3 * Height(img);
assert(dst_size >= static_cast<size_t>(totalsize));
auto imgsrc = StartSrc(img);
auto imgdist = dst;
for (auto h = 0; h < Height(img); h++) {
for (auto w = 0; w < Width(img); w++) {
*imgdist++ = *(imgsrc + 2);
*imgdist++ = *(imgsrc + 1);
*imgdist++ = *(imgsrc);
imgsrc += img.Pixelstride;
}
imgsrc += RowPadding(img);
}
}
inline void ExtractAndConvertToRGB565(const Image& img, char* dst, size_t dst_size)
{
auto totalsize = Width(img) * 2 * Height(img);
assert(dst_size >= static_cast<size_t>(totalsize));
auto imgsrc = StartSrc(img);
auto imgdist = dst;
for (auto h = 0; h < Height(img); h++) {
for (auto w = 0; w < Width(img); w++) {
int short rgb = (*(imgsrc + 2) << 11) | (*(imgsrc + 1) << 5) | *(imgsrc);
*imgdist++ = rgb;
*imgdist++ = rgb << 8;
imgsrc += img.Pixelstride;
}
imgsrc += RowPadding(img);
}
}
Running on a high resolution WINDOWS 10 laptop, when text zoom is set in the display settings, the mouse cursor is captured, the mouse cursor image is incomplete.
I'm trying to launch the example in Mac OS terminal, so I get this error:
$ ./Example/screen_capture_example
Starting Capture Demo/Test
Testing captured monitor bounds check
Id=69732992 Index=0 Height=1600 Width=2560 OffsetX=0 OffsetY=0 Name=Monitor 69732992
Id=69732992 Index=0 Height=1601 Width=2560 OffsetX=0 OffsetY=0 Name=Monitor 69732992
Id=69732992 Index=0 Height=1600 Width=2561 OffsetX=0 OffsetY=0 Name=Monitor 69732992
Running display capturing for 10 seconds
Library is requesting the list of monitors to capture!
Id=69732992 Index=0 Height=1600 Width=2560 OffsetX=0 OffsetY=0 Name=Monitor 69732992
onNewFrame fps9
onNewFrame fps10
onNewFrame fps11
onNewFrame fps10
onNewFrame fps11
onNewFrame fps10
onNewFrame fps11
onNewFrame fps11
onNewFrame fps10
Running window capturing for 10 seconds
Running Partial display capturing for 10 seconds
Library is requesting the list of monitors to capture!
Id=69732992 Index=0 Height=512 Width=512 OffsetX=512 OffsetY=512 Name=Monitor 69732992
onNewFrame fps0
Segmentation fault: 11
Hello,
I am having troubles using this in QtCreator.
I have tried compiling it in VS2015, it works.
But I also get Linking Errors in QtCreator.
Can't I just include the headers and compile it into my application?
I have no idea at the moment where to start.
I use the demo has a low frame rate.Almost 2fps at macos,why?
And how can I include the library to JNI?
Is it possible to capture login screen within an windows service?
on unbuntu/debian
sudo apt-get install libxtst-dev libxinerama-dev libx11-dev libxfixes-dev
but cannot catch the right libs on Fedora
dnf / yum install ???
Thanks
Any example of how to compile the sources of the example?
thanks
the mouse thread seems to take frame-timer instead of mouse-timer.
sharing frame-timer from mouse thread with frame-capture thread can lead to irregular capture frequency.
Hi,
nice project. could you tell me what is the status of this project? what already works, what does not work and what will be developed in future?
what is the difference to this method? https://www.codeproject.com/Tips/1116253/Desktop-screen-capture-on-Windows-via-Windows-Desk
EnumDisplayDevices
.
ProcessFame
is assuming it's rotated.I have a PR I'll attach shortly, not sure if the approach is one you'd want to take straight in though. It also doesn't really fix (2), in that it allows screen_capture_lite to at least work in that case (which it wasn't), but the image it gives the client is still unrotated.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.