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

Side by Side Diff: webrtc/modules/video_coding/codecs/test/videoprocessor.h

Issue 1888593004: Delete all use of tick_util.h. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 8 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_CODECS_TEST_VIDEOPROCESSOR_H_ 11 #ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_VIDEOPROCESSOR_H_
12 #define WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_VIDEOPROCESSOR_H_ 12 #define WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_VIDEOPROCESSOR_H_
13 13
14 #include <string> 14 #include <string>
15 15
16 #include "webrtc/base/checks.h" 16 #include "webrtc/base/checks.h"
17 #include "webrtc/common_video/libyuv/include/scaler.h" 17 #include "webrtc/common_video/libyuv/include/scaler.h"
18 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" 18 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
19 #include "webrtc/modules/video_coding/include/video_codec_interface.h" 19 #include "webrtc/modules/video_coding/include/video_codec_interface.h"
20 #include "webrtc/modules/video_coding/codecs/test/packet_manipulator.h" 20 #include "webrtc/modules/video_coding/codecs/test/packet_manipulator.h"
21 #include "webrtc/modules/video_coding/codecs/test/stats.h" 21 #include "webrtc/modules/video_coding/codecs/test/stats.h"
22 #include "webrtc/system_wrappers/include/tick_util.h"
23 #include "webrtc/test/testsupport/frame_reader.h" 22 #include "webrtc/test/testsupport/frame_reader.h"
24 #include "webrtc/test/testsupport/frame_writer.h" 23 #include "webrtc/test/testsupport/frame_writer.h"
25 #include "webrtc/video_frame.h" 24 #include "webrtc/video_frame.h"
26 25
27 namespace webrtc { 26 namespace webrtc {
28 namespace test { 27 namespace test {
29 28
30 // Defines which frame types shall be excluded from packet loss and when. 29 // Defines which frame types shall be excluded from packet loss and when.
31 enum ExcludeFrameTypes { 30 enum ExcludeFrameTypes {
32 // Will exclude the first keyframe in the video sequence from packet loss. 31 // Will exclude the first keyframe in the video sequence from packet loss.
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 171
173 private: 172 private:
174 // Invoked by the callback when a frame has completed encoding. 173 // Invoked by the callback when a frame has completed encoding.
175 void FrameEncoded(webrtc::VideoCodecType codec, 174 void FrameEncoded(webrtc::VideoCodecType codec,
176 const webrtc::EncodedImage& encodedImage, 175 const webrtc::EncodedImage& encodedImage,
177 const webrtc::RTPFragmentationHeader* fragmentation); 176 const webrtc::RTPFragmentationHeader* fragmentation);
178 // Invoked by the callback when a frame has completed decoding. 177 // Invoked by the callback when a frame has completed decoding.
179 void FrameDecoded(const webrtc::VideoFrame& image); 178 void FrameDecoded(const webrtc::VideoFrame& image);
180 // Used for getting a 32-bit integer representing time 179 // Used for getting a 32-bit integer representing time
181 // (checks the size is within signed 32-bit bounds before casting it) 180 // (checks the size is within signed 32-bit bounds before casting it)
182 int GetElapsedTimeMicroseconds(const webrtc::TickTime& start, 181 int GetElapsedTimeMicroseconds(int64_t start,
183 const webrtc::TickTime& stop); 182 int64_t stop);
stefan-webrtc 2016/04/19 09:19:12 git cl format
nisse-webrtc 2016/04/19 12:19:25 Fixing this. Not doing a cl format of all the cl u
184 // Updates the encoder with the target bit rate and the frame rate. 183 // Updates the encoder with the target bit rate and the frame rate.
185 void SetRates(int bit_rate, int frame_rate) override; 184 void SetRates(int bit_rate, int frame_rate) override;
186 // Return the size of the encoded frame in bytes. 185 // Return the size of the encoded frame in bytes.
187 size_t EncodedFrameSize() override; 186 size_t EncodedFrameSize() override;
188 // Return the encoded frame type (key or delta). 187 // Return the encoded frame type (key or delta).
189 FrameType EncodedFrameType() override; 188 FrameType EncodedFrameType() override;
190 // Return the number of dropped frames. 189 // Return the number of dropped frames.
191 int NumberDroppedFrames() override; 190 int NumberDroppedFrames() override;
192 // Return the number of spatial resizes. 191 // Return the number of spatial resizes.
193 int NumberSpatialResizes() override; 192 int NumberSpatialResizes() override;
(...skipping 24 matching lines...) Expand all
218 FrameType encoded_frame_type_; 217 FrameType encoded_frame_type_;
219 int prev_time_stamp_; 218 int prev_time_stamp_;
220 int num_dropped_frames_; 219 int num_dropped_frames_;
221 int num_spatial_resizes_; 220 int num_spatial_resizes_;
222 int last_encoder_frame_width_; 221 int last_encoder_frame_width_;
223 int last_encoder_frame_height_; 222 int last_encoder_frame_height_;
224 Scaler scaler_; 223 Scaler scaler_;
225 224
226 // Statistics 225 // Statistics
227 double bit_rate_factor_; // multiply frame length with this to get bit rate 226 double bit_rate_factor_; // multiply frame length with this to get bit rate
228 webrtc::TickTime encode_start_; 227 int64_t encode_start_;
229 webrtc::TickTime decode_start_; 228 int64_t decode_start_;
stefan-webrtc 2016/04/19 09:19:12 Units
nisse-webrtc 2016/04/19 12:19:25 Done.
230 229
231 // Callback class required to implement according to the VideoEncoder API. 230 // Callback class required to implement according to the VideoEncoder API.
232 class VideoProcessorEncodeCompleteCallback 231 class VideoProcessorEncodeCompleteCallback
233 : public webrtc::EncodedImageCallback { 232 : public webrtc::EncodedImageCallback {
234 public: 233 public:
235 explicit VideoProcessorEncodeCompleteCallback(VideoProcessorImpl* vp) 234 explicit VideoProcessorEncodeCompleteCallback(VideoProcessorImpl* vp)
236 : video_processor_(vp) {} 235 : video_processor_(vp) {}
237 int32_t Encoded( 236 int32_t Encoded(
238 const webrtc::EncodedImage& encoded_image, 237 const webrtc::EncodedImage& encoded_image,
239 const webrtc::CodecSpecificInfo* codec_specific_info, 238 const webrtc::CodecSpecificInfo* codec_specific_info,
(...skipping 18 matching lines...) Expand all
258 257
259 private: 258 private:
260 VideoProcessorImpl* video_processor_; 259 VideoProcessorImpl* video_processor_;
261 }; 260 };
262 }; 261 };
263 262
264 } // namespace test 263 } // namespace test
265 } // namespace webrtc 264 } // namespace webrtc
266 265
267 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_VIDEOPROCESSOR_H_ 266 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_VIDEOPROCESSOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698