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