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