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

Side by Side Diff: webrtc/common_types.cc

Issue 2911193002: Implement timing frames. (Closed)
Patch Set: Fix capture timestamp issues which cause capture time from the future Created 3 years, 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 30 matching lines...) Expand all
41 hasAbsoluteSendTime(false), 41 hasAbsoluteSendTime(false),
42 absoluteSendTime(0), 42 absoluteSendTime(0),
43 hasTransportSequenceNumber(false), 43 hasTransportSequenceNumber(false),
44 transportSequenceNumber(0), 44 transportSequenceNumber(0),
45 hasAudioLevel(false), 45 hasAudioLevel(false),
46 voiceActivity(false), 46 voiceActivity(false),
47 audioLevel(0), 47 audioLevel(0),
48 hasVideoRotation(false), 48 hasVideoRotation(false),
49 videoRotation(kVideoRotation_0), 49 videoRotation(kVideoRotation_0),
50 hasVideoContentType(false), 50 hasVideoContentType(false),
51 videoContentType(VideoContentType::UNSPECIFIED) {} 51 videoContentType(VideoContentType::UNSPECIFIED),
52 hasVideoTiming(false) {}
52 53
53 RTPHeader::RTPHeader() 54 RTPHeader::RTPHeader()
54 : markerBit(false), 55 : markerBit(false),
55 payloadType(0), 56 payloadType(0),
56 sequenceNumber(0), 57 sequenceNumber(0),
57 timestamp(0), 58 timestamp(0),
58 ssrc(0), 59 ssrc(0),
59 numCSRCs(0), 60 numCSRCs(0),
60 arrOfCSRCs(), 61 arrOfCSRCs(),
61 paddingLength(0), 62 paddingLength(0),
(...skipping 11 matching lines...) Expand all
73 maxBitrate(0), 74 maxBitrate(0),
74 minBitrate(0), 75 minBitrate(0),
75 targetBitrate(0), 76 targetBitrate(0),
76 maxFramerate(0), 77 maxFramerate(0),
77 qpMax(0), 78 qpMax(0),
78 numberOfSimulcastStreams(0), 79 numberOfSimulcastStreams(0),
79 simulcastStream(), 80 simulcastStream(),
80 spatialLayers(), 81 spatialLayers(),
81 mode(kRealtimeVideo), 82 mode(kRealtimeVideo),
82 expect_encode_from_texture(false), 83 expect_encode_from_texture(false),
84 timingFrameTriggerThresholds({0, 0}),
83 codec_specific_() {} 85 codec_specific_() {}
84 86
85 VideoCodecVP8* VideoCodec::VP8() { 87 VideoCodecVP8* VideoCodec::VP8() {
86 RTC_DCHECK_EQ(codecType, kVideoCodecVP8); 88 RTC_DCHECK_EQ(codecType, kVideoCodecVP8);
87 return &codec_specific_.VP8; 89 return &codec_specific_.VP8;
88 } 90 }
89 91
90 const VideoCodecVP8& VideoCodec::VP8() const { 92 const VideoCodecVP8& VideoCodec::VP8() const {
91 RTC_DCHECK_EQ(codecType, kVideoCodecVP8); 93 RTC_DCHECK_EQ(codecType, kVideoCodecVP8);
92 return codec_specific_.VP8; 94 return codec_specific_.VP8;
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 // Get the sum of all the temporal layer for a specific spatial layer. 197 // Get the sum of all the temporal layer for a specific spatial layer.
196 uint32_t BitrateAllocation::GetSpatialLayerSum(size_t spatial_index) const { 198 uint32_t BitrateAllocation::GetSpatialLayerSum(size_t spatial_index) const {
197 RTC_CHECK_LT(spatial_index, kMaxSpatialLayers); 199 RTC_CHECK_LT(spatial_index, kMaxSpatialLayers);
198 uint32_t sum = 0; 200 uint32_t sum = 0;
199 for (int i = 0; i < kMaxTemporalStreams; ++i) 201 for (int i = 0; i < kMaxTemporalStreams; ++i)
200 sum += bitrates_[spatial_index][i]; 202 sum += bitrates_[spatial_index][i];
201 return sum; 203 return sum;
202 } 204 }
203 205
204 } // namespace webrtc 206 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698