-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrecorder.rkt
65 lines (58 loc) · 1.61 KB
/
recorder.rkt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#lang racket/base
;; A prototype camera recorder for video
(require video/base
video/devices
video/private/video-canvas
racket/gui/base
racket/class)
(define WIDTH 640)
(define HEIGHT 480)
(define FPS 25)
(define video-capture%
(class frame%
(super-new [label "Video Capture"]
[min-width 700]
[min-height 600])
(define devices (list-input-devices))
(define screen-row
(new horizontal-pane%
[parent this]
[alignment '(center center)]
[spacing 20]))
(define screen
(new video-canvas%
[parent screen-row]
[width WIDTH]
[height HEIGHT]))
(define dev-row
(new horizontal-pane%
[parent this]
[alignment '(center center)]
[spacing 20]))
(define cam-source
(new choice%
[parent dev-row]
[choices (cameras devices)]
[label "Camera"]
[min-width 200]
[stretchable-width #t]
[style '(vertical-label)]))
(define screen-source
(new choice%
[parent dev-row]
[choices (video-devices devices)]
[label "Screen Capture"]
[min-width 200]
[stretchable-width #t]
[style '(vertical-label)]))
(define aud-source
(new choice%
[parent dev-row]
[choices (audio-devices devices)]
[label "Audio Capture"]
[min-width 200]
[stretchable-width #t]
[style '(vertical-label)]))
))
(define vc (new video-capture%))
(send vc show #t)