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 <map> | 10 #include <map> |
11 #include <set> | 11 #include <set> |
12 | 12 |
13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
14 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
15 #include "base/logging.h" | 15 #include "base/logging.h" |
16 #include "base/time/time.h" | 16 #include "base/time/time.h" |
17 #include "media/cast/net/cast_transport_config.h" | 17 #include "media/cast/net/cast_transport_config.h" |
18 | 18 |
19 namespace media { | 19 namespace media { |
20 namespace cast { | 20 namespace cast { |
21 | 21 |
22 const int64 kDontShowTimeoutMs = 33; | 22 const int64 kDontShowTimeoutMs = 33; |
23 const float kDefaultCongestionControlBackOff = 0.875f; | 23 const float kDefaultCongestionControlBackOff = 0.875f; |
24 const uint32 kVideoFrequency = 90000; | 24 const uint32 kVideoFrequency = 90000; |
25 const uint32 kStartFrameId = UINT32_C(0xffffffff); | 25 const uint32 kStartFrameId = UINT32_C(0xffffffff); |
26 | 26 |
27 // 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 |
28 // implementation must retain in order to process the acknowledgements of past | 28 // implementation must retain in order to process the acknowledgements of past |
29 // frames. | 29 // frames. |
30 const int kMaxUnackedFrames = 60; | 30 // This value is carefully choosen such that it fits in the 8-bits range for |
| 31 // frame IDs. It is also less than half of the full 8-bits range such that we |
| 32 // can handle wrap around and compare two frame IDs. |
| 33 const int kMaxUnackedFrames = 120; |
31 | 34 |
32 const int kStartRttMs = 20; | 35 const int kStartRttMs = 20; |
33 const int64 kCastMessageUpdateIntervalMs = 33; | 36 const int64 kCastMessageUpdateIntervalMs = 33; |
34 const int64 kNackRepeatIntervalMs = 30; | 37 const int64 kNackRepeatIntervalMs = 30; |
35 | 38 |
36 enum CastInitializationStatus { | 39 enum CastInitializationStatus { |
37 STATUS_AUDIO_UNINITIALIZED, | 40 STATUS_AUDIO_UNINITIALIZED, |
38 STATUS_VIDEO_UNINITIALIZED, | 41 STATUS_VIDEO_UNINITIALIZED, |
39 STATUS_AUDIO_INITIALIZED, | 42 STATUS_AUDIO_INITIALIZED, |
40 STATUS_VIDEO_INITIALIZED, | 43 STATUS_VIDEO_INITIALIZED, |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 | 192 |
190 inline base::TimeDelta RtpDeltaToTimeDelta(int64 rtp_delta, int rtp_timebase) { | 193 inline base::TimeDelta RtpDeltaToTimeDelta(int64 rtp_delta, int rtp_timebase) { |
191 DCHECK_GT(rtp_timebase, 0); | 194 DCHECK_GT(rtp_timebase, 0); |
192 return rtp_delta * base::TimeDelta::FromSeconds(1) / rtp_timebase; | 195 return rtp_delta * base::TimeDelta::FromSeconds(1) / rtp_timebase; |
193 } | 196 } |
194 | 197 |
195 } // namespace cast | 198 } // namespace cast |
196 } // namespace media | 199 } // namespace media |
197 | 200 |
198 #endif // MEDIA_CAST_CAST_DEFINES_H_ | 201 #endif // MEDIA_CAST_CAST_DEFINES_H_ |
OLD | NEW |