| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2004 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 sendbuf_size_ = option; | 153 sendbuf_size_ = option; |
| 154 } else if (opt == rtc::Socket::OPT_RCVBUF) { | 154 } else if (opt == rtc::Socket::OPT_RCVBUF) { |
| 155 recvbuf_size_ = option; | 155 recvbuf_size_ = option; |
| 156 } else if (opt == rtc::Socket::OPT_DSCP) { | 156 } else if (opt == rtc::Socket::OPT_DSCP) { |
| 157 dscp_ = static_cast<rtc::DiffServCodePoint>(option); | 157 dscp_ = static_cast<rtc::DiffServCodePoint>(option); |
| 158 } | 158 } |
| 159 return 0; | 159 return 0; |
| 160 } | 160 } |
| 161 | 161 |
| 162 void PostMessage(int id, const rtc::CopyOnWriteBuffer& packet) { | 162 void PostMessage(int id, const rtc::CopyOnWriteBuffer& packet) { |
| 163 thread_->Post(this, id, rtc::WrapMessageData(packet)); | 163 thread_->Post(RTC_FROM_HERE, this, id, rtc::WrapMessageData(packet)); |
| 164 } | 164 } |
| 165 | 165 |
| 166 virtual void OnMessage(rtc::Message* msg) { | 166 virtual void OnMessage(rtc::Message* msg) { |
| 167 rtc::TypedMessageData<rtc::CopyOnWriteBuffer>* msg_data = | 167 rtc::TypedMessageData<rtc::CopyOnWriteBuffer>* msg_data = |
| 168 static_cast<rtc::TypedMessageData<rtc::CopyOnWriteBuffer>*>( | 168 static_cast<rtc::TypedMessageData<rtc::CopyOnWriteBuffer>*>( |
| 169 msg->pdata); | 169 msg->pdata); |
| 170 if (dest_) { | 170 if (dest_) { |
| 171 if (msg->message_id == ST_RTP) { | 171 if (msg->message_id == ST_RTP) { |
| 172 dest_->OnPacketReceived(&msg_data->data(), | 172 dest_->OnPacketReceived(&msg_data->data(), |
| 173 rtc::CreatePacketTime(0)); | 173 rtc::CreatePacketTime(0)); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 std::vector<rtc::CopyOnWriteBuffer> rtp_packets_; | 218 std::vector<rtc::CopyOnWriteBuffer> rtp_packets_; |
| 219 std::vector<rtc::CopyOnWriteBuffer> rtcp_packets_; | 219 std::vector<rtc::CopyOnWriteBuffer> rtcp_packets_; |
| 220 int sendbuf_size_; | 220 int sendbuf_size_; |
| 221 int recvbuf_size_; | 221 int recvbuf_size_; |
| 222 rtc::DiffServCodePoint dscp_; | 222 rtc::DiffServCodePoint dscp_; |
| 223 }; | 223 }; |
| 224 | 224 |
| 225 } // namespace cricket | 225 } // namespace cricket |
| 226 | 226 |
| 227 #endif // WEBRTC_MEDIA_BASE_FAKENETWORKINTERFACE_H_ | 227 #endif // WEBRTC_MEDIA_BASE_FAKENETWORKINTERFACE_H_ |
| OLD | NEW |