ijksdl_egl.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /*
  2. * Copyright (c) 2016 Bilibili
  3. * copyright (c) 2016 Zhang Rui <bbcallen@gmail.com>
  4. *
  5. * This file is part of ijkPlayer.
  6. *
  7. * ijkPlayer is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU Lesser General Public
  9. * License as published by the Free Software Foundation; either
  10. * version 2.1 of the License, or (at your option) any later version.
  11. *
  12. * ijkPlayer is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * Lesser General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Lesser General Public
  18. * License along with ijkPlayer; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  20. */
  21. #ifndef IJKSDL__IJKSDL_EGL_H
  22. #define IJKSDL__IJKSDL_EGL_H
  23. #include <EGL/egl.h>
  24. #include <EGL/eglext.h>
  25. #include <EGL/eglplatform.h>
  26. #include "ijksdl_class.h"
  27. typedef struct SDL_VoutOverlay SDL_VoutOverlay;
  28. typedef struct IJK_EGL_Opaque IJK_EGL_Opaque;
  29. #if 0
  30. enum {
  31. IJK_GLES2__GL_EXT_texture_rg,
  32. IJK_GLES2__MAX_EXT,
  33. };
  34. #endif
  35. typedef struct IJK_EGL
  36. {
  37. SDL_Class *opaque_class;
  38. IJK_EGL_Opaque *opaque;
  39. EGLNativeWindowType window;
  40. EGLDisplay display;
  41. EGLSurface surface;
  42. EGLContext context;
  43. EGLint width;
  44. EGLint height;
  45. #if 0
  46. uint8_t gles2_extensions[IJK_GLES2__MAX_EXT];
  47. #endif
  48. } IJK_EGL;
  49. IJK_EGL *IJK_EGL_create();
  50. void IJK_EGL_free(IJK_EGL *egl);
  51. void IJK_EGL_freep(IJK_EGL **egl);
  52. EGLBoolean IJK_EGL_display(IJK_EGL* egl, EGLNativeWindowType window, SDL_VoutOverlay *overlay);
  53. void IJK_EGL_terminate(IJK_EGL* egl);
  54. #endif