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

Side by Side Diff: talk/app/webrtc/java/android/org/webrtc/EglBase10.java

Issue 1523843006: MediaCodecVideoEncoder, set timestamp on the encoder surface when drawing a texture. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years 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 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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 252
253 @Override 253 @Override
254 public void swapBuffers() { 254 public void swapBuffers() {
255 checkIsNotReleased(); 255 checkIsNotReleased();
256 if (eglSurface == EGL10.EGL_NO_SURFACE) { 256 if (eglSurface == EGL10.EGL_NO_SURFACE) {
257 throw new RuntimeException("No EGLSurface - can't swap buffers"); 257 throw new RuntimeException("No EGLSurface - can't swap buffers");
258 } 258 }
259 egl.eglSwapBuffers(eglDisplay, eglSurface); 259 egl.eglSwapBuffers(eglDisplay, eglSurface);
260 } 260 }
261 261
262 @Override
263 public void swapBuffers(long timeStampNs) {
magjed_webrtc 2015/12/16 13:51:53 ditto - Remove this. It should never be called, ri
perkj_webrtc 2015/12/16 21:18:44 Done.
264 // Egl 1.0 does not support the extension to set the time stamp on a surface so ignore it.
265 swapBuffers();
266 }
267
262 // Return an EGLDisplay, or die trying. 268 // Return an EGLDisplay, or die trying.
263 private EGLDisplay getEglDisplay() { 269 private EGLDisplay getEglDisplay() {
264 EGLDisplay eglDisplay = egl.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY); 270 EGLDisplay eglDisplay = egl.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY);
265 if (eglDisplay == EGL10.EGL_NO_DISPLAY) { 271 if (eglDisplay == EGL10.EGL_NO_DISPLAY) {
266 throw new RuntimeException("Unable to get EGL10 display"); 272 throw new RuntimeException("Unable to get EGL10 display");
267 } 273 }
268 int[] version = new int[2]; 274 int[] version = new int[2];
269 if (!egl.eglInitialize(eglDisplay, version)) { 275 if (!egl.eglInitialize(eglDisplay, version)) {
270 throw new RuntimeException("Unable to initialize EGL10"); 276 throw new RuntimeException("Unable to initialize EGL10");
271 } 277 }
(...skipping 18 matching lines...) Expand all
290 EGLContext rootContext = 296 EGLContext rootContext =
291 sharedContext == null ? EGL10.EGL_NO_CONTEXT : sharedContext.eglContext; 297 sharedContext == null ? EGL10.EGL_NO_CONTEXT : sharedContext.eglContext;
292 EGLContext eglContext = 298 EGLContext eglContext =
293 egl.eglCreateContext(eglDisplay, eglConfig, rootContext, contextAttribut es); 299 egl.eglCreateContext(eglDisplay, eglConfig, rootContext, contextAttribut es);
294 if (eglContext == EGL10.EGL_NO_CONTEXT) { 300 if (eglContext == EGL10.EGL_NO_CONTEXT) {
295 throw new RuntimeException("Failed to create EGL context"); 301 throw new RuntimeException("Failed to create EGL context");
296 } 302 }
297 return eglContext; 303 return eglContext;
298 } 304 }
299 } 305 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698