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

Can't make a GStream binding. #46

Closed
Filipp-Druan opened this issue Oct 26, 2023 · 1 comment
Closed

Can't make a GStream binding. #46

Filipp-Druan opened this issue Oct 26, 2023 · 1 comment

Comments

@Filipp-Druan
Copy link

I tried to make binding for GStreamer and get fiasco.
cl-gtk4.gstreamer.asd:

(defsystem cl-gtk4.gstreamer
  :version "1.0.0"
  :author "Filipp Druan <druanf@bk.ru>"
  :maintainer "Bohong Huang <1281299809@qq.com>"
  :license "lgpl3"
  :description "GStreamer bindings for Common Lisp."
  :homepage "https://github.com/bohonghuang/cl-gtk4"
  :bug-tracker "https://github.com/bohonghuang/cl-gtk4/issues"
  :source-control (:git "https://github.com/bohonghuang/cl-gtk4.git")
  :serial t
  :components ((:file "gstreamer"))
  :depends-on (#:cl-gobject-introspection-wrapper #:cl-gtk4))

(uiop:register-image-restore-hook
 (lambda ()
   (let ((package (find-package :sourceview)))
     (when package
       (setf (symbol-value (find-symbol "*NS*" package))
             (uiop:symbol-call :gir :require-namespace "gstreamer"))))))

gstreamer.lisp:

(cl:defpackage gtkgstreamer
  (:use)
  (:nicknames #:gstreamer)
  (:export #:*ns*))

(in-package #:gstreamer)

(gir-wrapper:define-gir-namespace "gstreamer")

I tried different versions, different spellings of the library name, but Lisp still gave me an error:

CL-USER> (ql:quickload :cl-gtk4.gstreamer)
To load "cl-gtk4.gstreamer":
  Load 1 ASDF system:
    cl-gtk4.gstreamer
; Loading "cl-gtk4.gstreamer"
[package gtkgstreamer]

; file: /home/iam/quicklisp/local-projects/cl-gtk4/gstreamer.lisp
; in: GOBJECT-INTROSPECTION-WRAPPER:DEFINE-GIR-NAMESPACE "gstreamer"
;     (GOBJECT-INTROSPECTION-WRAPPER:DEFINE-GIR-NAMESPACE "gstreamer")
; 
; caught COMMON-LISP:ERROR:
;   (during macroexpansion of (GOBJECT-INTROSPECTION-WRAPPER:DEFINE-GIR-NAMESPACE "gstreamer"))
;   Typelib file for namespace 'gstreamer' (any version) not found
; Debugger entered on #<UIOP/LISP-BUILD:COMPILE-FILE-ERROR {10046B53C3}>
; 
; compilation unit aborted
;   caught 1 fatal ERROR condition
;   caught 1 ERROR condition
[1] CL-USER> 
; Evaluation aborted on #<UIOP/LISP-BUILD:COMPILE-FILE-ERROR {10046B53C3}>

How I can make a binding?

@bohonghuang
Copy link
Owner

The acronym in the GIR library name should be capitalized. I happened to create a WIP binding to GStreamer a few days ago, but I'm currently considering how to modularize it based on different GStreamer plugins. Perhaps we can discuss that there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants