OLD | NEW |
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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 maxBitrate(0), | 54 maxBitrate(0), |
55 minBitrate(0), | 55 minBitrate(0), |
56 targetBitrate(0), | 56 targetBitrate(0), |
57 maxFramerate(0), | 57 maxFramerate(0), |
58 qpMax(0), | 58 qpMax(0), |
59 numberOfSimulcastStreams(0), | 59 numberOfSimulcastStreams(0), |
60 simulcastStream(), | 60 simulcastStream(), |
61 spatialLayers(), | 61 spatialLayers(), |
62 mode(kRealtimeVideo), | 62 mode(kRealtimeVideo), |
63 expect_encode_from_texture(false), | 63 expect_encode_from_texture(false), |
64 codecSpecific() {} | 64 codec_specific_() {} |
65 | 65 |
66 VideoCodecVP8* VideoCodec::VP8() { | 66 VideoCodecVP8* VideoCodec::VP8() { |
67 RTC_DCHECK_EQ(codecType, kVideoCodecVP8); | 67 RTC_DCHECK_EQ(codecType, kVideoCodecVP8); |
68 return &codecSpecific.VP8; | 68 return &codec_specific_.VP8; |
69 } | 69 } |
70 | 70 |
71 const VideoCodecVP8& VideoCodec::VP8() const { | 71 const VideoCodecVP8& VideoCodec::VP8() const { |
72 RTC_DCHECK_EQ(codecType, kVideoCodecVP8); | 72 RTC_DCHECK_EQ(codecType, kVideoCodecVP8); |
73 return codecSpecific.VP8; | 73 return codec_specific_.VP8; |
74 } | 74 } |
75 | 75 |
76 VideoCodecVP9* VideoCodec::VP9() { | 76 VideoCodecVP9* VideoCodec::VP9() { |
77 RTC_DCHECK_EQ(codecType, kVideoCodecVP9); | 77 RTC_DCHECK_EQ(codecType, kVideoCodecVP9); |
78 return &codecSpecific.VP9; | 78 return &codec_specific_.VP9; |
79 } | 79 } |
80 | 80 |
81 const VideoCodecVP9& VideoCodec::VP9() const { | 81 const VideoCodecVP9& VideoCodec::VP9() const { |
82 RTC_DCHECK_EQ(codecType, kVideoCodecVP9); | 82 RTC_DCHECK_EQ(codecType, kVideoCodecVP9); |
83 return codecSpecific.VP9; | 83 return codec_specific_.VP9; |
84 } | 84 } |
85 | 85 |
86 VideoCodecH264* VideoCodec::H264() { | 86 VideoCodecH264* VideoCodec::H264() { |
87 RTC_DCHECK_EQ(codecType, kVideoCodecH264); | 87 RTC_DCHECK_EQ(codecType, kVideoCodecH264); |
88 return &codecSpecific.H264; | 88 return &codec_specific_.H264; |
89 } | 89 } |
90 | 90 |
91 const VideoCodecH264& VideoCodec::H264() const { | 91 const VideoCodecH264& VideoCodec::H264() const { |
92 RTC_DCHECK_EQ(codecType, kVideoCodecH264); | 92 RTC_DCHECK_EQ(codecType, kVideoCodecH264); |
93 return codecSpecific.H264; | 93 return codec_specific_.H264; |
94 } | 94 } |
95 | 95 |
96 static const char* kPayloadNameVp8 = "VP8"; | 96 static const char* kPayloadNameVp8 = "VP8"; |
97 static const char* kPayloadNameVp9 = "VP9"; | 97 static const char* kPayloadNameVp9 = "VP9"; |
98 static const char* kPayloadNameH264 = "H264"; | 98 static const char* kPayloadNameH264 = "H264"; |
99 static const char* kPayloadNameI420 = "I420"; | 99 static const char* kPayloadNameI420 = "I420"; |
100 static const char* kPayloadNameRED = "RED"; | 100 static const char* kPayloadNameRED = "RED"; |
101 static const char* kPayloadNameULPFEC = "ULPFEC"; | 101 static const char* kPayloadNameULPFEC = "ULPFEC"; |
102 static const char* kPayloadNameGeneric = "Generic"; | 102 static const char* kPayloadNameGeneric = "Generic"; |
103 | 103 |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 // Get the sum of all the temporal layer for a specific spatial layer. | 172 // Get the sum of all the temporal layer for a specific spatial layer. |
173 uint32_t BitrateAllocation::GetSpatialLayerSum(size_t spatial_index) const { | 173 uint32_t BitrateAllocation::GetSpatialLayerSum(size_t spatial_index) const { |
174 RTC_DCHECK_LT(spatial_index, static_cast<size_t>(kMaxSpatialLayers)); | 174 RTC_DCHECK_LT(spatial_index, static_cast<size_t>(kMaxSpatialLayers)); |
175 uint32_t sum = 0; | 175 uint32_t sum = 0; |
176 for (int i = 0; i < kMaxTemporalStreams; ++i) | 176 for (int i = 0; i < kMaxTemporalStreams; ++i) |
177 sum += bitrates_[spatial_index][i]; | 177 sum += bitrates_[spatial_index][i]; |
178 return sum; | 178 return sum; |
179 } | 179 } |
180 | 180 |
181 } // namespace webrtc | 181 } // namespace webrtc |
OLD | NEW |