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 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
936 inline FakeVideoMediaChannel::~FakeVideoMediaChannel() { | 936 inline FakeVideoMediaChannel::~FakeVideoMediaChannel() { |
937 if (engine_) { | 937 if (engine_) { |
938 engine_->UnregisterChannel(this); | 938 engine_->UnregisterChannel(this); |
939 } | 939 } |
940 } | 940 } |
941 | 941 |
942 class FakeDataEngine : public DataEngineInterface { | 942 class FakeDataEngine : public DataEngineInterface { |
943 public: | 943 public: |
944 FakeDataEngine() : last_channel_type_(DCT_NONE) {} | 944 FakeDataEngine() : last_channel_type_(DCT_NONE) {} |
945 | 945 |
946 virtual DataMediaChannel* CreateChannel(DataChannelType data_channel_type) { | 946 virtual DataMediaChannel* CreateChannel(DataChannelType data_channel_type, |
| 947 const MediaConfig& config) { |
947 last_channel_type_ = data_channel_type; | 948 last_channel_type_ = data_channel_type; |
948 FakeDataMediaChannel* ch = new FakeDataMediaChannel(this, DataOptions()); | 949 FakeDataMediaChannel* ch = new FakeDataMediaChannel(this, DataOptions()); |
949 channels_.push_back(ch); | 950 channels_.push_back(ch); |
950 return ch; | 951 return ch; |
951 } | 952 } |
952 | 953 |
953 FakeDataMediaChannel* GetChannel(size_t index) { | 954 FakeDataMediaChannel* GetChannel(size_t index) { |
954 return (channels_.size() > index) ? channels_[index] : NULL; | 955 return (channels_.size() > index) ? channels_[index] : NULL; |
955 } | 956 } |
956 | 957 |
(...skipping 11 matching lines...) Expand all Loading... |
968 | 969 |
969 private: | 970 private: |
970 std::vector<FakeDataMediaChannel*> channels_; | 971 std::vector<FakeDataMediaChannel*> channels_; |
971 std::vector<DataCodec> data_codecs_; | 972 std::vector<DataCodec> data_codecs_; |
972 DataChannelType last_channel_type_; | 973 DataChannelType last_channel_type_; |
973 }; | 974 }; |
974 | 975 |
975 } // namespace cricket | 976 } // namespace cricket |
976 | 977 |
977 #endif // WEBRTC_MEDIA_BASE_FAKEMEDIAENGINE_H_ | 978 #endif // WEBRTC_MEDIA_BASE_FAKEMEDIAENGINE_H_ |
OLD | NEW |