From aa9f3f5b3161c387c510f90ac8cbc205610fd62d Mon Sep 17 00:00:00 2001 From: "Nikolay V. Razbegaev" Date: Tue, 6 Apr 2010 20:23:25 +0200 Subject: [PATCH] Fix for recent iolib syscalls naming scheme --- example.lisp | 7 +++---- package.lisp | 10 +++++----- v4l2.lisp | 6 +++--- videodev2.lisp | 2 +- 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/example.lisp b/example.lisp index 2e46c0f..cc6e1a2 100644 --- a/example.lisp +++ b/example.lisp @@ -5,8 +5,7 @@ (asdf:oos 'asdf:load-op :bordeaux-threads) (defpackage :test-v4l2 - (:use :common-lisp :gtk :gtkglext) - (:import-from :iolib.syscalls %sys-open %sys-close o-rdwr)) + (:use :common-lisp :gtk :gtkglext)) (in-package :test-v4l2) @@ -104,7 +103,7 @@ :initial-element #xff)))) (defun video-init (device) - (let ((fd (%sys-open device o-rdwr))) + (let ((fd (isys:open device isys:o-rdwr))) (setq *capture-fd* fd) (diagnose fd) ; info about device (device-init fd) ; setup @@ -115,7 +114,7 @@ (defun video-uninit (fd buffers) (v4l2:stream-off fd) ; stop capturing (v4l2:unmap-buffers buffers) ; throw away buffers from memory - (%sys-close fd) ; close device + (isys:close fd) ; close device (format t "that's all!~%")) (defun capture-thread () diff --git a/package.lisp b/package.lisp index 346d1e9..0d946c1 100644 --- a/package.lisp +++ b/package.lisp @@ -17,12 +17,12 @@ (defpackage #:cl-v4l2 (:nicknames :v4l2) - (:use :cl :cffi :iolib.syscalls #:trivial-garbage #:closer-mop) + (:use :cl :cffi #:trivial-garbage #:closer-mop) (:shadowing-import-from :closer-mop - :defclass - :defgeneric - :defmethod - :standard-generic-function) + :defclass + :defgeneric + :defmethod + :standard-generic-function) (:shadow :format :standard) (:export #:query-capabilities diff --git a/v4l2.lisp b/v4l2.lisp index 36a0626..9123dbc 100644 --- a/v4l2.lisp +++ b/v4l2.lisp @@ -24,7 +24,7 @@ (let ((req! (if (> req (ash 1 31)) (- req (ash 1 32)) req))) - (%sys-ioctl fd req! arg))) + (isys:ioctl fd req! arg))) (defun query-capabilities (fd) "Query for device capabilities." @@ -133,7 +133,7 @@ collect (with-slots (index length m) buf (list buf - (%sys-mmap (make-pointer 0) length prot-read map-shared fd + (isys:mmap (make-pointer 0) length isys:prot-read isys:map-shared fd (buffer-union-offset m)) length))))) @@ -143,7 +143,7 @@ (multiple-value-bind (buffer addr length) (values-list buf) (declare (ignore buffer)) - (%sys-munmap addr length)))) + (isys:munmap addr length)))) (defun stream-action (fd req) (with-foreign-object (type 'buf-type 2) ;; 2 - hack to create `type' as pointer diff --git a/videodev2.lisp b/videodev2.lisp index b43839b..cb257e2 100644 --- a/videodev2.lisp +++ b/videodev2.lisp @@ -274,7 +274,7 @@ (bytesused :uint32) (flags :uint32) (field field) - (timestamp timeval) + (timestamp isys:timeval) (timecode timecode) (sequence :uint32) ; memory location -- 2.11.4.GIT