OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 #include "webrtc/video/video_send_stream.h" | 10 #include "webrtc/video/video_send_stream.h" |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 SendStatisticsProxy* const stats_proxy_; | 286 SendStatisticsProxy* const stats_proxy_; |
287 const VideoSendStream::Config* const config_; | 287 const VideoSendStream::Config* const config_; |
288 std::map<uint32_t, RtpState> suspended_ssrcs_; | 288 std::map<uint32_t, RtpState> suspended_ssrcs_; |
289 | 289 |
290 ProcessThread* module_process_thread_; | 290 ProcessThread* module_process_thread_; |
291 rtc::ThreadChecker module_process_thread_checker_; | 291 rtc::ThreadChecker module_process_thread_checker_; |
292 rtc::TaskQueue* const worker_queue_; | 292 rtc::TaskQueue* const worker_queue_; |
293 | 293 |
294 rtc::CriticalSection encoder_activity_crit_sect_; | 294 rtc::CriticalSection encoder_activity_crit_sect_; |
295 CheckEncoderActivityTask* check_encoder_activity_task_ | 295 CheckEncoderActivityTask* check_encoder_activity_task_ |
296 GUARDED_BY(encoder_activity_crit_sect_); | 296 RTC_GUARDED_BY(encoder_activity_crit_sect_); |
297 | 297 |
298 CallStats* const call_stats_; | 298 CallStats* const call_stats_; |
299 RtpTransportControllerSendInterface* const transport_; | 299 RtpTransportControllerSendInterface* const transport_; |
300 BitrateAllocator* const bitrate_allocator_; | 300 BitrateAllocator* const bitrate_allocator_; |
301 | 301 |
302 // TODO(brandtr): Move ownership to PayloadRouter. | 302 // TODO(brandtr): Move ownership to PayloadRouter. |
303 std::unique_ptr<FlexfecSender> flexfec_sender_; | 303 std::unique_ptr<FlexfecSender> flexfec_sender_; |
304 | 304 |
305 rtc::CriticalSection ivf_writers_crit_; | 305 rtc::CriticalSection ivf_writers_crit_; |
306 std::unique_ptr<IvfFileWriter> file_writers_[kMaxSimulcastStreams] GUARDED_BY( | 306 std::unique_ptr<IvfFileWriter> |
307 ivf_writers_crit_); | 307 file_writers_[kMaxSimulcastStreams] RTC_GUARDED_BY(ivf_writers_crit_); |
308 | 308 |
309 int max_padding_bitrate_; | 309 int max_padding_bitrate_; |
310 int encoder_min_bitrate_bps_; | 310 int encoder_min_bitrate_bps_; |
311 uint32_t encoder_max_bitrate_bps_; | 311 uint32_t encoder_max_bitrate_bps_; |
312 uint32_t encoder_target_rate_bps_; | 312 uint32_t encoder_target_rate_bps_; |
313 | 313 |
314 VideoStreamEncoder* const video_stream_encoder_; | 314 VideoStreamEncoder* const video_stream_encoder_; |
315 EncoderRtcpFeedback encoder_feedback_; | 315 EncoderRtcpFeedback encoder_feedback_; |
316 ProtectionBitrateCalculator protection_bitrate_calculator_; | 316 ProtectionBitrateCalculator protection_bitrate_calculator_; |
317 | 317 |
318 const std::unique_ptr<RtcpBandwidthObserver> bandwidth_observer_; | 318 const std::unique_ptr<RtcpBandwidthObserver> bandwidth_observer_; |
319 // RtpRtcp modules, declared here as they use other members on construction. | 319 // RtpRtcp modules, declared here as they use other members on construction. |
320 const std::vector<RtpRtcp*> rtp_rtcp_modules_; | 320 const std::vector<RtpRtcp*> rtp_rtcp_modules_; |
321 PayloadRouter payload_router_; | 321 PayloadRouter payload_router_; |
322 | 322 |
323 // |weak_ptr_| to our self. This is used since we can not call | 323 // |weak_ptr_| to our self. This is used since we can not call |
324 // |weak_ptr_factory_.GetWeakPtr| from multiple sequences but it is ok to copy | 324 // |weak_ptr_factory_.GetWeakPtr| from multiple sequences but it is ok to copy |
325 // an existing WeakPtr. | 325 // an existing WeakPtr. |
326 rtc::WeakPtr<VideoSendStreamImpl> weak_ptr_; | 326 rtc::WeakPtr<VideoSendStreamImpl> weak_ptr_; |
327 // |weak_ptr_factory_| must be declared last to make sure all WeakPtr's are | 327 // |weak_ptr_factory_| must be declared last to make sure all WeakPtr's are |
328 // invalidated before any other members are destroyed. | 328 // invalidated before any other members are destroyed. |
329 rtc::WeakPtrFactory<VideoSendStreamImpl> weak_ptr_factory_; | 329 rtc::WeakPtrFactory<VideoSendStreamImpl> weak_ptr_factory_; |
330 | 330 |
331 rtc::CriticalSection overhead_bytes_per_packet_crit_; | 331 rtc::CriticalSection overhead_bytes_per_packet_crit_; |
332 size_t overhead_bytes_per_packet_ GUARDED_BY(overhead_bytes_per_packet_crit_); | 332 size_t overhead_bytes_per_packet_ |
| 333 RTC_GUARDED_BY(overhead_bytes_per_packet_crit_); |
333 size_t transport_overhead_bytes_per_packet_; | 334 size_t transport_overhead_bytes_per_packet_; |
334 }; | 335 }; |
335 | 336 |
336 // TODO(tommi): See if there's a more elegant way to create a task that creates | 337 // TODO(tommi): See if there's a more elegant way to create a task that creates |
337 // an object on the correct task queue. | 338 // an object on the correct task queue. |
338 class VideoSendStream::ConstructionTask : public rtc::QueuedTask { | 339 class VideoSendStream::ConstructionTask : public rtc::QueuedTask { |
339 public: | 340 public: |
340 ConstructionTask(std::unique_ptr<VideoSendStreamImpl>* send_stream, | 341 ConstructionTask(std::unique_ptr<VideoSendStreamImpl>* send_stream, |
341 rtc::Event* done_event, | 342 rtc::Event* done_event, |
342 SendStatisticsProxy* stats_proxy, | 343 SendStatisticsProxy* stats_proxy, |
(...skipping 905 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1248 std::min(config_->rtp.max_packet_size, | 1249 std::min(config_->rtp.max_packet_size, |
1249 kPathMTU - transport_overhead_bytes_per_packet_); | 1250 kPathMTU - transport_overhead_bytes_per_packet_); |
1250 | 1251 |
1251 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { | 1252 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { |
1252 rtp_rtcp->SetMaxRtpPacketSize(rtp_packet_size); | 1253 rtp_rtcp->SetMaxRtpPacketSize(rtp_packet_size); |
1253 } | 1254 } |
1254 } | 1255 } |
1255 | 1256 |
1256 } // namespace internal | 1257 } // namespace internal |
1257 } // namespace webrtc | 1258 } // namespace webrtc |
OLD | NEW |