Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Side by Side Diff: webrtc/video_engine/vie_encoder.h

Issue 1341943003: Remove default ViEEncoder encoder instance. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/video_engine/vie_channel_group.cc ('k') | webrtc/video_engine/vie_encoder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 public VCMSendStatisticsCallback, 69 public VCMSendStatisticsCallback,
70 public VideoCaptureCallback { 70 public VideoCaptureCallback {
71 public: 71 public:
72 friend class ViEBitrateObserver; 72 friend class ViEBitrateObserver;
73 73
74 ViEEncoder(int32_t channel_id, 74 ViEEncoder(int32_t channel_id,
75 uint32_t number_of_cores, 75 uint32_t number_of_cores,
76 ProcessThread& module_process_thread, 76 ProcessThread& module_process_thread,
77 PacedSender* pacer, 77 PacedSender* pacer,
78 BitrateAllocator* bitrate_allocator, 78 BitrateAllocator* bitrate_allocator,
79 BitrateController* bitrate_controller, 79 BitrateController* bitrate_controller);
80 bool disable_default_encoder);
81 ~ViEEncoder(); 80 ~ViEEncoder();
82 81
83 bool Init(); 82 bool Init();
84 83
85 // This function is assumed to be called before any frames are delivered and 84 // This function is assumed to be called before any frames are delivered and
86 // only once. 85 // only once.
87 // Ideally this would be done in Init, but the dependencies between ViEEncoder 86 // Ideally this would be done in Init, but the dependencies between ViEEncoder
88 // and ViEChannel makes it really hard to do in a good way. 87 // and ViEChannel makes it really hard to do in a good way.
89 void StartThreadsAndSetSharedMembers( 88 void StartThreadsAndSetSharedMembers(
90 rtc::scoped_refptr<PayloadRouter> send_payload_router, 89 rtc::scoped_refptr<PayloadRouter> send_payload_router,
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 185
187 private: 186 private:
188 bool EncoderPaused() const EXCLUSIVE_LOCKS_REQUIRED(data_cs_); 187 bool EncoderPaused() const EXCLUSIVE_LOCKS_REQUIRED(data_cs_);
189 void TraceFrameDropStart() EXCLUSIVE_LOCKS_REQUIRED(data_cs_); 188 void TraceFrameDropStart() EXCLUSIVE_LOCKS_REQUIRED(data_cs_);
190 void TraceFrameDropEnd() EXCLUSIVE_LOCKS_REQUIRED(data_cs_); 189 void TraceFrameDropEnd() EXCLUSIVE_LOCKS_REQUIRED(data_cs_);
191 190
192 void UpdateHistograms(); 191 void UpdateHistograms();
193 192
194 const int channel_id_; 193 const int channel_id_;
195 const uint32_t number_of_cores_; 194 const uint32_t number_of_cores_;
196 const bool disable_default_encoder_;
197 195
198 const rtc::scoped_ptr<VideoProcessingModule> vpm_; 196 const rtc::scoped_ptr<VideoProcessingModule> vpm_;
199 const rtc::scoped_ptr<QMVideoSettingsCallback> qm_callback_; 197 const rtc::scoped_ptr<QMVideoSettingsCallback> qm_callback_;
200 const rtc::scoped_ptr<VideoCodingModule> vcm_; 198 const rtc::scoped_ptr<VideoCodingModule> vcm_;
201 rtc::scoped_refptr<PayloadRouter> send_payload_router_; 199 rtc::scoped_refptr<PayloadRouter> send_payload_router_;
202 200
203 rtc::scoped_ptr<CriticalSectionWrapper> callback_cs_; 201 rtc::scoped_ptr<CriticalSectionWrapper> callback_cs_;
204 rtc::scoped_ptr<CriticalSectionWrapper> data_cs_; 202 rtc::scoped_ptr<CriticalSectionWrapper> data_cs_;
205 rtc::scoped_ptr<BitrateObserver> bitrate_observer_; 203 rtc::scoped_ptr<BitrateObserver> bitrate_observer_;
206 204
207 PacedSender* const pacer_; 205 PacedSender* const pacer_;
208 BitrateAllocator* const bitrate_allocator_; 206 BitrateAllocator* const bitrate_allocator_;
209 BitrateController* const bitrate_controller_; 207 BitrateController* const bitrate_controller_;
210 208
211 // The time we last received an input frame or encoded frame. This is used to 209 // The time we last received an input frame or encoded frame. This is used to
212 // track when video is stopped long enough that we also want to stop sending 210 // track when video is stopped long enough that we also want to stop sending
213 // padding. 211 // padding.
214 int64_t time_of_last_frame_activity_ms_ GUARDED_BY(data_cs_); 212 int64_t time_of_last_frame_activity_ms_ GUARDED_BY(data_cs_);
215 bool send_padding_ GUARDED_BY(data_cs_); 213 bool simulcast_enabled_ GUARDED_BY(data_cs_);
216 int min_transmit_bitrate_kbps_ GUARDED_BY(data_cs_); 214 int min_transmit_bitrate_kbps_ GUARDED_BY(data_cs_);
217 uint32_t last_observed_bitrate_bps_ GUARDED_BY(data_cs_); 215 uint32_t last_observed_bitrate_bps_ GUARDED_BY(data_cs_);
218 int target_delay_ms_ GUARDED_BY(data_cs_); 216 int target_delay_ms_ GUARDED_BY(data_cs_);
219 bool network_is_transmitting_ GUARDED_BY(data_cs_); 217 bool network_is_transmitting_ GUARDED_BY(data_cs_);
220 bool encoder_paused_ GUARDED_BY(data_cs_); 218 bool encoder_paused_ GUARDED_BY(data_cs_);
221 bool encoder_paused_and_dropped_frame_ GUARDED_BY(data_cs_); 219 bool encoder_paused_and_dropped_frame_ GUARDED_BY(data_cs_);
222 std::map<unsigned int, int64_t> time_last_intra_request_ms_ 220 std::map<unsigned int, int64_t> time_last_intra_request_ms_
223 GUARDED_BY(data_cs_); 221 GUARDED_BY(data_cs_);
224 222
225 bool fec_enabled_; 223 bool fec_enabled_;
(...skipping 11 matching lines...) Expand all
237 bool video_suspended_ GUARDED_BY(data_cs_); 235 bool video_suspended_ GUARDED_BY(data_cs_);
238 I420FrameCallback* pre_encode_callback_ GUARDED_BY(callback_cs_); 236 I420FrameCallback* pre_encode_callback_ GUARDED_BY(callback_cs_);
239 const int64_t start_ms_; 237 const int64_t start_ms_;
240 238
241 SendStatisticsProxy* send_statistics_proxy_ GUARDED_BY(callback_cs_); 239 SendStatisticsProxy* send_statistics_proxy_ GUARDED_BY(callback_cs_);
242 }; 240 };
243 241
244 } // namespace webrtc 242 } // namespace webrtc
245 243
246 #endif // WEBRTC_VIDEO_ENGINE_VIE_ENCODER_H_ 244 #endif // WEBRTC_VIDEO_ENGINE_VIE_ENCODER_H_
OLDNEW
« no previous file with comments | « webrtc/video_engine/vie_channel_group.cc ('k') | webrtc/video_engine/vie_encoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698