| 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 |
| 11 #ifndef WEBRTC_MEDIA_BASE_FAKEMEDIAENGINE_H_ | 11 #ifndef WEBRTC_MEDIA_BASE_FAKEMEDIAENGINE_H_ |
| 12 #define WEBRTC_MEDIA_BASE_FAKEMEDIAENGINE_H_ | 12 #define WEBRTC_MEDIA_BASE_FAKEMEDIAENGINE_H_ |
| 13 | 13 |
| 14 #include <list> | 14 #include <list> |
| 15 #include <map> | 15 #include <map> |
| 16 #include <memory> | 16 #include <memory> |
| 17 #include <set> | 17 #include <set> |
| 18 #include <string> | 18 #include <string> |
| 19 #include <vector> | 19 #include <vector> |
| 20 | 20 |
| 21 #include "webrtc/audio_sink.h" | 21 #include "webrtc/audio_sink.h" |
| 22 #include "webrtc/base/copyonwritebuffer.h" | 22 #include "webrtc/base/copyonwritebuffer.h" |
| 23 #include "webrtc/base/networkroute.h" |
| 23 #include "webrtc/base/stringutils.h" | 24 #include "webrtc/base/stringutils.h" |
| 24 #include "webrtc/media/base/audiosource.h" | 25 #include "webrtc/media/base/audiosource.h" |
| 25 #include "webrtc/media/base/mediaengine.h" | 26 #include "webrtc/media/base/mediaengine.h" |
| 26 #include "webrtc/media/base/rtputils.h" | 27 #include "webrtc/media/base/rtputils.h" |
| 27 #include "webrtc/media/base/streamparams.h" | 28 #include "webrtc/media/base/streamparams.h" |
| 28 #include "webrtc/p2p/base/sessiondescription.h" | 29 #include "webrtc/p2p/base/sessiondescription.h" |
| 29 | 30 |
| 30 namespace cricket { | 31 namespace cricket { |
| 31 | 32 |
| 32 class FakeMediaEngine; | 33 class FakeMediaEngine; |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 const rtc::PacketTime& packet_time) { | 210 const rtc::PacketTime& packet_time) { |
| 210 rtp_packets_.push_back(std::string(packet->data<char>(), packet->size())); | 211 rtp_packets_.push_back(std::string(packet->data<char>(), packet->size())); |
| 211 } | 212 } |
| 212 virtual void OnRtcpReceived(rtc::CopyOnWriteBuffer* packet, | 213 virtual void OnRtcpReceived(rtc::CopyOnWriteBuffer* packet, |
| 213 const rtc::PacketTime& packet_time) { | 214 const rtc::PacketTime& packet_time) { |
| 214 rtcp_packets_.push_back(std::string(packet->data<char>(), packet->size())); | 215 rtcp_packets_.push_back(std::string(packet->data<char>(), packet->size())); |
| 215 } | 216 } |
| 216 virtual void OnReadyToSend(bool ready) { | 217 virtual void OnReadyToSend(bool ready) { |
| 217 ready_to_send_ = ready; | 218 ready_to_send_ = ready; |
| 218 } | 219 } |
| 220 virtual void OnNetworkRouteChanged(const std::string& transport_name, |
| 221 const NetworkRoute& network_route) {} |
| 219 bool fail_set_send_codecs() const { return fail_set_send_codecs_; } | 222 bool fail_set_send_codecs() const { return fail_set_send_codecs_; } |
| 220 bool fail_set_recv_codecs() const { return fail_set_recv_codecs_; } | 223 bool fail_set_recv_codecs() const { return fail_set_recv_codecs_; } |
| 221 | 224 |
| 222 private: | 225 private: |
| 223 bool sending_; | 226 bool sending_; |
| 224 bool playout_; | 227 bool playout_; |
| 225 std::vector<RtpHeaderExtension> recv_extensions_; | 228 std::vector<RtpHeaderExtension> recv_extensions_; |
| 226 std::vector<RtpHeaderExtension> send_extensions_; | 229 std::vector<RtpHeaderExtension> send_extensions_; |
| 227 std::list<std::string> rtp_packets_; | 230 std::list<std::string> rtp_packets_; |
| 228 std::list<std::string> rtcp_packets_; | 231 std::list<std::string> rtcp_packets_; |
| (...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 892 | 895 |
| 893 private: | 896 private: |
| 894 std::vector<FakeDataMediaChannel*> channels_; | 897 std::vector<FakeDataMediaChannel*> channels_; |
| 895 std::vector<DataCodec> data_codecs_; | 898 std::vector<DataCodec> data_codecs_; |
| 896 DataChannelType last_channel_type_; | 899 DataChannelType last_channel_type_; |
| 897 }; | 900 }; |
| 898 | 901 |
| 899 } // namespace cricket | 902 } // namespace cricket |
| 900 | 903 |
| 901 #endif // WEBRTC_MEDIA_BASE_FAKEMEDIAENGINE_H_ | 904 #endif // WEBRTC_MEDIA_BASE_FAKEMEDIAENGINE_H_ |
| OLD | NEW |