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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 class ViEEncoder : public VideoEncoderRateObserver, | 54 class ViEEncoder : public VideoEncoderRateObserver, |
55 public EncodedImageCallback, | 55 public EncodedImageCallback, |
56 public VCMSendStatisticsCallback { | 56 public VCMSendStatisticsCallback { |
57 public: | 57 public: |
58 friend class ViEBitrateObserver; | 58 friend class ViEBitrateObserver; |
59 | 59 |
60 ViEEncoder(uint32_t number_of_cores, | 60 ViEEncoder(uint32_t number_of_cores, |
61 const std::vector<uint32_t>& ssrcs, | 61 const std::vector<uint32_t>& ssrcs, |
62 ProcessThread* module_process_thread, | 62 ProcessThread* module_process_thread, |
63 SendStatisticsProxy* stats_proxy, | 63 SendStatisticsProxy* stats_proxy, |
64 // TODO(nisse): Used only for tests, delete? | 64 OveruseFrameDetector* overuse_detector); |
65 rtc::VideoSinkInterface<VideoFrame>* pre_encode_callback, | |
66 OveruseFrameDetector* overuse_detector, | |
67 PacedSender* pacer); | |
68 ~ViEEncoder(); | 65 ~ViEEncoder(); |
69 | 66 |
70 vcm::VideoSender* video_sender(); | 67 vcm::VideoSender* video_sender(); |
71 | 68 |
72 void SetNetworkTransmissionState(bool is_transmitting); | 69 void SetNetworkTransmissionState(bool is_transmitting); |
73 | 70 |
74 // Returns the id of the owning channel. | 71 // Returns the id of the owning channel. |
75 int Owner() const; | 72 int Owner() const; |
76 | 73 |
77 void Start(); | 74 void Start(); |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 const uint32_t number_of_cores_; | 129 const uint32_t number_of_cores_; |
133 const std::vector<uint32_t> ssrcs_; | 130 const std::vector<uint32_t> ssrcs_; |
134 | 131 |
135 const std::unique_ptr<VideoProcessing> vp_; | 132 const std::unique_ptr<VideoProcessing> vp_; |
136 const std::unique_ptr<QMVideoSettingsCallback> qm_callback_; | 133 const std::unique_ptr<QMVideoSettingsCallback> qm_callback_; |
137 vcm::VideoSender video_sender_; | 134 vcm::VideoSender video_sender_; |
138 | 135 |
139 rtc::CriticalSection data_cs_; | 136 rtc::CriticalSection data_cs_; |
140 | 137 |
141 SendStatisticsProxy* const stats_proxy_; | 138 SendStatisticsProxy* const stats_proxy_; |
142 rtc::VideoSinkInterface<VideoFrame>* const pre_encode_callback_; | |
143 OveruseFrameDetector* const overuse_detector_; | 139 OveruseFrameDetector* const overuse_detector_; |
144 PacedSender* const pacer_; | |
145 | 140 |
146 // The time we last received an input frame or encoded frame. This is used to | 141 // The time we last received an input frame or encoded frame. This is used to |
147 // track when video is stopped long enough that we also want to stop sending | 142 // track when video is stopped long enough that we also want to stop sending |
148 // padding. | 143 // padding. |
149 int64_t time_of_last_frame_activity_ms_ GUARDED_BY(data_cs_); | 144 int64_t time_of_last_frame_activity_ms_ GUARDED_BY(data_cs_); |
150 VideoCodec encoder_config_ GUARDED_BY(data_cs_); | 145 VideoCodec encoder_config_ GUARDED_BY(data_cs_); |
151 int min_transmit_bitrate_bps_ GUARDED_BY(data_cs_); | 146 int min_transmit_bitrate_bps_ GUARDED_BY(data_cs_); |
152 uint32_t last_observed_bitrate_bps_ GUARDED_BY(data_cs_); | 147 uint32_t last_observed_bitrate_bps_ GUARDED_BY(data_cs_); |
153 bool network_is_transmitting_ GUARDED_BY(data_cs_); | 148 bool network_is_transmitting_ GUARDED_BY(data_cs_); |
154 bool encoder_paused_ GUARDED_BY(data_cs_); | 149 bool encoder_paused_ GUARDED_BY(data_cs_); |
(...skipping 11 matching lines...) Expand all Loading... |
166 uint64_t picture_id_rpsi_ GUARDED_BY(data_cs_); | 161 uint64_t picture_id_rpsi_ GUARDED_BY(data_cs_); |
167 | 162 |
168 bool video_suspended_ GUARDED_BY(data_cs_); | 163 bool video_suspended_ GUARDED_BY(data_cs_); |
169 | 164 |
170 std::unique_ptr<IvfFileWriter> file_writers_[kMaxLayers] GUARDED_BY(data_cs_); | 165 std::unique_ptr<IvfFileWriter> file_writers_[kMaxLayers] GUARDED_BY(data_cs_); |
171 }; | 166 }; |
172 | 167 |
173 } // namespace webrtc | 168 } // namespace webrtc |
174 | 169 |
175 #endif // WEBRTC_VIDEO_VIE_ENCODER_H_ | 170 #endif // WEBRTC_VIDEO_VIE_ENCODER_H_ |
OLD | NEW |