peer_connection_factory_proxy.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. * Copyright 2014 The WebRTC project authors. All Rights Reserved.
  3. *
  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
  6. * tree. An additional intellectual property rights grant can be found
  7. * in the file PATENTS. All contributing project authors may
  8. * be found in the AUTHORS file in the root of the source tree.
  9. */
  10. #ifndef API_PEER_CONNECTION_FACTORY_PROXY_H_
  11. #define API_PEER_CONNECTION_FACTORY_PROXY_H_
  12. #include <memory>
  13. #include <string>
  14. #include <utility>
  15. #include "api/peer_connection_interface.h"
  16. #include "api/proxy.h"
  17. #include "rtc_base/bind.h"
  18. namespace webrtc {
  19. // TODO(deadbeef): Move this to .cc file and out of api/. What threads methods
  20. // are called on is an implementation detail.
  21. BEGIN_SIGNALING_PROXY_MAP(PeerConnectionFactory)
  22. PROXY_SIGNALING_THREAD_DESTRUCTOR()
  23. PROXY_METHOD1(void, SetOptions, const Options&)
  24. PROXY_METHOD4(rtc::scoped_refptr<PeerConnectionInterface>,
  25. CreatePeerConnection,
  26. const PeerConnectionInterface::RTCConfiguration&,
  27. std::unique_ptr<cricket::PortAllocator>,
  28. std::unique_ptr<rtc::RTCCertificateGeneratorInterface>,
  29. PeerConnectionObserver*)
  30. PROXY_METHOD2(rtc::scoped_refptr<PeerConnectionInterface>,
  31. CreatePeerConnection,
  32. const PeerConnectionInterface::RTCConfiguration&,
  33. PeerConnectionDependencies)
  34. PROXY_CONSTMETHOD1(webrtc::RtpCapabilities,
  35. GetRtpSenderCapabilities,
  36. cricket::MediaType)
  37. PROXY_CONSTMETHOD1(webrtc::RtpCapabilities,
  38. GetRtpReceiverCapabilities,
  39. cricket::MediaType)
  40. PROXY_METHOD1(rtc::scoped_refptr<MediaStreamInterface>,
  41. CreateLocalMediaStream,
  42. const std::string&)
  43. PROXY_METHOD1(rtc::scoped_refptr<AudioSourceInterface>,
  44. CreateAudioSource,
  45. const cricket::AudioOptions&)
  46. PROXY_METHOD2(rtc::scoped_refptr<VideoTrackInterface>,
  47. CreateVideoTrack,
  48. const std::string&,
  49. VideoTrackSourceInterface*)
  50. PROXY_METHOD2(rtc::scoped_refptr<AudioTrackInterface>,
  51. CreateAudioTrack,
  52. const std::string&,
  53. AudioSourceInterface*)
  54. PROXY_METHOD2(bool, StartAecDump, FILE*, int64_t)
  55. PROXY_METHOD0(void, StopAecDump)
  56. END_PROXY_MAP()
  57. } // namespace webrtc
  58. #endif // API_PEER_CONNECTION_FACTORY_PROXY_H_