opening gstreamer window from cl

This commit is contained in:
efim
2024-08-15 15:25:44 +00:00
parent e991200a8e
commit 1e06e2e476
5 changed files with 64 additions and 1 deletions

View File

@@ -35,6 +35,10 @@
(gir:invoke (pipeline 'set-state)
(gir:nget *gstreamer* "State" :playing))))
;; from here?
;; https://github.com/irsbugs/GStreaming?tab=readme-ov-file#gstparse_launch
;; and docs searched with underscore
;; https://gstreamer.freedesktop.org/documentation/gstreamer/gstparse.html?gi-language=python#gst_parse_launch
(defun tutorial-main ()
(gir:invoke (*gstreamer* 'init) '())
(let ((pipeline (gir:invoke (*gstreamer* 'parse-launch)
@@ -57,3 +61,29 @@
;; videotestsc worked
;; and error i got was from trying to set :null ? but it should be correct enum
;; oh well, ok
(defun for-screencast ()
(gir:invoke (*gstreamer* 'init) '())
(let ((pipeline (gir:invoke (*gstreamer* 'parse-launch)
"pipewiresrc path=46 ! videoconvert ! autovideosink"
;"playbin uri=https://gstreamer.freedesktop.org/data/media/sintel_trailer-480p.webm"
)))
(gir:invoke (pipeline 'set-state)
(gir:nget *gstreamer* "State" :playing))
;; (let* ((bus (gir:invoke (pipeline 'get-bus)))
;; (msg (gir:invoke (bus 'timed-pop-filtered)
;; (gir:nget *gstreamer* :clock-time-none)
;; (list
;; (gir:nget *gstreamer* "MessageType" :error)
;; (gir:nget *gstreamer* "MessageType" :eos))))))
;; (gir:invoke (pipeline 'set-state)
;; (gir:nget *gstreamer* "State" :paused))
))
;; well, pipewire is not part of what's added to env
;; not sure if i can add it
;; trying to run without env gstreamer doesn't work, installing
;; $ sudo apt install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-good1.0-dev
;; still results in error for (defvar *gstreamer* (gir:require-namespace "Gst"))
;; i can try to add pipewire, but then would it work with the screen share running on system server?
;; it did work. wowy. ok
;; cool. now i'm kind of at the point of python example :D