[macOS] Wire up SampleBufferTransformer behind flags.
This wires up the use of SampleBufferTransformer inside the capturer behind flags that are disabled by default. With this CL we only convert to NV12 (we never rescale). Note that NV12 -> NV12 triggers a fast-path that returns the input camera pixel buffer, so this does not cause a copy. Flags added: - InCaptureConvertToNv12: Configures the transformer optimally. This means pixel transfer when you have a pixel buffer, libyuv when you have an MJPEG sample buffer. - kInCaptureConvertToNv12WithPixelTransfer: Transform using pixel transfer. Used for testing, will not be shipped. - kInCaptureConvertToNv12WithLibyuv: Transform using libyuv. Used for testing, will not be shipped. There is currently an issue obtaining the color space of CVPixelBufferPool-created pixel buffers. Until this is resolved, we hardcode the color space to kColorSpaceRec709Apple which avoids color space parsing in all processes. Bug: chromium:1132299 Change-Id: I733ceebb50db0a337c542434ac9f146ba120732a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2518978 Commit-Queue: Henrik Boström <hbos@chromium.org> Reviewed-by:Markus Handell <handellm@google.com> Cr-Commit-Position: refs/heads/master@{#825305}
Showing
This diff is collapsed.
Please register or sign in to comment