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

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

Issue 1313563002: Java VideoRenderer.Callbacks: Make renderFrame() interface asynchronous (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase and rerun tests 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
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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 if (!renderFrameCalled) { 88 if (!renderFrameCalled) {
89 if (rendererName != null) { 89 if (rendererName != null) {
90 Log.d(TAG, rendererName + " render frame: " 90 Log.d(TAG, rendererName + " render frame: "
91 + frame.rotatedWidth() + " x " + frame.rotatedHeight()); 91 + frame.rotatedWidth() + " x " + frame.rotatedHeight());
92 } else { 92 } else {
93 Log.d(TAG, "Render frame: " + frame.rotatedWidth() + " x " + frame.rot atedHeight()); 93 Log.d(TAG, "Render frame: " + frame.rotatedWidth() + " x " + frame.rot atedHeight());
94 } 94 }
95 } 95 }
96 renderFrameCalled = true; 96 renderFrameCalled = true;
97 doneRendering.countDown(); 97 doneRendering.countDown();
98 VideoRenderer.renderFrameDone(frame);
AlexG 2015/08/26 23:27:25 nit: move this above doneRendering.countDown();
magjed_webrtc 2015/08/27 15:52:20 Done.
98 } 99 }
99 100
100 101
101 // This method shouldn't hold any locks or touch member variables since it 102 // This method shouldn't hold any locks or touch member variables since it
102 // blocks. 103 // blocks.
103 public boolean waitForFramesRendered(int timeoutMs) 104 public boolean waitForFramesRendered(int timeoutMs)
104 throws InterruptedException { 105 throws InterruptedException {
105 doneRendering.await(timeoutMs, TimeUnit.MILLISECONDS); 106 doneRendering.await(timeoutMs, TimeUnit.MILLISECONDS);
106 return (doneRendering.getCount() <= 0); 107 return (doneRendering.getCount() <= 0);
107 } 108 }
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 localRenderer.waitForFramesRendered(WAIT_TIMEOUT)); 425 localRenderer.waitForFramesRendered(WAIT_TIMEOUT));
425 assertTrue("Remote video frames were not rendered after video restart.", 426 assertTrue("Remote video frames were not rendered after video restart.",
426 remoteRenderer.waitForFramesRendered(WAIT_TIMEOUT)); 427 remoteRenderer.waitForFramesRendered(WAIT_TIMEOUT));
427 } 428 }
428 pcClient.close(); 429 pcClient.close();
429 assertTrue(waitForPeerConnectionClosed(WAIT_TIMEOUT)); 430 assertTrue(waitForPeerConnectionClosed(WAIT_TIMEOUT));
430 Log.d(TAG, "testVideoSourceRestart done."); 431 Log.d(TAG, "testVideoSourceRestart done.");
431 } 432 }
432 433
433 } 434 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698