version info of the ffi modules
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
)
|
||||
|
||||
(provide fmpg-ffi-decoder-handler
|
||||
fmpg-version
|
||||
)
|
||||
|
||||
;; The native shim is the new instance-only FFmpeg audio API. It exposes a
|
||||
@@ -36,6 +37,15 @@
|
||||
|
||||
(define _fmpg_instance _pointer)
|
||||
|
||||
(define (fmpg-version)
|
||||
(let* ((v (fmpg_version))
|
||||
(patch (remainder v 256))
|
||||
(minor (remainder (quotient v 256) 256))
|
||||
(major (quotient v 65536))
|
||||
)
|
||||
(list major minor patch)))
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Native bindings
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
@@ -138,6 +148,9 @@
|
||||
|
||||
(define-ffmpeg-audio fmpg_compatible_ffmpeg
|
||||
(_fun -> _int))
|
||||
|
||||
(define-ffmpeg-audio fmpg_version
|
||||
(_fun -> _int))
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
@@ -329,6 +342,9 @@
|
||||
(hash-set! h 'audio-streams audio-streams)
|
||||
h))
|
||||
|
||||
(define (version)
|
||||
(fmpg-version))
|
||||
|
||||
(lambda (cmd . args)
|
||||
(cond
|
||||
[(eq? cmd 'new) (new)]
|
||||
@@ -342,6 +358,7 @@
|
||||
[(eq? cmd 'tell) (tell)]
|
||||
[(eq? cmd 'file) ffmpeg-file]
|
||||
[(eq? cmd 'metadata) (metadata)]
|
||||
[(eq? cmd 'version) (version)]
|
||||
[else (error (format "Unknown command: ~a" cmd))])))
|
||||
|
||||
); end of module
|
||||
|
||||
Reference in New Issue
Block a user