| 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 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 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 kMaxIpPacketSize = 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 CastInitializationStatus { |
| 33 STATUS_AUDIO_UNINITIALIZED, |
| 34 STATUS_VIDEO_UNINITIALIZED, |
| 35 STATUS_AUDIO_INITIALIZED, |
| 36 STATUS_VIDEO_INITIALIZED, |
| 37 STATUS_INVALID_CAST_ENVIRONMENT, |
| 38 STATUS_INVALID_CRYPTO_CONFIGURATION, |
| 39 STATUS_UNSUPPORTED_AUDIO_CODEC, |
| 40 STATUS_INVALID_AUDIO_CONFIGURATION, |
| 41 STATUS_INVALID_VIDEO_CONFIGURATION, |
| 42 STATUS_GPU_ACCELERATION_NOT_SUPPORTED, |
| 43 STATUS_GPU_ACCELERATION_ERROR, |
| 44 }; |
| 45 |
| 32 enum DefaultSettings { | 46 enum DefaultSettings { |
| 33 kDefaultAudioEncoderBitrate = 0, // This means "auto," and may mean VBR. | 47 kDefaultAudioEncoderBitrate = 0, // This means "auto," and may mean VBR. |
| 34 kDefaultAudioSamplingRate = 48000, | 48 kDefaultAudioSamplingRate = 48000, |
| 35 kDefaultMaxQp = 56, | 49 kDefaultMaxQp = 56, |
| 36 kDefaultMinQp = 4, | 50 kDefaultMinQp = 4, |
| 37 kDefaultMaxFrameRate = 30, | 51 kDefaultMaxFrameRate = 30, |
| 38 kDefaultNumberOfVideoBuffers = 1, | 52 kDefaultNumberOfVideoBuffers = 1, |
| 39 kDefaultRtcpIntervalMs = 500, | 53 kDefaultRtcpIntervalMs = 500, |
| 40 kDefaultRtpHistoryMs = 1000, | 54 kDefaultRtpHistoryMs = 1000, |
| 41 kDefaultRtpMaxDelayMs = 100, | 55 kDefaultRtpMaxDelayMs = 100, |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 base::TimeTicks zero_time; | 163 base::TimeTicks zero_time; |
| 150 base::TimeDelta recorded_delta = time_ticks - zero_time; | 164 base::TimeDelta recorded_delta = time_ticks - zero_time; |
| 151 // Timestamp is in 90 KHz for video. | 165 // Timestamp is in 90 KHz for video. |
| 152 return static_cast<uint32>(recorded_delta.InMilliseconds() * 90); | 166 return static_cast<uint32>(recorded_delta.InMilliseconds() * 90); |
| 153 } | 167 } |
| 154 | 168 |
| 155 } // namespace cast | 169 } // namespace cast |
| 156 } // namespace media | 170 } // namespace media |
| 157 | 171 |
| 158 #endif // MEDIA_CAST_CAST_DEFINES_H_ | 172 #endif // MEDIA_CAST_CAST_DEFINES_H_ |
| OLD | NEW |