mirror of
https://github.com/neon443/Scream.git
synced 2026-03-11 13:26:18 +00:00
YAYAYAYAYAYAAYAYAYA VIDEOOO
we have video! supports macOS 12.3 and up
This commit is contained in:
@@ -37,11 +37,16 @@ class CaptureEngine: NSObject {
|
||||
streamOutput.pcmBufferHandler = { print($0) }
|
||||
|
||||
do {
|
||||
streamOutput.frameBufferHandler = { frame in
|
||||
// print("got frame \(frame.size) at \(frame.contentRect)")
|
||||
continuation.yield(frame)
|
||||
}
|
||||
stream = SCStream(filter: filter, configuration: config, delegate: streamOutput)
|
||||
|
||||
try stream?.addStreamOutput(streamOutput, type: .screen, sampleHandlerQueue: videoSampleBufferQueue)
|
||||
try stream?.addStreamOutput(streamOutput, type: .audio, sampleHandlerQueue: audioSampleBufferQueue)
|
||||
try stream?.addStreamOutput(streamOutput, type: .microphone, sampleHandlerQueue: videoSampleBufferQueue)
|
||||
// try stream?.addStreamOutput(streamOutput, type: .audio, sampleHandlerQueue: audioSampleBufferQueue)
|
||||
// try stream?.addStreamOutput(streamOutput, type: .microphone, sampleHandlerQueue: videoSampleBufferQueue)
|
||||
stream?.startCapture()
|
||||
} catch {
|
||||
continuation.finish(throwing: error)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user