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

Side by Side Diff: webrtc/media/base/videoadapter_unittest.cc

Issue 1587193006: Move talk/media to webrtc/media (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebased to b647aca12a884a13c1728118586245399b55fa3d (#11493) 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
« no previous file with comments | « webrtc/media/base/videoadapter.cc ('k') | webrtc/media/base/videocapturer.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 * libjingle 2 * libjingle
3 * Copyright 2010 Google Inc. 3 * Copyright 2010 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 13 matching lines...) Expand all
24 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 24 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
25 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28 // If we don't have a WebRtcVideoFrame, just skip all of these tests. 28 // If we don't have a WebRtcVideoFrame, just skip all of these tests.
29 #if defined(HAVE_WEBRTC_VIDEO) 29 #if defined(HAVE_WEBRTC_VIDEO)
30 #include <limits.h> // For INT_MAX 30 #include <limits.h> // For INT_MAX
31 #include <string> 31 #include <string>
32 #include <vector> 32 #include <vector>
33 33
34 #include "talk/media/base/fakevideocapturer.h"
35 #include "talk/media/base/mediachannel.h"
36 #include "talk/media/base/testutils.h"
37 #include "talk/media/base/videoadapter.h"
38 #include "webrtc/base/gunit.h" 34 #include "webrtc/base/gunit.h"
39 #include "webrtc/base/logging.h" 35 #include "webrtc/base/logging.h"
40 #include "webrtc/base/sigslot.h" 36 #include "webrtc/base/sigslot.h"
37 #include "webrtc/media/base/fakevideocapturer.h"
38 #include "webrtc/media/base/mediachannel.h"
39 #include "webrtc/media/base/testutils.h"
40 #include "webrtc/media/base/videoadapter.h"
41 41
42 namespace cricket { 42 namespace cricket {
43 43
44 namespace { 44 namespace {
45 static const uint32_t kWaitTimeout = 3000U; // 3 seconds. 45 static const uint32_t kWaitTimeout = 3000U; // 3 seconds.
46 static const uint32_t kShortWaitTimeout = 1000U; // 1 second. 46 static const uint32_t kShortWaitTimeout = 1000U; // 1 second.
47 void UpdateCpuLoad(CoordinatedVideoAdapter* adapter, 47 void UpdateCpuLoad(CoordinatedVideoAdapter* adapter,
48 int current_cpus, int max_cpus, float process_load, float system_load) { 48 int current_cpus, int max_cpus, float process_load, float system_load) {
49 adapter->set_cpu_load_min_samples(1); 49 adapter->set_cpu_load_min_samples(1);
50 adapter->OnCpuLoadUpdated(current_cpus, max_cpus, 50 adapter->OnCpuLoadUpdated(current_cpus, max_cpus,
(...skipping 1247 matching lines...) Expand 10 before | Expand all | Expand 10 after
1298 // it gets all the way there. 1298 // it gets all the way there.
1299 for (size_t i = 0; i < 10; ++i) { 1299 for (size_t i = 0; i < 10; ++i) {
1300 UpdateCpuLoad(&adapter, 1, 1, 0.5f, 0.5f); 1300 UpdateCpuLoad(&adapter, 1, 1, 0.5f, 0.5f);
1301 } 1301 }
1302 EXPECT_EQ(640, adapter.output_format().width); 1302 EXPECT_EQ(640, adapter.output_format().width);
1303 EXPECT_EQ(360, adapter.output_format().height); 1303 EXPECT_EQ(360, adapter.output_format().height);
1304 } 1304 }
1305 1305
1306 } // namespace cricket 1306 } // namespace cricket
1307 #endif // HAVE_WEBRTC_VIDEO 1307 #endif // HAVE_WEBRTC_VIDEO
OLDNEW
« no previous file with comments | « webrtc/media/base/videoadapter.cc ('k') | webrtc/media/base/videocapturer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698