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_TRANSPORT_CAST_TRANSPORT_DEFINES_H_ | 5 #ifndef MEDIA_CAST_TRANSPORT_CAST_TRANSPORT_DEFINES_H_ |
6 #define MEDIA_CAST_TRANSPORT_CAST_TRANSPORT_DEFINES_H_ | 6 #define MEDIA_CAST_TRANSPORT_CAST_TRANSPORT_DEFINES_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
14 | 14 |
15 namespace media { | 15 namespace media { |
16 namespace cast { | 16 namespace cast { |
17 namespace transport { | 17 namespace transport { |
18 | 18 |
19 // TODO(mikhal): Implement and add more types. | 19 // TODO(mikhal): Implement and add more types. |
20 enum CastTransportStatus { | 20 enum CastTransportStatus { |
21 TRANSPORT_UNINITIALIZED = 0, | 21 TRANSPORT_AUDIO_UNINITIALIZED = 0, |
22 TRANSPORT_INITIALIZED, | 22 TRANSPORT_VIDEO_UNINITIALIZED, |
| 23 TRANSPORT_AUDIO_INITIALIZED, |
| 24 TRANSPORT_VIDEO_INITIALIZED, |
23 TRANSPORT_INVALID_CRYPTO_CONFIG, | 25 TRANSPORT_INVALID_CRYPTO_CONFIG, |
24 TRANSPORT_SOCKET_ERROR, | 26 TRANSPORT_SOCKET_ERROR, |
25 CAST_TRANSPORT_STATUS_LAST = TRANSPORT_SOCKET_ERROR | 27 CAST_TRANSPORT_STATUS_LAST = TRANSPORT_SOCKET_ERROR |
26 }; | 28 }; |
27 | 29 |
28 const size_t kMaxIpPacketSize = 1500; | 30 const size_t kMaxIpPacketSize = 1500; |
29 // Each uint16 represents one packet id within a cast frame. | 31 // Each uint16 represents one packet id within a cast frame. |
30 typedef std::set<uint16> PacketIdSet; | 32 typedef std::set<uint16> PacketIdSet; |
31 // Each uint8 represents one cast frame. | 33 // Each uint8 represents one cast frame. |
32 typedef std::map<uint8, PacketIdSet> MissingFramesAndPacketsMap; | 34 typedef std::map<uint8, PacketIdSet> MissingFramesAndPacketsMap; |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 base::TimeDelta recorded_delta = time_ticks - zero_time; | 139 base::TimeDelta recorded_delta = time_ticks - zero_time; |
138 // Timestamp is in 90 KHz for video. | 140 // Timestamp is in 90 KHz for video. |
139 return static_cast<uint32>(recorded_delta.InMilliseconds() * 90); | 141 return static_cast<uint32>(recorded_delta.InMilliseconds() * 90); |
140 } | 142 } |
141 | 143 |
142 } // namespace transport | 144 } // namespace transport |
143 } // namespace cast | 145 } // namespace cast |
144 } // namespace media | 146 } // namespace media |
145 | 147 |
146 #endif // MEDIA_CAST_TRANSPORT_CAST_TRANSPORT_DEFINES_H_ | 148 #endif // MEDIA_CAST_TRANSPORT_CAST_TRANSPORT_DEFINES_H_ |
OLD | NEW |