Skip to content

Commit 5164164

Browse files
committed
Actually use the link function.
1 parent aa1ce62 commit 5164164

File tree

1 file changed

+18
-10
lines changed

1 file changed

+18
-10
lines changed

ffmpeg.rkt

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
opengl/util
1212
portaudio
1313
video/private/ffmpeg
14-
video/private/ffmpeg-stream
14+
video/private/ffmpeg-pipeline
1515
video/private/packetqueue
1616
video/private/video-canvas)
1717

@@ -140,12 +140,20 @@
140140
[(_ _)
141141
data])]))
142142

143-
(define in-bundle (file->stream-bundle "/Users/leif/demo2.mp4"))
144-
(demux-stream in-bundle
145-
#:by-index-callback (queue-stream))
146-
(define out-bundle (bundle-for-file "/Users/leif/test.mp4"
147-
in-bundle))
148-
(mux-stream out-bundle
149-
#:by-index-callback (dequeue-stream
150-
#:passthrough-proc encode-proc))
151-
143+
(link (λ () (file->stream-bundle "/Users/leif/demo2.mp4"))
144+
(λ (in-bundle) (bundle-for-file "/Users/leif/test.mp4"
145+
(mk-stream-bundle
146+
#:locked? #f
147+
#:streams
148+
(for/list ([i (stream-bundle-streams in-bundle)])
149+
(cond
150+
[(eq? (codec-obj-type i) 'video)
151+
(mk-codec-obj #:callback-data (codec-obj-callback-data i)
152+
#:type 'video
153+
#:id 'h264)]
154+
[(eq? (codec-obj-type i) 'audio)
155+
i
156+
#;(mk-codec-obj #:callback-data (codec-obj-callback-data i)
157+
#:type 'audio
158+
#:id 'aac)])))))
159+
#:out-callback encode-proc)

0 commit comments

Comments
 (0)