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

Side by Side Diff: webrtc/media/engine/webrtcvideocapturer.cc

Issue 1753293002: Safe numeric library: base/numerics (copied from Chromium) (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase with master + correct new safe_conversions.h include Created 4 years, 9 months 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
« no previous file with comments | « webrtc/common_audio/wav_file.cc ('k') | webrtc/media/sctp/sctpdataengine.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #include "webrtc/media/engine/webrtcvideocapturer.h" 11 #include "webrtc/media/engine/webrtcvideocapturer.h"
12 12
13 #ifdef HAVE_CONFIG_H 13 #ifdef HAVE_CONFIG_H
14 #include <config.h> 14 #include <config.h>
15 #endif 15 #endif
16 16
17 #include "webrtc/base/arraysize.h" 17 #include "webrtc/base/arraysize.h"
18 #include "webrtc/base/bind.h" 18 #include "webrtc/base/bind.h"
19 #include "webrtc/base/checks.h" 19 #include "webrtc/base/checks.h"
20 #include "webrtc/base/criticalsection.h" 20 #include "webrtc/base/criticalsection.h"
21 #include "webrtc/base/logging.h" 21 #include "webrtc/base/logging.h"
22 #include "webrtc/base/safe_conversions.h" 22 #include "webrtc/base/numerics/safe_conversions.h"
23 #include "webrtc/base/thread.h" 23 #include "webrtc/base/thread.h"
24 #include "webrtc/base/timeutils.h" 24 #include "webrtc/base/timeutils.h"
25 #include "webrtc/media/engine/webrtcvideoframe.h" 25 #include "webrtc/media/engine/webrtcvideoframe.h"
26 #include "webrtc/media/engine/webrtcvideoframefactory.h" 26 #include "webrtc/media/engine/webrtcvideoframefactory.h"
27 27
28 #include "webrtc/base/win32.h" // Need this to #include the impl files. 28 #include "webrtc/base/win32.h" // Need this to #include the impl files.
29 #include "webrtc/modules/video_capture/video_capture_factory.h" 29 #include "webrtc/modules/video_capture/video_capture_factory.h"
30 #include "webrtc/system_wrappers/include/field_trial.h" 30 #include "webrtc/system_wrappers/include/field_trial.h"
31 31
32 namespace cricket { 32 namespace cricket {
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 pixel_width = 1; 417 pixel_width = 1;
418 pixel_height = 1; 418 pixel_height = 1;
419 // Convert units from VideoFrame RenderTimeMs to CapturedFrame (nanoseconds). 419 // Convert units from VideoFrame RenderTimeMs to CapturedFrame (nanoseconds).
420 time_stamp = sample.render_time_ms() * rtc::kNumNanosecsPerMillisec; 420 time_stamp = sample.render_time_ms() * rtc::kNumNanosecsPerMillisec;
421 data_size = rtc::checked_cast<uint32_t>(length); 421 data_size = rtc::checked_cast<uint32_t>(length);
422 data = buffer; 422 data = buffer;
423 rotation = sample.rotation(); 423 rotation = sample.rotation();
424 } 424 }
425 425
426 } // namespace cricket 426 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/common_audio/wav_file.cc ('k') | webrtc/media/sctp/sctpdataengine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698