OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2013 Google Inc. | 3 * Copyright 2013 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 16 matching lines...) Expand all Loading... |
27 | 27 |
28 #ifndef TALK_APP_WEBRTC_TEST_PEERCONNECTIONTESTWRAPPER_H_ | 28 #ifndef TALK_APP_WEBRTC_TEST_PEERCONNECTIONTESTWRAPPER_H_ |
29 #define TALK_APP_WEBRTC_TEST_PEERCONNECTIONTESTWRAPPER_H_ | 29 #define TALK_APP_WEBRTC_TEST_PEERCONNECTIONTESTWRAPPER_H_ |
30 | 30 |
31 #include "talk/app/webrtc/peerconnectioninterface.h" | 31 #include "talk/app/webrtc/peerconnectioninterface.h" |
32 #include "talk/app/webrtc/test/fakeaudiocapturemodule.h" | 32 #include "talk/app/webrtc/test/fakeaudiocapturemodule.h" |
33 #include "talk/app/webrtc/test/fakeconstraints.h" | 33 #include "talk/app/webrtc/test/fakeconstraints.h" |
34 #include "talk/app/webrtc/test/fakevideotrackrenderer.h" | 34 #include "talk/app/webrtc/test/fakevideotrackrenderer.h" |
35 #include "webrtc/base/sigslot.h" | 35 #include "webrtc/base/sigslot.h" |
36 | 36 |
37 namespace webrtc { | |
38 class DtlsIdentityStoreInterface; | |
39 class PortAllocatorFactoryInterface; | |
40 } | |
41 | |
42 class PeerConnectionTestWrapper | 37 class PeerConnectionTestWrapper |
43 : public webrtc::PeerConnectionObserver, | 38 : public webrtc::PeerConnectionObserver, |
44 public webrtc::CreateSessionDescriptionObserver, | 39 public webrtc::CreateSessionDescriptionObserver, |
45 public sigslot::has_slots<> { | 40 public sigslot::has_slots<> { |
46 public: | 41 public: |
47 static void Connect(PeerConnectionTestWrapper* caller, | 42 static void Connect(PeerConnectionTestWrapper* caller, |
48 PeerConnectionTestWrapper* callee); | 43 PeerConnectionTestWrapper* callee); |
49 | 44 |
50 explicit PeerConnectionTestWrapper(const std::string& name); | 45 explicit PeerConnectionTestWrapper(const std::string& name); |
51 virtual ~PeerConnectionTestWrapper(); | 46 virtual ~PeerConnectionTestWrapper(); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 void SetLocalDescription(const std::string& type, const std::string& sdp); | 98 void SetLocalDescription(const std::string& type, const std::string& sdp); |
104 void SetRemoteDescription(const std::string& type, const std::string& sdp); | 99 void SetRemoteDescription(const std::string& type, const std::string& sdp); |
105 bool CheckForConnection(); | 100 bool CheckForConnection(); |
106 bool CheckForAudio(); | 101 bool CheckForAudio(); |
107 bool CheckForVideo(); | 102 bool CheckForVideo(); |
108 rtc::scoped_refptr<webrtc::MediaStreamInterface> GetUserMedia( | 103 rtc::scoped_refptr<webrtc::MediaStreamInterface> GetUserMedia( |
109 bool audio, const webrtc::FakeConstraints& audio_constraints, | 104 bool audio, const webrtc::FakeConstraints& audio_constraints, |
110 bool video, const webrtc::FakeConstraints& video_constraints); | 105 bool video, const webrtc::FakeConstraints& video_constraints); |
111 | 106 |
112 std::string name_; | 107 std::string name_; |
113 rtc::scoped_refptr<webrtc::PortAllocatorFactoryInterface> | |
114 allocator_factory_; | |
115 rtc::scoped_refptr<webrtc::PeerConnectionInterface> peer_connection_; | 108 rtc::scoped_refptr<webrtc::PeerConnectionInterface> peer_connection_; |
116 rtc::scoped_refptr<webrtc::PeerConnectionFactoryInterface> | 109 rtc::scoped_refptr<webrtc::PeerConnectionFactoryInterface> |
117 peer_connection_factory_; | 110 peer_connection_factory_; |
118 rtc::scoped_refptr<FakeAudioCaptureModule> fake_audio_capture_module_; | 111 rtc::scoped_refptr<FakeAudioCaptureModule> fake_audio_capture_module_; |
119 rtc::scoped_ptr<webrtc::FakeVideoTrackRenderer> renderer_; | 112 rtc::scoped_ptr<webrtc::FakeVideoTrackRenderer> renderer_; |
120 }; | 113 }; |
121 | 114 |
122 #endif // TALK_APP_WEBRTC_TEST_PEERCONNECTIONTESTWRAPPER_H_ | 115 #endif // TALK_APP_WEBRTC_TEST_PEERCONNECTIONTESTWRAPPER_H_ |
OLD | NEW |