OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MEDIA_CAST_CAST_DEFINES_H_ | 5 #ifndef MEDIA_CAST_CAST_DEFINES_H_ |
6 #define MEDIA_CAST_CAST_DEFINES_H_ | 6 #define MEDIA_CAST_CAST_DEFINES_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
15 | 15 |
16 namespace media { | 16 namespace media { |
17 namespace cast { | 17 namespace cast { |
18 | 18 |
19 const int64 kDontShowTimeoutMs = 33; | 19 const int64 kDontShowTimeoutMs = 33; |
20 const float kDefaultCongestionControlBackOff = 0.875f; | 20 const float kDefaultCongestionControlBackOff = 0.875f; |
21 const uint32 kVideoFrequency = 90000; | 21 const uint32 kVideoFrequency = 90000; |
22 const int64 kSkippedFramesCheckPeriodkMs = 10000; | 22 const int64 kSkippedFramesCheckPeriodkMs = 10000; |
23 const uint32 kStartFrameId = GG_UINT32_C(0xffffffff); | 23 const uint32 kStartFrameId = GG_UINT32_C(0xffffffff); |
24 | 24 |
25 // Number of skipped frames threshold in fps (as configured) per period above. | 25 // Number of skipped frames threshold in fps (as configured) per period above. |
26 const int kSkippedFramesThreshold = 3; | 26 const int kSkippedFramesThreshold = 3; |
27 const size_t kIpPacketSize = 1500; | 27 const size_t kMaxIpPacketSize = 1500; |
28 const int kStartRttMs = 20; | 28 const int kStartRttMs = 20; |
29 const int64 kCastMessageUpdateIntervalMs = 33; | 29 const int64 kCastMessageUpdateIntervalMs = 33; |
30 const int64 kNackRepeatIntervalMs = 30; | 30 const int64 kNackRepeatIntervalMs = 30; |
31 | 31 |
32 enum DefaultSettings { | 32 enum DefaultSettings { |
33 kDefaultAudioEncoderBitrate = 0, // This means "auto," and may mean VBR. | 33 kDefaultAudioEncoderBitrate = 0, // This means "auto," and may mean VBR. |
34 kDefaultAudioSamplingRate = 48000, | 34 kDefaultAudioSamplingRate = 48000, |
35 kDefaultMaxQp = 56, | 35 kDefaultMaxQp = 56, |
36 kDefaultMinQp = 4, | 36 kDefaultMinQp = 4, |
37 kDefaultMaxFrameRate = 30, | 37 kDefaultMaxFrameRate = 30, |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 base::TimeTicks zero_time; | 167 base::TimeTicks zero_time; |
168 base::TimeDelta recorded_delta = time_ticks - zero_time; | 168 base::TimeDelta recorded_delta = time_ticks - zero_time; |
169 // Timestamp is in 90 KHz for video. | 169 // Timestamp is in 90 KHz for video. |
170 return static_cast<uint32>(recorded_delta.InMilliseconds() * 90); | 170 return static_cast<uint32>(recorded_delta.InMilliseconds() * 90); |
171 } | 171 } |
172 | 172 |
173 } // namespace cast | 173 } // namespace cast |
174 } // namespace media | 174 } // namespace media |
175 | 175 |
176 #endif // MEDIA_CAST_CAST_DEFINES_H_ | 176 #endif // MEDIA_CAST_CAST_DEFINES_H_ |
OLD | NEW |