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; | 23 const int64 kDontShowTimeoutMs = 33; |
mcasas
2015/09/15 16:59:39
I think this is never used, so please remove.
(But
msu.koo
2015/09/17 07:00:50
Done.
| |
24 const float kDefaultCongestionControlBackOff = 0.875f; | 24 const float kDefaultCongestionControlBackOff = 0.875f; |
mcasas
2015/09/15 16:59:39
This is only used once in [1], suggest moving it t
msu.koo
2015/09/17 07:00:50
Done.
| |
25 const uint32 kVideoFrequency = 90000; | 25 const uint32 kVideoFrequency = 90000; |
26 const int kMinSampleRateForEncoding = 8000; | |
mcasas
2015/09/15 16:59:39
s/int/uint32_t/
I personally like writing 8000u f
miu
2015/09/15 22:05:22
The "int" is more correct, per style guide (https:
msu.koo
2015/09/17 07:00:50
Acknowledged.
| |
26 const uint32 kStartFrameId = UINT32_C(0xffffffff); | 27 const uint32 kStartFrameId = UINT32_C(0xffffffff); |
27 | 28 |
28 // This is an important system-wide constant. This limits how much history the | 29 // 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 | 30 // implementation must retain in order to process the acknowledgements of past |
30 // frames. | 31 // frames. |
31 // This value is carefully choosen such that it fits in the 8-bits range for | 32 // 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 | 33 // 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. | 34 // can handle wrap around and compare two frame IDs. |
34 const int kMaxUnackedFrames = 120; | 35 const int kMaxUnackedFrames = 120; |
35 | 36 |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
212 | 213 |
213 inline int64 TimeDeltaToRtpDelta(base::TimeDelta delta, int rtp_timebase) { | 214 inline int64 TimeDeltaToRtpDelta(base::TimeDelta delta, int rtp_timebase) { |
214 DCHECK_GT(rtp_timebase, 0); | 215 DCHECK_GT(rtp_timebase, 0); |
215 return delta * rtp_timebase / base::TimeDelta::FromSeconds(1); | 216 return delta * rtp_timebase / base::TimeDelta::FromSeconds(1); |
216 } | 217 } |
217 | 218 |
218 } // namespace cast | 219 } // namespace cast |
219 } // namespace media | 220 } // namespace media |
220 | 221 |
221 #endif // MEDIA_CAST_CAST_DEFINES_H_ | 222 #endif // MEDIA_CAST_CAST_DEFINES_H_ |
OLD | NEW |