| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 unsigned char config_parameters[kConfigParameterSize], | 95 unsigned char config_parameters[kConfigParameterSize], |
| 96 unsigned char& config_parameters_size); | 96 unsigned char& config_parameters_size); |
| 97 | 97 |
| 98 // Scale or crop/pad image. | 98 // Scale or crop/pad image. |
| 99 int32_t ScaleInputImage(bool enable); | 99 int32_t ScaleInputImage(bool enable); |
| 100 | 100 |
| 101 // Implementing VideoCaptureCallback. | 101 // Implementing VideoCaptureCallback. |
| 102 void DeliverFrame(VideoFrame video_frame) override; | 102 void DeliverFrame(VideoFrame video_frame) override; |
| 103 | 103 |
| 104 int32_t SendKeyFrame(); | 104 int32_t SendKeyFrame(); |
| 105 int32_t SendCodecStatistics(uint32_t* num_key_frames, | |
| 106 uint32_t* num_delta_frames); | |
| 107 | 105 |
| 108 uint32_t LastObservedBitrateBps() const; | 106 uint32_t LastObservedBitrateBps() const; |
| 109 int CodecTargetBitrate(uint32_t* bitrate) const; | 107 int CodecTargetBitrate(uint32_t* bitrate) const; |
| 110 // Loss protection. | 108 // Loss protection. |
| 111 int32_t UpdateProtectionMethod(bool nack, bool fec); | 109 int32_t UpdateProtectionMethod(bool nack, bool fec); |
| 112 bool nack_enabled() const { return nack_enabled_; } | 110 bool nack_enabled() const { return nack_enabled_; } |
| 113 | 111 |
| 114 // Buffering mode. | 112 // Buffering mode. |
| 115 void SetSenderBufferingMode(int target_delay_ms); | 113 void SetSenderBufferingMode(int target_delay_ms); |
| 116 | 114 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 // Called by BitrateObserver. | 153 // Called by BitrateObserver. |
| 156 void OnNetworkChanged(uint32_t bitrate_bps, | 154 void OnNetworkChanged(uint32_t bitrate_bps, |
| 157 uint8_t fraction_lost, | 155 uint8_t fraction_lost, |
| 158 int64_t round_trip_time_ms); | 156 int64_t round_trip_time_ms); |
| 159 | 157 |
| 160 private: | 158 private: |
| 161 bool EncoderPaused() const EXCLUSIVE_LOCKS_REQUIRED(data_cs_); | 159 bool EncoderPaused() const EXCLUSIVE_LOCKS_REQUIRED(data_cs_); |
| 162 void TraceFrameDropStart() EXCLUSIVE_LOCKS_REQUIRED(data_cs_); | 160 void TraceFrameDropStart() EXCLUSIVE_LOCKS_REQUIRED(data_cs_); |
| 163 void TraceFrameDropEnd() EXCLUSIVE_LOCKS_REQUIRED(data_cs_); | 161 void TraceFrameDropEnd() EXCLUSIVE_LOCKS_REQUIRED(data_cs_); |
| 164 | 162 |
| 165 void UpdateHistograms(); | |
| 166 | |
| 167 const int channel_id_; | 163 const int channel_id_; |
| 168 const uint32_t number_of_cores_; | 164 const uint32_t number_of_cores_; |
| 169 | 165 |
| 170 const rtc::scoped_ptr<VideoProcessingModule> vpm_; | 166 const rtc::scoped_ptr<VideoProcessingModule> vpm_; |
| 171 const rtc::scoped_ptr<QMVideoSettingsCallback> qm_callback_; | 167 const rtc::scoped_ptr<QMVideoSettingsCallback> qm_callback_; |
| 172 const rtc::scoped_ptr<VideoCodingModule> vcm_; | 168 const rtc::scoped_ptr<VideoCodingModule> vcm_; |
| 173 rtc::scoped_refptr<PayloadRouter> send_payload_router_; | 169 rtc::scoped_refptr<PayloadRouter> send_payload_router_; |
| 174 | 170 |
| 175 rtc::scoped_ptr<CriticalSectionWrapper> data_cs_; | 171 rtc::scoped_ptr<CriticalSectionWrapper> data_cs_; |
| 176 rtc::scoped_ptr<BitrateObserver> bitrate_observer_; | 172 rtc::scoped_ptr<BitrateObserver> bitrate_observer_; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 199 | 195 |
| 200 ProcessThread* module_process_thread_; | 196 ProcessThread* module_process_thread_; |
| 201 | 197 |
| 202 bool has_received_sli_ GUARDED_BY(data_cs_); | 198 bool has_received_sli_ GUARDED_BY(data_cs_); |
| 203 uint8_t picture_id_sli_ GUARDED_BY(data_cs_); | 199 uint8_t picture_id_sli_ GUARDED_BY(data_cs_); |
| 204 bool has_received_rpsi_ GUARDED_BY(data_cs_); | 200 bool has_received_rpsi_ GUARDED_BY(data_cs_); |
| 205 uint64_t picture_id_rpsi_ GUARDED_BY(data_cs_); | 201 uint64_t picture_id_rpsi_ GUARDED_BY(data_cs_); |
| 206 std::map<uint32_t, int> ssrc_streams_ GUARDED_BY(data_cs_); | 202 std::map<uint32_t, int> ssrc_streams_ GUARDED_BY(data_cs_); |
| 207 | 203 |
| 208 bool video_suspended_ GUARDED_BY(data_cs_); | 204 bool video_suspended_ GUARDED_BY(data_cs_); |
| 209 const int64_t start_ms_; | |
| 210 }; | 205 }; |
| 211 | 206 |
| 212 } // namespace webrtc | 207 } // namespace webrtc |
| 213 | 208 |
| 214 #endif // WEBRTC_VIDEO_ENGINE_VIE_ENCODER_H_ | 209 #endif // WEBRTC_VIDEO_ENGINE_VIE_ENCODER_H_ |
| OLD | NEW |