scratch-screen-share/gtk-playground.lisp

34 lines
1.1 KiB
Common Lisp

(load (sb-ext:posix-getenv "ASDF"))
(asdf:load-system 'cl-cffi-gtk)
(defpackage #:gtkStuff (:use #:cl))
(in-package #:gtkStuff)
(gtk:cl-cffi-gtk-build-info) ; yay, this works, cool
(defun example-window-simple ()
(gtk:within-main-loop
(let (;; Create a toplevel window.
(window (gtk:gtk-window-new :toplevel)))
;; Signal handler for the window to handle the signal "destroy".
(gobject:g-signal-connect window "destroy"
(lambda (widget)
(declare (ignore widget))
(gtk:leave-gtk-main)))
;; Show the window.
(gtk:gtk-widget-show-all window))))
;; yay, this works. good.
;; this https://www.crategus.com/books/cl-gtk/gtk-tutorial.html#idp3
;; and how could i integrate with out node of pipewire?
(defun start-ffmpeg ()
(uiop:run-program '("ffmpeg" "-f" "pipewire" "-i" "out-node" "-f" "rawvideo" "-pix_fmt" "rgb24" "-")
:output :lines
:error-output :lines
:input :interactive
:wait nil
))