mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-04 10:33:30 +00:00
mac-virtualcam: Switch pixel format of camera extension to BGRA
BGRA was used by default in Apple's example code and is also already supported by OBS.
This commit is contained in:
parent
83c4f5383e
commit
f8f2c6d989
|
@ -52,7 +52,7 @@ class OBSCameraDeviceSource: NSObject, CMIOExtensionDeviceSource {
|
|||
let dimensions = CMVideoDimensions(width: 1920, height: 1080)
|
||||
CMVideoFormatDescriptionCreate(
|
||||
allocator: kCFAllocatorDefault,
|
||||
codecType: kCVPixelFormatType_32ARGB,
|
||||
codecType: kCVPixelFormatType_32BGRA,
|
||||
width: dimensions.width,
|
||||
height: dimensions.height,
|
||||
extensions: nil,
|
||||
|
@ -179,7 +179,7 @@ class OBSCameraDeviceSource: NSObject, CMIOExtensionDeviceSource {
|
|||
bitsPerComponent: 8,
|
||||
bytesPerRow: rowBytes,
|
||||
space: CGColorSpaceCreateDeviceRGB(),
|
||||
bitmapInfo: CGImageAlphaInfo.premultipliedFirst.rawValue
|
||||
bitmapInfo: CGImageAlphaInfo.noneSkipFirst.rawValue | CGBitmapInfo.byteOrder32Little.rawValue
|
||||
)!
|
||||
let graphicsContext = NSGraphicsContext(cgContext: cgContext, flipped: false)
|
||||
|
||||
|
|
Loading…
Reference in a new issue