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

Side by Side Diff: webrtc/modules/video_coding/main/source/codec_timer.cc

Issue 1414693006: Add DecodedImageCallback::Decoded() function with custom decode time value. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: addressed comments. 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
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
(...skipping 10 matching lines...) Expand all
21 VCMCodecTimer::VCMCodecTimer() 21 VCMCodecTimer::VCMCodecTimer()
22 : 22 :
23 _filteredMax(0), 23 _filteredMax(0),
24 _ignoredSampleCount(0), 24 _ignoredSampleCount(0),
25 _shortMax(0), 25 _shortMax(0),
26 _history() 26 _history()
27 { 27 {
28 Reset(); 28 Reset();
29 } 29 }
30 30
31 int32_t VCMCodecTimer::StopTimer(int64_t startTimeMs, int64_t nowMs)
32 {
33 const int32_t timeDiff = static_cast<int32_t>(nowMs - startTimeMs);
34 MaxFilter(timeDiff, nowMs);
35 return timeDiff;
36 }
37
38 void VCMCodecTimer::Reset() 31 void VCMCodecTimer::Reset()
39 { 32 {
40 _filteredMax = 0; 33 _filteredMax = 0;
41 _ignoredSampleCount = 0; 34 _ignoredSampleCount = 0;
42 _shortMax = 0; 35 _shortMax = 0;
43 for (int i=0; i < MAX_HISTORY_SIZE; i++) 36 for (int i=0; i < MAX_HISTORY_SIZE; i++)
44 { 37 {
45 _history[i].shortMax = 0; 38 _history[i].shortMax = 0;
46 _history[i].timeMs = -1; 39 _history[i].timeMs = -1;
47 } 40 }
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 } 120 }
128 } 121 }
129 122
130 // Get the maximum observed time within a time window 123 // Get the maximum observed time within a time window
131 int32_t VCMCodecTimer::RequiredDecodeTimeMs(FrameType /*frameType*/) const 124 int32_t VCMCodecTimer::RequiredDecodeTimeMs(FrameType /*frameType*/) const
132 { 125 {
133 return _filteredMax; 126 return _filteredMax;
134 } 127 }
135 128
136 } 129 }
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/main/source/codec_timer.h ('k') | webrtc/modules/video_coding/main/source/generic_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698