Commit e6ea08cc authored by Sean McAllister's avatar Sean McAllister Committed by Commit Bot

Refactor OS_LINUX preprocessor directive for LaCrOS effort.

Currently, ChromeOS defines the OS_LINUX directive as well as
OS_CHROMEOS.  We're working to separate these two, so we're
making the fact that OS_LINUX == OS_LINUX || OS_CHROMEOS
explicit.

This is changes for /media/capture/video

This CL was uploaded by git cl split.

R=guidou@chromium.org

Bug: 1110266
Change-Id: I73819505c21053585355c83e9f13e48aa386fa9c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2370729Reviewed-by: default avatarGuido Urdaneta <guidou@chromium.org>
Commit-Queue: Sean McAllister <smcallis@google.com>
Cr-Commit-Position: refs/heads/master@{#801406}
parent 9a7338da
......@@ -208,7 +208,7 @@ void FakeVideoCaptureDeviceFactory::GetDevicesInfo(
int entry_index = 0;
for (const auto& entry : devices_config_) {
VideoCaptureApi api =
#if defined(OS_LINUX)
#if defined(OS_LINUX) || defined(OS_CHROMEOS)
VideoCaptureApi::LINUX_V4L2_SINGLE_PLANE;
#elif defined(OS_MAC)
VideoCaptureApi::MACOSX_AVFOUNDATION;
......
......@@ -52,7 +52,7 @@ void FileVideoCaptureDeviceFactory::GetDevicesInfo(
VideoCaptureApi::WIN_DIRECT_SHOW;
#elif defined(OS_MAC)
VideoCaptureApi::MACOSX_AVFOUNDATION;
#elif defined(OS_LINUX)
#elif defined(OS_LINUX) || defined(OS_CHROMEOS)
VideoCaptureApi::LINUX_V4L2_SINGLE_PLANE;
#else
VideoCaptureApi::UNKNOWN;
......
......@@ -58,7 +58,7 @@ VideoCaptureBufferPoolImpl::CreateSharedMemoryViaRawFileDescriptorStruct(
int buffer_id) {
// This requires platforms where base::SharedMemoryHandle is backed by a
// file descriptor.
#if defined(OS_LINUX)
#if defined(OS_LINUX) || defined(OS_CHROMEOS)
base::AutoLock lock(lock_);
VideoCaptureBufferTracker* tracker = GetTracker(buffer_id);
......
......@@ -301,7 +301,7 @@ void VideoCaptureDeviceClient::OnIncomingCapturedData(
// see http://linuxtv.org/downloads/v4l-dvb-apis/packed-rgb.html.
// Windows RGB24 defines blue at lowest byte,
// see https://msdn.microsoft.com/en-us/library/windows/desktop/dd407253
#if defined(OS_LINUX)
#if defined(OS_LINUX) || defined(OS_CHROMEOS)
fourcc_format = libyuv::FOURCC_RAW;
#elif defined(OS_WIN)
fourcc_format = libyuv::FOURCC_24BG;
......
......@@ -227,7 +227,7 @@ TEST_F(VideoCaptureDeviceClientTest, DataCaptureGoodPixelFormats) {
PIXEL_FORMAT_NV21,
PIXEL_FORMAT_YUY2,
PIXEL_FORMAT_UYVY,
#if defined(OS_WIN) || defined(OS_LINUX)
#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS)
PIXEL_FORMAT_RGB24,
#endif
PIXEL_FORMAT_ARGB,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment