OLD | NEW |
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 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 } | 408 } |
409 | 409 |
410 /** Passes GLSurfaceView to video renderer. */ | 410 /** Passes GLSurfaceView to video renderer. */ |
411 public static synchronized void setView(GLSurfaceView surface, | 411 public static synchronized void setView(GLSurfaceView surface, |
412 Runnable eglContextReadyCallback) { | 412 Runnable eglContextReadyCallback) { |
413 Logging.d(TAG, "VideoRendererGui.setView"); | 413 Logging.d(TAG, "VideoRendererGui.setView"); |
414 instance = new VideoRendererGui(surface); | 414 instance = new VideoRendererGui(surface); |
415 eglContextReady = eglContextReadyCallback; | 415 eglContextReady = eglContextReadyCallback; |
416 } | 416 } |
417 | 417 |
| 418 @Deprecated |
| 419 public static synchronized EGLContext getEGLContext() { |
| 420 return eglContext; |
| 421 } |
| 422 |
418 public static synchronized EglBase.Context getEglBaseContext() { | 423 public static synchronized EglBase.Context getEglBaseContext() { |
419 return new EglBase10.Context(eglContext); | 424 return new EglBase.Context(eglContext); |
420 } | 425 } |
421 | 426 |
422 /** Releases GLSurfaceView video renderer. */ | 427 /** Releases GLSurfaceView video renderer. */ |
423 public static synchronized void dispose() { | 428 public static synchronized void dispose() { |
424 if (instance == null){ | 429 if (instance == null){ |
425 return; | 430 return; |
426 } | 431 } |
427 Logging.d(TAG, "VideoRendererGui.dispose"); | 432 Logging.d(TAG, "VideoRendererGui.dispose"); |
428 synchronized (instance.yuvImageRenderers) { | 433 synchronized (instance.yuvImageRenderers) { |
429 for (YuvImageRenderer yuvImageRenderer : instance.yuvImageRenderers) { | 434 for (YuvImageRenderer yuvImageRenderer : instance.yuvImageRenderers) { |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
641 GLES20.glViewport(0, 0, screenWidth, screenHeight); | 646 GLES20.glViewport(0, 0, screenWidth, screenHeight); |
642 GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT); | 647 GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT); |
643 synchronized (yuvImageRenderers) { | 648 synchronized (yuvImageRenderers) { |
644 for (YuvImageRenderer yuvImageRenderer : yuvImageRenderers) { | 649 for (YuvImageRenderer yuvImageRenderer : yuvImageRenderers) { |
645 yuvImageRenderer.draw(drawer); | 650 yuvImageRenderer.draw(drawer); |
646 } | 651 } |
647 } | 652 } |
648 } | 653 } |
649 | 654 |
650 } | 655 } |
OLD | NEW |