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

Side by Side Diff: webrtc/modules/video_coding/generic_encoder_unittest.cc

Issue 2995953002: Revert of Add a flags field to video timing extension. (Closed)
Patch Set: Created 3 years, 4 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) 2017 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2017 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 13 matching lines...) Expand all
24 const int& i) { 24 const int& i) {
25 return min_frame_size + (s + 1) * i % (max_frame_size - min_frame_size); 25 return min_frame_size + (s + 1) * i % (max_frame_size - min_frame_size);
26 } 26 }
27 27
28 class FakeEncodedImageCallback : public EncodedImageCallback { 28 class FakeEncodedImageCallback : public EncodedImageCallback {
29 public: 29 public:
30 FakeEncodedImageCallback() : last_frame_was_timing_(false) {} 30 FakeEncodedImageCallback() : last_frame_was_timing_(false) {}
31 Result OnEncodedImage(const EncodedImage& encoded_image, 31 Result OnEncodedImage(const EncodedImage& encoded_image,
32 const CodecSpecificInfo* codec_specific_info, 32 const CodecSpecificInfo* codec_specific_info,
33 const RTPFragmentationHeader* fragmentation) override { 33 const RTPFragmentationHeader* fragmentation) override {
34 last_frame_was_timing_ = 34 last_frame_was_timing_ = encoded_image.timing_.is_timing_frame;
35 encoded_image.timing_.flags != TimingFrameFlags::kInvalid;
36 return Result(Result::OK); 35 return Result(Result::OK);
37 }; 36 };
38 37
39 bool WasTimingFrame() { return last_frame_was_timing_; } 38 bool WasTimingFrame() { return last_frame_was_timing_; }
40 39
41 private: 40 private:
42 bool last_frame_was_timing_; 41 bool last_frame_was_timing_;
43 }; 42 };
44 43
45 enum class FrameType { 44 enum class FrameType {
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 kAverageSize[s] * kDefaultOutlierFrameSizePercent / 100) { 159 kAverageSize[s] * kDefaultOutlierFrameSizePercent / 100) {
161 // Too big frame. May be dropped or timing, but not normal. 160 // Too big frame. May be dropped or timing, but not normal.
162 EXPECT_NE(frames[s][i], FrameType::kNormal); 161 EXPECT_NE(frames[s][i], FrameType::kNormal);
163 } 162 }
164 } 163 }
165 } 164 }
166 } 165 }
167 166
168 } // namespace test 167 } // namespace test
169 } // namespace webrtc 168 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/generic_encoder.cc ('k') | webrtc/sdk/android/src/jni/androidmediaencoder_jni.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698