VideoCapturerAndroid: Report onFirstFrameAvailable() for textures as well
We currently only trigger onFirstFrameAvailable() for byte buffer frames. R=perkj@webrtc.org Review URL: https://codereview.webrtc.org/1701993002 . Cr-Commit-Position: refs/heads/master@{#11670}
This commit is contained in:
parent
5199c74d25
commit
f45381e1e5
@ -152,6 +152,18 @@ public class VideoCapturerAndroidTest extends ActivityTestCase {
|
||||
capturer, cameraEvents, getInstrumentation().getContext());
|
||||
}
|
||||
|
||||
@MediumTest
|
||||
public void testCameraEventsUsingTextures() throws InterruptedException {
|
||||
EglBase eglBase = EglBase.create();
|
||||
VideoCapturerAndroidTestFixtures.CameraEvents cameraEvents =
|
||||
VideoCapturerAndroidTestFixtures.createCameraEvents();
|
||||
VideoCapturerAndroid capturer =
|
||||
VideoCapturerAndroid.create("", cameraEvents, eglBase.getEglBaseContext());
|
||||
VideoCapturerAndroidTestFixtures.cameraEventsInvoked(
|
||||
capturer, cameraEvents, getInstrumentation().getContext());
|
||||
eglBase.release();
|
||||
}
|
||||
|
||||
@MediumTest
|
||||
// Test what happens when attempting to call e.g. switchCamera() after camera has been stopped.
|
||||
public void testCameraCallsAfterStop() throws InterruptedException {
|
||||
|
||||
@ -678,9 +678,13 @@ public class VideoCapturerAndroid implements
|
||||
return;
|
||||
}
|
||||
if (dropNextFrame) {
|
||||
surfaceHelper.returnTextureFrame();
|
||||
dropNextFrame = false;
|
||||
return;
|
||||
surfaceHelper.returnTextureFrame();
|
||||
dropNextFrame = false;
|
||||
return;
|
||||
}
|
||||
if (eventsHandler != null && !firstFrameReported) {
|
||||
eventsHandler.onFirstFrameAvailable();
|
||||
firstFrameReported = true;
|
||||
}
|
||||
|
||||
int rotation = getFrameOrientation();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user