Expand description
YCbCr matrices accepted by SCStreamConfiguration.colorMatrix.
The property takes a CFStringRef and ScreenCaptureKit only honours the
kCGDisplayStreamYCbCrMatrix_* values reproduced here; anything else is
ignored by the system with no diagnostic. Using these constants instead of
a hand-written literal is the difference between “the matrix was applied”
and “the matrix was silently dropped”.
The matrix only affects YCbCr pixel formats (420v / 420f /
PixelFormat::YCbCr_420v and friends); it is inert for BGRA capture.
§Examples
use screencapturekit::stream::configuration::{color_matrix, SCStreamConfiguration};
let config = SCStreamConfiguration::new().with_color_matrix(color_matrix::ITU_R_709_2).expect("color matrix has no NUL byte");Constants§
- ITU_
R_ 601_ 4 kCGDisplayStreamYCbCrMatrix_ITU_R_601_4— SD (Rec. 601).- ITU_
R_ 709_ 2 kCGDisplayStreamYCbCrMatrix_ITU_R_709_2— HD (Rec. 709).- SMPTE_
240M_ 1995 kCGDisplayStreamYCbCrMatrix_SMPTE_240M_1995— SMPTE 240M.