Comments (1)
Simple create a list, and somehow let it work like a lock
a = [0, 0]
lets say a[0] represents status of thread 1, and a[1] for thread 2
Since you have sleep(0.1)
which helps decrease errors
So in each thread, right before you take a screenshot, you check first if there are 1 in a, if not then you set value from 0 to 1, and set back to 0 when done screenshot
For example:
def reading():
time.sleep(1)
while True:
while (1 in a):
pass
a[1] = 1
wnd.read_window_frame(window)
a[1] = 0
print("reading frame 2")
time.sleep(0.1)
from dxcam.
Related Issues (20)
- how to do the accurate sleep HOT 1
- Running on a standalone graphics card will result in an error HOT 2
- dxcam is fast, so is yolo, but cv2 isn't HOT 1
- ctypes.WinError() OSError: [WinError 87] The parameter is incorrect. in typer.py HOT 1
- is there any way to "unscreenshot" a window? HOT 5
- empty black capture
- OSError: [WinError 87] error
- AttributeError: 'DXCamera' object has no attribute 'is_capturing' HOT 1
- TypeError: 'float' object cannot be interpreted as an integer
- PyPI 站没有了
- Capturing on HDR display has very bright output HOT 1
- Helllo win 7 doesn't work
- feedback BUG:camera.grab() Resolution error
- feedback BUG:camera.grab() Resolution error HOT 5
- [NOT-ISSUE] [TUTORIAL] Adding Cursor To Screen Capture HOT 1
- Dxcam is returning a black img after use pyinstaller
- Is there any way to have the captured screenshots include the mouse cursor? HOT 1
- All frames taken from camera.get_latest_frame() are glitchy in a weird way!
- ValueError: could not broadcast input array from shape (640,640,3) into shape (1080,1920,3)
- How can I take screenshots based on the specified hwnd
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dxcam.