cleanup and trying to catch frames
This commit is contained in:
@@ -11,6 +11,13 @@
|
||||
(defvar *gtk* (gir:require-namespace "Gtk" "3.0"))
|
||||
(gir:nget *gtk* "WindowType" :toplevel) ; get enum value
|
||||
|
||||
(defun huh-window ()
|
||||
(gir:invoke (*gtk* 'init) nil)
|
||||
(let ((window (gir:invoke (*gtk* "Window" 'new)
|
||||
(gir:nget *gtk* "WindowType" :toplevel))))
|
||||
(gir:invoke (window 'show))
|
||||
(gir:invoke (*gtk* 'main))))
|
||||
|
||||
;; name wildly from
|
||||
;; https://stackoverflow.com/questions/36296165/python-bindings-for-gstreamer-how-to-import-typelib
|
||||
(defvar *gstreamer* (gir:require-namespace "Gst"))
|
||||
@@ -68,9 +75,10 @@
|
||||
(format nil "pipewiresrc path=~A ! videoconvert ! videobox name=move ! autovideosink" stream-num)
|
||||
;"playbin uri=https://gstreamer.freedesktop.org/data/media/sintel_trailer-480p.webm"
|
||||
))
|
||||
(move-element (gir:invoke (pipeline 'get-by-name) "move")))
|
||||
;(move-element (gir:invoke (pipeline 'get-by-name) "move"))
|
||||
)
|
||||
(gir:invoke (pipeline 'set-state) (gir:nget *gstreamer* "State" :playing))
|
||||
(values pipeline move-element)))
|
||||
pipeline))
|
||||
|
||||
;; well, pipewire is not part of what's added to env
|
||||
;; not sure if i can add it
|
||||
@@ -113,7 +121,7 @@
|
||||
(sink (gir:invoke (*gstreamer* "ElementFactory" 'make) "autovideosink" "sink")))
|
||||
(when stream-num
|
||||
;; Set pipewiresrc properties, such as the path
|
||||
(gir:invoke (source 'set-property) 'path stream-num))
|
||||
(setf (gir:property source 'path) (format nil "~A" stream-num)))
|
||||
|
||||
;; Add and link elements in the pipeline
|
||||
(gir:invoke (pipeline 'add) source)
|
||||
|
||||
Reference in New Issue
Block a user