Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(157)

Side by Side Diff: talk/app/webrtc/peerconnectionfactoryproxy.h

Issue 1520963002: Removing webrtc::PortAllocatorFactoryInterface. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixing patch conflicts Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2014 Google Inc. 3 * Copyright 2014 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 26 matching lines...) Expand all
37 37
38 namespace webrtc { 38 namespace webrtc {
39 39
40 BEGIN_PROXY_MAP(PeerConnectionFactory) 40 BEGIN_PROXY_MAP(PeerConnectionFactory)
41 PROXY_METHOD1(void, SetOptions, const Options&) 41 PROXY_METHOD1(void, SetOptions, const Options&)
42 // Can't use PROXY_METHOD5 because scoped_ptr must be moved. 42 // Can't use PROXY_METHOD5 because scoped_ptr must be moved.
43 // TODO(tommi,hbos): Use of templates to support scoped_ptr? 43 // TODO(tommi,hbos): Use of templates to support scoped_ptr?
44 rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection( 44 rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection(
45 const PeerConnectionInterface::RTCConfiguration& a1, 45 const PeerConnectionInterface::RTCConfiguration& a1,
46 const MediaConstraintsInterface* a2, 46 const MediaConstraintsInterface* a2,
47 PortAllocatorFactoryInterface* a3,
48 rtc::scoped_ptr<DtlsIdentityStoreInterface> a4,
49 PeerConnectionObserver* a5) override {
50 return owner_thread_->Invoke<rtc::scoped_refptr<PeerConnectionInterface>>(
51 rtc::Bind(&PeerConnectionFactoryProxy::CreatePeerConnection_ot1, this,
52 a1, a2, a3, a4.release(), a5));
53 }
54 rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection(
55 const PeerConnectionInterface::RTCConfiguration& a1,
56 const MediaConstraintsInterface* a2,
57 rtc::scoped_ptr<cricket::PortAllocator> a3, 47 rtc::scoped_ptr<cricket::PortAllocator> a3,
58 rtc::scoped_ptr<DtlsIdentityStoreInterface> a4, 48 rtc::scoped_ptr<DtlsIdentityStoreInterface> a4,
59 PeerConnectionObserver* a5) override { 49 PeerConnectionObserver* a5) override {
60 return owner_thread_->Invoke<rtc::scoped_refptr<PeerConnectionInterface>>( 50 return owner_thread_->Invoke<rtc::scoped_refptr<PeerConnectionInterface>>(
61 rtc::Bind(&PeerConnectionFactoryProxy::CreatePeerConnection_ot2, this, 51 rtc::Bind(&PeerConnectionFactoryProxy::CreatePeerConnection_ot, this,
62 a1, a2, a3.release(), a4.release(), a5)); 52 a1, a2, a3.release(), a4.release(), a5));
63 } 53 }
64 PROXY_METHOD1(rtc::scoped_refptr<MediaStreamInterface>, 54 PROXY_METHOD1(rtc::scoped_refptr<MediaStreamInterface>,
65 CreateLocalMediaStream, const std::string&) 55 CreateLocalMediaStream, const std::string&)
66 PROXY_METHOD1(rtc::scoped_refptr<AudioSourceInterface>, 56 PROXY_METHOD1(rtc::scoped_refptr<AudioSourceInterface>,
67 CreateAudioSource, const MediaConstraintsInterface*) 57 CreateAudioSource, const MediaConstraintsInterface*)
68 PROXY_METHOD2(rtc::scoped_refptr<VideoSourceInterface>, 58 PROXY_METHOD2(rtc::scoped_refptr<VideoSourceInterface>,
69 CreateVideoSource, cricket::VideoCapturer*, 59 CreateVideoSource, cricket::VideoCapturer*,
70 const MediaConstraintsInterface*) 60 const MediaConstraintsInterface*)
71 PROXY_METHOD2(rtc::scoped_refptr<VideoTrackInterface>, 61 PROXY_METHOD2(rtc::scoped_refptr<VideoTrackInterface>,
72 CreateVideoTrack, const std::string&, VideoSourceInterface*) 62 CreateVideoTrack, const std::string&, VideoSourceInterface*)
73 PROXY_METHOD2(rtc::scoped_refptr<AudioTrackInterface>, 63 PROXY_METHOD2(rtc::scoped_refptr<AudioTrackInterface>,
74 CreateAudioTrack, const std::string&, AudioSourceInterface*) 64 CreateAudioTrack, const std::string&, AudioSourceInterface*)
75 PROXY_METHOD1(bool, StartAecDump, rtc::PlatformFile) 65 PROXY_METHOD1(bool, StartAecDump, rtc::PlatformFile)
76 PROXY_METHOD0(void, StopAecDump) 66 PROXY_METHOD0(void, StopAecDump)
77 PROXY_METHOD1(bool, StartRtcEventLog, rtc::PlatformFile) 67 PROXY_METHOD1(bool, StartRtcEventLog, rtc::PlatformFile)
78 PROXY_METHOD0(void, StopRtcEventLog) 68 PROXY_METHOD0(void, StopRtcEventLog)
79 69
80 private: 70 private:
81 rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection_ot1( 71 rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection_ot(
82 const PeerConnectionInterface::RTCConfiguration& a1,
83 const MediaConstraintsInterface* a2,
84 PortAllocatorFactoryInterface* a3,
85 DtlsIdentityStoreInterface* a4,
86 PeerConnectionObserver* a5) {
87 rtc::scoped_ptr<DtlsIdentityStoreInterface> ptr_a4(a4);
88 return c_->CreatePeerConnection(a1, a2, a3, std::move(ptr_a4), a5);
89 }
90
91 rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection_ot2(
92 const PeerConnectionInterface::RTCConfiguration& a1, 72 const PeerConnectionInterface::RTCConfiguration& a1,
93 const MediaConstraintsInterface* a2, 73 const MediaConstraintsInterface* a2,
94 cricket::PortAllocator* a3, 74 cricket::PortAllocator* a3,
95 DtlsIdentityStoreInterface* a4, 75 DtlsIdentityStoreInterface* a4,
96 PeerConnectionObserver* a5) { 76 PeerConnectionObserver* a5) {
97 rtc::scoped_ptr<cricket::PortAllocator> ptr_a3(a3); 77 rtc::scoped_ptr<cricket::PortAllocator> ptr_a3(a3);
98 rtc::scoped_ptr<DtlsIdentityStoreInterface> ptr_a4(a4); 78 rtc::scoped_ptr<DtlsIdentityStoreInterface> ptr_a4(a4);
99 return c_->CreatePeerConnection(a1, a2, std::move(ptr_a3), 79 return c_->CreatePeerConnection(a1, a2, std::move(ptr_a3),
100 std::move(ptr_a4), a5); 80 std::move(ptr_a4), a5);
101 } 81 }
102 END_PROXY() 82 END_PROXY()
103 83
104 } // namespace webrtc 84 } // namespace webrtc
105 85
106 #endif // TALK_APP_WEBRTC_PEERCONNECTIONFACTORYPROXY_H_ 86 #endif // TALK_APP_WEBRTC_PEERCONNECTIONFACTORYPROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698