| 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 |
| 11 #ifndef WEBRTC_MEDIA_BASE_HYBRIDDATAENGINE_H_ | 11 #ifndef WEBRTC_MEDIA_BASE_HYBRIDDATAENGINE_H_ |
| 12 #define WEBRTC_MEDIA_BASE_HYBRIDDATAENGINE_H_ | 12 #define WEBRTC_MEDIA_BASE_HYBRIDDATAENGINE_H_ |
| 13 | 13 |
| 14 #include <memory> |
| 14 #include <string> | 15 #include <string> |
| 15 #include <vector> | 16 #include <vector> |
| 16 | 17 |
| 17 #include "webrtc/base/scoped_ptr.h" | |
| 18 #include "webrtc/media/base/codec.h" | 18 #include "webrtc/media/base/codec.h" |
| 19 #include "webrtc/media/base/mediachannel.h" | 19 #include "webrtc/media/base/mediachannel.h" |
| 20 #include "webrtc/media/base/mediaengine.h" | 20 #include "webrtc/media/base/mediaengine.h" |
| 21 | 21 |
| 22 namespace cricket { | 22 namespace cricket { |
| 23 | 23 |
| 24 class HybridDataEngine : public DataEngineInterface { | 24 class HybridDataEngine : public DataEngineInterface { |
| 25 public: | 25 public: |
| 26 // Takes ownership. | 26 // Takes ownership. |
| 27 HybridDataEngine(DataEngineInterface* first, | 27 HybridDataEngine(DataEngineInterface* first, |
| (...skipping 14 matching lines...) Expand all Loading... |
| 42 } | 42 } |
| 43 if (!channel && second_) { | 43 if (!channel && second_) { |
| 44 channel = second_->CreateChannel(data_channel_type); | 44 channel = second_->CreateChannel(data_channel_type); |
| 45 } | 45 } |
| 46 return channel; | 46 return channel; |
| 47 } | 47 } |
| 48 | 48 |
| 49 virtual const std::vector<DataCodec>& data_codecs() { return codecs_; } | 49 virtual const std::vector<DataCodec>& data_codecs() { return codecs_; } |
| 50 | 50 |
| 51 private: | 51 private: |
| 52 rtc::scoped_ptr<DataEngineInterface> first_; | 52 std::unique_ptr<DataEngineInterface> first_; |
| 53 rtc::scoped_ptr<DataEngineInterface> second_; | 53 std::unique_ptr<DataEngineInterface> second_; |
| 54 std::vector<DataCodec> codecs_; | 54 std::vector<DataCodec> codecs_; |
| 55 }; | 55 }; |
| 56 | 56 |
| 57 } // namespace cricket | 57 } // namespace cricket |
| 58 | 58 |
| 59 #endif // WEBRTC_MEDIA_BASE_HYBRIDDATAENGINE_H_ | 59 #endif // WEBRTC_MEDIA_BASE_HYBRIDDATAENGINE_H_ |
| OLD | NEW |