add files (#153)
This commit is contained in:
parent
c2e9e12d6c
commit
f9e7a1436d
|
|
@ -167,3 +167,7 @@ list(APPEND CC_EXTERNAL_INCLUDES
|
||||||
${platform_spec_path}/include/v8
|
${platform_spec_path}/include/v8
|
||||||
${platform_spec_path}/include/glslang
|
${platform_spec_path}/include/glslang
|
||||||
)
|
)
|
||||||
|
|
||||||
|
#TODO: remove in future version
|
||||||
|
link_directories(${platform_spec_path}/ext/usr/lib)
|
||||||
|
include_directories(${platform_spec_path}/ext/usr/include)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,477 @@
|
||||||
|
#ifndef __egl_h_
|
||||||
|
#define __egl_h_ 1
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Copyright (c) 2013-2017 The Khronos Group Inc.
|
||||||
|
**
|
||||||
|
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
** copy of this software and/or associated documentation files (the
|
||||||
|
** "Materials"), to deal in the Materials without restriction, including
|
||||||
|
** without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
** distribute, sublicense, and/or sell copies of the Materials, and to
|
||||||
|
** permit persons to whom the Materials are furnished to do so, subject to
|
||||||
|
** the following conditions:
|
||||||
|
**
|
||||||
|
** The above copyright notice and this permission notice shall be included
|
||||||
|
** in all copies or substantial portions of the Materials.
|
||||||
|
**
|
||||||
|
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||||
|
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
** This header is generated from the Khronos EGL XML API Registry.
|
||||||
|
** The current version of the Registry, generator scripts
|
||||||
|
** used to make the header, and the header can be found at
|
||||||
|
** http://www.khronos.org/registry/egl
|
||||||
|
**
|
||||||
|
** Khronos $Git commit SHA1: ad06e1c38e $ on $Git commit date: 2020-04-09
|
||||||
|
*18:40:05 +0200 $
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <EGL/eglplatform.h>
|
||||||
|
|
||||||
|
#ifndef EGL_EGL_PROTOTYPES
|
||||||
|
#define EGL_EGL_PROTOTYPES 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Generated on date 20200505 */
|
||||||
|
|
||||||
|
/* Generated C header for:
|
||||||
|
* API: egl
|
||||||
|
* Versions considered: .*
|
||||||
|
* Versions emitted: .*
|
||||||
|
* Default extensions included: None
|
||||||
|
* Additional extensions included: _nomatch_^
|
||||||
|
* Extensions removed: _nomatch_^
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef EGL_VERSION_1_0
|
||||||
|
#define EGL_VERSION_1_0 1
|
||||||
|
typedef unsigned int EGLBoolean;
|
||||||
|
typedef void *EGLDisplay;
|
||||||
|
#include <EGL/eglplatform.h>
|
||||||
|
#include <KHR/khrplatform.h>
|
||||||
|
typedef void *EGLConfig;
|
||||||
|
typedef void *EGLSurface;
|
||||||
|
typedef void *EGLContext;
|
||||||
|
typedef void (*__eglMustCastToProperFunctionPointerType)(void);
|
||||||
|
#define EGL_ALPHA_SIZE 0x3021
|
||||||
|
#define EGL_BAD_ACCESS 0x3002
|
||||||
|
#define EGL_BAD_ALLOC 0x3003
|
||||||
|
#define EGL_BAD_ATTRIBUTE 0x3004
|
||||||
|
#define EGL_BAD_CONFIG 0x3005
|
||||||
|
#define EGL_BAD_CONTEXT 0x3006
|
||||||
|
#define EGL_BAD_CURRENT_SURFACE 0x3007
|
||||||
|
#define EGL_BAD_DISPLAY 0x3008
|
||||||
|
#define EGL_BAD_MATCH 0x3009
|
||||||
|
#define EGL_BAD_NATIVE_PIXMAP 0x300A
|
||||||
|
#define EGL_BAD_NATIVE_WINDOW 0x300B
|
||||||
|
#define EGL_BAD_PARAMETER 0x300C
|
||||||
|
#define EGL_BAD_SURFACE 0x300D
|
||||||
|
#define EGL_BLUE_SIZE 0x3022
|
||||||
|
#define EGL_BUFFER_SIZE 0x3020
|
||||||
|
#define EGL_CONFIG_CAVEAT 0x3027
|
||||||
|
#define EGL_CONFIG_ID 0x3028
|
||||||
|
#define EGL_CORE_NATIVE_ENGINE 0x305B
|
||||||
|
#define EGL_DEPTH_SIZE 0x3025
|
||||||
|
#define EGL_DONT_CARE EGL_CAST(EGLint, -1)
|
||||||
|
#define EGL_DRAW 0x3059
|
||||||
|
#define EGL_EXTENSIONS 0x3055
|
||||||
|
#define EGL_FALSE 0
|
||||||
|
#define EGL_GREEN_SIZE 0x3023
|
||||||
|
#define EGL_HEIGHT 0x3056
|
||||||
|
#define EGL_LARGEST_PBUFFER 0x3058
|
||||||
|
#define EGL_LEVEL 0x3029
|
||||||
|
#define EGL_MAX_PBUFFER_HEIGHT 0x302A
|
||||||
|
#define EGL_MAX_PBUFFER_PIXELS 0x302B
|
||||||
|
#define EGL_MAX_PBUFFER_WIDTH 0x302C
|
||||||
|
#define EGL_NATIVE_RENDERABLE 0x302D
|
||||||
|
#define EGL_NATIVE_VISUAL_ID 0x302E
|
||||||
|
#define EGL_NATIVE_VISUAL_TYPE 0x302F
|
||||||
|
#define EGL_NONE 0x3038
|
||||||
|
#define EGL_NON_CONFORMANT_CONFIG 0x3051
|
||||||
|
#define EGL_NOT_INITIALIZED 0x3001
|
||||||
|
#define EGL_NO_CONTEXT EGL_CAST(EGLContext, 0)
|
||||||
|
#define EGL_NO_DISPLAY EGL_CAST(EGLDisplay, 0)
|
||||||
|
#define EGL_NO_SURFACE EGL_CAST(EGLSurface, 0)
|
||||||
|
#define EGL_PBUFFER_BIT 0x0001
|
||||||
|
#define EGL_PIXMAP_BIT 0x0002
|
||||||
|
#define EGL_READ 0x305A
|
||||||
|
#define EGL_RED_SIZE 0x3024
|
||||||
|
#define EGL_SAMPLES 0x3031
|
||||||
|
#define EGL_SAMPLE_BUFFERS 0x3032
|
||||||
|
#define EGL_SLOW_CONFIG 0x3050
|
||||||
|
#define EGL_STENCIL_SIZE 0x3026
|
||||||
|
#define EGL_SUCCESS 0x3000
|
||||||
|
#define EGL_SURFACE_TYPE 0x3033
|
||||||
|
#define EGL_TRANSPARENT_BLUE_VALUE 0x3035
|
||||||
|
#define EGL_TRANSPARENT_GREEN_VALUE 0x3036
|
||||||
|
#define EGL_TRANSPARENT_RED_VALUE 0x3037
|
||||||
|
#define EGL_TRANSPARENT_RGB 0x3052
|
||||||
|
#define EGL_TRANSPARENT_TYPE 0x3034
|
||||||
|
#define EGL_TRUE 1
|
||||||
|
#define EGL_VENDOR 0x3053
|
||||||
|
#define EGL_VERSION 0x3054
|
||||||
|
#define EGL_WIDTH 0x3057
|
||||||
|
#define EGL_WINDOW_BIT 0x0004
|
||||||
|
typedef EGLBoolean(EGLAPIENTRYP PFNEGLCHOOSECONFIGPROC)(
|
||||||
|
EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs,
|
||||||
|
EGLint config_size, EGLint *num_config);
|
||||||
|
typedef EGLBoolean(EGLAPIENTRYP PFNEGLCOPYBUFFERSPROC)(
|
||||||
|
EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target);
|
||||||
|
typedef EGLContext(EGLAPIENTRYP PFNEGLCREATECONTEXTPROC)(
|
||||||
|
EGLDisplay dpy, EGLConfig config, EGLContext share_context,
|
||||||
|
const EGLint *attrib_list);
|
||||||
|
typedef EGLSurface(EGLAPIENTRYP PFNEGLCREATEPBUFFERSURFACEPROC)(
|
||||||
|
EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list);
|
||||||
|
typedef EGLSurface(EGLAPIENTRYP PFNEGLCREATEPIXMAPSURFACEPROC)(
|
||||||
|
EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap,
|
||||||
|
const EGLint *attrib_list);
|
||||||
|
typedef EGLSurface(EGLAPIENTRYP PFNEGLCREATEWINDOWSURFACEPROC)(
|
||||||
|
EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win,
|
||||||
|
const EGLint *attrib_list);
|
||||||
|
typedef EGLBoolean(EGLAPIENTRYP PFNEGLDESTROYCONTEXTPROC)(EGLDisplay dpy,
|
||||||
|
EGLContext ctx);
|
||||||
|
typedef EGLBoolean(EGLAPIENTRYP PFNEGLDESTROYSURFACEPROC)(EGLDisplay dpy,
|
||||||
|
EGLSurface surface);
|
||||||
|
typedef EGLBoolean(EGLAPIENTRYP PFNEGLGETCONFIGATTRIBPROC)(EGLDisplay dpy,
|
||||||
|
EGLConfig config,
|
||||||
|
EGLint attribute,
|
||||||
|
EGLint *value);
|
||||||
|
typedef EGLBoolean(EGLAPIENTRYP PFNEGLGETCONFIGSPROC)(EGLDisplay dpy,
|
||||||
|
EGLConfig *configs,
|
||||||
|
EGLint config_size,
|
||||||
|
EGLint *num_config);
|
||||||
|
typedef EGLDisplay(EGLAPIENTRYP PFNEGLGETCURRENTDISPLAYPROC)(void);
|
||||||
|
typedef EGLSurface(EGLAPIENTRYP PFNEGLGETCURRENTSURFACEPROC)(EGLint readdraw);
|
||||||
|
typedef EGLDisplay(EGLAPIENTRYP PFNEGLGETDISPLAYPROC)(
|
||||||
|
EGLNativeDisplayType display_id);
|
||||||
|
typedef EGLint(EGLAPIENTRYP PFNEGLGETERRORPROC)(void);
|
||||||
|
typedef __eglMustCastToProperFunctionPointerType(
|
||||||
|
EGLAPIENTRYP PFNEGLGETPROCADDRESSPROC)(const char *procname);
|
||||||
|
typedef EGLBoolean(EGLAPIENTRYP PFNEGLINITIALIZEPROC)(EGLDisplay dpy,
|
||||||
|
EGLint *major,
|
||||||
|
EGLint *minor);
|
||||||
|
typedef EGLBoolean(EGLAPIENTRYP PFNEGLMAKECURRENTPROC)(EGLDisplay dpy,
|
||||||
|
EGLSurface draw,
|
||||||
|
EGLSurface read,
|
||||||
|
EGLContext ctx);
|
||||||
|
typedef EGLBoolean(EGLAPIENTRYP PFNEGLQUERYCONTEXTPROC)(EGLDisplay dpy,
|
||||||
|
EGLContext ctx,
|
||||||
|
EGLint attribute,
|
||||||
|
EGLint *value);
|
||||||
|
typedef const char *(EGLAPIENTRYP PFNEGLQUERYSTRINGPROC)(EGLDisplay dpy,
|
||||||
|
EGLint name);
|
||||||
|
typedef EGLBoolean(EGLAPIENTRYP PFNEGLQUERYSURFACEPROC)(EGLDisplay dpy,
|
||||||
|
EGLSurface surface,
|
||||||
|
EGLint attribute,
|
||||||
|
EGLint *value);
|
||||||
|
typedef EGLBoolean(EGLAPIENTRYP PFNEGLSWAPBUFFERSPROC)(EGLDisplay dpy,
|
||||||
|
EGLSurface surface);
|
||||||
|
typedef EGLBoolean(EGLAPIENTRYP PFNEGLTERMINATEPROC)(EGLDisplay dpy);
|
||||||
|
typedef EGLBoolean(EGLAPIENTRYP PFNEGLWAITGLPROC)(void);
|
||||||
|
typedef EGLBoolean(EGLAPIENTRYP PFNEGLWAITNATIVEPROC)(EGLint engine);
|
||||||
|
#if EGL_EGL_PROTOTYPES
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglChooseConfig(EGLDisplay dpy,
|
||||||
|
const EGLint *attrib_list,
|
||||||
|
EGLConfig *configs,
|
||||||
|
EGLint config_size,
|
||||||
|
EGLint *num_config);
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers(EGLDisplay dpy, EGLSurface surface,
|
||||||
|
EGLNativePixmapType target);
|
||||||
|
EGLAPI EGLContext EGLAPIENTRY eglCreateContext(EGLDisplay dpy, EGLConfig config,
|
||||||
|
EGLContext share_context,
|
||||||
|
const EGLint *attrib_list);
|
||||||
|
EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferSurface(
|
||||||
|
EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list);
|
||||||
|
EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurface(EGLDisplay dpy,
|
||||||
|
EGLConfig config,
|
||||||
|
EGLNativePixmapType pixmap,
|
||||||
|
const EGLint *attrib_list);
|
||||||
|
EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface(EGLDisplay dpy,
|
||||||
|
EGLConfig config,
|
||||||
|
EGLNativeWindowType win,
|
||||||
|
const EGLint *attrib_list);
|
||||||
|
EGLAPI EGLSurface EGLAPIENTRY
|
||||||
|
HeglCreateWindowSurface(EGLDisplay dpy, EGLConfig config,
|
||||||
|
EGLNativeWindowType win, const EGLint *attrib_list);
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglDestroyContext(EGLDisplay dpy, EGLContext ctx);
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglDestroySurface(EGLDisplay dpy,
|
||||||
|
EGLSurface surface);
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigAttrib(EGLDisplay dpy,
|
||||||
|
EGLConfig config,
|
||||||
|
EGLint attribute,
|
||||||
|
EGLint *value);
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigs(EGLDisplay dpy, EGLConfig *configs,
|
||||||
|
EGLint config_size,
|
||||||
|
EGLint *num_config);
|
||||||
|
EGLAPI EGLDisplay EGLAPIENTRY eglGetCurrentDisplay(void);
|
||||||
|
EGLAPI EGLSurface EGLAPIENTRY eglGetCurrentSurface(EGLint readdraw);
|
||||||
|
EGLAPI EGLDisplay EGLAPIENTRY eglGetDisplay(EGLNativeDisplayType display_id);
|
||||||
|
EGLAPI EGLint EGLAPIENTRY eglGetError(void);
|
||||||
|
EGLAPI __eglMustCastToProperFunctionPointerType EGLAPIENTRY
|
||||||
|
eglGetProcAddress(const char *procname);
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglInitialize(EGLDisplay dpy, EGLint *major,
|
||||||
|
EGLint *minor);
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglMakeCurrent(EGLDisplay dpy, EGLSurface draw,
|
||||||
|
EGLSurface read, EGLContext ctx);
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglQueryContext(EGLDisplay dpy, EGLContext ctx,
|
||||||
|
EGLint attribute, EGLint *value);
|
||||||
|
EGLAPI const char *EGLAPIENTRY eglQueryString(EGLDisplay dpy, EGLint name);
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface(EGLDisplay dpy,
|
||||||
|
EGLSurface surface,
|
||||||
|
EGLint attribute, EGLint *value);
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy,
|
||||||
|
EGLSurface surface);
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglTerminate(EGLDisplay dpy);
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglWaitGL(void);
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglWaitNative(EGLint engine);
|
||||||
|
#endif
|
||||||
|
#endif /* EGL_VERSION_1_0 */
|
||||||
|
|
||||||
|
#ifndef EGL_VERSION_1_1
|
||||||
|
#define EGL_VERSION_1_1 1
|
||||||
|
#define EGL_BACK_BUFFER 0x3084
|
||||||
|
#define EGL_BIND_TO_TEXTURE_RGB 0x3039
|
||||||
|
#define EGL_BIND_TO_TEXTURE_RGBA 0x303A
|
||||||
|
#define EGL_CONTEXT_LOST 0x300E
|
||||||
|
#define EGL_MIN_SWAP_INTERVAL 0x303B
|
||||||
|
#define EGL_MAX_SWAP_INTERVAL 0x303C
|
||||||
|
#define EGL_MIPMAP_TEXTURE 0x3082
|
||||||
|
#define EGL_MIPMAP_LEVEL 0x3083
|
||||||
|
#define EGL_NO_TEXTURE 0x305C
|
||||||
|
#define EGL_TEXTURE_2D 0x305F
|
||||||
|
#define EGL_TEXTURE_FORMAT 0x3080
|
||||||
|
#define EGL_TEXTURE_RGB 0x305D
|
||||||
|
#define EGL_TEXTURE_RGBA 0x305E
|
||||||
|
#define EGL_TEXTURE_TARGET 0x3081
|
||||||
|
typedef EGLBoolean(EGLAPIENTRYP PFNEGLBINDTEXIMAGEPROC)(EGLDisplay dpy,
|
||||||
|
EGLSurface surface,
|
||||||
|
EGLint buffer);
|
||||||
|
typedef EGLBoolean(EGLAPIENTRYP PFNEGLRELEASETEXIMAGEPROC)(EGLDisplay dpy,
|
||||||
|
EGLSurface surface,
|
||||||
|
EGLint buffer);
|
||||||
|
typedef EGLBoolean(EGLAPIENTRYP PFNEGLSURFACEATTRIBPROC)(EGLDisplay dpy,
|
||||||
|
EGLSurface surface,
|
||||||
|
EGLint attribute,
|
||||||
|
EGLint value);
|
||||||
|
typedef EGLBoolean(EGLAPIENTRYP PFNEGLSWAPINTERVALPROC)(EGLDisplay dpy,
|
||||||
|
EGLint interval);
|
||||||
|
#if EGL_EGL_PROTOTYPES
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglBindTexImage(EGLDisplay dpy,
|
||||||
|
EGLSurface surface,
|
||||||
|
EGLint buffer);
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglReleaseTexImage(EGLDisplay dpy,
|
||||||
|
EGLSurface surface,
|
||||||
|
EGLint buffer);
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglSurfaceAttrib(EGLDisplay dpy,
|
||||||
|
EGLSurface surface,
|
||||||
|
EGLint attribute, EGLint value);
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglSwapInterval(EGLDisplay dpy, EGLint interval);
|
||||||
|
#endif
|
||||||
|
#endif /* EGL_VERSION_1_1 */
|
||||||
|
|
||||||
|
#ifndef EGL_VERSION_1_2
|
||||||
|
#define EGL_VERSION_1_2 1
|
||||||
|
typedef unsigned int EGLenum;
|
||||||
|
typedef void *EGLClientBuffer;
|
||||||
|
#define EGL_ALPHA_FORMAT 0x3088
|
||||||
|
#define EGL_ALPHA_FORMAT_NONPRE 0x308B
|
||||||
|
#define EGL_ALPHA_FORMAT_PRE 0x308C
|
||||||
|
#define EGL_ALPHA_MASK_SIZE 0x303E
|
||||||
|
#define EGL_BUFFER_PRESERVED 0x3094
|
||||||
|
#define EGL_BUFFER_DESTROYED 0x3095
|
||||||
|
#define EGL_CLIENT_APIS 0x308D
|
||||||
|
#define EGL_COLORSPACE 0x3087
|
||||||
|
#define EGL_COLORSPACE_sRGB 0x3089
|
||||||
|
#define EGL_COLORSPACE_LINEAR 0x308A
|
||||||
|
#define EGL_COLOR_BUFFER_TYPE 0x303F
|
||||||
|
#define EGL_CONTEXT_CLIENT_TYPE 0x3097
|
||||||
|
#define EGL_DISPLAY_SCALING 10000
|
||||||
|
#define EGL_HORIZONTAL_RESOLUTION 0x3090
|
||||||
|
#define EGL_LUMINANCE_BUFFER 0x308F
|
||||||
|
#define EGL_LUMINANCE_SIZE 0x303D
|
||||||
|
#define EGL_OPENGL_ES_BIT 0x0001
|
||||||
|
#define EGL_OPENVG_BIT 0x0002
|
||||||
|
#define EGL_OPENGL_ES_API 0x30A0
|
||||||
|
#define EGL_OPENVG_API 0x30A1
|
||||||
|
#define EGL_OPENVG_IMAGE 0x3096
|
||||||
|
#define EGL_PIXEL_ASPECT_RATIO 0x3092
|
||||||
|
#define EGL_RENDERABLE_TYPE 0x3040
|
||||||
|
#define EGL_RENDER_BUFFER 0x3086
|
||||||
|
#define EGL_RGB_BUFFER 0x308E
|
||||||
|
#define EGL_SINGLE_BUFFER 0x3085
|
||||||
|
#define EGL_SWAP_BEHAVIOR 0x3093
|
||||||
|
#define EGL_UNKNOWN EGL_CAST(EGLint, -1)
|
||||||
|
#define EGL_VERTICAL_RESOLUTION 0x3091
|
||||||
|
typedef EGLBoolean(EGLAPIENTRYP PFNEGLBINDAPIPROC)(EGLenum api);
|
||||||
|
typedef EGLenum(EGLAPIENTRYP PFNEGLQUERYAPIPROC)(void);
|
||||||
|
typedef EGLSurface(EGLAPIENTRYP PFNEGLCREATEPBUFFERFROMCLIENTBUFFERPROC)(
|
||||||
|
EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config,
|
||||||
|
const EGLint *attrib_list);
|
||||||
|
typedef EGLBoolean(EGLAPIENTRYP PFNEGLRELEASETHREADPROC)(void);
|
||||||
|
typedef EGLBoolean(EGLAPIENTRYP PFNEGLWAITCLIENTPROC)(void);
|
||||||
|
#if EGL_EGL_PROTOTYPES
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglBindAPI(EGLenum api);
|
||||||
|
EGLAPI EGLenum EGLAPIENTRY eglQueryAPI(void);
|
||||||
|
EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferFromClientBuffer(
|
||||||
|
EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config,
|
||||||
|
const EGLint *attrib_list);
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglReleaseThread(void);
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglWaitClient(void);
|
||||||
|
#endif
|
||||||
|
#endif /* EGL_VERSION_1_2 */
|
||||||
|
|
||||||
|
#ifndef EGL_VERSION_1_3
|
||||||
|
#define EGL_VERSION_1_3 1
|
||||||
|
#define EGL_CONFORMANT 0x3042
|
||||||
|
#define EGL_CONTEXT_CLIENT_VERSION 0x3098
|
||||||
|
#define EGL_MATCH_NATIVE_PIXMAP 0x3041
|
||||||
|
#define EGL_OPENGL_ES2_BIT 0x0004
|
||||||
|
#define EGL_VG_ALPHA_FORMAT 0x3088
|
||||||
|
#define EGL_VG_ALPHA_FORMAT_NONPRE 0x308B
|
||||||
|
#define EGL_VG_ALPHA_FORMAT_PRE 0x308C
|
||||||
|
#define EGL_VG_ALPHA_FORMAT_PRE_BIT 0x0040
|
||||||
|
#define EGL_VG_COLORSPACE 0x3087
|
||||||
|
#define EGL_VG_COLORSPACE_sRGB 0x3089
|
||||||
|
#define EGL_VG_COLORSPACE_LINEAR 0x308A
|
||||||
|
#define EGL_VG_COLORSPACE_LINEAR_BIT 0x0020
|
||||||
|
#endif /* EGL_VERSION_1_3 */
|
||||||
|
|
||||||
|
#ifndef EGL_VERSION_1_4
|
||||||
|
#define EGL_VERSION_1_4 1
|
||||||
|
#define EGL_DEFAULT_DISPLAY EGL_CAST(EGLNativeDisplayType, 0)
|
||||||
|
#define EGL_MULTISAMPLE_RESOLVE_BOX_BIT 0x0200
|
||||||
|
#define EGL_MULTISAMPLE_RESOLVE 0x3099
|
||||||
|
#define EGL_MULTISAMPLE_RESOLVE_DEFAULT 0x309A
|
||||||
|
#define EGL_MULTISAMPLE_RESOLVE_BOX 0x309B
|
||||||
|
#define EGL_OPENGL_API 0x30A2
|
||||||
|
#define EGL_OPENGL_BIT 0x0008
|
||||||
|
#define EGL_SWAP_BEHAVIOR_PRESERVED_BIT 0x0400
|
||||||
|
typedef EGLContext(EGLAPIENTRYP PFNEGLGETCURRENTCONTEXTPROC)(void);
|
||||||
|
#if EGL_EGL_PROTOTYPES
|
||||||
|
EGLAPI EGLContext EGLAPIENTRY eglGetCurrentContext(void);
|
||||||
|
#endif
|
||||||
|
#endif /* EGL_VERSION_1_4 */
|
||||||
|
|
||||||
|
#ifndef EGL_VERSION_1_5
|
||||||
|
#define EGL_VERSION_1_5 1
|
||||||
|
typedef void *EGLSync;
|
||||||
|
typedef intptr_t EGLAttrib;
|
||||||
|
typedef khronos_utime_nanoseconds_t EGLTime;
|
||||||
|
typedef void *EGLImage;
|
||||||
|
#define EGL_CONTEXT_MAJOR_VERSION 0x3098
|
||||||
|
#define EGL_CONTEXT_MINOR_VERSION 0x30FB
|
||||||
|
#define EGL_CONTEXT_OPENGL_PROFILE_MASK 0x30FD
|
||||||
|
#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY 0x31BD
|
||||||
|
#define EGL_NO_RESET_NOTIFICATION 0x31BE
|
||||||
|
#define EGL_LOSE_CONTEXT_ON_RESET 0x31BF
|
||||||
|
#define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT 0x00000001
|
||||||
|
#define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT 0x00000002
|
||||||
|
#define EGL_CONTEXT_OPENGL_DEBUG 0x31B0
|
||||||
|
#define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE 0x31B1
|
||||||
|
#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS 0x31B2
|
||||||
|
#define EGL_OPENGL_ES3_BIT 0x00000040
|
||||||
|
#define EGL_CL_EVENT_HANDLE 0x309C
|
||||||
|
#define EGL_SYNC_CL_EVENT 0x30FE
|
||||||
|
#define EGL_SYNC_CL_EVENT_COMPLETE 0x30FF
|
||||||
|
#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE 0x30F0
|
||||||
|
#define EGL_SYNC_TYPE 0x30F7
|
||||||
|
#define EGL_SYNC_STATUS 0x30F1
|
||||||
|
#define EGL_SYNC_CONDITION 0x30F8
|
||||||
|
#define EGL_SIGNALED 0x30F2
|
||||||
|
#define EGL_UNSIGNALED 0x30F3
|
||||||
|
#define EGL_SYNC_FLUSH_COMMANDS_BIT 0x0001
|
||||||
|
#define EGL_FOREVER 0xFFFFFFFFFFFFFFFFull
|
||||||
|
#define EGL_TIMEOUT_EXPIRED 0x30F5
|
||||||
|
#define EGL_CONDITION_SATISFIED 0x30F6
|
||||||
|
#define EGL_NO_SYNC EGL_CAST(EGLSync, 0)
|
||||||
|
#define EGL_SYNC_FENCE 0x30F9
|
||||||
|
#define EGL_GL_COLORSPACE 0x309D
|
||||||
|
#define EGL_GL_COLORSPACE_SRGB 0x3089
|
||||||
|
#define EGL_GL_COLORSPACE_LINEAR 0x308A
|
||||||
|
#define EGL_GL_RENDERBUFFER 0x30B9
|
||||||
|
#define EGL_GL_TEXTURE_2D 0x30B1
|
||||||
|
#define EGL_GL_TEXTURE_LEVEL 0x30BC
|
||||||
|
#define EGL_GL_TEXTURE_3D 0x30B2
|
||||||
|
#define EGL_GL_TEXTURE_ZOFFSET 0x30BD
|
||||||
|
#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x30B3
|
||||||
|
#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x30B4
|
||||||
|
#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x30B5
|
||||||
|
#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x30B6
|
||||||
|
#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x30B7
|
||||||
|
#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x30B8
|
||||||
|
#define EGL_IMAGE_PRESERVED 0x30D2
|
||||||
|
#define EGL_NO_IMAGE EGL_CAST(EGLImage, 0)
|
||||||
|
typedef EGLSync(EGLAPIENTRYP PFNEGLCREATESYNCPROC)(
|
||||||
|
EGLDisplay dpy, EGLenum type, const EGLAttrib *attrib_list);
|
||||||
|
typedef EGLBoolean(EGLAPIENTRYP PFNEGLDESTROYSYNCPROC)(EGLDisplay dpy,
|
||||||
|
EGLSync sync);
|
||||||
|
typedef EGLint(EGLAPIENTRYP PFNEGLCLIENTWAITSYNCPROC)(EGLDisplay dpy,
|
||||||
|
EGLSync sync,
|
||||||
|
EGLint flags,
|
||||||
|
EGLTime timeout);
|
||||||
|
typedef EGLBoolean(EGLAPIENTRYP PFNEGLGETSYNCATTRIBPROC)(EGLDisplay dpy,
|
||||||
|
EGLSync sync,
|
||||||
|
EGLint attribute,
|
||||||
|
EGLAttrib *value);
|
||||||
|
typedef EGLImage(EGLAPIENTRYP PFNEGLCREATEIMAGEPROC)(
|
||||||
|
EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer,
|
||||||
|
const EGLAttrib *attrib_list);
|
||||||
|
typedef EGLBoolean(EGLAPIENTRYP PFNEGLDESTROYIMAGEPROC)(EGLDisplay dpy,
|
||||||
|
EGLImage image);
|
||||||
|
typedef EGLDisplay(EGLAPIENTRYP PFNEGLGETPLATFORMDISPLAYPROC)(
|
||||||
|
EGLenum platform, void *native_display, const EGLAttrib *attrib_list);
|
||||||
|
typedef EGLSurface(EGLAPIENTRYP PFNEGLCREATEPLATFORMWINDOWSURFACEPROC)(
|
||||||
|
EGLDisplay dpy, EGLConfig config, void *native_window,
|
||||||
|
const EGLAttrib *attrib_list);
|
||||||
|
typedef EGLSurface(EGLAPIENTRYP PFNEGLCREATEPLATFORMPIXMAPSURFACEPROC)(
|
||||||
|
EGLDisplay dpy, EGLConfig config, void *native_pixmap,
|
||||||
|
const EGLAttrib *attrib_list);
|
||||||
|
typedef EGLBoolean(EGLAPIENTRYP PFNEGLWAITSYNCPROC)(EGLDisplay dpy,
|
||||||
|
EGLSync sync, EGLint flags);
|
||||||
|
#if EGL_EGL_PROTOTYPES
|
||||||
|
EGLAPI EGLSync EGLAPIENTRY eglCreateSync(EGLDisplay dpy, EGLenum type,
|
||||||
|
const EGLAttrib *attrib_list);
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglDestroySync(EGLDisplay dpy, EGLSync sync);
|
||||||
|
EGLAPI EGLint EGLAPIENTRY eglClientWaitSync(EGLDisplay dpy, EGLSync sync,
|
||||||
|
EGLint flags, EGLTime timeout);
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttrib(EGLDisplay dpy, EGLSync sync,
|
||||||
|
EGLint attribute,
|
||||||
|
EGLAttrib *value);
|
||||||
|
EGLAPI EGLImage EGLAPIENTRY eglCreateImage(EGLDisplay dpy, EGLContext ctx,
|
||||||
|
EGLenum target,
|
||||||
|
EGLClientBuffer buffer,
|
||||||
|
const EGLAttrib *attrib_list);
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImage(EGLDisplay dpy, EGLImage image);
|
||||||
|
EGLAPI EGLDisplay EGLAPIENTRY eglGetPlatformDisplay(
|
||||||
|
EGLenum platform, void *native_display, const EGLAttrib *attrib_list);
|
||||||
|
EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurface(
|
||||||
|
EGLDisplay dpy, EGLConfig config, void *native_window,
|
||||||
|
const EGLAttrib *attrib_list);
|
||||||
|
EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurface(
|
||||||
|
EGLDisplay dpy, EGLConfig config, void *native_pixmap,
|
||||||
|
const EGLAttrib *attrib_list);
|
||||||
|
EGLAPI EGLBoolean EGLAPIENTRY eglWaitSync(EGLDisplay dpy, EGLSync sync,
|
||||||
|
EGLint flags);
|
||||||
|
#endif
|
||||||
|
#endif /* EGL_VERSION_1_5 */
|
||||||
|
|
||||||
|
#if EGL_EGL_PROTOTYPES
|
||||||
|
#define __REDIR(x, y) __typeof__(x) x __asm__(#y)
|
||||||
|
__REDIR(eglCreateWindowSurface, HeglCreateWindowSurface);
|
||||||
|
#endif
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,185 @@
|
||||||
|
#ifndef __eglplatform_h_
|
||||||
|
#define __eglplatform_h_
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Copyright (c) 2007-2016 The Khronos Group Inc.
|
||||||
|
**
|
||||||
|
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
** copy of this software and/or associated documentation files (the
|
||||||
|
** "Materials"), to deal in the Materials without restriction, including
|
||||||
|
** without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
** distribute, sublicense, and/or sell copies of the Materials, and to
|
||||||
|
** permit persons to whom the Materials are furnished to do so, subject to
|
||||||
|
** the following conditions:
|
||||||
|
**
|
||||||
|
** The above copyright notice and this permission notice shall be included
|
||||||
|
** in all copies or substantial portions of the Materials.
|
||||||
|
**
|
||||||
|
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||||
|
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Platform-specific types and definitions for egl.h
|
||||||
|
* $Revision: 30994 $ on $Date: 2015-04-30 13:36:48 -0700 (Thu, 30 Apr 2015) $
|
||||||
|
*
|
||||||
|
* Adopters may modify khrplatform.h and this file to suit their platform.
|
||||||
|
* You are encouraged to submit all modifications to the Khronos group so that
|
||||||
|
* they can be included in future versions of this file. Please submit changes
|
||||||
|
* by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
|
||||||
|
* by filing a bug against product "EGL" component "Registry".
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <KHR/khrplatform.h>
|
||||||
|
|
||||||
|
/* Macros used in EGL function prototype declarations.
|
||||||
|
*
|
||||||
|
* EGL functions should be prototyped as:
|
||||||
|
*
|
||||||
|
* EGLAPI return-type EGLAPIENTRY eglFunction(arguments);
|
||||||
|
* typedef return-type (EXPAPIENTRYP PFNEGLFUNCTIONPROC) (arguments);
|
||||||
|
*
|
||||||
|
* KHRONOS_APICALL and KHRONOS_APIENTRY are defined in KHR/khrplatform.h
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __HarmonyOS__
|
||||||
|
#define __HarmonyOS__
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef EGLAPI
|
||||||
|
#define EGLAPI KHRONOS_APICALL
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef EGLAPIENTRY
|
||||||
|
#define EGLAPIENTRY KHRONOS_APIENTRY
|
||||||
|
#endif
|
||||||
|
#define EGLAPIENTRYP EGLAPIENTRY*
|
||||||
|
|
||||||
|
/* The types NativeDisplayType, NativeWindowType, and NativePixmapType
|
||||||
|
* are aliases of window-system-dependent types, such as X Display * or
|
||||||
|
* Windows Device Context. They must be defined in platform-specific
|
||||||
|
* code below. The EGL-prefixed versions of Native*Type are the same
|
||||||
|
* types, renamed in EGL 1.3 so all types in the API start with "EGL".
|
||||||
|
*
|
||||||
|
* Khronos STRONGLY RECOMMENDS that you use the default definitions
|
||||||
|
* provided below, since these changes affect both binary and source
|
||||||
|
* portability of applications using EGL running on different EGL
|
||||||
|
* implementations.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */
|
||||||
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
#define WIN32_LEAN_AND_MEAN 1
|
||||||
|
#endif
|
||||||
|
#include <windows.h>
|
||||||
|
|
||||||
|
typedef HDC EGLNativeDisplayType;
|
||||||
|
typedef HBITMAP EGLNativePixmapType;
|
||||||
|
typedef HWND EGLNativeWindowType;
|
||||||
|
|
||||||
|
#elif defined(__EMSCRIPTEN__)
|
||||||
|
|
||||||
|
typedef int EGLNativeDisplayType;
|
||||||
|
typedef int EGLNativePixmapType;
|
||||||
|
typedef int EGLNativeWindowType;
|
||||||
|
|
||||||
|
#elif defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */
|
||||||
|
|
||||||
|
typedef int EGLNativeDisplayType;
|
||||||
|
typedef void *EGLNativePixmapType;
|
||||||
|
typedef void *EGLNativeWindowType;
|
||||||
|
|
||||||
|
#elif defined(WL_EGL_PLATFORM)
|
||||||
|
|
||||||
|
typedef struct wl_display *EGLNativeDisplayType;
|
||||||
|
typedef struct wl_egl_pixmap *EGLNativePixmapType;
|
||||||
|
typedef struct wl_egl_window *EGLNativeWindowType;
|
||||||
|
|
||||||
|
#elif defined(__GBM__)
|
||||||
|
|
||||||
|
typedef struct gbm_device *EGLNativeDisplayType;
|
||||||
|
typedef struct gbm_bo *EGLNativePixmapType;
|
||||||
|
typedef void *EGLNativeWindowType;
|
||||||
|
|
||||||
|
#elif defined(__HarmonyOS__) || defined(HarmonyOS)
|
||||||
|
|
||||||
|
struct NativeLayer;
|
||||||
|
|
||||||
|
typedef void* EGLNativeDisplayType;
|
||||||
|
typedef void* EGLNativePixmapType;
|
||||||
|
typedef struct NativeLayer* EGLNativeWindowType;
|
||||||
|
|
||||||
|
#elif defined(USE_OZONE)
|
||||||
|
|
||||||
|
typedef intptr_t EGLNativeDisplayType;
|
||||||
|
typedef intptr_t EGLNativePixmapType;
|
||||||
|
typedef intptr_t EGLNativeWindowType;
|
||||||
|
|
||||||
|
#elif defined(__unix__) && defined(EGL_NO_X11)
|
||||||
|
|
||||||
|
typedef void *EGLNativeDisplayType;
|
||||||
|
typedef khronos_uintptr_t EGLNativePixmapType;
|
||||||
|
typedef khronos_uintptr_t EGLNativeWindowType;
|
||||||
|
|
||||||
|
#elif defined(__unix__) || defined(USE_X11)
|
||||||
|
|
||||||
|
/* X11 (tentative) */
|
||||||
|
#include <X11/Xlib.h>
|
||||||
|
#include <X11/Xutil.h>
|
||||||
|
|
||||||
|
typedef Display *EGLNativeDisplayType;
|
||||||
|
typedef Pixmap EGLNativePixmapType;
|
||||||
|
typedef Window EGLNativeWindowType;
|
||||||
|
|
||||||
|
#elif defined(__APPLE__)
|
||||||
|
|
||||||
|
typedef int EGLNativeDisplayType;
|
||||||
|
typedef void *EGLNativePixmapType;
|
||||||
|
typedef void *EGLNativeWindowType;
|
||||||
|
|
||||||
|
#elif defined(__HAIKU__)
|
||||||
|
|
||||||
|
#include <kernel/image.h>
|
||||||
|
|
||||||
|
typedef void *EGLNativeDisplayType;
|
||||||
|
typedef khronos_uintptr_t EGLNativePixmapType;
|
||||||
|
typedef khronos_uintptr_t EGLNativeWindowType;
|
||||||
|
|
||||||
|
#elif defined(__Fuchsia__)
|
||||||
|
|
||||||
|
typedef void *EGLNativeDisplayType;
|
||||||
|
typedef khronos_uintptr_t EGLNativePixmapType;
|
||||||
|
typedef khronos_uintptr_t EGLNativeWindowType;
|
||||||
|
|
||||||
|
#else
|
||||||
|
#error "Platform not recognized"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* EGL 1.2 types, renamed for consistency in EGL 1.3 */
|
||||||
|
typedef EGLNativeDisplayType NativeDisplayType;
|
||||||
|
typedef EGLNativePixmapType NativePixmapType;
|
||||||
|
typedef EGLNativeWindowType NativeWindowType;
|
||||||
|
|
||||||
|
|
||||||
|
/* Define EGLint. This must be a signed integral type large enough to contain
|
||||||
|
* all legal attribute names and values passed into and out of EGL, whether
|
||||||
|
* their type is boolean, bitmask, enumerant (symbolic constant), integer,
|
||||||
|
* handle, or other. While in general a 32-bit integer will suffice, if
|
||||||
|
* handles are 64 bit types, then EGLint should be defined as a signed 64-bit
|
||||||
|
* integer type.
|
||||||
|
*/
|
||||||
|
typedef khronos_int32_t EGLint;
|
||||||
|
|
||||||
|
|
||||||
|
/* C++ / C typecast macros for special EGL handle values */
|
||||||
|
#if defined(__cplusplus)
|
||||||
|
#define EGL_CAST(type, value) (static_cast<type>(value))
|
||||||
|
#else
|
||||||
|
#define EGL_CAST(type, value) ((type) (value))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __eglplatform_h */
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,467 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2010 The Android Open Source Project
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef OPENSL_ES_ANDROID_H_
|
||||||
|
#define OPENSL_ES_ANDROID_H_
|
||||||
|
|
||||||
|
#include "OpenSLES.h"
|
||||||
|
#include "OpenSLES_AndroidConfiguration.h"
|
||||||
|
#include "OpenSLES_AndroidMetadata.h"
|
||||||
|
#include <jni.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
/* Android common types */
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
typedef sl_int64_t SLAint64; /* 64 bit signed integer */
|
||||||
|
|
||||||
|
typedef sl_uint64_t SLAuint64; /* 64 bit unsigned integer */
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
/* Android PCM Data Format */
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/* The following pcm representations and data formats map to those in OpenSLES 1.1 */
|
||||||
|
#define SL_ANDROID_PCM_REPRESENTATION_SIGNED_INT ((SLuint32) 0x00000001)
|
||||||
|
#define SL_ANDROID_PCM_REPRESENTATION_UNSIGNED_INT ((SLuint32) 0x00000002)
|
||||||
|
#define SL_ANDROID_PCM_REPRESENTATION_FLOAT ((SLuint32) 0x00000003)
|
||||||
|
|
||||||
|
#define SL_ANDROID_DATAFORMAT_PCM_EX ((SLuint32) 0x00000004)
|
||||||
|
|
||||||
|
typedef struct SLAndroidDataFormat_PCM_EX_ {
|
||||||
|
SLuint32 formatType;
|
||||||
|
SLuint32 numChannels;
|
||||||
|
SLuint32 sampleRate;
|
||||||
|
SLuint32 bitsPerSample;
|
||||||
|
SLuint32 containerSize;
|
||||||
|
SLuint32 channelMask;
|
||||||
|
SLuint32 endianness;
|
||||||
|
SLuint32 representation;
|
||||||
|
} SLAndroidDataFormat_PCM_EX;
|
||||||
|
|
||||||
|
#define SL_ANDROID_SPEAKER_NON_POSITIONAL ((SLuint32) 0x80000000)
|
||||||
|
|
||||||
|
// Make an indexed channel mask from a bitfield.
|
||||||
|
//
|
||||||
|
// Each bit in the bitfield corresponds to a channel index,
|
||||||
|
// from least-significant bit (channel 0) up to the bit
|
||||||
|
// corresponding to the maximum channel count (currently FCC_8).
|
||||||
|
// A '1' in the bitfield indicates that the channel should be
|
||||||
|
// included in the stream, while a '0' indicates that it
|
||||||
|
// should be excluded. For instance, a bitfield of 0x0A (binary 00001010)
|
||||||
|
// would define a stream that contains channels 1 and 3. (The corresponding
|
||||||
|
// indexed mask, after setting the SL_ANDROID_NON_POSITIONAL bit,
|
||||||
|
// would be 0x8000000A.)
|
||||||
|
#define SL_ANDROID_MAKE_INDEXED_CHANNEL_MASK(bitfield) \
|
||||||
|
((bitfield) | SL_ANDROID_SPEAKER_NON_POSITIONAL)
|
||||||
|
|
||||||
|
// Specifying SL_ANDROID_SPEAKER_USE_DEFAULT as a channel mask in
|
||||||
|
// SLAndroidDataFormat_PCM_EX causes OpenSL ES to assign a default
|
||||||
|
// channel mask based on the number of channels requested. This
|
||||||
|
// value cannot be combined with SL_ANDROID_SPEAKER_NON_POSITIONAL.
|
||||||
|
#define SL_ANDROID_SPEAKER_USE_DEFAULT ((SLuint32)0)
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
/* Android Effect interface */
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
extern SL_API const SLInterfaceID SL_IID_ANDROIDEFFECT;
|
||||||
|
|
||||||
|
/** Android Effect interface methods */
|
||||||
|
|
||||||
|
struct SLAndroidEffectItf_;
|
||||||
|
typedef const struct SLAndroidEffectItf_ * const * SLAndroidEffectItf;
|
||||||
|
|
||||||
|
struct SLAndroidEffectItf_ {
|
||||||
|
|
||||||
|
SLresult (*CreateEffect) (SLAndroidEffectItf self,
|
||||||
|
SLInterfaceID effectImplementationId);
|
||||||
|
|
||||||
|
SLresult (*ReleaseEffect) (SLAndroidEffectItf self,
|
||||||
|
SLInterfaceID effectImplementationId);
|
||||||
|
|
||||||
|
SLresult (*SetEnabled) (SLAndroidEffectItf self,
|
||||||
|
SLInterfaceID effectImplementationId,
|
||||||
|
SLboolean enabled);
|
||||||
|
|
||||||
|
SLresult (*IsEnabled) (SLAndroidEffectItf self,
|
||||||
|
SLInterfaceID effectImplementationId,
|
||||||
|
SLboolean *pEnabled);
|
||||||
|
|
||||||
|
SLresult (*SendCommand) (SLAndroidEffectItf self,
|
||||||
|
SLInterfaceID effectImplementationId,
|
||||||
|
SLuint32 command,
|
||||||
|
SLuint32 commandSize,
|
||||||
|
void *pCommandData,
|
||||||
|
SLuint32 *replySize,
|
||||||
|
void *pReplyData);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
/* Android Effect Send interface */
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
extern SL_API const SLInterfaceID SL_IID_ANDROIDEFFECTSEND;
|
||||||
|
|
||||||
|
/** Android Effect Send interface methods */
|
||||||
|
|
||||||
|
struct SLAndroidEffectSendItf_;
|
||||||
|
typedef const struct SLAndroidEffectSendItf_ * const * SLAndroidEffectSendItf;
|
||||||
|
|
||||||
|
struct SLAndroidEffectSendItf_ {
|
||||||
|
SLresult (*EnableEffectSend) (
|
||||||
|
SLAndroidEffectSendItf self,
|
||||||
|
SLInterfaceID effectImplementationId,
|
||||||
|
SLboolean enable,
|
||||||
|
SLmillibel initialLevel
|
||||||
|
);
|
||||||
|
SLresult (*IsEnabled) (
|
||||||
|
SLAndroidEffectSendItf self,
|
||||||
|
SLInterfaceID effectImplementationId,
|
||||||
|
SLboolean *pEnable
|
||||||
|
);
|
||||||
|
SLresult (*SetDirectLevel) (
|
||||||
|
SLAndroidEffectSendItf self,
|
||||||
|
SLmillibel directLevel
|
||||||
|
);
|
||||||
|
SLresult (*GetDirectLevel) (
|
||||||
|
SLAndroidEffectSendItf self,
|
||||||
|
SLmillibel *pDirectLevel
|
||||||
|
);
|
||||||
|
SLresult (*SetSendLevel) (
|
||||||
|
SLAndroidEffectSendItf self,
|
||||||
|
SLInterfaceID effectImplementationId,
|
||||||
|
SLmillibel sendLevel
|
||||||
|
);
|
||||||
|
SLresult (*GetSendLevel)(
|
||||||
|
SLAndroidEffectSendItf self,
|
||||||
|
SLInterfaceID effectImplementationId,
|
||||||
|
SLmillibel *pSendLevel
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
/* Android Effect Capabilities interface */
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
extern SL_API const SLInterfaceID SL_IID_ANDROIDEFFECTCAPABILITIES;
|
||||||
|
|
||||||
|
/** Android Effect Capabilities interface methods */
|
||||||
|
|
||||||
|
struct SLAndroidEffectCapabilitiesItf_;
|
||||||
|
typedef const struct SLAndroidEffectCapabilitiesItf_ * const * SLAndroidEffectCapabilitiesItf;
|
||||||
|
|
||||||
|
struct SLAndroidEffectCapabilitiesItf_ {
|
||||||
|
|
||||||
|
SLresult (*QueryNumEffects) (SLAndroidEffectCapabilitiesItf self,
|
||||||
|
SLuint32 *pNumSupportedEffects);
|
||||||
|
|
||||||
|
|
||||||
|
SLresult (*QueryEffect) (SLAndroidEffectCapabilitiesItf self,
|
||||||
|
SLuint32 index,
|
||||||
|
SLInterfaceID *pEffectType,
|
||||||
|
SLInterfaceID *pEffectImplementation,
|
||||||
|
SLchar *pName,
|
||||||
|
SLuint16 *pNameSize);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
/* Android Configuration interface */
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
extern SL_API const SLInterfaceID SL_IID_ANDROIDCONFIGURATION;
|
||||||
|
|
||||||
|
/** Android Configuration interface methods */
|
||||||
|
|
||||||
|
struct SLAndroidConfigurationItf_;
|
||||||
|
typedef const struct SLAndroidConfigurationItf_ * const * SLAndroidConfigurationItf;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Java Proxy Type IDs
|
||||||
|
*/
|
||||||
|
#define SL_ANDROID_JAVA_PROXY_ROUTING 0x0001
|
||||||
|
|
||||||
|
struct SLAndroidConfigurationItf_ {
|
||||||
|
|
||||||
|
SLresult (*SetConfiguration) (SLAndroidConfigurationItf self,
|
||||||
|
const SLchar *configKey,
|
||||||
|
const void *pConfigValue,
|
||||||
|
SLuint32 valueSize);
|
||||||
|
|
||||||
|
SLresult (*GetConfiguration) (SLAndroidConfigurationItf self,
|
||||||
|
const SLchar *configKey,
|
||||||
|
SLuint32 *pValueSize,
|
||||||
|
void *pConfigValue
|
||||||
|
);
|
||||||
|
|
||||||
|
SLresult (*AcquireJavaProxy) (SLAndroidConfigurationItf self,
|
||||||
|
SLuint32 proxyType,
|
||||||
|
jobject *pProxyObj);
|
||||||
|
|
||||||
|
SLresult (*ReleaseJavaProxy) (SLAndroidConfigurationItf self,
|
||||||
|
SLuint32 proxyType);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
/* Android Simple Buffer Queue Interface */
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
extern SL_API const SLInterfaceID SL_IID_ANDROIDSIMPLEBUFFERQUEUE;
|
||||||
|
|
||||||
|
struct SLAndroidSimpleBufferQueueItf_;
|
||||||
|
typedef const struct SLAndroidSimpleBufferQueueItf_ * const * SLAndroidSimpleBufferQueueItf;
|
||||||
|
|
||||||
|
typedef void (SLAPIENTRY *slAndroidSimpleBufferQueueCallback)(
|
||||||
|
SLAndroidSimpleBufferQueueItf caller,
|
||||||
|
void *pContext
|
||||||
|
);
|
||||||
|
|
||||||
|
/** Android simple buffer queue state **/
|
||||||
|
|
||||||
|
typedef struct SLAndroidSimpleBufferQueueState_ {
|
||||||
|
SLuint32 count;
|
||||||
|
SLuint32 index;
|
||||||
|
} SLAndroidSimpleBufferQueueState;
|
||||||
|
|
||||||
|
|
||||||
|
struct SLAndroidSimpleBufferQueueItf_ {
|
||||||
|
SLresult (*Enqueue) (
|
||||||
|
SLAndroidSimpleBufferQueueItf self,
|
||||||
|
const void *pBuffer,
|
||||||
|
SLuint32 size
|
||||||
|
);
|
||||||
|
SLresult (*Clear) (
|
||||||
|
SLAndroidSimpleBufferQueueItf self
|
||||||
|
);
|
||||||
|
SLresult (*GetState) (
|
||||||
|
SLAndroidSimpleBufferQueueItf self,
|
||||||
|
SLAndroidSimpleBufferQueueState *pState
|
||||||
|
);
|
||||||
|
SLresult (*RegisterCallback) (
|
||||||
|
SLAndroidSimpleBufferQueueItf self,
|
||||||
|
slAndroidSimpleBufferQueueCallback callback,
|
||||||
|
void* pContext
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
/* Android Buffer Queue Interface */
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
extern SL_API const SLInterfaceID SL_IID_ANDROIDBUFFERQUEUESOURCE;
|
||||||
|
|
||||||
|
struct SLAndroidBufferQueueItf_;
|
||||||
|
typedef const struct SLAndroidBufferQueueItf_ * const * SLAndroidBufferQueueItf;
|
||||||
|
|
||||||
|
#define SL_ANDROID_ITEMKEY_NONE ((SLuint32) 0x00000000)
|
||||||
|
#define SL_ANDROID_ITEMKEY_EOS ((SLuint32) 0x00000001)
|
||||||
|
#define SL_ANDROID_ITEMKEY_DISCONTINUITY ((SLuint32) 0x00000002)
|
||||||
|
#define SL_ANDROID_ITEMKEY_BUFFERQUEUEEVENT ((SLuint32) 0x00000003)
|
||||||
|
#define SL_ANDROID_ITEMKEY_FORMAT_CHANGE ((SLuint32) 0x00000004)
|
||||||
|
|
||||||
|
#define SL_ANDROIDBUFFERQUEUEEVENT_NONE ((SLuint32) 0x00000000)
|
||||||
|
#define SL_ANDROIDBUFFERQUEUEEVENT_PROCESSED ((SLuint32) 0x00000001)
|
||||||
|
#if 0 // reserved for future use
|
||||||
|
#define SL_ANDROIDBUFFERQUEUEEVENT_UNREALIZED ((SLuint32) 0x00000002)
|
||||||
|
#define SL_ANDROIDBUFFERQUEUEEVENT_CLEARED ((SLuint32) 0x00000004)
|
||||||
|
#define SL_ANDROIDBUFFERQUEUEEVENT_STOPPED ((SLuint32) 0x00000008)
|
||||||
|
#define SL_ANDROIDBUFFERQUEUEEVENT_ERROR ((SLuint32) 0x00000010)
|
||||||
|
#define SL_ANDROIDBUFFERQUEUEEVENT_CONTENT_END ((SLuint32) 0x00000020)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
typedef struct SLAndroidBufferItem_ {
|
||||||
|
SLuint32 itemKey; // identifies the item
|
||||||
|
SLuint32 itemSize;
|
||||||
|
SLuint8 itemData[0];
|
||||||
|
} SLAndroidBufferItem;
|
||||||
|
|
||||||
|
typedef SLresult (SLAPIENTRY *slAndroidBufferQueueCallback)(
|
||||||
|
SLAndroidBufferQueueItf caller,/* input */
|
||||||
|
void *pCallbackContext, /* input */
|
||||||
|
void *pBufferContext, /* input */
|
||||||
|
void *pBufferData, /* input */
|
||||||
|
SLuint32 dataSize, /* input */
|
||||||
|
SLuint32 dataUsed, /* input */
|
||||||
|
const SLAndroidBufferItem *pItems,/* input */
|
||||||
|
SLuint32 itemsLength /* input */
|
||||||
|
);
|
||||||
|
|
||||||
|
typedef struct SLAndroidBufferQueueState_ {
|
||||||
|
SLuint32 count;
|
||||||
|
SLuint32 index;
|
||||||
|
} SLAndroidBufferQueueState;
|
||||||
|
|
||||||
|
struct SLAndroidBufferQueueItf_ {
|
||||||
|
SLresult (*RegisterCallback) (
|
||||||
|
SLAndroidBufferQueueItf self,
|
||||||
|
slAndroidBufferQueueCallback callback,
|
||||||
|
void* pCallbackContext
|
||||||
|
);
|
||||||
|
|
||||||
|
SLresult (*Clear) (
|
||||||
|
SLAndroidBufferQueueItf self
|
||||||
|
);
|
||||||
|
|
||||||
|
SLresult (*Enqueue) (
|
||||||
|
SLAndroidBufferQueueItf self,
|
||||||
|
void *pBufferContext,
|
||||||
|
void *pData,
|
||||||
|
SLuint32 dataLength,
|
||||||
|
const SLAndroidBufferItem *pItems,
|
||||||
|
SLuint32 itemsLength
|
||||||
|
);
|
||||||
|
|
||||||
|
SLresult (*GetState) (
|
||||||
|
SLAndroidBufferQueueItf self,
|
||||||
|
SLAndroidBufferQueueState *pState
|
||||||
|
);
|
||||||
|
|
||||||
|
SLresult (*SetCallbackEventsMask) (
|
||||||
|
SLAndroidBufferQueueItf self,
|
||||||
|
SLuint32 eventFlags
|
||||||
|
);
|
||||||
|
|
||||||
|
SLresult (*GetCallbackEventsMask) (
|
||||||
|
SLAndroidBufferQueueItf self,
|
||||||
|
SLuint32 *pEventFlags
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
/* Android File Descriptor Data Locator */
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/** Addendum to Data locator macros */
|
||||||
|
#define SL_DATALOCATOR_ANDROIDFD ((SLuint32) 0x800007BC)
|
||||||
|
|
||||||
|
#define SL_DATALOCATOR_ANDROIDFD_USE_FILE_SIZE ((SLAint64) 0xFFFFFFFFFFFFFFFFll)
|
||||||
|
|
||||||
|
/** File Descriptor-based data locator definition, locatorType must be SL_DATALOCATOR_ANDROIDFD */
|
||||||
|
typedef struct SLDataLocator_AndroidFD_ {
|
||||||
|
SLuint32 locatorType;
|
||||||
|
SLint32 fd;
|
||||||
|
SLAint64 offset;
|
||||||
|
SLAint64 length;
|
||||||
|
} SLDataLocator_AndroidFD;
|
||||||
|
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
/* Android Android Simple Buffer Queue Data Locator */
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/** Addendum to Data locator macros */
|
||||||
|
#define SL_DATALOCATOR_ANDROIDSIMPLEBUFFERQUEUE ((SLuint32) 0x800007BD)
|
||||||
|
|
||||||
|
/** BufferQueue-based data locator definition where locatorType must
|
||||||
|
* be SL_DATALOCATOR_ANDROIDSIMPLEBUFFERQUEUE
|
||||||
|
*/
|
||||||
|
typedef struct SLDataLocator_AndroidSimpleBufferQueue {
|
||||||
|
SLuint32 locatorType;
|
||||||
|
SLuint32 numBuffers;
|
||||||
|
} SLDataLocator_AndroidSimpleBufferQueue;
|
||||||
|
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
/* Android Buffer Queue Data Locator */
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/** Addendum to Data locator macros */
|
||||||
|
#define SL_DATALOCATOR_ANDROIDBUFFERQUEUE ((SLuint32) 0x800007BE)
|
||||||
|
|
||||||
|
/** Android Buffer Queue-based data locator definition,
|
||||||
|
* locatorType must be SL_DATALOCATOR_ANDROIDBUFFERQUEUE */
|
||||||
|
typedef struct SLDataLocator_AndroidBufferQueue_ {
|
||||||
|
SLuint32 locatorType;
|
||||||
|
SLuint32 numBuffers;
|
||||||
|
} SLDataLocator_AndroidBufferQueue;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* MIME types required for data in Android Buffer Queues
|
||||||
|
*/
|
||||||
|
#define SL_ANDROID_MIME_AACADTS ((SLchar *) "audio/vnd.android.aac-adts")
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
/* Acoustic Echo Cancellation (AEC) Interface */
|
||||||
|
/* --------------------------------------------------------------------------*/
|
||||||
|
extern SL_API const SLInterfaceID SL_IID_ANDROIDACOUSTICECHOCANCELLATION;
|
||||||
|
|
||||||
|
struct SLAndroidAcousticEchoCancellationItf_;
|
||||||
|
typedef const struct SLAndroidAcousticEchoCancellationItf_ * const *
|
||||||
|
SLAndroidAcousticEchoCancellationItf;
|
||||||
|
|
||||||
|
struct SLAndroidAcousticEchoCancellationItf_ {
|
||||||
|
SLresult (*SetEnabled)(
|
||||||
|
SLAndroidAcousticEchoCancellationItf self,
|
||||||
|
SLboolean enabled
|
||||||
|
);
|
||||||
|
SLresult (*IsEnabled)(
|
||||||
|
SLAndroidAcousticEchoCancellationItf self,
|
||||||
|
SLboolean *pEnabled
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
/* Automatic Gain Control (ACC) Interface */
|
||||||
|
/* --------------------------------------------------------------------------*/
|
||||||
|
extern SL_API const SLInterfaceID SL_IID_ANDROIDAUTOMATICGAINCONTROL;
|
||||||
|
|
||||||
|
struct SLAndroidAutomaticGainControlItf_;
|
||||||
|
typedef const struct SLAndroidAutomaticGainControlItf_ * const * SLAndroidAutomaticGainControlItf;
|
||||||
|
|
||||||
|
struct SLAndroidAutomaticGainControlItf_ {
|
||||||
|
SLresult (*SetEnabled)(
|
||||||
|
SLAndroidAutomaticGainControlItf self,
|
||||||
|
SLboolean enabled
|
||||||
|
);
|
||||||
|
SLresult (*IsEnabled)(
|
||||||
|
SLAndroidAutomaticGainControlItf self,
|
||||||
|
SLboolean *pEnabled
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
/* Noise Suppression Interface */
|
||||||
|
/* --------------------------------------------------------------------------*/
|
||||||
|
extern SL_API const SLInterfaceID SL_IID_ANDROIDNOISESUPPRESSION;
|
||||||
|
|
||||||
|
struct SLAndroidNoiseSuppressionItf_;
|
||||||
|
typedef const struct SLAndroidNoiseSuppressionItf_ * const * SLAndroidNoiseSuppressionItf;
|
||||||
|
|
||||||
|
struct SLAndroidNoiseSuppressionItf_ {
|
||||||
|
SLresult (*SetEnabled)(
|
||||||
|
SLAndroidNoiseSuppressionItf self,
|
||||||
|
SLboolean enabled
|
||||||
|
);
|
||||||
|
SLresult (*IsEnabled)(
|
||||||
|
SLAndroidNoiseSuppressionItf self,
|
||||||
|
SLboolean *pEnabled
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
#endif /* OPENSL_ES_ANDROID_H_ */
|
||||||
|
|
@ -0,0 +1,105 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2010 The Android Open Source Project
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef OPENSL_ES_ANDROIDCONFIGURATION_H_
|
||||||
|
#define OPENSL_ES_ANDROIDCONFIGURATION_H_
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
/* Android AudioRecorder configuration */
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/** Audio recording preset */
|
||||||
|
/** Audio recording preset key */
|
||||||
|
#define SL_ANDROID_KEY_RECORDING_PRESET ((const SLchar*) "androidRecordingPreset")
|
||||||
|
/** Audio recording preset values */
|
||||||
|
/** preset "none" cannot be set, it is used to indicate the current settings
|
||||||
|
* do not match any of the presets. */
|
||||||
|
#define SL_ANDROID_RECORDING_PRESET_NONE ((SLuint32) 0x00000000)
|
||||||
|
/** generic recording configuration on the platform */
|
||||||
|
#define SL_ANDROID_RECORDING_PRESET_GENERIC ((SLuint32) 0x00000001)
|
||||||
|
/** uses the microphone audio source with the same orientation as the camera
|
||||||
|
* if available, the main device microphone otherwise */
|
||||||
|
#define SL_ANDROID_RECORDING_PRESET_CAMCORDER ((SLuint32) 0x00000002)
|
||||||
|
/** uses the main microphone tuned for voice recognition */
|
||||||
|
#define SL_ANDROID_RECORDING_PRESET_VOICE_RECOGNITION ((SLuint32) 0x00000003)
|
||||||
|
/** uses the main microphone tuned for audio communications */
|
||||||
|
#define SL_ANDROID_RECORDING_PRESET_VOICE_COMMUNICATION ((SLuint32) 0x00000004)
|
||||||
|
/** uses the main microphone unprocessed */
|
||||||
|
#define SL_ANDROID_RECORDING_PRESET_UNPROCESSED ((SLuint32) 0x00000005)
|
||||||
|
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
/* Android AudioPlayer configuration */
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/** Audio playback stream type */
|
||||||
|
/** Audio playback stream type key */
|
||||||
|
#define SL_ANDROID_KEY_STREAM_TYPE ((const SLchar*) "androidPlaybackStreamType")
|
||||||
|
|
||||||
|
/** Audio playback stream type values */
|
||||||
|
/* same as android.media.AudioManager.STREAM_VOICE_CALL */
|
||||||
|
#define SL_ANDROID_STREAM_VOICE ((SLint32) 0x00000000)
|
||||||
|
/* same as android.media.AudioManager.STREAM_SYSTEM */
|
||||||
|
#define SL_ANDROID_STREAM_SYSTEM ((SLint32) 0x00000001)
|
||||||
|
/* same as android.media.AudioManager.STREAM_RING */
|
||||||
|
#define SL_ANDROID_STREAM_RING ((SLint32) 0x00000002)
|
||||||
|
/* same as android.media.AudioManager.STREAM_MUSIC */
|
||||||
|
#define SL_ANDROID_STREAM_MEDIA ((SLint32) 0x00000003)
|
||||||
|
/* same as android.media.AudioManager.STREAM_ALARM */
|
||||||
|
#define SL_ANDROID_STREAM_ALARM ((SLint32) 0x00000004)
|
||||||
|
/* same as android.media.AudioManager.STREAM_NOTIFICATION */
|
||||||
|
#define SL_ANDROID_STREAM_NOTIFICATION ((SLint32) 0x00000005)
|
||||||
|
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
/* Android AudioPlayer and AudioRecorder configuration */
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/** Audio Performance mode.
|
||||||
|
* Performance mode tells the framework how to configure the audio path
|
||||||
|
* for a player or recorder according to application performance and
|
||||||
|
* functional requirements.
|
||||||
|
* It affects the output or input latency based on acceptable tradeoffs on
|
||||||
|
* battery drain and use of pre or post processing effects.
|
||||||
|
* Performance mode should be set before realizing the object and should be
|
||||||
|
* read after realizing the object to check if the requested mode could be
|
||||||
|
* granted or not.
|
||||||
|
*/
|
||||||
|
/** Audio Performance mode key */
|
||||||
|
#define SL_ANDROID_KEY_PERFORMANCE_MODE ((const SLchar*) "androidPerformanceMode")
|
||||||
|
|
||||||
|
/** Audio performance values */
|
||||||
|
/* No specific performance requirement. Allows HW and SW pre/post processing. */
|
||||||
|
#define SL_ANDROID_PERFORMANCE_NONE ((SLuint32) 0x00000000)
|
||||||
|
/* Priority given to latency. No HW or software pre/post processing.
|
||||||
|
* This is the default if no performance mode is specified. */
|
||||||
|
#define SL_ANDROID_PERFORMANCE_LATENCY ((SLuint32) 0x00000001)
|
||||||
|
/* Priority given to latency while still allowing HW pre and post processing. */
|
||||||
|
#define SL_ANDROID_PERFORMANCE_LATENCY_EFFECTS ((SLuint32) 0x00000002)
|
||||||
|
/* Priority given to power saving if latency is not a concern.
|
||||||
|
* Allows HW and SW pre/post processing. */
|
||||||
|
#define SL_ANDROID_PERFORMANCE_POWER_SAVING ((SLuint32) 0x00000003)
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
#endif /* OPENSL_ES_ANDROIDCONFIGURATION_H_ */
|
||||||
|
|
@ -0,0 +1,47 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2011 The Android Open Source Project
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef OPENSL_ES_ANDROIDMETADATA_H_
|
||||||
|
#define OPENSL_ES_ANDROIDMETADATA_H_
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
/* Android metadata keys */
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Additional metadata keys to be used in SLMetadataExtractionItf:
|
||||||
|
* the ANDROID_KEY_PCMFORMAT_* keys follow the fields of the SLDataFormat_PCM struct, and as such
|
||||||
|
* all values corresponding to these keys are of SLuint32 type, and are defined as the fields
|
||||||
|
* of the same name in SLDataFormat_PCM. The exception is that sample rate is expressed here
|
||||||
|
* in Hz units, rather than in milliHz units.
|
||||||
|
*/
|
||||||
|
#define ANDROID_KEY_PCMFORMAT_NUMCHANNELS "AndroidPcmFormatNumChannels"
|
||||||
|
#define ANDROID_KEY_PCMFORMAT_SAMPLERATE "AndroidPcmFormatSampleRate"
|
||||||
|
#define ANDROID_KEY_PCMFORMAT_BITSPERSAMPLE "AndroidPcmFormatBitsPerSample"
|
||||||
|
#define ANDROID_KEY_PCMFORMAT_CONTAINERSIZE "AndroidPcmFormatContainerSize"
|
||||||
|
#define ANDROID_KEY_PCMFORMAT_CHANNELMASK "AndroidPcmFormatChannelMask"
|
||||||
|
#define ANDROID_KEY_PCMFORMAT_ENDIANNESS "AndroidPcmFormatEndianness"
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
#endif /* OPENSL_ES_ANDROIDMETADATA_H_ */
|
||||||
|
|
@ -0,0 +1,61 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2007-2009 The Khronos Group Inc.
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
* this software and /or associated documentation files (the "Materials "), to
|
||||||
|
* deal in the Materials without restriction, including without limitation the
|
||||||
|
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||||
|
* sell copies of the Materials, and to permit persons to whom the Materials are
|
||||||
|
* furnished to do so, subject to
|
||||||
|
* the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included
|
||||||
|
* in all copies or substantial portions of the Materials.
|
||||||
|
*
|
||||||
|
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
* MATERIALS.
|
||||||
|
*
|
||||||
|
* OpenSLES_Platform.h - OpenSL ES version 1.0
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
/* NOTE: This file contains definitions for the base types and the */
|
||||||
|
/* SLAPIENTRY macro. This file **WILL NEED TO BE EDITED** to provide */
|
||||||
|
/* the correct definitions specific to the platform being used. */
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
|
#ifndef _OPENSLES_PLATFORM_H_
|
||||||
|
#define _OPENSLES_PLATFORM_H_
|
||||||
|
|
||||||
|
typedef unsigned char sl_uint8_t;
|
||||||
|
typedef signed char sl_int8_t;
|
||||||
|
typedef unsigned short sl_uint16_t;
|
||||||
|
typedef signed short sl_int16_t;
|
||||||
|
typedef unsigned int /*long*/ sl_uint32_t;
|
||||||
|
typedef signed int /*long*/ sl_int32_t;
|
||||||
|
typedef long long sl_int64_t;
|
||||||
|
typedef unsigned long long sl_uint64_t;
|
||||||
|
|
||||||
|
#ifndef SL_API
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#define SL_API /* override per-platform */
|
||||||
|
#else
|
||||||
|
#define SL_API __declspec(dllimport)
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef SLAPIENTRY
|
||||||
|
#define SLAPIENTRY
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef SL_API_DEPRECATED
|
||||||
|
#define SL_API_DEPRECATED(level) __attribute__((availability(android,deprecated=level)))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* _OPENSLES_PLATFORM_H_ */
|
||||||
Binary file not shown.
Loading…
Reference in New Issue