OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 // 12. SctpDataMediaChannel::OnInboundPacketFromSctpToChannel(inboundpacket) | 81 // 12. SctpDataMediaChannel::OnInboundPacketFromSctpToChannel(inboundpacket) |
82 // 13. SctpDataMediaChannel::OnDataFromSctpToChannel(data) | 82 // 13. SctpDataMediaChannel::OnDataFromSctpToChannel(data) |
83 // 14. SctpDataMediaChannel::SignalDataReceived(data) | 83 // 14. SctpDataMediaChannel::SignalDataReceived(data) |
84 // [from the same thread, methods registered/connected to | 84 // [from the same thread, methods registered/connected to |
85 // SctpDataMediaChannel are called with the recieved data] | 85 // SctpDataMediaChannel are called with the recieved data] |
86 class SctpDataEngine : public DataEngineInterface, public sigslot::has_slots<> { | 86 class SctpDataEngine : public DataEngineInterface, public sigslot::has_slots<> { |
87 public: | 87 public: |
88 SctpDataEngine(); | 88 SctpDataEngine(); |
89 ~SctpDataEngine() override; | 89 ~SctpDataEngine() override; |
90 | 90 |
91 DataMediaChannel* CreateChannel(DataChannelType data_channel_type) override; | 91 DataMediaChannel* CreateChannel(DataChannelType data_channel_type, |
| 92 const MediaConfig& config) override; |
92 const std::vector<DataCodec>& data_codecs() override { return codecs_; } | 93 const std::vector<DataCodec>& data_codecs() override { return codecs_; } |
93 | 94 |
94 private: | 95 private: |
95 const std::vector<DataCodec> codecs_; | 96 const std::vector<DataCodec> codecs_; |
96 }; | 97 }; |
97 | 98 |
98 // TODO(ldixon): Make into a special type of TypedMessageData. | 99 // TODO(ldixon): Make into a special type of TypedMessageData. |
99 // Holds data to be passed on to a channel. | 100 // Holds data to be passed on to a channel. |
100 struct SctpInboundPacket; | 101 struct SctpInboundPacket; |
101 | 102 |
(...skipping 16 matching lines...) Expand all Loading... |
118 PPID_BINARY_PARTIAL = 52, | 119 PPID_BINARY_PARTIAL = 52, |
119 PPID_BINARY_LAST = 53, | 120 PPID_BINARY_LAST = 53, |
120 PPID_TEXT_PARTIAL = 54, | 121 PPID_TEXT_PARTIAL = 54, |
121 PPID_TEXT_LAST = 51 | 122 PPID_TEXT_LAST = 51 |
122 }; | 123 }; |
123 | 124 |
124 typedef std::set<uint32_t> StreamSet; | 125 typedef std::set<uint32_t> StreamSet; |
125 | 126 |
126 // Given a thread which will be used to post messages (received data) to this | 127 // Given a thread which will be used to post messages (received data) to this |
127 // SctpDataMediaChannel instance. | 128 // SctpDataMediaChannel instance. |
128 explicit SctpDataMediaChannel(rtc::Thread* thread); | 129 explicit SctpDataMediaChannel(rtc::Thread* thread, const MediaConfig& config); |
129 virtual ~SctpDataMediaChannel(); | 130 virtual ~SctpDataMediaChannel(); |
130 | 131 |
131 // When SetSend is set to true, connects. When set to false, disconnects. | 132 // When SetSend is set to true, connects. When set to false, disconnects. |
132 // Calling: "SetSend(true); SetSend(false); SetSend(true);" will connect, | 133 // Calling: "SetSend(true); SetSend(false); SetSend(true);" will connect, |
133 // disconnect, and reconnect. | 134 // disconnect, and reconnect. |
134 virtual bool SetSend(bool send); | 135 virtual bool SetSend(bool send); |
135 // Unless SetReceive(true) is called, received packets will be discarded. | 136 // Unless SetReceive(true) is called, received packets will be discarded. |
136 virtual bool SetReceive(bool receive); | 137 virtual bool SetReceive(bool receive); |
137 | 138 |
138 virtual bool SetSendParameters(const DataSendParameters& params); | 139 virtual bool SetSendParameters(const DataSendParameters& params); |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 StreamSet queued_reset_streams_; | 241 StreamSet queued_reset_streams_; |
241 StreamSet sent_reset_streams_; | 242 StreamSet sent_reset_streams_; |
242 | 243 |
243 // A static human-readable name for debugging messages. | 244 // A static human-readable name for debugging messages. |
244 const char* debug_name_; | 245 const char* debug_name_; |
245 }; | 246 }; |
246 | 247 |
247 } // namespace cricket | 248 } // namespace cricket |
248 | 249 |
249 #endif // WEBRTC_MEDIA_SCTP_SCTPDATAENGINE_H_ | 250 #endif // WEBRTC_MEDIA_SCTP_SCTPDATAENGINE_H_ |
OLD | NEW |