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

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

Issue 1257043004: AppRTCDemo: Render each video in a separate SurfaceView (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: addressing alex's comments Created 5 years, 4 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 * libjingle 2 * libjingle
3 * Copyright 2014 Google Inc. 3 * Copyright 2014 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 public synchronized void renderFrame(VideoRenderer.I420Frame frame) { 110 public synchronized void renderFrame(VideoRenderer.I420Frame frame) {
111 if (!renderFrameCalled) { 111 if (!renderFrameCalled) {
112 if (rendererName != null) { 112 if (rendererName != null) {
113 Log.d(TAG, rendererName + " render frame: " + frame.width + " x " + fr ame.height); 113 Log.d(TAG, rendererName + " render frame: " + frame.width + " x " + fr ame.height);
114 } else { 114 } else {
115 Log.d(TAG, "Render frame: " + frame.width + " x " + frame.height); 115 Log.d(TAG, "Render frame: " + frame.width + " x " + frame.height);
116 } 116 }
117 } 117 }
118 renderFrameCalled = true; 118 renderFrameCalled = true;
119 doneRendering.countDown(); 119 doneRendering.countDown();
120 VideoRenderer.renderFrameDone(frame);
120 } 121 }
121 122
122 123
123 // This method shouldn't hold any locks or touch member variables since it 124 // This method shouldn't hold any locks or touch member variables since it
124 // blocks. 125 // blocks.
125 public boolean waitForFramesRendered(int timeoutMs) 126 public boolean waitForFramesRendered(int timeoutMs)
126 throws InterruptedException { 127 throws InterruptedException {
127 doneRendering.await(timeoutMs, TimeUnit.MILLISECONDS); 128 doneRendering.await(timeoutMs, TimeUnit.MILLISECONDS);
128 return (doneRendering.getCount() <= 0); 129 return (doneRendering.getCount() <= 0);
129 } 130 }
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 localRenderer.waitForFramesRendered(WAIT_TIMEOUT)); 447 localRenderer.waitForFramesRendered(WAIT_TIMEOUT));
447 assertTrue("Remote video frames were not rendered after video restart.", 448 assertTrue("Remote video frames were not rendered after video restart.",
448 remoteRenderer.waitForFramesRendered(WAIT_TIMEOUT)); 449 remoteRenderer.waitForFramesRendered(WAIT_TIMEOUT));
449 } 450 }
450 pcClient.close(); 451 pcClient.close();
451 assertTrue(waitForPeerConnectionClosed(WAIT_TIMEOUT)); 452 assertTrue(waitForPeerConnectionClosed(WAIT_TIMEOUT));
452 Log.d(TAG, "testVideoSourceRestart done."); 453 Log.d(TAG, "testVideoSourceRestart done.");
453 } 454 }
454 455
455 } 456 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698