create_peerconnection_factory.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * Copyright 2018 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_CREATE_PEERCONNECTION_FACTORY_H_
  11. #define API_CREATE_PEERCONNECTION_FACTORY_H_
  12. #include <memory>
  13. #include "api/audio/audio_mixer.h"
  14. #include "api/audio_codecs/audio_decoder_factory.h"
  15. #include "api/audio_codecs/audio_encoder_factory.h"
  16. #include "api/peer_connection_interface.h"
  17. #include "api/scoped_refptr.h"
  18. #include "api/video_codecs/video_decoder_factory.h"
  19. #include "api/video_codecs/video_encoder_factory.h"
  20. namespace rtc {
  21. // TODO(bugs.webrtc.org/9987): Move rtc::Thread to api/ or expose a better
  22. // type. At the moment, rtc::Thread is not part of api/ so it cannot be
  23. // included in order to avoid to leak internal types.
  24. class Thread;
  25. } // namespace rtc
  26. namespace webrtc {
  27. class AudioDeviceModule;
  28. class AudioProcessing;
  29. // Create a new instance of PeerConnectionFactoryInterface with optional video
  30. // codec factories. These video factories represents all video codecs, i.e. no
  31. // extra internal video codecs will be added.
  32. RTC_EXPORT rtc::scoped_refptr<PeerConnectionFactoryInterface>
  33. CreatePeerConnectionFactory(
  34. rtc::Thread* network_thread,
  35. rtc::Thread* worker_thread,
  36. rtc::Thread* signaling_thread,
  37. rtc::scoped_refptr<AudioDeviceModule> default_adm,
  38. rtc::scoped_refptr<AudioEncoderFactory> audio_encoder_factory,
  39. rtc::scoped_refptr<AudioDecoderFactory> audio_decoder_factory,
  40. std::unique_ptr<VideoEncoderFactory> video_encoder_factory,
  41. std::unique_ptr<VideoDecoderFactory> video_decoder_factory,
  42. rtc::scoped_refptr<AudioMixer> audio_mixer,
  43. rtc::scoped_refptr<AudioProcessing> audio_processing);
  44. } // namespace webrtc
  45. #endif // API_CREATE_PEERCONNECTION_FACTORY_H_