Add media::GetFormatDescriptionColorSpace
Restrict this to macOS 10.11 and above. In theory the function should not compile when targeting macOS 10.10. In practice it does, because the CoreMedia constants are preprocessor defined to their CoreVideo equivalents (which are defined). This function is nearly identical to media::GetImageBufferColorSpace, but instead operates on a CMFormatDescriptionRef. Add DCHECKs that the behavior of the two functions be the same, that is, the kCVImageBuffer-prefixed and kCMFormatDescription-prefixed constants be equal. Use base::mac::CFCast instead of reinterpret_casts. The next patch in this sequence will move these two functions over to media/base/mac, because it will be accessed in capture. Bug: 959962 Change-Id: Iea9d8d357dec72ddc928b7e1fd3a631c131ade74 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2449934Reviewed-by:Dale Curtis <dalecurtis@chromium.org> Commit-Queue: ccameron <ccameron@chromium.org> Cr-Commit-Position: refs/heads/master@{#813924}
Showing
This diff is collapsed.
Please register or sign in to comment