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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <cmath> | 10 #include <cmath> |
11 #include <map> | 11 #include <map> |
12 #include <set> | 12 #include <set> |
13 | 13 |
14 #include "base/basictypes.h" | 14 #include "base/basictypes.h" |
15 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
16 #include "base/logging.h" | 16 #include "base/logging.h" |
17 #include "base/time/time.h" | 17 #include "base/time/time.h" |
18 #include "media/cast/net/cast_transport_config.h" | 18 #include "media/cast/net/cast_transport_config.h" |
19 | 19 |
20 namespace media { | 20 namespace media { |
21 namespace cast { | 21 namespace cast { |
22 | 22 |
23 const int64 kDontShowTimeoutMs = 33; | |
24 const float kDefaultCongestionControlBackOff = 0.875f; | |
25 const uint32 kVideoFrequency = 90000; | 23 const uint32 kVideoFrequency = 90000; |
| 24 const int kMinSampleRateForEncoding = 8000; |
26 const uint32 kStartFrameId = UINT32_C(0xffffffff); | 25 const uint32 kStartFrameId = UINT32_C(0xffffffff); |
27 | 26 |
28 // This is an important system-wide constant. This limits how much history the | 27 // This is an important system-wide constant. This limits how much history the |
29 // implementation must retain in order to process the acknowledgements of past | 28 // implementation must retain in order to process the acknowledgements of past |
30 // frames. | 29 // frames. |
31 // This value is carefully choosen such that it fits in the 8-bits range for | 30 // This value is carefully choosen such that it fits in the 8-bits range for |
32 // frame IDs. It is also less than half of the full 8-bits range such that we | 31 // frame IDs. It is also less than half of the full 8-bits range such that we |
33 // can handle wrap around and compare two frame IDs. | 32 // can handle wrap around and compare two frame IDs. |
34 const int kMaxUnackedFrames = 120; | 33 const int kMaxUnackedFrames = 120; |
35 | 34 |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 | 211 |
213 inline int64 TimeDeltaToRtpDelta(base::TimeDelta delta, int rtp_timebase) { | 212 inline int64 TimeDeltaToRtpDelta(base::TimeDelta delta, int rtp_timebase) { |
214 DCHECK_GT(rtp_timebase, 0); | 213 DCHECK_GT(rtp_timebase, 0); |
215 return delta * rtp_timebase / base::TimeDelta::FromSeconds(1); | 214 return delta * rtp_timebase / base::TimeDelta::FromSeconds(1); |
216 } | 215 } |
217 | 216 |
218 } // namespace cast | 217 } // namespace cast |
219 } // namespace media | 218 } // namespace media |
220 | 219 |
221 #endif // MEDIA_CAST_CAST_DEFINES_H_ | 220 #endif // MEDIA_CAST_CAST_DEFINES_H_ |
OLD | NEW |