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

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

Issue 1152733005: Use one scoped_refptr. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: remove from BUILD.gn Created 5 years, 6 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.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
11 #ifndef WEBRTC_VIDEO_ENGINE_VIE_ENCODER_H_ 11 #ifndef WEBRTC_VIDEO_ENGINE_VIE_ENCODER_H_
12 #define WEBRTC_VIDEO_ENGINE_VIE_ENCODER_H_ 12 #define WEBRTC_VIDEO_ENGINE_VIE_ENCODER_H_
13 13
14 #include <map> 14 #include <map>
15 #include <vector> 15 #include <vector>
16 16
17 #include "webrtc/base/scoped_ptr.h" 17 #include "webrtc/base/scoped_ptr.h"
18 #include "webrtc/base/scoped_ref_ptr.h"
18 #include "webrtc/base/thread_annotations.h" 19 #include "webrtc/base/thread_annotations.h"
19 #include "webrtc/common_types.h" 20 #include "webrtc/common_types.h"
21 #include "webrtc/frame_callback.h"
20 #include "webrtc/modules/bitrate_controller/include/bitrate_allocator.h" 22 #include "webrtc/modules/bitrate_controller/include/bitrate_allocator.h"
21 #include "webrtc/modules/bitrate_controller/include/bitrate_controller.h" 23 #include "webrtc/modules/bitrate_controller/include/bitrate_controller.h"
22 #include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h" 24 #include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h"
23 #include "webrtc/modules/video_coding/main/interface/video_coding_defines.h" 25 #include "webrtc/modules/video_coding/main/interface/video_coding_defines.h"
24 #include "webrtc/modules/video_processing/main/interface/video_processing.h" 26 #include "webrtc/modules/video_processing/main/interface/video_processing.h"
25 #include "webrtc/typedefs.h" 27 #include "webrtc/typedefs.h"
26 #include "webrtc/frame_callback.h"
27 #include "webrtc/system_wrappers/interface/scoped_refptr.h"
28 #include "webrtc/video_engine/vie_capturer.h" 28 #include "webrtc/video_engine/vie_capturer.h"
29 #include "webrtc/video_engine/vie_defines.h" 29 #include "webrtc/video_engine/vie_defines.h"
30 30
31 namespace webrtc { 31 namespace webrtc {
32 32
33 class Config; 33 class Config;
34 class CriticalSectionWrapper; 34 class CriticalSectionWrapper;
35 class EncodedImageCallback; 35 class EncodedImageCallback;
36 class PacedSender; 36 class PacedSender;
37 class PayloadRouter; 37 class PayloadRouter;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 bool disable_default_encoder); 82 bool disable_default_encoder);
83 ~ViEEncoder(); 83 ~ViEEncoder();
84 84
85 bool Init(); 85 bool Init();
86 86
87 // This function is assumed to be called before any frames are delivered and 87 // This function is assumed to be called before any frames are delivered and
88 // only once. 88 // only once.
89 // Ideally this would be done in Init, but the dependencies between ViEEncoder 89 // Ideally this would be done in Init, but the dependencies between ViEEncoder
90 // and ViEChannel makes it really hard to do in a good way. 90 // and ViEChannel makes it really hard to do in a good way.
91 void StartThreadsAndSetSharedMembers( 91 void StartThreadsAndSetSharedMembers(
92 scoped_refptr<PayloadRouter> send_payload_router, 92 rtc::scoped_refptr<PayloadRouter> send_payload_router,
93 VCMProtectionCallback* vcm_protection_callback); 93 VCMProtectionCallback* vcm_protection_callback);
94 94
95 // This function must be called before the corresponding ViEChannel is 95 // This function must be called before the corresponding ViEChannel is
96 // deleted. 96 // deleted.
97 void StopThreadsAndRemoveSharedMembers(); 97 void StopThreadsAndRemoveSharedMembers();
98 98
99 void SetNetworkTransmissionState(bool is_transmitting); 99 void SetNetworkTransmissionState(bool is_transmitting);
100 100
101 // Returns the id of the owning channel. 101 // Returns the id of the owning channel.
102 int Owner() const; 102 int Owner() const;
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 193
194 void UpdateHistograms(); 194 void UpdateHistograms();
195 195
196 const int channel_id_; 196 const int channel_id_;
197 const uint32_t number_of_cores_; 197 const uint32_t number_of_cores_;
198 const bool disable_default_encoder_; 198 const bool disable_default_encoder_;
199 199
200 const rtc::scoped_ptr<VideoProcessingModule> vpm_; 200 const rtc::scoped_ptr<VideoProcessingModule> vpm_;
201 const rtc::scoped_ptr<QMVideoSettingsCallback> qm_callback_; 201 const rtc::scoped_ptr<QMVideoSettingsCallback> qm_callback_;
202 const rtc::scoped_ptr<VideoCodingModule> vcm_; 202 const rtc::scoped_ptr<VideoCodingModule> vcm_;
203 scoped_refptr<PayloadRouter> send_payload_router_; 203 rtc::scoped_refptr<PayloadRouter> send_payload_router_;
204 204
205 rtc::scoped_ptr<CriticalSectionWrapper> callback_cs_; 205 rtc::scoped_ptr<CriticalSectionWrapper> callback_cs_;
206 rtc::scoped_ptr<CriticalSectionWrapper> data_cs_; 206 rtc::scoped_ptr<CriticalSectionWrapper> data_cs_;
207 rtc::scoped_ptr<BitrateObserver> bitrate_observer_; 207 rtc::scoped_ptr<BitrateObserver> bitrate_observer_;
208 208
209 PacedSender* const pacer_; 209 PacedSender* const pacer_;
210 BitrateAllocator* const bitrate_allocator_; 210 BitrateAllocator* const bitrate_allocator_;
211 BitrateController* const bitrate_controller_; 211 BitrateController* const bitrate_controller_;
212 212
213 // The time we last received an input frame or encoded frame. This is used to 213 // The time we last received an input frame or encoded frame. This is used to
(...skipping 25 matching lines...) Expand all
239 bool video_suspended_ GUARDED_BY(data_cs_); 239 bool video_suspended_ GUARDED_BY(data_cs_);
240 I420FrameCallback* pre_encode_callback_ GUARDED_BY(callback_cs_); 240 I420FrameCallback* pre_encode_callback_ GUARDED_BY(callback_cs_);
241 const int64_t start_ms_; 241 const int64_t start_ms_;
242 242
243 SendStatisticsProxy* send_statistics_proxy_ GUARDED_BY(callback_cs_); 243 SendStatisticsProxy* send_statistics_proxy_ GUARDED_BY(callback_cs_);
244 }; 244 };
245 245
246 } // namespace webrtc 246 } // namespace webrtc
247 247
248 #endif // WEBRTC_VIDEO_ENGINE_VIE_ENCODER_H_ 248 #endif // WEBRTC_VIDEO_ENGINE_VIE_ENCODER_H_
OLDNEW
« no previous file with comments | « webrtc/video_engine/vie_channel.cc ('k') | webrtc/video_engine/vie_encoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698