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

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

Issue 2378003002: Delete webrtc::VideoFrame::CreateEmptyFrame. (Closed)
Patch Set: Created 4 years, 2 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) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 res = false; 67 res = false;
68 } 68 }
69 } 69 }
70 return res; 70 return res;
71 } 71 }
72 72
73 class EmptyFrameGenerator : public FrameGenerator { 73 class EmptyFrameGenerator : public FrameGenerator {
74 public: 74 public:
75 EmptyFrameGenerator(int width, int height) : width_(width), height_(height) {} 75 EmptyFrameGenerator(int width, int height) : width_(width), height_(height) {}
76 VideoFrame* NextFrame() override { 76 VideoFrame* NextFrame() override {
77 frame_.reset(new VideoFrame()); 77 frame_.reset(new VideoFrame(I420Buffer::Create(width_, height_),
78 frame_->CreateEmptyFrame(width_, height_, width_, (width_ + 1) / 2, 78 webrtc::kVideoRotation_0, 0));
79 (width_ + 1) / 2);
80 return frame_.get(); 79 return frame_.get();
81 } 80 }
82 81
83 private: 82 private:
84 const int width_; 83 const int width_;
85 const int height_; 84 const int height_;
86 std::unique_ptr<VideoFrame> frame_; 85 std::unique_ptr<VideoFrame> frame_;
87 }; 86 };
88 87
89 class EncodedImageCallbackImpl : public EncodedImageCallback { 88 class EncodedImageCallbackImpl : public EncodedImageCallback {
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 } 505 }
507 { 506 {
508 // TODO(andresp): Find out why this fails with framerate = 7.5 507 // TODO(andresp): Find out why this fails with framerate = 7.5
509 Vp8StreamInfo expected = {{7.0, 7.0, 7.0}, {high_b, high_b, high_b}}; 508 Vp8StreamInfo expected = {{7.0, 7.0, 7.0}, {high_b, high_b, high_b}};
510 EXPECT_THAT(SimulateWithFramerate(7.0), MatchesVp8StreamInfo(expected)); 509 EXPECT_THAT(SimulateWithFramerate(7.0), MatchesVp8StreamInfo(expected));
511 } 510 }
512 } 511 }
513 } // namespace 512 } // namespace
514 } // namespace vcm 513 } // namespace vcm
515 } // namespace webrtc 514 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698