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

Side by Side Diff: webrtc/media/base/videoframe_unittest.h

Issue 2080253002: Delete method cricket::VideoFrame::Copy. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix syntax error in objc files. Created 4 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/media/base/videoframe.h ('k') | webrtc/media/engine/webrtcvideoframe.h » ('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) 2004 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2004 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 1790 matching lines...) Expand 10 before | Expand all | Expand 10 after
1801 u, kWidth / 2, 1801 u, kWidth / 2,
1802 v, kWidth / 2, 1802 v, kWidth / 2,
1803 kWidth, kHeight)); 1803 kWidth, kHeight));
1804 } 1804 }
1805 EXPECT_TRUE(frame2.Init(cricket::FOURCC_I422, kWidth, kHeight, kWidth, 1805 EXPECT_TRUE(frame2.Init(cricket::FOURCC_I422, kWidth, kHeight, kWidth,
1806 kHeight, y, out_size, 1, 1, 0, 1806 kHeight, y, out_size, 1, 1, 0,
1807 webrtc::kVideoRotation_0)); 1807 webrtc::kVideoRotation_0));
1808 EXPECT_TRUE(IsEqual(frame1, frame2, 1)); 1808 EXPECT_TRUE(IsEqual(frame1, frame2, 1));
1809 } 1809 }
1810 1810
1811 ///////////////////
1812 // General tests //
1813 ///////////////////
1814
1815 void Copy() {
1816 std::unique_ptr<T> source(new T);
1817 std::unique_ptr<cricket::VideoFrame> target;
1818 ASSERT_TRUE(LoadFrameNoRepeat(source.get()));
1819 target.reset(source->Copy());
1820 EXPECT_TRUE(IsEqual(*source, *target, 0));
1821 source.reset();
1822 ASSERT_TRUE(target->video_frame_buffer() != NULL);
1823 EXPECT_TRUE(target->video_frame_buffer()->DataY() != NULL);
1824 }
1825
1826 void CopyIsRef() {
1827 std::unique_ptr<T> source(new T);
1828 std::unique_ptr<const cricket::VideoFrame> target;
1829 ASSERT_TRUE(LoadFrameNoRepeat(source.get()));
1830 target.reset(source->Copy());
1831 EXPECT_TRUE(IsEqual(*source, *target, 0));
1832 const T* const_source = source.get();
1833 EXPECT_EQ(const_source->video_frame_buffer(), target->video_frame_buffer());
1834 }
1835
1836 int repeat_; 1811 int repeat_;
1837 }; 1812 };
1838 1813
1839 #endif // WEBRTC_MEDIA_BASE_VIDEOFRAME_UNITTEST_H_ 1814 #endif // WEBRTC_MEDIA_BASE_VIDEOFRAME_UNITTEST_H_
OLDNEW
« no previous file with comments | « webrtc/media/base/videoframe.h ('k') | webrtc/media/engine/webrtcvideoframe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698