| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2004 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 VideoChannel* CreateVideoChannel( | 103 VideoChannel* CreateVideoChannel( |
| 104 webrtc::MediaControllerInterface* media_controller, | 104 webrtc::MediaControllerInterface* media_controller, |
| 105 TransportController* transport_controller, | 105 TransportController* transport_controller, |
| 106 const std::string& content_name, | 106 const std::string& content_name, |
| 107 const std::string* bundle_transport_name, | 107 const std::string* bundle_transport_name, |
| 108 bool rtcp, | 108 bool rtcp, |
| 109 bool srtp_required, | 109 bool srtp_required, |
| 110 const VideoOptions& options); | 110 const VideoOptions& options); |
| 111 // Destroys a video channel created with the Create API. | 111 // Destroys a video channel created with the Create API. |
| 112 void DestroyVideoChannel(VideoChannel* video_channel); | 112 void DestroyVideoChannel(VideoChannel* video_channel); |
| 113 RtpDataChannel* CreateRtpDataChannel( | 113 DataChannel* CreateDataChannel( |
| 114 webrtc::MediaControllerInterface* media_controller, | 114 webrtc::MediaControllerInterface* media_controller, |
| 115 TransportController* transport_controller, | 115 TransportController* transport_controller, |
| 116 const std::string& content_name, | 116 const std::string& content_name, |
| 117 const std::string* bundle_transport_name, | 117 const std::string* bundle_transport_name, |
| 118 bool rtcp, | 118 bool rtcp, |
| 119 bool srtp_required); | 119 bool srtp_required, |
| 120 DataChannelType data_channel_type); |
| 120 // Destroys a data channel created with the Create API. | 121 // Destroys a data channel created with the Create API. |
| 121 void DestroyRtpDataChannel(RtpDataChannel* data_channel); | 122 void DestroyDataChannel(DataChannel* data_channel); |
| 122 | 123 |
| 123 // Indicates whether any channels exist. | 124 // Indicates whether any channels exist. |
| 124 bool has_channels() const { | 125 bool has_channels() const { |
| 125 return (!voice_channels_.empty() || !video_channels_.empty()); | 126 return (!voice_channels_.empty() || !video_channels_.empty()); |
| 126 } | 127 } |
| 127 | 128 |
| 128 // RTX will be enabled/disabled in engines that support it. The supporting | 129 // RTX will be enabled/disabled in engines that support it. The supporting |
| 129 // engines will start offering an RTX codec. Must be called before Init(). | 130 // engines will start offering an RTX codec. Must be called before Init(). |
| 130 bool SetVideoRtxEnabled(bool enable); | 131 bool SetVideoRtxEnabled(bool enable); |
| 131 | 132 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 142 // bytes. When the limit is reached, logging will stop and the file will be | 143 // bytes. When the limit is reached, logging will stop and the file will be |
| 143 // closed. If max_size_bytes is set to <= 0, no limit will be used. | 144 // closed. If max_size_bytes is set to <= 0, no limit will be used. |
| 144 bool StartAecDump(rtc::PlatformFile file, int64_t max_size_bytes); | 145 bool StartAecDump(rtc::PlatformFile file, int64_t max_size_bytes); |
| 145 | 146 |
| 146 // Stops recording AEC dump. | 147 // Stops recording AEC dump. |
| 147 void StopAecDump(); | 148 void StopAecDump(); |
| 148 | 149 |
| 149 private: | 150 private: |
| 150 typedef std::vector<VoiceChannel*> VoiceChannels; | 151 typedef std::vector<VoiceChannel*> VoiceChannels; |
| 151 typedef std::vector<VideoChannel*> VideoChannels; | 152 typedef std::vector<VideoChannel*> VideoChannels; |
| 152 typedef std::vector<RtpDataChannel*> RtpDataChannels; | 153 typedef std::vector<DataChannel*> DataChannels; |
| 153 | 154 |
| 154 void Construct(MediaEngineInterface* me, | 155 void Construct(MediaEngineInterface* me, |
| 155 DataEngineInterface* dme, | 156 DataEngineInterface* dme, |
| 156 rtc::Thread* worker_thread, | 157 rtc::Thread* worker_thread, |
| 157 rtc::Thread* network_thread); | 158 rtc::Thread* network_thread); |
| 158 bool InitMediaEngine_w(); | 159 bool InitMediaEngine_w(); |
| 159 void DestructorDeletes_w(); | 160 void DestructorDeletes_w(); |
| 160 void Terminate_w(); | 161 void Terminate_w(); |
| 161 bool SetCryptoOptions_w(const rtc::CryptoOptions& crypto_options); | 162 bool SetCryptoOptions_w(const rtc::CryptoOptions& crypto_options); |
| 162 VoiceChannel* CreateVoiceChannel_w( | 163 VoiceChannel* CreateVoiceChannel_w( |
| 163 webrtc::MediaControllerInterface* media_controller, | 164 webrtc::MediaControllerInterface* media_controller, |
| 164 TransportController* transport_controller, | 165 TransportController* transport_controller, |
| 165 const std::string& content_name, | 166 const std::string& content_name, |
| 166 const std::string* bundle_transport_name, | 167 const std::string* bundle_transport_name, |
| 167 bool rtcp, | 168 bool rtcp, |
| 168 bool srtp_required, | 169 bool srtp_required, |
| 169 const AudioOptions& options); | 170 const AudioOptions& options); |
| 170 void DestroyVoiceChannel_w(VoiceChannel* voice_channel); | 171 void DestroyVoiceChannel_w(VoiceChannel* voice_channel); |
| 171 VideoChannel* CreateVideoChannel_w( | 172 VideoChannel* CreateVideoChannel_w( |
| 172 webrtc::MediaControllerInterface* media_controller, | 173 webrtc::MediaControllerInterface* media_controller, |
| 173 TransportController* transport_controller, | 174 TransportController* transport_controller, |
| 174 const std::string& content_name, | 175 const std::string& content_name, |
| 175 const std::string* bundle_transport_name, | 176 const std::string* bundle_transport_name, |
| 176 bool rtcp, | 177 bool rtcp, |
| 177 bool srtp_required, | 178 bool srtp_required, |
| 178 const VideoOptions& options); | 179 const VideoOptions& options); |
| 179 void DestroyVideoChannel_w(VideoChannel* video_channel); | 180 void DestroyVideoChannel_w(VideoChannel* video_channel); |
| 180 RtpDataChannel* CreateRtpDataChannel_w( | 181 DataChannel* CreateDataChannel_w( |
| 181 webrtc::MediaControllerInterface* media_controller, | 182 webrtc::MediaControllerInterface* media_controller, |
| 182 TransportController* transport_controller, | 183 TransportController* transport_controller, |
| 183 const std::string& content_name, | 184 const std::string& content_name, |
| 184 const std::string* bundle_transport_name, | 185 const std::string* bundle_transport_name, |
| 185 bool rtcp, | 186 bool rtcp, |
| 186 bool srtp_required); | 187 bool srtp_required, |
| 187 void DestroyRtpDataChannel_w(RtpDataChannel* data_channel); | 188 DataChannelType data_channel_type); |
| 189 void DestroyDataChannel_w(DataChannel* data_channel); |
| 188 | 190 |
| 189 std::unique_ptr<MediaEngineInterface> media_engine_; | 191 std::unique_ptr<MediaEngineInterface> media_engine_; |
| 190 std::unique_ptr<DataEngineInterface> data_media_engine_; | 192 std::unique_ptr<DataEngineInterface> data_media_engine_; |
| 191 bool initialized_; | 193 bool initialized_; |
| 192 rtc::Thread* main_thread_; | 194 rtc::Thread* main_thread_; |
| 193 rtc::Thread* worker_thread_; | 195 rtc::Thread* worker_thread_; |
| 194 rtc::Thread* network_thread_; | 196 rtc::Thread* network_thread_; |
| 195 | 197 |
| 196 VoiceChannels voice_channels_; | 198 VoiceChannels voice_channels_; |
| 197 VideoChannels video_channels_; | 199 VideoChannels video_channels_; |
| 198 RtpDataChannels data_channels_; | 200 DataChannels data_channels_; |
| 199 | 201 |
| 200 bool enable_rtx_; | 202 bool enable_rtx_; |
| 201 rtc::CryptoOptions crypto_options_; | 203 rtc::CryptoOptions crypto_options_; |
| 202 | 204 |
| 203 bool capturing_; | 205 bool capturing_; |
| 204 }; | 206 }; |
| 205 | 207 |
| 206 } // namespace cricket | 208 } // namespace cricket |
| 207 | 209 |
| 208 #endif // WEBRTC_PC_CHANNELMANAGER_H_ | 210 #endif // WEBRTC_PC_CHANNELMANAGER_H_ |
| OLD | NEW |