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

Side by Side Diff: talk/app/webrtc/java/testcommon/src/org/webrtc/PeerConnectionTest.java

Issue 1257043004: AppRTCDemo: Render each video in a separate SurfaceView (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Change license header for PercentFrameLayout.java 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
« no previous file with comments | « talk/app/webrtc/java/src/org/webrtc/VideoRenderer.java ('k') | talk/libjingle.gyp » ('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 2013 Google Inc. 3 * Copyright 2013 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 129
130 public synchronized void expectFramesDelivered(int count) { 130 public synchronized void expectFramesDelivered(int count) {
131 assertFalse(RENDER_TO_GUI); 131 assertFalse(RENDER_TO_GUI);
132 expectedFramesDelivered += count; 132 expectedFramesDelivered += count;
133 } 133 }
134 134
135 @Override 135 @Override
136 public synchronized void renderFrame(VideoRenderer.I420Frame frame) { 136 public synchronized void renderFrame(VideoRenderer.I420Frame frame) {
137 setSize(frame.width, frame.height); 137 setSize(frame.width, frame.height);
138 --expectedFramesDelivered; 138 --expectedFramesDelivered;
139 VideoRenderer.renderFrameDone(frame);
139 } 140 }
140 141
141 // TODO(guoweis): Remove this once chrome code base is updated. 142 // TODO(guoweis): Remove this once chrome code base is updated.
142 @Override 143 @Override
143 public boolean canApplyRotation() { 144 public boolean canApplyRotation() {
144 return false; 145 return false;
145 } 146 }
146 147
147 public synchronized void expectSignalingChange(SignalingState newState) { 148 public synchronized void expectSignalingChange(SignalingState newState) {
148 expectedSignalingChanges.add(newState); 149 expectedSignalingChanges.add(newState);
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 private void setSize(int width, int height) { 447 private void setSize(int width, int height) {
447 assertEquals(this.width, -1); 448 assertEquals(this.width, -1);
448 assertEquals(this.height, -1); 449 assertEquals(this.height, -1);
449 this.width = width; 450 this.width = width;
450 this.height = height; 451 this.height = height;
451 } 452 }
452 453
453 @Override 454 @Override
454 public void renderFrame(VideoRenderer.I420Frame frame) { 455 public void renderFrame(VideoRenderer.I420Frame frame) {
455 ++numFramesDelivered; 456 ++numFramesDelivered;
457 VideoRenderer.renderFrameDone(frame);
456 } 458 }
457 459
458 // TODO(guoweis): Remove this once chrome code base is updated. 460 // TODO(guoweis): Remove this once chrome code base is updated.
459 @Override 461 @Override
460 public boolean canApplyRotation() { 462 public boolean canApplyRotation() {
461 return false; 463 return false;
462 } 464 }
463 } 465 }
464 466
465 private static VideoRenderer createVideoRenderer( 467 private static VideoRenderer createVideoRenderer(
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 TreeSet<String> threads = new TreeSet<String>(); 775 TreeSet<String> threads = new TreeSet<String>();
774 // This pokes at /proc instead of using the Java APIs because we're also 776 // This pokes at /proc instead of using the Java APIs because we're also
775 // looking for libjingle/webrtc native threads, most of which won't have 777 // looking for libjingle/webrtc native threads, most of which won't have
776 // attached to the JVM. 778 // attached to the JVM.
777 for (String threadId : (new File("/proc/self/task")).list()) { 779 for (String threadId : (new File("/proc/self/task")).list()) {
778 threads.add(threadId); 780 threads.add(threadId);
779 } 781 }
780 return threads; 782 return threads;
781 } 783 }
782 } 784 }
OLDNEW
« no previous file with comments | « talk/app/webrtc/java/src/org/webrtc/VideoRenderer.java ('k') | talk/libjingle.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698