Libraryless. Click here for Pure Java version (6311L/35K).
1 | sclass ScreenCamStream extends SourceTriggeredStream<BufferedImage> is Steppable { |
2 | settable volatile Rect area = screenBounds(0); |
3 | |
4 | public bool step() { |
5 | if (ended()) false; |
6 | catchError(lambda0 shootImpl); |
7 | true; |
8 | } |
9 | |
10 | long frameCount() { ret elementCount(); } |
11 | |
12 | void shootImpl { |
13 | var img = shootScreenWithMeta(area).image; |
14 | assertInstanceOf(ScreenShotMeta, getMetaSrc(img)); |
15 | newElement(img); |
16 | } |
17 | |
18 | void useScreen(int iScreen) { |
19 | area = screenBounds_safe(iScreen); |
20 | } |
21 | } |
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1033670 |
Snippet name: | ScreenCamStream |
Eternal ID of this version: | #1033670/16 |
Text MD5: | 7208cc47c3bbb75e1e35be3fe950feff |
Transpilation MD5: | 93e1fb557e226f9b4a1d0929150044b2 |
Author: | stefan |
Category: | javax / screen recognition |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-01-17 01:06:29 |
Source code size: | 524 bytes / 21 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 190 / 365 |
Version history: | 15 change(s) |
Referenced in: | [show references] |