ffmpeg support
This commit is contained in:
+24
-2
@@ -2,7 +2,9 @@
|
||||
|
||||
(require racket/contract
|
||||
racket/path
|
||||
racket/string)
|
||||
racket/string
|
||||
racket/runtime-path
|
||||
)
|
||||
|
||||
(provide audio-format?
|
||||
audio-sniff-format
|
||||
@@ -333,4 +335,24 @@
|
||||
|
||||
(define/contract (audio-format-matches? file formats)
|
||||
(-> path-string? (listof symbol?) boolean?)
|
||||
(audio-format-matches?* file formats))
|
||||
(audio-format-matches?* file formats))
|
||||
|
||||
(define-runtime-path audio-tests "tests")
|
||||
|
||||
(define (sniff-test)
|
||||
(for-each (λ (ext)
|
||||
(let* ((dir (build-path audio-tests))
|
||||
(ext* (format ".~a" ext))
|
||||
(files (map (λ (f)
|
||||
(build-path audio-tests f))
|
||||
(filter (λ (f)
|
||||
(string-suffix? (format "~a" f) ext*))
|
||||
(directory-list dir))))
|
||||
)
|
||||
(for-each (λ (f)
|
||||
(displayln (format "~a: ~a" f (audio-sniff-format/extension f))))
|
||||
files)
|
||||
)
|
||||
)
|
||||
'(aac adts flac mp3 ogg ts ac3 aiff m4a mp4 ogx wav wv mp2))
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user