Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Side by Side Diff: media/capture/video/win/video_capture_device_mf_win.cc

Issue 1507413003: clang/win: Let some chromium_code targets build with -Wextra. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: content_browsertests Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/capture/video/win/video_capture_device_mf_win.h" 5 #include "media/capture/video/win/video_capture_device_mf_win.h"
6 6
7 #include <mfapi.h> 7 #include <mfapi.h>
8 #include <mferror.h> 8 #include <mferror.h>
9 9
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 } static const kFormatMap[] = { 164 } static const kFormatMap[] = {
165 {MFVideoFormat_I420, PIXEL_FORMAT_I420}, 165 {MFVideoFormat_I420, PIXEL_FORMAT_I420},
166 {MFVideoFormat_YUY2, PIXEL_FORMAT_YUY2}, 166 {MFVideoFormat_YUY2, PIXEL_FORMAT_YUY2},
167 {MFVideoFormat_UYVY, PIXEL_FORMAT_UYVY}, 167 {MFVideoFormat_UYVY, PIXEL_FORMAT_UYVY},
168 {MFVideoFormat_RGB24, PIXEL_FORMAT_RGB24}, 168 {MFVideoFormat_RGB24, PIXEL_FORMAT_RGB24},
169 {MFVideoFormat_ARGB32, PIXEL_FORMAT_ARGB}, 169 {MFVideoFormat_ARGB32, PIXEL_FORMAT_ARGB},
170 {MFVideoFormat_MJPG, PIXEL_FORMAT_MJPEG}, 170 {MFVideoFormat_MJPG, PIXEL_FORMAT_MJPEG},
171 {MFVideoFormat_YV12, PIXEL_FORMAT_YV12}, 171 {MFVideoFormat_YV12, PIXEL_FORMAT_YV12},
172 }; 172 };
173 173
174 for (int i = 0; i < arraysize(kFormatMap); ++i) { 174 for (const auto& kFormat : kFormatMap) {
175 if (kFormatMap[i].guid == guid) { 175 if (kFormat.guid == guid) {
176 *format = kFormatMap[i].format; 176 *format = kFormat.format;
177 return true; 177 return true;
178 } 178 }
179 } 179 }
180 180
181 return false; 181 return false;
182 } 182 }
183 183
184 const std::string VideoCaptureDevice::Name::GetModel() const { 184 const std::string VideoCaptureDevice::Name::GetModel() const {
185 const size_t vid_prefix_size = sizeof(kVidPrefix) - 1; 185 const size_t vid_prefix_size = sizeof(kVidPrefix) - 1;
186 const size_t pid_prefix_size = sizeof(kPidPrefix) - 1; 186 const size_t pid_prefix_size = sizeof(kPidPrefix) - 1;
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 HRESULT hr) { 322 HRESULT hr) {
323 if (client_.get()) { 323 if (client_.get()) {
324 client_->OnError( 324 client_->OnError(
325 from_here, 325 from_here,
326 base::StringPrintf("VideoCaptureDeviceMFWin: %s", 326 base::StringPrintf("VideoCaptureDeviceMFWin: %s",
327 logging::SystemErrorCodeToString(hr).c_str())); 327 logging::SystemErrorCodeToString(hr).c_str()));
328 } 328 }
329 } 329 }
330 330
331 } // namespace media 331 } // namespace media
OLDNEW
« no previous file with comments | « media/capture/video/win/video_capture_device_factory_win.cc ('k') | net/base/keygen_handler_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698