| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 | 99 |
| 100 // Inherit from class webrtc::Transport. | 100 // Inherit from class webrtc::Transport. |
| 101 int SendPacket(const void *data, size_t len) override; | 101 int SendPacket(const void *data, size_t len) override; |
| 102 int SendRTCPPacket(const void *data, size_t len) override; | 102 int SendRTCPPacket(const void *data, size_t len) override; |
| 103 | 103 |
| 104 private: | 104 private: |
| 105 struct Packet { | 105 struct Packet { |
| 106 enum Type { Rtp, Rtcp, } type_; | 106 enum Type { Rtp, Rtcp, } type_; |
| 107 | 107 |
| 108 Packet() : len_(0) {} | 108 Packet() : len_(0) {} |
| 109 Packet(Type type, const void* data, size_t len, uint32 time_ms) | 109 Packet(Type type, const void* data, size_t len, uint32_t time_ms) |
| 110 : type_(type), len_(len), send_time_ms_(time_ms) { | 110 : type_(type), len_(len), send_time_ms_(time_ms) { |
| 111 EXPECT_LE(len_, kMaxPacketSizeByte); | 111 EXPECT_LE(len_, kMaxPacketSizeByte); |
| 112 memcpy(data_, data, len_); | 112 memcpy(data_, data, len_); |
| 113 } | 113 } |
| 114 | 114 |
| 115 uint8_t data_[kMaxPacketSizeByte]; | 115 uint8_t data_[kMaxPacketSizeByte]; |
| 116 size_t len_; | 116 size_t len_; |
| 117 uint32 send_time_ms_; | 117 uint32_t send_time_ms_; |
| 118 }; | 118 }; |
| 119 | 119 |
| 120 static bool Run(void* transport) { | 120 static bool Run(void* transport) { |
| 121 return static_cast<ConferenceTransport*>(transport)->DispatchPackets(); | 121 return static_cast<ConferenceTransport*>(transport)->DispatchPackets(); |
| 122 } | 122 } |
| 123 | 123 |
| 124 int GetReceiverChannelForSsrc(unsigned int sender_ssrc) const; | 124 int GetReceiverChannelForSsrc(unsigned int sender_ssrc) const; |
| 125 void StorePacket(Packet::Type type, const void* data, size_t len); | 125 void StorePacket(Packet::Type type, const void* data, size_t len); |
| 126 void SendPacket(const Packet& packet); | 126 void SendPacket(const Packet& packet); |
| 127 bool DispatchPackets(); | 127 bool DispatchPackets(); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 153 webrtc::VoENetwork* remote_network_; | 153 webrtc::VoENetwork* remote_network_; |
| 154 webrtc::VoEFile* remote_file_; | 154 webrtc::VoEFile* remote_file_; |
| 155 | 155 |
| 156 LoudestFilter loudest_filter_; | 156 LoudestFilter loudest_filter_; |
| 157 | 157 |
| 158 const rtc::scoped_ptr<webrtc::RtpHeaderParser> rtp_header_parser_; | 158 const rtc::scoped_ptr<webrtc::RtpHeaderParser> rtp_header_parser_; |
| 159 }; | 159 }; |
| 160 } // namespace voetest | 160 } // namespace voetest |
| 161 | 161 |
| 162 #endif // WEBRTC_VOICE_ENGINE_TEST_AUTO_TEST_FAKES_CONFERENCE_TRANSPORT_H_ | 162 #endif // WEBRTC_VOICE_ENGINE_TEST_AUTO_TEST_FAKES_CONFERENCE_TRANSPORT_H_ |
| OLD | NEW |