| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 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_EXAMPLES_PEERCONNECTION_CLIENT_CONDUCTOR_H_ | 11 #ifndef WEBRTC_EXAMPLES_PEERCONNECTION_CLIENT_CONDUCTOR_H_ |
| 12 #define WEBRTC_EXAMPLES_PEERCONNECTION_CLIENT_CONDUCTOR_H_ | 12 #define WEBRTC_EXAMPLES_PEERCONNECTION_CLIENT_CONDUCTOR_H_ |
| 13 #pragma once | 13 #pragma once |
| 14 | 14 |
| 15 #include <deque> | 15 #include <deque> |
| 16 #include <map> | 16 #include <map> |
| 17 #include <memory> |
| 17 #include <set> | 18 #include <set> |
| 18 #include <string> | 19 #include <string> |
| 19 | 20 |
| 20 #include "webrtc/api/mediastreaminterface.h" | 21 #include "webrtc/api/mediastreaminterface.h" |
| 21 #include "webrtc/api/peerconnectioninterface.h" | 22 #include "webrtc/api/peerconnectioninterface.h" |
| 22 #include "webrtc/examples/peerconnection/client/main_wnd.h" | 23 #include "webrtc/examples/peerconnection/client/main_wnd.h" |
| 23 #include "webrtc/examples/peerconnection/client/peer_connection_client.h" | 24 #include "webrtc/examples/peerconnection/client/peer_connection_client.h" |
| 24 | 25 |
| 25 namespace webrtc { | 26 namespace webrtc { |
| 26 class VideoCaptureModule; | 27 class VideoCaptureModule; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 51 virtual void Close(); | 52 virtual void Close(); |
| 52 | 53 |
| 53 protected: | 54 protected: |
| 54 ~Conductor(); | 55 ~Conductor(); |
| 55 bool InitializePeerConnection(); | 56 bool InitializePeerConnection(); |
| 56 bool ReinitializePeerConnectionForLoopback(); | 57 bool ReinitializePeerConnectionForLoopback(); |
| 57 bool CreatePeerConnection(bool dtls); | 58 bool CreatePeerConnection(bool dtls); |
| 58 void DeletePeerConnection(); | 59 void DeletePeerConnection(); |
| 59 void EnsureStreamingUI(); | 60 void EnsureStreamingUI(); |
| 60 void AddStreams(); | 61 void AddStreams(); |
| 61 cricket::VideoCapturer* OpenVideoCaptureDevice(); | 62 std::unique_ptr<cricket::VideoCapturer> OpenVideoCaptureDevice(); |
| 62 | 63 |
| 63 // | 64 // |
| 64 // PeerConnectionObserver implementation. | 65 // PeerConnectionObserver implementation. |
| 65 // | 66 // |
| 66 | 67 |
| 67 void OnSignalingChange( | 68 void OnSignalingChange( |
| 68 webrtc::PeerConnectionInterface::SignalingState new_state) override{}; | 69 webrtc::PeerConnectionInterface::SignalingState new_state) override{}; |
| 69 void OnAddStream( | 70 void OnAddStream( |
| 70 rtc::scoped_refptr<webrtc::MediaStreamInterface> stream) override; | 71 rtc::scoped_refptr<webrtc::MediaStreamInterface> stream) override; |
| 71 void OnRemoveStream( | 72 void OnRemoveStream( |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 peer_connection_factory_; | 128 peer_connection_factory_; |
| 128 PeerConnectionClient* client_; | 129 PeerConnectionClient* client_; |
| 129 MainWindow* main_wnd_; | 130 MainWindow* main_wnd_; |
| 130 std::deque<std::string*> pending_messages_; | 131 std::deque<std::string*> pending_messages_; |
| 131 std::map<std::string, rtc::scoped_refptr<webrtc::MediaStreamInterface> > | 132 std::map<std::string, rtc::scoped_refptr<webrtc::MediaStreamInterface> > |
| 132 active_streams_; | 133 active_streams_; |
| 133 std::string server_; | 134 std::string server_; |
| 134 }; | 135 }; |
| 135 | 136 |
| 136 #endif // WEBRTC_EXAMPLES_PEERCONNECTION_CLIENT_CONDUCTOR_H_ | 137 #endif // WEBRTC_EXAMPLES_PEERCONNECTION_CLIENT_CONDUCTOR_H_ |
| OLD | NEW |