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

Side by Side Diff: webrtc/modules/video_coding/video_coding_impl.h

Issue 1721353002: Replace scoped_ptr with unique_ptr in webrtc/modules/video_coding/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 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
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_MODULES_VIDEO_CODING_VIDEO_CODING_IMPL_H_ 11 #ifndef WEBRTC_MODULES_VIDEO_CODING_VIDEO_CODING_IMPL_H_
12 #define WEBRTC_MODULES_VIDEO_CODING_VIDEO_CODING_IMPL_H_ 12 #define WEBRTC_MODULES_VIDEO_CODING_VIDEO_CODING_IMPL_H_
13 13
14 #include "webrtc/modules/video_coding/include/video_coding.h" 14 #include "webrtc/modules/video_coding/include/video_coding.h"
15 15
16 #include <memory>
16 #include <vector> 17 #include <vector>
17 18
18 #include "webrtc/base/thread_annotations.h" 19 #include "webrtc/base/thread_annotations.h"
19 #include "webrtc/base/thread_checker.h" 20 #include "webrtc/base/thread_checker.h"
20 #include "webrtc/modules/video_coding/codec_database.h" 21 #include "webrtc/modules/video_coding/codec_database.h"
21 #include "webrtc/modules/video_coding/frame_buffer.h" 22 #include "webrtc/modules/video_coding/frame_buffer.h"
22 #include "webrtc/modules/video_coding/generic_decoder.h" 23 #include "webrtc/modules/video_coding/generic_decoder.h"
23 #include "webrtc/modules/video_coding/generic_encoder.h" 24 #include "webrtc/modules/video_coding/generic_encoder.h"
24 #include "webrtc/modules/video_coding/jitter_buffer.h" 25 #include "webrtc/modules/video_coding/jitter_buffer.h"
25 #include "webrtc/modules/video_coding/media_optimization.h" 26 #include "webrtc/modules/video_coding/media_optimization.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 95
95 int64_t TimeUntilNextProcess(); 96 int64_t TimeUntilNextProcess();
96 int32_t Process(); 97 int32_t Process();
97 98
98 private: 99 private:
99 void SetEncoderParameters(EncoderParameters params) 100 void SetEncoderParameters(EncoderParameters params)
100 EXCLUSIVE_LOCKS_REQUIRED(encoder_crit_); 101 EXCLUSIVE_LOCKS_REQUIRED(encoder_crit_);
101 102
102 Clock* const clock_; 103 Clock* const clock_;
103 104
104 rtc::scoped_ptr<CriticalSectionWrapper> process_crit_sect_; 105 std::unique_ptr<CriticalSectionWrapper> process_crit_sect_;
105 rtc::CriticalSection encoder_crit_; 106 rtc::CriticalSection encoder_crit_;
106 VCMGenericEncoder* _encoder; 107 VCMGenericEncoder* _encoder;
107 VCMEncodedFrameCallback _encodedFrameCallback GUARDED_BY(encoder_crit_); 108 VCMEncodedFrameCallback _encodedFrameCallback GUARDED_BY(encoder_crit_);
108 media_optimization::MediaOptimization _mediaOpt; 109 media_optimization::MediaOptimization _mediaOpt;
109 VCMSendStatisticsCallback* _sendStatsCallback GUARDED_BY(process_crit_sect_); 110 VCMSendStatisticsCallback* _sendStatsCallback GUARDED_BY(process_crit_sect_);
110 VCMCodecDataBase _codecDataBase GUARDED_BY(encoder_crit_); 111 VCMCodecDataBase _codecDataBase GUARDED_BY(encoder_crit_);
111 bool frame_dropper_enabled_ GUARDED_BY(encoder_crit_); 112 bool frame_dropper_enabled_ GUARDED_BY(encoder_crit_);
112 VCMProcessTimer _sendStatsTimer; 113 VCMProcessTimer _sendStatsTimer;
113 114
114 // Must be accessed on the construction thread of VideoSender. 115 // Must be accessed on the construction thread of VideoSender.
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 void TriggerDecoderShutdown(); 179 void TriggerDecoderShutdown();
179 180
180 protected: 181 protected:
181 int32_t Decode(const webrtc::VCMEncodedFrame& frame) 182 int32_t Decode(const webrtc::VCMEncodedFrame& frame)
182 EXCLUSIVE_LOCKS_REQUIRED(_receiveCritSect); 183 EXCLUSIVE_LOCKS_REQUIRED(_receiveCritSect);
183 int32_t RequestKeyFrame(); 184 int32_t RequestKeyFrame();
184 int32_t RequestSliceLossIndication(const uint64_t pictureID) const; 185 int32_t RequestSliceLossIndication(const uint64_t pictureID) const;
185 186
186 private: 187 private:
187 Clock* const clock_; 188 Clock* const clock_;
188 rtc::scoped_ptr<CriticalSectionWrapper> process_crit_sect_; 189 std::unique_ptr<CriticalSectionWrapper> process_crit_sect_;
189 CriticalSectionWrapper* _receiveCritSect; 190 CriticalSectionWrapper* _receiveCritSect;
190 VCMTiming _timing; 191 VCMTiming _timing;
191 VCMReceiver _receiver; 192 VCMReceiver _receiver;
192 VCMDecodedFrameCallback _decodedFrameCallback; 193 VCMDecodedFrameCallback _decodedFrameCallback;
193 VCMFrameTypeCallback* _frameTypeCallback GUARDED_BY(process_crit_sect_); 194 VCMFrameTypeCallback* _frameTypeCallback GUARDED_BY(process_crit_sect_);
194 VCMReceiveStatisticsCallback* _receiveStatsCallback 195 VCMReceiveStatisticsCallback* _receiveStatsCallback
195 GUARDED_BY(process_crit_sect_); 196 GUARDED_BY(process_crit_sect_);
196 VCMDecoderTimingCallback* _decoderTimingCallback 197 VCMDecoderTimingCallback* _decoderTimingCallback
197 GUARDED_BY(process_crit_sect_); 198 GUARDED_BY(process_crit_sect_);
198 VCMPacketRequestCallback* _packetRequestCallback 199 VCMPacketRequestCallback* _packetRequestCallback
(...skipping 14 matching lines...) Expand all
213 214
214 VCMProcessTimer _receiveStatsTimer; 215 VCMProcessTimer _receiveStatsTimer;
215 VCMProcessTimer _retransmissionTimer; 216 VCMProcessTimer _retransmissionTimer;
216 VCMProcessTimer _keyRequestTimer; 217 VCMProcessTimer _keyRequestTimer;
217 QpParser qp_parser_; 218 QpParser qp_parser_;
218 }; 219 };
219 220
220 } // namespace vcm 221 } // namespace vcm
221 } // namespace webrtc 222 } // namespace webrtc
222 #endif // WEBRTC_MODULES_VIDEO_CODING_VIDEO_CODING_IMPL_H_ 223 #endif // WEBRTC_MODULES_VIDEO_CODING_VIDEO_CODING_IMPL_H_
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/timestamp_map.h ('k') | webrtc/modules/video_coding/video_coding_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698