OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_NET_CAST_TRANSPORT_DEFINES_H_ | 5 #ifndef MEDIA_CAST_NET_CAST_TRANSPORT_DEFINES_H_ |
6 #define MEDIA_CAST_NET_CAST_TRANSPORT_DEFINES_H_ | 6 #define MEDIA_CAST_NET_CAST_TRANSPORT_DEFINES_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
11 #include <map> | 11 #include <map> |
12 #include <set> | 12 #include <set> |
13 #include <string> | 13 #include <string> |
14 #include <vector> | 14 #include <vector> |
15 | 15 |
16 #include "base/macros.h" | 16 #include "base/macros.h" |
17 #include "base/memory/ref_counted.h" | 17 #include "base/memory/ref_counted.h" |
18 #include "base/time/time.h" | 18 #include "base/time/time.h" |
19 #include "media/cast/common/frame_id.h" | 19 #include "media/cast/common/frame_id.h" |
20 | 20 |
21 namespace media { | 21 namespace media { |
22 namespace cast { | 22 namespace cast { |
23 | 23 |
24 // Enums used to indicate transport readiness state. | 24 // Enums used to indicate transport readiness state. |
25 enum CastTransportStatus { | 25 enum CastTransportStatus { |
26 TRANSPORT_AUDIO_UNINITIALIZED = 0, | 26 TRANSPORT_STREAM_UNINITIALIZED = 0, |
27 TRANSPORT_VIDEO_UNINITIALIZED, | 27 TRANSPORT_STREAM_INITIALIZED, |
28 TRANSPORT_AUDIO_INITIALIZED, | |
29 TRANSPORT_VIDEO_INITIALIZED, | |
30 TRANSPORT_INVALID_CRYPTO_CONFIG, | 28 TRANSPORT_INVALID_CRYPTO_CONFIG, |
31 TRANSPORT_SOCKET_ERROR, | 29 TRANSPORT_SOCKET_ERROR, |
32 CAST_TRANSPORT_STATUS_LAST = TRANSPORT_SOCKET_ERROR | 30 CAST_TRANSPORT_STATUS_LAST = TRANSPORT_SOCKET_ERROR |
33 }; | 31 }; |
34 | 32 |
35 // kRtcpCastAllPacketsLost is used in PacketIDSet and | 33 // kRtcpCastAllPacketsLost is used in PacketIDSet and |
36 // on the wire to mean that ALL packets for a particular | 34 // on the wire to mean that ALL packets for a particular |
37 // frame are lost. | 35 // frame are lost. |
38 const uint16_t kRtcpCastAllPacketsLost = 0xffff; | 36 const uint16_t kRtcpCastAllPacketsLost = 0xffff; |
39 | 37 |
(...skipping 10 matching lines...) Expand all Loading... |
50 using MissingFramesAndPacketsMap = std::map<FrameId, PacketIdSet>; | 48 using MissingFramesAndPacketsMap = std::map<FrameId, PacketIdSet>; |
51 | 49 |
52 using Packet = std::vector<uint8_t>; | 50 using Packet = std::vector<uint8_t>; |
53 using PacketRef = scoped_refptr<base::RefCountedData<Packet>>; | 51 using PacketRef = scoped_refptr<base::RefCountedData<Packet>>; |
54 using PacketList = std::vector<PacketRef>; | 52 using PacketList = std::vector<PacketRef>; |
55 | 53 |
56 } // namespace cast | 54 } // namespace cast |
57 } // namespace media | 55 } // namespace media |
58 | 56 |
59 #endif // MEDIA_CAST_NET_CAST_TRANSPORT_DEFINES_H_ | 57 #endif // MEDIA_CAST_NET_CAST_TRANSPORT_DEFINES_H_ |
OLD | NEW |