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

Side by Side Diff: webrtc/examples/androidtests/src/org/appspot/apprtc/test/PeerConnectionClientTest.java

Issue 1306073003: Android: Remove VideoRenderer.Callbacks.canApplyRotation() (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Restore previous test behaviour + remove some dead code Created 5 years, 3 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 | « talk/app/webrtc/java/testcommon/src/org/webrtc/PeerConnectionTest.java ('k') | no next file » | 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 2014 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2014 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 this.rendererName = rendererName; 76 this.rendererName = rendererName;
77 reset(expectedFrames); 77 reset(expectedFrames);
78 } 78 }
79 79
80 // Resets render to wait for new amount of video frames. 80 // Resets render to wait for new amount of video frames.
81 public synchronized void reset(int expectedFrames) { 81 public synchronized void reset(int expectedFrames) {
82 renderFrameCalled = false; 82 renderFrameCalled = false;
83 doneRendering = new CountDownLatch(expectedFrames); 83 doneRendering = new CountDownLatch(expectedFrames);
84 } 84 }
85 85
86 // TODO(guoweis): Remove this once chrome code base is updated.
87 @Override
88 public boolean canApplyRotation() {
89 return false;
90 }
91
92 @Override 86 @Override
93 public synchronized void renderFrame(VideoRenderer.I420Frame frame) { 87 public synchronized void renderFrame(VideoRenderer.I420Frame frame) {
94 if (!renderFrameCalled) { 88 if (!renderFrameCalled) {
95 if (rendererName != null) { 89 if (rendererName != null) {
96 Log.d(TAG, rendererName + " render frame: " + frame.width + " x " + fr ame.height); 90 Log.d(TAG, rendererName + " render frame: "
91 + frame.rotatedWidth() + " x " + frame.rotatedHeight());
97 } else { 92 } else {
98 Log.d(TAG, "Render frame: " + frame.width + " x " + frame.height); 93 Log.d(TAG, "Render frame: " + frame.rotatedWidth() + " x " + frame.rot atedHeight());
99 } 94 }
100 } 95 }
101 renderFrameCalled = true; 96 renderFrameCalled = true;
102 doneRendering.countDown(); 97 doneRendering.countDown();
103 } 98 }
104 99
105 100
106 // This method shouldn't hold any locks or touch member variables since it 101 // This method shouldn't hold any locks or touch member variables since it
107 // blocks. 102 // blocks.
108 public boolean waitForFramesRendered(int timeoutMs) 103 public boolean waitForFramesRendered(int timeoutMs)
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 localRenderer.waitForFramesRendered(WAIT_TIMEOUT)); 424 localRenderer.waitForFramesRendered(WAIT_TIMEOUT));
430 assertTrue("Remote video frames were not rendered after video restart.", 425 assertTrue("Remote video frames were not rendered after video restart.",
431 remoteRenderer.waitForFramesRendered(WAIT_TIMEOUT)); 426 remoteRenderer.waitForFramesRendered(WAIT_TIMEOUT));
432 } 427 }
433 pcClient.close(); 428 pcClient.close();
434 assertTrue(waitForPeerConnectionClosed(WAIT_TIMEOUT)); 429 assertTrue(waitForPeerConnectionClosed(WAIT_TIMEOUT));
435 Log.d(TAG, "testVideoSourceRestart done."); 430 Log.d(TAG, "testVideoSourceRestart done.");
436 } 431 }
437 432
438 } 433 }
OLDNEW
« no previous file with comments | « talk/app/webrtc/java/testcommon/src/org/webrtc/PeerConnectionTest.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698