Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changed arrangement to reduce height #41

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 21 additions & 11 deletions video/player.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -297,29 +297,36 @@
[label "00:00:00.00"]
[font (make-object font% 32 'modern 'normal 'bold)]
[stretchable-width #f]))
(define render-row
(new horizontal-pane%
(define control-row
(new horizontal-panel%
[parent this]
[style '[border]]
[alignment '(center center)]))
(define render-row
(new horizontal-panel%
[parent control-row]
[style '[border]]
[alignment '(center center)]))
(new check-box%
[parent render-row]
[label "Render Video"]
[label "Video"]
[value #t]
[callback
(λ (c e)
(define v (send c get-value))
(render-video v))])
(new check-box%
[parent render-row]
[label "Render Audio"]
[label "Audio"]
[value #t]
[callback
(λ (c e)
(define v (send c get-value))
(render-audio v))])
(define seek-row
(new horizontal-pane%
[parent this]
(new horizontal-panel%
[parent control-row]
[style '[border]]
[alignment '(center center)]))
(define seek-field
(new text-field%
Expand All @@ -339,8 +346,9 @@
(define frame (send seek-field get-value))
(send vps seek (string->number frame)))])
(define speed-row
(new horizontal-pane%
[parent this]
(new horizontal-panel%
[parent control-row]
[style '[border]]
[alignment '(center center)]))
(define speed-field
(new text-field%
Expand All @@ -361,12 +369,14 @@
(define speed (string->number (send speed-field get-value)))
(when speed
(send vps set-speed speed)))])
(new message%
[parent this]
[label (format "FPS: ~a" (send vps get-fps))])

;; Start the initial video
(send vps set-video video)
(define fps-indicator-updater
(new timer%
[interval 250]
[notify-callback
(λ () (send this set-label (format "Video Player (FPS:~a)" (send vps get-fps))))]))
(define seek-bar-updater
(new timer%
[interval 50]
Expand Down