still not getting data from buffer
but the error is in gir::map-c-array length is NIL, not sure what's up with that
This commit is contained in:
@@ -6,9 +6,9 @@
|
||||
(:use :cl))
|
||||
|
||||
(in-package :capturing-frames)
|
||||
(gir:require-namespace "GLib")
|
||||
|
||||
(defvar *gstreamer* (gir:require-namespace "Gst"))
|
||||
(defvar *gstapp* (gir:require-namespace "GstApp"))
|
||||
;(defvar *gstapp* (gir:require-namespace "GstApp"))
|
||||
|
||||
(defun cast-with-videobox (&optional stream-num)
|
||||
(gir:invoke (*gstreamer* 'init) '())
|
||||
@@ -50,7 +50,6 @@
|
||||
|
||||
(gir:invoke (pipeline 'set-state) (gir:nget *gstreamer* "State" :playing))
|
||||
|
||||
;; Example: Move the video 10 pixels down and 20 pixels to the right
|
||||
(values pipeline appsink)))
|
||||
|
||||
(defun process-frame (sample)
|
||||
@@ -61,6 +60,7 @@
|
||||
(caps-struct (gir:invoke (caps 'get-structure) 0))
|
||||
(width (gir:invoke ((gir:invoke (caps-struct 'get-value) "width") 'get-int)))
|
||||
(height (gir:invoke ((gir:invoke (caps-struct 'get-value) "height") 'get-int))))
|
||||
|
||||
(multiple-value-bind (found map-info) (gir:invoke (buffer 'map) (gir:nget *gstreamer* "MapFlags" :read))
|
||||
(format t ">>>> the buffer has offset ~A~%" (gir:field buffer 'offset))
|
||||
(format t ">>>> what's in struct? ~A~%" (gir:invoke (caps-struct 'to-string)))
|
||||
@@ -70,11 +70,8 @@
|
||||
(let ((data (gir:field map-info 'data))
|
||||
(size (gir:field map-info 'size)))
|
||||
(format t ">>>> and struct info? ~A~%" map-info)
|
||||
; (format t ">>>> and data has size ~A and buf ~A~%" size (or data "empty data"))
|
||||
)))
|
||||
;; Unmap the memory when done
|
||||
;; (gir:invoke (info 'unmap) map-info)
|
||||
))
|
||||
(gir:invoke (buffer 'unmap) map-info)
|
||||
(format t ">>>> and data has size ~A and data is ~A~%" size (or data "empty data")))))))
|
||||
|
||||
(defun start-processing (appsink)
|
||||
(gir:connect appsink "new-sample"
|
||||
|
||||
Reference in New Issue
Block a user