| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 // 6. For each available raw video frame call EncodeVideoFrame. | 52 // 6. For each available raw video frame call EncodeVideoFrame. |
| 53 class ViEEncoder : public VideoEncoderRateObserver, | 53 class ViEEncoder : public VideoEncoderRateObserver, |
| 54 public EncodedImageCallback, | 54 public EncodedImageCallback, |
| 55 public VCMSendStatisticsCallback { | 55 public VCMSendStatisticsCallback { |
| 56 public: | 56 public: |
| 57 friend class ViEBitrateObserver; | 57 friend class ViEBitrateObserver; |
| 58 | 58 |
| 59 ViEEncoder(uint32_t number_of_cores, | 59 ViEEncoder(uint32_t number_of_cores, |
| 60 ProcessThread* module_process_thread, | 60 ProcessThread* module_process_thread, |
| 61 SendStatisticsProxy* stats_proxy, | 61 SendStatisticsProxy* stats_proxy, |
| 62 OveruseFrameDetector* overuse_detector); | 62 // TODO(nisse): Used only for tests, delete? |
| 63 rtc::VideoSinkInterface<VideoFrame>* pre_encode_callback, |
| 64 OveruseFrameDetector* overuse_detector, |
| 65 PacedSender* pacer); |
| 63 ~ViEEncoder(); | 66 ~ViEEncoder(); |
| 64 | 67 |
| 65 vcm::VideoSender* video_sender(); | 68 vcm::VideoSender* video_sender(); |
| 66 | 69 |
| 67 void SetNetworkTransmissionState(bool is_transmitting); | 70 void SetNetworkTransmissionState(bool is_transmitting); |
| 68 | 71 |
| 69 // Returns the id of the owning channel. | 72 // Returns the id of the owning channel. |
| 70 int Owner() const; | 73 int Owner() const; |
| 71 | 74 |
| 72 void Start(); | 75 void Start(); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 | 126 |
| 124 const uint32_t number_of_cores_; | 127 const uint32_t number_of_cores_; |
| 125 | 128 |
| 126 const std::unique_ptr<VideoProcessing> vp_; | 129 const std::unique_ptr<VideoProcessing> vp_; |
| 127 const std::unique_ptr<QMVideoSettingsCallback> qm_callback_; | 130 const std::unique_ptr<QMVideoSettingsCallback> qm_callback_; |
| 128 vcm::VideoSender video_sender_; | 131 vcm::VideoSender video_sender_; |
| 129 | 132 |
| 130 rtc::CriticalSection data_cs_; | 133 rtc::CriticalSection data_cs_; |
| 131 | 134 |
| 132 SendStatisticsProxy* const stats_proxy_; | 135 SendStatisticsProxy* const stats_proxy_; |
| 136 rtc::VideoSinkInterface<VideoFrame>* const pre_encode_callback_; |
| 133 OveruseFrameDetector* const overuse_detector_; | 137 OveruseFrameDetector* const overuse_detector_; |
| 138 PacedSender* const pacer_; |
| 134 | 139 |
| 135 // The time we last received an input frame or encoded frame. This is used to | 140 // The time we last received an input frame or encoded frame. This is used to |
| 136 // track when video is stopped long enough that we also want to stop sending | 141 // track when video is stopped long enough that we also want to stop sending |
| 137 // padding. | 142 // padding. |
| 138 int64_t time_of_last_frame_activity_ms_ GUARDED_BY(data_cs_); | 143 int64_t time_of_last_frame_activity_ms_ GUARDED_BY(data_cs_); |
| 139 VideoCodec encoder_config_ GUARDED_BY(data_cs_); | 144 VideoCodec encoder_config_ GUARDED_BY(data_cs_); |
| 140 int min_transmit_bitrate_bps_ GUARDED_BY(data_cs_); | 145 int min_transmit_bitrate_bps_ GUARDED_BY(data_cs_); |
| 141 uint32_t last_observed_bitrate_bps_ GUARDED_BY(data_cs_); | 146 uint32_t last_observed_bitrate_bps_ GUARDED_BY(data_cs_); |
| 142 bool network_is_transmitting_ GUARDED_BY(data_cs_); | 147 bool network_is_transmitting_ GUARDED_BY(data_cs_); |
| 143 bool encoder_paused_ GUARDED_BY(data_cs_); | 148 bool encoder_paused_ GUARDED_BY(data_cs_); |
| 144 bool encoder_paused_and_dropped_frame_ GUARDED_BY(data_cs_); | 149 bool encoder_paused_and_dropped_frame_ GUARDED_BY(data_cs_); |
| 145 | 150 |
| 146 rtc::CriticalSection sink_cs_; | 151 rtc::CriticalSection sink_cs_; |
| 147 EncodedImageCallback* sink_ GUARDED_BY(sink_cs_); | 152 EncodedImageCallback* sink_ GUARDED_BY(sink_cs_); |
| 148 | 153 |
| 149 ProcessThread* module_process_thread_; | 154 ProcessThread* module_process_thread_; |
| 150 | 155 |
| 151 bool has_received_sli_ GUARDED_BY(data_cs_); | 156 bool has_received_sli_ GUARDED_BY(data_cs_); |
| 152 uint8_t picture_id_sli_ GUARDED_BY(data_cs_); | 157 uint8_t picture_id_sli_ GUARDED_BY(data_cs_); |
| 153 bool has_received_rpsi_ GUARDED_BY(data_cs_); | 158 bool has_received_rpsi_ GUARDED_BY(data_cs_); |
| 154 uint64_t picture_id_rpsi_ GUARDED_BY(data_cs_); | 159 uint64_t picture_id_rpsi_ GUARDED_BY(data_cs_); |
| 155 | 160 |
| 156 bool video_suspended_ GUARDED_BY(data_cs_); | 161 bool video_suspended_ GUARDED_BY(data_cs_); |
| 157 }; | 162 }; |
| 158 | 163 |
| 159 } // namespace webrtc | 164 } // namespace webrtc |
| 160 | 165 |
| 161 #endif // WEBRTC_VIDEO_VIE_ENCODER_H_ | 166 #endif // WEBRTC_VIDEO_VIE_ENCODER_H_ |
| OLD | NEW |