| 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 | 10 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 class RtpRtcp; | 37 class RtpRtcp; |
| 38 class ViEChannel; | 38 class ViEChannel; |
| 39 class ViEEncoder; | 39 class ViEEncoder; |
| 40 class VieRemb; | 40 class VieRemb; |
| 41 | 41 |
| 42 namespace internal { | 42 namespace internal { |
| 43 | 43 |
| 44 class VideoSendStream : public webrtc::VideoSendStream, | 44 class VideoSendStream : public webrtc::VideoSendStream, |
| 45 public webrtc::CpuOveruseObserver, | 45 public webrtc::CpuOveruseObserver, |
| 46 public webrtc::BitrateAllocatorObserver, | 46 public webrtc::BitrateAllocatorObserver, |
| 47 public webrtc::VCMProtectionCallback { | 47 public webrtc::VCMProtectionCallback, |
| 48 protected webrtc::EncodedImageCallback { |
| 48 public: | 49 public: |
| 49 VideoSendStream(int num_cpu_cores, | 50 VideoSendStream(int num_cpu_cores, |
| 50 ProcessThread* module_process_thread, | 51 ProcessThread* module_process_thread, |
| 51 CallStats* call_stats, | 52 CallStats* call_stats, |
| 52 CongestionController* congestion_controller, | 53 CongestionController* congestion_controller, |
| 53 BitrateAllocator* bitrate_allocator, | 54 BitrateAllocator* bitrate_allocator, |
| 54 VieRemb* remb, | 55 VieRemb* remb, |
| 55 const VideoSendStream::Config& config, | 56 const VideoSendStream::Config& config, |
| 56 const VideoEncoderConfig& encoder_config, | 57 const VideoEncoderConfig& encoder_config, |
| 57 const std::map<uint32_t, RtpState>& suspended_ssrcs); | 58 const std::map<uint32_t, RtpState>& suspended_ssrcs); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 88 const FecProtectionParams* key_params, | 89 const FecProtectionParams* key_params, |
| 89 uint32_t* sent_video_rate_bps, | 90 uint32_t* sent_video_rate_bps, |
| 90 uint32_t* sent_nack_rate_bps, | 91 uint32_t* sent_nack_rate_bps, |
| 91 uint32_t* sent_fec_rate_bps) override; | 92 uint32_t* sent_fec_rate_bps) override; |
| 92 | 93 |
| 93 private: | 94 private: |
| 94 struct EncoderSettings { | 95 struct EncoderSettings { |
| 95 VideoCodec video_codec; | 96 VideoCodec video_codec; |
| 96 int min_transmit_bitrate_bps; | 97 int min_transmit_bitrate_bps; |
| 97 }; | 98 }; |
| 99 |
| 100 // Implements EncodedImageCallback. The implementation routes encoded frames |
| 101 // to the |payload_router_| and |config.pre_encode_callback| if set. |
| 102 // Called on an arbitrary encoder callback thread. |
| 103 int32_t Encoded(const EncodedImage& encoded_image, |
| 104 const CodecSpecificInfo* codec_specific_info, |
| 105 const RTPFragmentationHeader* fragmentation) override; |
| 106 |
| 98 static bool EncoderThreadFunction(void* obj); | 107 static bool EncoderThreadFunction(void* obj); |
| 99 void EncoderProcess(); | 108 void EncoderProcess(); |
| 100 | 109 |
| 101 void ConfigureProtection(); | 110 void ConfigureProtection(); |
| 102 void ConfigureSsrcs(); | 111 void ConfigureSsrcs(); |
| 103 | 112 |
| 104 SendStatisticsProxy stats_proxy_; | 113 SendStatisticsProxy stats_proxy_; |
| 105 EncodedFrameCallbackAdapter encoded_frame_proxy_; | 114 EncodedFrameCallbackAdapter encoded_frame_proxy_; |
| 106 const VideoSendStream::Config config_; | 115 const VideoSendStream::Config config_; |
| 107 std::map<uint32_t, RtpState> suspended_ssrcs_; | 116 std::map<uint32_t, RtpState> suspended_ssrcs_; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 127 const std::unique_ptr<RtcpBandwidthObserver> bandwidth_observer_; | 136 const std::unique_ptr<RtcpBandwidthObserver> bandwidth_observer_; |
| 128 // RtpRtcp modules, declared here as they use other members on construction. | 137 // RtpRtcp modules, declared here as they use other members on construction. |
| 129 const std::vector<RtpRtcp*> rtp_rtcp_modules_; | 138 const std::vector<RtpRtcp*> rtp_rtcp_modules_; |
| 130 PayloadRouter payload_router_; | 139 PayloadRouter payload_router_; |
| 131 VideoCaptureInput input_; | 140 VideoCaptureInput input_; |
| 132 }; | 141 }; |
| 133 } // namespace internal | 142 } // namespace internal |
| 134 } // namespace webrtc | 143 } // namespace webrtc |
| 135 | 144 |
| 136 #endif // WEBRTC_VIDEO_VIDEO_SEND_STREAM_H_ | 145 #endif // WEBRTC_VIDEO_VIDEO_SEND_STREAM_H_ |
| OLD | NEW |