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

Side by Side Diff: talk/app/webrtc/androidtests/src/org/webrtc/VideoCapturerAndroidTest.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 | « no previous file | talk/app/webrtc/java/android/org/webrtc/EglBase.java » ('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 2015 Google Inc. 3 * Copyright 2015 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 30 matching lines...) Expand all
41 static class RendererCallbacks implements VideoRenderer.Callbacks { 41 static class RendererCallbacks implements VideoRenderer.Callbacks {
42 private int framesRendered = 0; 42 private int framesRendered = 0;
43 private Object frameLock = 0; 43 private Object frameLock = 0;
44 44
45 @Override 45 @Override
46 public void renderFrame(I420Frame frame) { 46 public void renderFrame(I420Frame frame) {
47 synchronized (frameLock) { 47 synchronized (frameLock) {
48 ++framesRendered; 48 ++framesRendered;
49 frameLock.notify(); 49 frameLock.notify();
50 } 50 }
51 VideoRenderer.renderFrameDone(frame);
51 } 52 }
52 53
53 // TODO(guoweis): Remove this once chrome code base is updated. 54 // TODO(guoweis): Remove this once chrome code base is updated.
54 @Override 55 @Override
55 public boolean canApplyRotation() { 56 public boolean canApplyRotation() {
56 return false; 57 return false;
57 } 58 }
58 59
59 public int WaitForNextFrameToRender() throws InterruptedException { 60 public int WaitForNextFrameToRender() throws InterruptedException {
60 synchronized (frameLock) { 61 synchronized (frameLock) {
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 observer.WaitForNextCapturedFrame(); 307 observer.WaitForNextCapturedFrame();
307 capturer.stopCapture(); 308 capturer.stopCapture();
308 309
309 listOftimestamps = observer.getCopyAndResetListOftimeStamps(); 310 listOftimestamps = observer.getCopyAndResetListOftimeStamps();
310 assertTrue(listOftimestamps.size() >= 2); 311 assertTrue(listOftimestamps.size() >= 2);
311 for (Long timeStamp : listOftimestamps) { 312 for (Long timeStamp : listOftimestamps) {
312 capturer.returnBuffer(timeStamp); 313 capturer.returnBuffer(timeStamp);
313 } 314 }
314 } 315 }
315 } 316 }
OLDNEW
« no previous file with comments | « no previous file | talk/app/webrtc/java/android/org/webrtc/EglBase.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698