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

Side by Side Diff: talk/media/base/videocapturer.cc

Issue 1461053002: Cleaned up deprecated elapsed_time methods and changed rotation to be webrtc::VideoRotation (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 1 month 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 | « talk/media/base/videocapturer.h ('k') | talk/media/base/videoframefactory.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 * libjingle 2 * libjingle
3 * Copyright 2010 Google Inc. 3 * Copyright 2010 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 // Implementation of struct CapturedFrame 75 // Implementation of struct CapturedFrame
76 ///////////////////////////////////////////////////////////////////// 76 /////////////////////////////////////////////////////////////////////
77 CapturedFrame::CapturedFrame() 77 CapturedFrame::CapturedFrame()
78 : width(0), 78 : width(0),
79 height(0), 79 height(0),
80 fourcc(0), 80 fourcc(0),
81 pixel_width(0), 81 pixel_width(0),
82 pixel_height(0), 82 pixel_height(0),
83 time_stamp(0), 83 time_stamp(0),
84 data_size(0), 84 data_size(0),
85 rotation(0), 85 rotation(webrtc::kVideoRotation_0),
86 data(NULL) {} 86 data(NULL) {}
87 87
88 // TODO(fbarchard): Remove this function once lmimediaengine stops using it. 88 // TODO(fbarchard): Remove this function once lmimediaengine stops using it.
89 bool CapturedFrame::GetDataSize(uint32_t* size) const { 89 bool CapturedFrame::GetDataSize(uint32_t* size) const {
90 if (!size || data_size == CapturedFrame::kUnknownDataSize) { 90 if (!size || data_size == CapturedFrame::kUnknownDataSize) {
91 return false; 91 return false;
92 } 92 }
93 *size = data_size; 93 *size = data_size;
94 return true; 94 return true;
95 } 95 }
96 96
97 webrtc::VideoRotation CapturedFrame::GetRotation() const {
98 ASSERT(rotation == 0 || rotation == 90 || rotation == 180 || rotation == 270);
99 return static_cast<webrtc::VideoRotation>(rotation);
100 }
101
102 ///////////////////////////////////////////////////////////////////// 97 /////////////////////////////////////////////////////////////////////
103 // Implementation of class VideoCapturer 98 // Implementation of class VideoCapturer
104 ///////////////////////////////////////////////////////////////////// 99 /////////////////////////////////////////////////////////////////////
105 VideoCapturer::VideoCapturer() 100 VideoCapturer::VideoCapturer()
106 : thread_(rtc::Thread::Current()), 101 : thread_(rtc::Thread::Current()),
107 adapt_frame_drops_data_(kMaxAccumulatorSize), 102 adapt_frame_drops_data_(kMaxAccumulatorSize),
108 frame_time_data_(kMaxAccumulatorSize), 103 frame_time_data_(kMaxAccumulatorSize),
109 apply_rotation_(true) { 104 apply_rotation_(true) {
110 Construct(); 105 Construct();
111 } 106 }
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
730 void VideoCapturer::GetVariableSnapshot( 725 void VideoCapturer::GetVariableSnapshot(
731 const rtc::RollingAccumulator<T>& data, 726 const rtc::RollingAccumulator<T>& data,
732 VariableInfo<T>* stats) { 727 VariableInfo<T>* stats) {
733 stats->max_val = data.ComputeMax(); 728 stats->max_val = data.ComputeMax();
734 stats->mean = data.ComputeMean(); 729 stats->mean = data.ComputeMean();
735 stats->min_val = data.ComputeMin(); 730 stats->min_val = data.ComputeMin();
736 stats->variance = data.ComputeVariance(); 731 stats->variance = data.ComputeVariance();
737 } 732 }
738 733
739 } // namespace cricket 734 } // namespace cricket
OLDNEW
« no previous file with comments | « talk/media/base/videocapturer.h ('k') | talk/media/base/videoframefactory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698