Harald Alvestrand | 25adc8e | 2022-05-03 13:44:34 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2004 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 | |
| 11 | #ifndef PC_CHANNEL_FACTORY_INTERFACE_H_ |
| 12 | #define PC_CHANNEL_FACTORY_INTERFACE_H_ |
| 13 | |
| 14 | #include <memory> |
| 15 | #include <string> |
| 16 | |
| 17 | #include "api/audio_options.h" |
| 18 | #include "api/crypto/crypto_options.h" |
| 19 | #include "api/video/video_bitrate_allocator_factory.h" |
| 20 | #include "call/call.h" |
| 21 | #include "media/base/media_channel.h" |
| 22 | #include "media/base/media_config.h" |
| 23 | |
| 24 | namespace cricket { |
| 25 | |
| 26 | class VideoChannel; |
| 27 | class VoiceChannel; |
| 28 | |
| 29 | class ChannelFactoryInterface { |
| 30 | public: |
| 31 | virtual std::unique_ptr<VideoChannel> CreateVideoChannel( |
| 32 | webrtc::Call* call, |
| 33 | const MediaConfig& media_config, |
Harald Alvestrand | 8f42992 | 2022-05-04 10:32:30 +0000 | [diff] [blame] | 34 | absl::string_view mid, |
Harald Alvestrand | 25adc8e | 2022-05-03 13:44:34 +0000 | [diff] [blame] | 35 | bool srtp_required, |
| 36 | const webrtc::CryptoOptions& crypto_options, |
| 37 | const VideoOptions& options, |
| 38 | webrtc::VideoBitrateAllocatorFactory* |
| 39 | video_bitrate_allocator_factory) = 0; |
| 40 | |
| 41 | virtual std::unique_ptr<VoiceChannel> CreateVoiceChannel( |
| 42 | webrtc::Call* call, |
| 43 | const MediaConfig& media_config, |
Harald Alvestrand | 8f42992 | 2022-05-04 10:32:30 +0000 | [diff] [blame] | 44 | absl::string_view mid, |
Harald Alvestrand | 25adc8e | 2022-05-03 13:44:34 +0000 | [diff] [blame] | 45 | bool srtp_required, |
| 46 | const webrtc::CryptoOptions& crypto_options, |
| 47 | const AudioOptions& options) = 0; |
| 48 | |
| 49 | protected: |
| 50 | virtual ~ChannelFactoryInterface() = default; |
| 51 | }; |
| 52 | |
| 53 | } // namespace cricket |
| 54 | |
| 55 | #endif // PC_CHANNEL_FACTORY_INTERFACE_H_ |