am 2d954623: Fix WXGA720 skin to be portrait by default. do not merge.
* commit '2d95462334a254a6d1aedbc431e19fdb2bb2a0e6':
Fix WXGA720 skin to be portrait by default. do not merge.
diff --git a/apps/Fallback/res/values-be/strings.xml b/apps/Fallback/res/values-be/strings.xml
new file mode 100644
index 0000000..d59ae53
--- /dev/null
+++ b/apps/Fallback/res/values-be/strings.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2007 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.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="appTitle" msgid="161410001913116606">"Дапаможны"</string>
+ <string name="title" msgid="8156274565006125136">"Дзеянні, якія не падрымліваюцца"</string>
+ <string name="error" msgid="6539615832923362301">"Гэтае дзеянне зараз не падтрымліваецца."</string>
+</resources>
diff --git a/apps/Fallback/res/values-et/strings.xml b/apps/Fallback/res/values-et/strings.xml
new file mode 100644
index 0000000..181b324
--- /dev/null
+++ b/apps/Fallback/res/values-et/strings.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2007 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.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="appTitle" msgid="161410001913116606">"Taandepilt"</string>
+ <string name="title" msgid="8156274565006125136">"Toetuseta toiming"</string>
+ <string name="error" msgid="6539615832923362301">"Seda toimingut praegu ei toetata."</string>
+</resources>
diff --git a/build/sdk-windows-x86.atree b/build/sdk-windows-x86.atree
index 68105a2..3144b27 100644
--- a/build/sdk-windows-x86.atree
+++ b/build/sdk-windows-x86.atree
@@ -27,7 +27,9 @@
#
rm platform-tools/adb
+rm platform-tools/fastboot
bin/adb.exe strip platform-tools/adb.exe
+bin/fastboot.exe strip platform-tools/fastboot.exe
bin/AdbWinUsbApi.dll platform-tools/AdbWinUsbApi.dll
bin/AdbWinApi.dll platform-tools/AdbWinApi.dll
diff --git a/build/sdk.atree b/build/sdk.atree
index 148899b..323ffcf 100644
--- a/build/sdk.atree
+++ b/build/sdk.atree
@@ -43,6 +43,7 @@
bin/adb strip platform-tools/adb
bin/aapt strip platform-tools/aapt
bin/aidl strip platform-tools/aidl
+bin/fastboot strip platform-tools/fastboot
bin/llvm-rs-cc strip platform-tools/llvm-rs-cc
# dx
@@ -50,7 +51,6 @@
bin/dexdump platform-tools/dexdump
framework/dx.jar platform-tools/lib/dx.jar
-
# Framework include for Renderscript
frameworks/base/libs/rs/scriptc platform-tools/renderscript/include
external/clang/lib/Headers platform-tools/renderscript/clang-include
diff --git a/cmds/monkey/src/com/android/commands/monkey/MonkeySourceNetwork.java b/cmds/monkey/src/com/android/commands/monkey/MonkeySourceNetwork.java
index ba6d567..c5b25e6 100644
--- a/cmds/monkey/src/com/android/commands/monkey/MonkeySourceNetwork.java
+++ b/cmds/monkey/src/com/android/commands/monkey/MonkeySourceNetwork.java
@@ -529,8 +529,8 @@
switch(event) {
case ON_WINDOW_STATE_CHANGE:
try {
- synchronized(MonkeySourceNetworkViews.sConnection) {
- MonkeySourceNetworkViews.sConnection.wait(timeout);
+ synchronized(MonkeySourceNetworkViews.class) {
+ MonkeySourceNetworkViews.class.wait(timeout);
}
} catch(InterruptedException e) {
Log.d(TAG, "Deferral interrupted: " + e.getMessage());
diff --git a/cmds/monkey/src/com/android/commands/monkey/MonkeySourceNetworkViews.java b/cmds/monkey/src/com/android/commands/monkey/MonkeySourceNetworkViews.java
index b6b08a9..5d078c2 100644
--- a/cmds/monkey/src/com/android/commands/monkey/MonkeySourceNetworkViews.java
+++ b/cmds/monkey/src/com/android/commands/monkey/MonkeySourceNetworkViews.java
@@ -20,13 +20,13 @@
import android.accessibilityservice.IAccessibilityServiceConnection;
import android.accessibilityservice.IEventListener;
-import android.accessibilityservice.AccessibilityServiceInfo;
import android.content.Context;
import android.content.pm.IPackageManager;
import android.content.pm.ApplicationInfo;
import android.graphics.Rect;
import android.os.ServiceManager;
import android.os.RemoteException;
+import android.os.SystemClock;
import android.util.Log;
import android.view.accessibility.AccessibilityInteractionClient;
import android.view.accessibility.AccessibilityNodeInfo;
@@ -54,9 +54,13 @@
public class MonkeySourceNetworkViews {
private static final String TAG = "MonkeyViews";
+ private static final int TIMEOUT_REGISTER_EVENT_LISTENER = 2000;
+
+ private static final int NO_ID = -1;
+
private static volatile AtomicReference<AccessibilityEvent> sLastAccessibilityEvent
= new AtomicReference<AccessibilityEvent>();
- protected static IAccessibilityServiceConnection sConnection;
+ protected static int sConnectionId;
private static IPackageManager sPm =
IPackageManager.Stub.asInterface(ServiceManager.getService("package"));
private static Map<String, Class<?>> sClassMap = new HashMap<String, Class<?>>();
@@ -96,17 +100,23 @@
COMMAND_MAP.put("getaccessibilityids", new GetAccessibilityIds());
}
- /* This registers our listener with accessibility services, and gives us a connection object */
- private static IAccessibilityServiceConnection getConnection() throws RemoteException {
+ private static int getConnection() throws RemoteException {
+ if (sConnectionId != NO_ID) {
+ return sConnectionId;
+ }
IEventListener listener = new IEventListener.Stub() {
- public void setConnection(IAccessibilityServiceConnection connection)
- throws RemoteException {
- AccessibilityServiceInfo info = new AccessibilityServiceInfo();
- info.eventTypes = AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED;
- info.feedbackType = AccessibilityServiceInfo.FEEDBACK_GENERIC;
- info.notificationTimeout = 0;
- info.flags = AccessibilityServiceInfo.DEFAULT;
- connection.setServiceInfo(info);
+ public void setConnection(IAccessibilityServiceConnection connection,
+ int connectionId) {
+ sConnectionId = connectionId;
+ if (connection != null) {
+ AccessibilityInteractionClient.getInstance().addConnection(connectionId,
+ connection);
+ } else {
+ AccessibilityInteractionClient.getInstance().removeConnection(connectionId);
+ }
+ synchronized (MonkeySourceNetworkViews.class) {
+ notifyAll();
+ }
}
public void onInterrupt() {}
@@ -114,14 +124,37 @@
public void onAccessibilityEvent(AccessibilityEvent event) {
Log.d(TAG, "Accessibility Event");
sLastAccessibilityEvent.set(AccessibilityEvent.obtain(event));
- synchronized(sConnection) {
- sConnection.notifyAll();
+ synchronized (MonkeySourceNetworkViews.class) {
+ notifyAll();
}
}
};
+
IAccessibilityManager manager = IAccessibilityManager.Stub.asInterface(
ServiceManager.getService(Context.ACCESSIBILITY_SERVICE));
- return manager.registerEventListener(listener);
+
+ final long beginTime = SystemClock.uptimeMillis();
+ synchronized (MonkeySourceNetworkViews.class) {
+ manager.registerEventListener(listener);
+ while (true) {
+ if (sConnectionId != NO_ID) {
+ return sConnectionId;
+ }
+ final long elapsedTime = (SystemClock.uptimeMillis() - beginTime);
+ final long remainingTime = TIMEOUT_REGISTER_EVENT_LISTENER - elapsedTime;
+ if (remainingTime <= 0) {
+ if (sConnectionId == NO_ID) {
+ throw new IllegalStateException("Cound not register IEventListener.");
+ }
+ return sConnectionId;
+ }
+ try {
+ MonkeySourceNetworkViews.class.wait(remainingTime);
+ } catch (InterruptedException ie) {
+ /* ignore */
+ }
+ }
+ }
}
/**
@@ -131,7 +164,7 @@
*/
public static void setup() {
try {
- sConnection = getConnection();
+ sConnectionId = getConnection();
} catch (RemoteException re) {
Log.e(TAG,"Remote Exception encountered when"
+ " attempting to connect to Accessibility Service");
@@ -208,14 +241,14 @@
int windowId = Integer.parseInt(windowString);
int viewId = Integer.parseInt(viewString);
return AccessibilityInteractionClient.getInstance()
- .findAccessibilityNodeInfoByAccessibilityId(sConnection, windowId, viewId);
+ .findAccessibilityNodeInfoByAccessibilityId(sConnectionId, windowId, viewId);
}
private static AccessibilityNodeInfo getNodeByViewId(String viewId, AccessibilityEvent event)
throws MonkeyViewException {
int id = getId(viewId, event);
return AccessibilityInteractionClient.getInstance()
- .findAccessibilityNodeInfoByViewIdInActiveWindow(sConnection, id);
+ .findAccessibilityNodeInfoByViewIdInActiveWindow(sConnectionId, id);
}
/**
@@ -267,7 +300,7 @@
public MonkeyCommandReturn translateCommand(List<String> command,
CommandQueue queue) {
if (command.size() > 2) {
- if (sConnection == null) {
+ if (sConnectionId < 0) {
return new MonkeyCommandReturn(false, NO_CONNECTION);
}
AccessibilityEvent lastEvent = sLastAccessibilityEvent.get();
@@ -339,13 +372,13 @@
// getviewswithtext "some text here"
public MonkeyCommandReturn translateCommand(List<String> command,
CommandQueue queue) {
- if (sConnection == null) {
+ if (sConnectionId < 0) {
return new MonkeyCommandReturn(false, NO_CONNECTION);
}
if (command.size() == 2) {
String text = command.get(1);
List<AccessibilityNodeInfo> nodes = AccessibilityInteractionClient.getInstance()
- .findAccessibilityNodeInfosByViewTextInActiveWindow(sConnection, text);
+ .findAccessibilityNodeInfosByViewTextInActiveWindow(sConnectionId, text);
ViewIntrospectionCommand idGetter = new GetAccessibilityIds();
List<String> emptyArgs = new ArrayList<String>();
StringBuilder ids = new StringBuilder();
diff --git a/ndk/platforms/android-14/arch-arm/symbols/libOpenMAXAL.so.functions.txt b/ndk/platforms/android-14/arch-arm/symbols/libOpenMAXAL.so.functions.txt
new file mode 100644
index 0000000..c3a190c
--- /dev/null
+++ b/ndk/platforms/android-14/arch-arm/symbols/libOpenMAXAL.so.functions.txt
@@ -0,0 +1,3 @@
+xaCreateEngine
+xaQueryNumSupportedEngineInterfaces
+xaQuerySupportedEngineInterfaces
diff --git a/ndk/platforms/android-14/arch-arm/symbols/libOpenMAXAL.so.variables.txt b/ndk/platforms/android-14/arch-arm/symbols/libOpenMAXAL.so.variables.txt
new file mode 100644
index 0000000..7ceda9c
--- /dev/null
+++ b/ndk/platforms/android-14/arch-arm/symbols/libOpenMAXAL.so.variables.txt
@@ -0,0 +1,41 @@
+XA_IID_ANDROIDBUFFERQUEUESOURCE
+XA_IID_AUDIODECODERCAPABILITIES
+XA_IID_AUDIOENCODER
+XA_IID_AUDIOENCODERCAPABILITIES
+XA_IID_AUDIOIODEVICECAPABILITIES
+XA_IID_CAMERA
+XA_IID_CAMERACAPABILITIES
+XA_IID_CONFIGEXTENSION
+XA_IID_DEVICEVOLUME
+XA_IID_DYNAMICINTERFACEMANAGEMENT
+XA_IID_DYNAMICSOURCE
+XA_IID_ENGINE
+XA_IID_EQUALIZER
+XA_IID_IMAGECONTROLS
+XA_IID_IMAGEDECODERCAPABILITIES
+XA_IID_IMAGEEFFECTS
+XA_IID_IMAGEENCODER
+XA_IID_IMAGEENCODERCAPABILITIES
+XA_IID_LED
+XA_IID_METADATAEXTRACTION
+XA_IID_METADATAINSERTION
+XA_IID_METADATATRAVERSAL
+XA_IID_NULL
+XA_IID_OBJECT
+XA_IID_OUTPUTMIX
+XA_IID_PLAY
+XA_IID_PLAYBACKRATE
+XA_IID_PREFETCHSTATUS
+XA_IID_RADIO
+XA_IID_RDS
+XA_IID_RECORD
+XA_IID_SEEK
+XA_IID_SNAPSHOT
+XA_IID_STREAMINFORMATION
+XA_IID_THREADSYNC
+XA_IID_VIBRA
+XA_IID_VIDEODECODERCAPABILITIES
+XA_IID_VIDEOENCODER
+XA_IID_VIDEOENCODERCAPABILITIES
+XA_IID_VIDEOPOSTPROCESSING
+XA_IID_VOLUME
diff --git a/ndk/platforms/android-14/arch-arm/symbols/libOpenSLES.so.variables.txt b/ndk/platforms/android-14/arch-arm/symbols/libOpenSLES.so.variables.txt
new file mode 100644
index 0000000..c7ee7d1
--- /dev/null
+++ b/ndk/platforms/android-14/arch-arm/symbols/libOpenSLES.so.variables.txt
@@ -0,0 +1,50 @@
+SL_IID_3DCOMMIT
+SL_IID_3DDOPPLER
+SL_IID_3DGROUPING
+SL_IID_3DLOCATION
+SL_IID_3DMACROSCOPIC
+SL_IID_3DSOURCE
+SL_IID_ANDROIDBUFFERQUEUESOURCE
+SL_IID_ANDROIDCONFIGURATION
+SL_IID_ANDROIDEFFECT
+SL_IID_ANDROIDEFFECTCAPABILITIES
+SL_IID_ANDROIDEFFECTSEND
+SL_IID_ANDROIDSIMPLEBUFFERQUEUE
+SL_IID_AUDIODECODERCAPABILITIES
+SL_IID_AUDIOENCODER
+SL_IID_AUDIOENCODERCAPABILITIES
+SL_IID_AUDIOIODEVICECAPABILITIES
+SL_IID_BASSBOOST
+SL_IID_BUFFERQUEUE
+SL_IID_DEVICEVOLUME
+SL_IID_DYNAMICINTERFACEMANAGEMENT
+SL_IID_DYNAMICSOURCE
+SL_IID_EFFECTSEND
+SL_IID_ENGINE
+SL_IID_ENGINECAPABILITIES
+SL_IID_ENVIRONMENTALREVERB
+SL_IID_EQUALIZER
+SL_IID_LED
+SL_IID_METADATAEXTRACTION
+SL_IID_METADATATRAVERSAL
+SL_IID_MIDIMESSAGE
+SL_IID_MIDIMUTESOLO
+SL_IID_MIDITEMPO
+SL_IID_MIDITIME
+SL_IID_MUTESOLO
+SL_IID_NULL
+SL_IID_OBJECT
+SL_IID_OUTPUTMIX
+SL_IID_PITCH
+SL_IID_PLAY
+SL_IID_PLAYBACKRATE
+SL_IID_PREFETCHSTATUS
+SL_IID_PRESETREVERB
+SL_IID_RATEPITCH
+SL_IID_RECORD
+SL_IID_SEEK
+SL_IID_THREADSYNC
+SL_IID_VIBRA
+SL_IID_VIRTUALIZER
+SL_IID_VISUALIZATION
+SL_IID_VOLUME
diff --git a/ndk/platforms/android-14/arch-x86/symbols/libOpenMAXAL.so.functions.txt b/ndk/platforms/android-14/arch-x86/symbols/libOpenMAXAL.so.functions.txt
new file mode 100644
index 0000000..c3a190c
--- /dev/null
+++ b/ndk/platforms/android-14/arch-x86/symbols/libOpenMAXAL.so.functions.txt
@@ -0,0 +1,3 @@
+xaCreateEngine
+xaQueryNumSupportedEngineInterfaces
+xaQuerySupportedEngineInterfaces
diff --git a/ndk/platforms/android-14/arch-x86/symbols/libOpenMAXAL.so.variables.txt b/ndk/platforms/android-14/arch-x86/symbols/libOpenMAXAL.so.variables.txt
new file mode 100644
index 0000000..7ceda9c
--- /dev/null
+++ b/ndk/platforms/android-14/arch-x86/symbols/libOpenMAXAL.so.variables.txt
@@ -0,0 +1,41 @@
+XA_IID_ANDROIDBUFFERQUEUESOURCE
+XA_IID_AUDIODECODERCAPABILITIES
+XA_IID_AUDIOENCODER
+XA_IID_AUDIOENCODERCAPABILITIES
+XA_IID_AUDIOIODEVICECAPABILITIES
+XA_IID_CAMERA
+XA_IID_CAMERACAPABILITIES
+XA_IID_CONFIGEXTENSION
+XA_IID_DEVICEVOLUME
+XA_IID_DYNAMICINTERFACEMANAGEMENT
+XA_IID_DYNAMICSOURCE
+XA_IID_ENGINE
+XA_IID_EQUALIZER
+XA_IID_IMAGECONTROLS
+XA_IID_IMAGEDECODERCAPABILITIES
+XA_IID_IMAGEEFFECTS
+XA_IID_IMAGEENCODER
+XA_IID_IMAGEENCODERCAPABILITIES
+XA_IID_LED
+XA_IID_METADATAEXTRACTION
+XA_IID_METADATAINSERTION
+XA_IID_METADATATRAVERSAL
+XA_IID_NULL
+XA_IID_OBJECT
+XA_IID_OUTPUTMIX
+XA_IID_PLAY
+XA_IID_PLAYBACKRATE
+XA_IID_PREFETCHSTATUS
+XA_IID_RADIO
+XA_IID_RDS
+XA_IID_RECORD
+XA_IID_SEEK
+XA_IID_SNAPSHOT
+XA_IID_STREAMINFORMATION
+XA_IID_THREADSYNC
+XA_IID_VIBRA
+XA_IID_VIDEODECODERCAPABILITIES
+XA_IID_VIDEOENCODER
+XA_IID_VIDEOENCODERCAPABILITIES
+XA_IID_VIDEOPOSTPROCESSING
+XA_IID_VOLUME
diff --git a/ndk/platforms/android-14/arch-x86/symbols/libOpenSLES.so.variables.txt b/ndk/platforms/android-14/arch-x86/symbols/libOpenSLES.so.variables.txt
new file mode 100644
index 0000000..c7ee7d1
--- /dev/null
+++ b/ndk/platforms/android-14/arch-x86/symbols/libOpenSLES.so.variables.txt
@@ -0,0 +1,50 @@
+SL_IID_3DCOMMIT
+SL_IID_3DDOPPLER
+SL_IID_3DGROUPING
+SL_IID_3DLOCATION
+SL_IID_3DMACROSCOPIC
+SL_IID_3DSOURCE
+SL_IID_ANDROIDBUFFERQUEUESOURCE
+SL_IID_ANDROIDCONFIGURATION
+SL_IID_ANDROIDEFFECT
+SL_IID_ANDROIDEFFECTCAPABILITIES
+SL_IID_ANDROIDEFFECTSEND
+SL_IID_ANDROIDSIMPLEBUFFERQUEUE
+SL_IID_AUDIODECODERCAPABILITIES
+SL_IID_AUDIOENCODER
+SL_IID_AUDIOENCODERCAPABILITIES
+SL_IID_AUDIOIODEVICECAPABILITIES
+SL_IID_BASSBOOST
+SL_IID_BUFFERQUEUE
+SL_IID_DEVICEVOLUME
+SL_IID_DYNAMICINTERFACEMANAGEMENT
+SL_IID_DYNAMICSOURCE
+SL_IID_EFFECTSEND
+SL_IID_ENGINE
+SL_IID_ENGINECAPABILITIES
+SL_IID_ENVIRONMENTALREVERB
+SL_IID_EQUALIZER
+SL_IID_LED
+SL_IID_METADATAEXTRACTION
+SL_IID_METADATATRAVERSAL
+SL_IID_MIDIMESSAGE
+SL_IID_MIDIMUTESOLO
+SL_IID_MIDITEMPO
+SL_IID_MIDITIME
+SL_IID_MUTESOLO
+SL_IID_NULL
+SL_IID_OBJECT
+SL_IID_OUTPUTMIX
+SL_IID_PITCH
+SL_IID_PLAY
+SL_IID_PLAYBACKRATE
+SL_IID_PREFETCHSTATUS
+SL_IID_PRESETREVERB
+SL_IID_RATEPITCH
+SL_IID_RECORD
+SL_IID_SEEK
+SL_IID_THREADSYNC
+SL_IID_VIBRA
+SL_IID_VIRTUALIZER
+SL_IID_VISUALIZATION
+SL_IID_VOLUME
diff --git a/ndk/platforms/android-14/include/OMXAL/OpenMAXAL.h b/ndk/platforms/android-14/include/OMXAL/OpenMAXAL.h
new file mode 100644
index 0000000..d31283c
--- /dev/null
+++ b/ndk/platforms/android-14/include/OMXAL/OpenMAXAL.h
@@ -0,0 +1,3195 @@
+/*
+ * Copyright (c) 2007-2010 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.
+ *
+ * OpenMAXAL.h - OpenMAX AL version 1.0.1
+ *
+ */
+
+/****************************************************************************/
+/* NOTE: This file is a standard OpenMAX AL header file and should not be */
+/* modified in any way. */
+/****************************************************************************/
+
+#ifndef _OPENMAXAL_H_
+#define _OPENMAXAL_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "OpenMAXAL_Platform.h"
+
+
+ /*****************************************************************/
+ /* TYPES */
+ /*****************************************************************/
+
+/* remap common types to XA types for clarity */
+typedef xa_int8_t XAint8; /* 8 bit signed integer */
+typedef xa_uint8_t XAuint8; /* 8 bit unsigned integer */
+typedef xa_int16_t XAint16; /* 16 bit signed integer */
+typedef xa_uint16_t XAuint16; /* 16 bit unsigned integer */
+typedef xa_int32_t XAint32; /* 32 bit signed integer */
+typedef xa_uint32_t XAuint32; /* 32 bit unsigned integer */
+typedef xa_uint64_t XAuint64; /* 64 bit unsigned integer */
+
+typedef XAuint32 XAboolean;
+typedef XAuint8 XAchar;
+typedef XAint16 XAmillibel;
+typedef XAuint32 XAmillisecond;
+typedef XAuint32 XAmilliHertz;
+typedef XAint32 XAmillimeter;
+typedef XAint32 XAmillidegree;
+typedef XAint16 XApermille;
+typedef XAuint32 XAmicrosecond;
+typedef XAuint64 XAtime;
+typedef XAuint32 XAresult;
+
+#define XA_BOOLEAN_FALSE ((XAuint32) 0x00000000)
+#define XA_BOOLEAN_TRUE ((XAuint32) 0x00000001)
+
+#define XA_MILLIBEL_MAX ((XAmillibel) 0x7FFF)
+#define XA_MILLIBEL_MIN ((XAmillibel) (-XA_MILLIBEL_MAX-1))
+
+#define XA_MILLIHERTZ_MAX ((XAmilliHertz) 0xFFFFFFFF)
+
+#define XA_MILLIMETER_MAX ((XAmillimeter) 0x7FFFFFFF)
+
+
+
+ /*****************************************************************/
+ /* RESULT CODES */
+ /*****************************************************************/
+
+#define XA_RESULT_SUCCESS ((XAuint32) 0x00000000)
+#define XA_RESULT_PRECONDITIONS_VIOLATED ((XAuint32) 0x00000001)
+#define XA_RESULT_PARAMETER_INVALID ((XAuint32) 0x00000002)
+#define XA_RESULT_MEMORY_FAILURE ((XAuint32) 0x00000003)
+#define XA_RESULT_RESOURCE_ERROR ((XAuint32) 0x00000004)
+#define XA_RESULT_RESOURCE_LOST ((XAuint32) 0x00000005)
+#define XA_RESULT_IO_ERROR ((XAuint32) 0x00000006)
+#define XA_RESULT_BUFFER_INSUFFICIENT ((XAuint32) 0x00000007)
+#define XA_RESULT_CONTENT_CORRUPTED ((XAuint32) 0x00000008)
+#define XA_RESULT_CONTENT_UNSUPPORTED ((XAuint32) 0x00000009)
+#define XA_RESULT_CONTENT_NOT_FOUND ((XAuint32) 0x0000000A)
+#define XA_RESULT_PERMISSION_DENIED ((XAuint32) 0x0000000B)
+#define XA_RESULT_FEATURE_UNSUPPORTED ((XAuint32) 0x0000000C)
+#define XA_RESULT_INTERNAL_ERROR ((XAuint32) 0x0000000D)
+#define XA_RESULT_UNKNOWN_ERROR ((XAuint32) 0x0000000E)
+#define XA_RESULT_OPERATION_ABORTED ((XAuint32) 0x0000000F)
+#define XA_RESULT_CONTROL_LOST ((XAuint32) 0x00000010)
+
+
+
+ /*****************************************************************/
+ /* INTERFACE ID DEFINITION */
+ /*****************************************************************/
+
+/* Interface ID defined as a UUID */
+typedef const struct XAInterfaceID_ {
+ XAuint32 time_low;
+ XAuint16 time_mid;
+ XAuint16 time_hi_and_version;
+ XAuint16 clock_seq;
+ XAuint8 node[6];
+} * XAInterfaceID;
+
+/* NULL Interface */
+XA_API extern const XAInterfaceID XA_IID_NULL;
+
+
+
+ /*****************************************************************/
+ /* GENERAL INTERFACES, STRUCTS AND DEFINES */
+ /*****************************************************************/
+
+/* OBJECT */
+
+#define XA_PRIORITY_LOWEST ((XAint32) (-0x7FFFFFFF-1))
+#define XA_PRIORITY_VERYLOW ((XAint32) -0x60000000)
+#define XA_PRIORITY_LOW ((XAint32) -0x40000000)
+#define XA_PRIORITY_BELOWNORMAL ((XAint32) -0x20000000)
+#define XA_PRIORITY_NORMAL ((XAint32) 0x00000000)
+#define XA_PRIORITY_ABOVENORMAL ((XAint32) 0x20000000)
+#define XA_PRIORITY_HIGH ((XAint32) 0x40000000)
+#define XA_PRIORITY_VERYHIGH ((XAint32) 0x60000000)
+#define XA_PRIORITY_HIGHEST ((XAint32) 0x7FFFFFFF)
+
+#define XA_OBJECT_EVENT_RUNTIME_ERROR ((XAuint32) 0x00000001)
+#define XA_OBJECT_EVENT_ASYNC_TERMINATION ((XAuint32) 0x00000002)
+#define XA_OBJECT_EVENT_RESOURCES_LOST ((XAuint32) 0x00000003)
+#define XA_OBJECT_EVENT_RESOURCES_AVAILABLE ((XAuint32) 0x00000004)
+#define XA_OBJECT_EVENT_ITF_CONTROL_TAKEN ((XAuint32) 0x00000005)
+#define XA_OBJECT_EVENT_ITF_CONTROL_RETURNED ((XAuint32) 0x00000006)
+#define XA_OBJECT_EVENT_ITF_PARAMETERS_CHANGED ((XAuint32) 0x00000007)
+
+#define XA_OBJECT_STATE_UNREALIZED ((XAuint32) 0x00000001)
+#define XA_OBJECT_STATE_REALIZED ((XAuint32) 0x00000002)
+#define XA_OBJECT_STATE_SUSPENDED ((XAuint32) 0x00000003)
+
+
+XA_API extern const XAInterfaceID XA_IID_OBJECT;
+
+struct XAObjectItf_;
+typedef const struct XAObjectItf_ * const * XAObjectItf;
+
+typedef void (XAAPIENTRY * xaObjectCallback) (
+ XAObjectItf caller,
+ const void * pContext,
+ XAuint32 event,
+ XAresult result,
+ XAuint32 param,
+ void * pInterface
+);
+
+struct XAObjectItf_ {
+ XAresult (*Realize) (
+ XAObjectItf self,
+ XAboolean async
+ );
+ XAresult (*Resume) (
+ XAObjectItf self,
+ XAboolean async
+ );
+ XAresult (*GetState) (
+ XAObjectItf self,
+ XAuint32 * pState
+ );
+ XAresult (*GetInterface) (
+ XAObjectItf self,
+ const XAInterfaceID iid,
+ void * pInterface
+ );
+ XAresult (*RegisterCallback) (
+ XAObjectItf self,
+ xaObjectCallback callback,
+ void * pContext
+ );
+ void (*AbortAsyncOperation) (
+ XAObjectItf self
+ );
+ void (*Destroy) (
+ XAObjectItf self
+ );
+ XAresult (*SetPriority) (
+ XAObjectItf self,
+ XAint32 priority,
+ XAboolean preemptable
+ );
+ XAresult (*GetPriority) (
+ XAObjectItf self,
+ XAint32 * pPriority,
+ XAboolean * pPreemptable
+ );
+ XAresult (*SetLossOfControlInterfaces) (
+ XAObjectItf self,
+ XAint16 numInterfaces,
+ XAInterfaceID * pInterfaceIDs,
+ XAboolean enabled
+ );
+};
+
+/* CONFIG EXTENSION */
+
+XA_API extern const XAInterfaceID XA_IID_CONFIGEXTENSION;
+
+struct XAConfigExtensionsItf_;
+typedef const struct XAConfigExtensionsItf_
+ * const * XAConfigExtensionsItf;
+
+struct XAConfigExtensionsItf_ {
+ XAresult (*SetConfiguration) (
+ XAConfigExtensionsItf self,
+ const XAchar * configKey,
+ XAuint32 valueSize,
+ const void * pConfigValue
+ );
+ XAresult (*GetConfiguration) (
+ XAConfigExtensionsItf self,
+ const XAchar * configKey,
+ XAuint32 * pValueSize,
+ void * pConfigValue
+ );
+};
+
+/* DYNAMIC INTERFACE MANAGEMENT */
+
+#define XA_DYNAMIC_ITF_EVENT_RUNTIME_ERROR ((XAuint32) 0x00000001)
+#define XA_DYNAMIC_ITF_EVENT_ASYNC_TERMINATION ((XAuint32) 0x00000002)
+#define XA_DYNAMIC_ITF_EVENT_RESOURCES_LOST ((XAuint32) 0x00000003)
+#define XA_DYNAMIC_ITF_EVENT_RESOURCES_LOST_PERMANENTLY ((XAuint32) 0x00000004)
+#define XA_DYNAMIC_ITF_EVENT_RESOURCES_AVAILABLE ((XAuint32) 0x00000005)
+
+XA_API extern const XAInterfaceID XA_IID_DYNAMICINTERFACEMANAGEMENT;
+
+struct XADynamicInterfaceManagementItf_;
+typedef const struct XADynamicInterfaceManagementItf_
+ * const * XADynamicInterfaceManagementItf;
+
+typedef void (XAAPIENTRY * xaDynamicInterfaceManagementCallback) (
+ XADynamicInterfaceManagementItf caller,
+ void * pContext,
+ XAuint32 event,
+ XAresult result,
+ const XAInterfaceID iid
+);
+
+struct XADynamicInterfaceManagementItf_ {
+ XAresult (*AddInterface) (
+ XADynamicInterfaceManagementItf self,
+ const XAInterfaceID iid,
+ XAboolean aysnc
+ );
+ XAresult (*RemoveInterface) (
+ XADynamicInterfaceManagementItf self,
+ const XAInterfaceID iid
+ );
+ XAresult (*ResumeInterface) (
+ XADynamicInterfaceManagementItf self,
+ const XAInterfaceID iid,
+ XAboolean aysnc
+ );
+ XAresult (*RegisterCallback) (
+ XADynamicInterfaceManagementItf self,
+ xaDynamicInterfaceManagementCallback callback,
+ void * pContext
+ );
+};
+
+/* DATA SOURCES/SINKS */
+
+#define XA_DATAFORMAT_MIME ((XAuint32) 0x00000001)
+#define XA_DATAFORMAT_PCM ((XAuint32) 0x00000002)
+#define XA_DATAFORMAT_RAWIMAGE ((XAuint32) 0x00000003)
+
+#define XA_DATALOCATOR_URI ((XAuint32) 0x00000001)
+#define XA_DATALOCATOR_ADDRESS ((XAuint32) 0x00000002)
+#define XA_DATALOCATOR_IODEVICE ((XAuint32) 0x00000003)
+#define XA_DATALOCATOR_OUTPUTMIX ((XAuint32) 0x00000004)
+#define XA_DATALOCATOR_NATIVEDISPLAY ((XAuint32) 0x00000005)
+#define XA_DATALOCATOR_RESERVED6 ((XAuint32) 0x00000006)
+#define XA_DATALOCATOR_RESERVED7 ((XAuint32) 0x00000007)
+
+typedef struct XADataSink_ {
+ void * pLocator;
+ void * pFormat;
+} XADataSink;
+
+typedef struct XADataSource_ {
+ void * pLocator;
+ void * pFormat;
+} XADataSource;
+
+#define XA_CONTAINERTYPE_UNSPECIFIED ((XAuint32) 0x00000001)
+#define XA_CONTAINERTYPE_RAW ((XAuint32) 0x00000002)
+#define XA_CONTAINERTYPE_ASF ((XAuint32) 0x00000003)
+#define XA_CONTAINERTYPE_AVI ((XAuint32) 0x00000004)
+#define XA_CONTAINERTYPE_BMP ((XAuint32) 0x00000005)
+#define XA_CONTAINERTYPE_JPG ((XAuint32) 0x00000006)
+#define XA_CONTAINERTYPE_JPG2000 ((XAuint32) 0x00000007)
+#define XA_CONTAINERTYPE_M4A ((XAuint32) 0x00000008)
+#define XA_CONTAINERTYPE_MP3 ((XAuint32) 0x00000009)
+#define XA_CONTAINERTYPE_MP4 ((XAuint32) 0x0000000A)
+#define XA_CONTAINERTYPE_MPEG_ES ((XAuint32) 0x0000000B)
+#define XA_CONTAINERTYPE_MPEG_PS ((XAuint32) 0x0000000C)
+#define XA_CONTAINERTYPE_MPEG_TS ((XAuint32) 0x0000000D)
+#define XA_CONTAINERTYPE_QT ((XAuint32) 0x0000000E)
+#define XA_CONTAINERTYPE_WAV ((XAuint32) 0x0000000F)
+#define XA_CONTAINERTYPE_XMF_0 ((XAuint32) 0x00000010)
+#define XA_CONTAINERTYPE_XMF_1 ((XAuint32) 0x00000011)
+#define XA_CONTAINERTYPE_XMF_2 ((XAuint32) 0x00000012)
+#define XA_CONTAINERTYPE_XMF_3 ((XAuint32) 0x00000013)
+#define XA_CONTAINERTYPE_XMF_GENERIC ((XAuint32) 0x00000014)
+#define XA_CONTAINERTYPE_AMR ((XAuint32) 0x00000015)
+#define XA_CONTAINERTYPE_AAC ((XAuint32) 0x00000016)
+#define XA_CONTAINERTYPE_3GPP ((XAuint32) 0x00000017)
+#define XA_CONTAINERTYPE_3GA ((XAuint32) 0x00000018)
+#define XA_CONTAINERTYPE_RM ((XAuint32) 0x00000019)
+#define XA_CONTAINERTYPE_DMF ((XAuint32) 0x0000001A)
+#define XA_CONTAINERTYPE_SMF ((XAuint32) 0x0000001B)
+#define XA_CONTAINERTYPE_MOBILE_DLS ((XAuint32) 0x0000001C)
+#define XA_CONTAINERTYPE_OGG ((XAuint32) 0x0000001D)
+
+typedef struct XADataFormat_MIME_ {
+ XAuint32 formatType;
+ XAchar * mimeType;
+ XAuint32 containerType;
+} XADataFormat_MIME;
+
+#define XA_BYTEORDER_BIGENDIAN ((XAuint32) 0x00000001)
+#define XA_BYTEORDER_LITTLEENDIAN ((XAuint32) 0x00000002)
+
+#define XA_SAMPLINGRATE_8 ((XAuint32) 8000000)
+#define XA_SAMPLINGRATE_11_025 ((XAuint32) 11025000)
+#define XA_SAMPLINGRATE_12 ((XAuint32) 12000000)
+#define XA_SAMPLINGRATE_16 ((XAuint32) 16000000)
+#define XA_SAMPLINGRATE_22_05 ((XAuint32) 22050000)
+#define XA_SAMPLINGRATE_24 ((XAuint32) 24000000)
+#define XA_SAMPLINGRATE_32 ((XAuint32) 32000000)
+#define XA_SAMPLINGRATE_44_1 ((XAuint32) 44100000)
+#define XA_SAMPLINGRATE_48 ((XAuint32) 48000000)
+#define XA_SAMPLINGRATE_64 ((XAuint32) 64000000)
+#define XA_SAMPLINGRATE_88_2 ((XAuint32) 88200000)
+#define XA_SAMPLINGRATE_96 ((XAuint32) 96000000)
+#define XA_SAMPLINGRATE_192 ((XAuint32) 192000000)
+
+#define XA_SPEAKER_FRONT_LEFT ((XAuint32) 0x00000001)
+#define XA_SPEAKER_FRONT_RIGHT ((XAuint32) 0x00000002)
+#define XA_SPEAKER_FRONT_CENTER ((XAuint32) 0x00000004)
+#define XA_SPEAKER_LOW_FREQUENCY ((XAuint32) 0x00000008)
+#define XA_SPEAKER_BACK_LEFT ((XAuint32) 0x00000010)
+#define XA_SPEAKER_BACK_RIGHT ((XAuint32) 0x00000020)
+#define XA_SPEAKER_FRONT_LEFT_OF_CENTER ((XAuint32) 0x00000040)
+#define XA_SPEAKER_FRONT_RIGHT_OF_CENTER ((XAuint32) 0x00000080)
+#define XA_SPEAKER_BACK_CENTER ((XAuint32) 0x00000100)
+#define XA_SPEAKER_SIDE_LEFT ((XAuint32) 0x00000200)
+#define XA_SPEAKER_SIDE_RIGHT ((XAuint32) 0x00000400)
+#define XA_SPEAKER_TOP_CENTER ((XAuint32) 0x00000800)
+#define XA_SPEAKER_TOP_FRONT_LEFT ((XAuint32) 0x00001000)
+#define XA_SPEAKER_TOP_FRONT_CENTER ((XAuint32) 0x00002000)
+#define XA_SPEAKER_TOP_FRONT_RIGHT ((XAuint32) 0x00004000)
+#define XA_SPEAKER_TOP_BACK_LEFT ((XAuint32) 0x00008000)
+#define XA_SPEAKER_TOP_BACK_CENTER ((XAuint32) 0x00010000)
+#define XA_SPEAKER_TOP_BACK_RIGHT ((XAuint32) 0x00020000)
+
+#define XA_PCMSAMPLEFORMAT_FIXED_8 ((XAuint16) 0x0008)
+#define XA_PCMSAMPLEFORMAT_FIXED_16 ((XAuint16) 0x0010)
+#define XA_PCMSAMPLEFORMAT_FIXED_20 ((XAuint16) 0x0014)
+#define XA_PCMSAMPLEFORMAT_FIXED_24 ((XAuint16) 0x0018)
+#define XA_PCMSAMPLEFORMAT_FIXED_28 ((XAuint16) 0x001C)
+#define XA_PCMSAMPLEFORMAT_FIXED_32 ((XAuint16) 0x0020)
+
+typedef struct XADataFormat_PCM_ {
+ XAuint32 formatType;
+ XAuint32 numChannels;
+ XAuint32 samplesPerSec;
+ XAuint32 bitsPerSample;
+ XAuint32 containerSize;
+ XAuint32 channelMask;
+ XAuint32 endianness;
+} XADataFormat_PCM;
+
+#define XA_COLORFORMAT_UNUSED ((XAuint32) 0x00000000)
+#define XA_COLORFORMAT_MONOCHROME ((XAuint32) 0x00000001)
+#define XA_COLORFORMAT_8BITRGB332 ((XAuint32) 0x00000002)
+#define XA_COLORFORMAT_12BITRGB444 ((XAuint32) 0x00000003)
+#define XA_COLORFORMAT_16BITARGB4444 ((XAuint32) 0x00000004)
+#define XA_COLORFORMAT_16BITARGB1555 ((XAuint32) 0x00000005)
+#define XA_COLORFORMAT_16BITRGB565 ((XAuint32) 0x00000006)
+#define XA_COLORFORMAT_16BITBGR565 ((XAuint32) 0x00000007)
+#define XA_COLORFORMAT_18BITRGB666 ((XAuint32) 0x00000008)
+#define XA_COLORFORMAT_18BITARGB1665 ((XAuint32) 0x00000009)
+#define XA_COLORFORMAT_19BITARGB1666 ((XAuint32) 0x0000000A)
+#define XA_COLORFORMAT_24BITRGB888 ((XAuint32) 0x0000000B)
+#define XA_COLORFORMAT_24BITBGR888 ((XAuint32) 0x0000000C)
+#define XA_COLORFORMAT_24BITARGB1887 ((XAuint32) 0x0000000D)
+#define XA_COLORFORMAT_25BITARGB1888 ((XAuint32) 0x0000000E)
+#define XA_COLORFORMAT_32BITBGRA8888 ((XAuint32) 0x0000000F)
+#define XA_COLORFORMAT_32BITARGB8888 ((XAuint32) 0x00000010)
+#define XA_COLORFORMAT_YUV411PLANAR ((XAuint32) 0x00000011)
+#define XA_COLORFORMAT_YUV420PLANAR ((XAuint32) 0x00000013)
+#define XA_COLORFORMAT_YUV420SEMIPLANAR ((XAuint32) 0x00000015)
+#define XA_COLORFORMAT_YUV422PLANAR ((XAuint32) 0x00000016)
+#define XA_COLORFORMAT_YUV422SEMIPLANAR ((XAuint32) 0x00000018)
+#define XA_COLORFORMAT_YCBYCR ((XAuint32) 0x00000019)
+#define XA_COLORFORMAT_YCRYCB ((XAuint32) 0x0000001A)
+#define XA_COLORFORMAT_CBYCRY ((XAuint32) 0x0000001B)
+#define XA_COLORFORMAT_CRYCBY ((XAuint32) 0x0000001C)
+#define XA_COLORFORMAT_YUV444INTERLEAVED ((XAuint32) 0x0000001D)
+#define XA_COLORFORMAT_RAWBAYER8BIT ((XAuint32) 0x0000001E)
+#define XA_COLORFORMAT_RAWBAYER10BIT ((XAuint32) 0x0000001F)
+#define XA_COLORFORMAT_RAWBAYER8BITCOMPRESSED ((XAuint32) 0x00000020)
+#define XA_COLORFORMAT_L2 ((XAuint32) 0x00000021)
+#define XA_COLORFORMAT_L4 ((XAuint32) 0x00000022)
+#define XA_COLORFORMAT_L8 ((XAuint32) 0x00000023)
+#define XA_COLORFORMAT_L16 ((XAuint32) 0x00000024)
+#define XA_COLORFORMAT_L24 ((XAuint32) 0x00000025)
+#define XA_COLORFORMAT_L32 ((XAuint32) 0x00000026)
+#define XA_COLORFORMAT_18BITBGR666 ((XAuint32) 0x00000029)
+#define XA_COLORFORMAT_24BITARGB6666 ((XAuint32) 0x0000002A)
+#define XA_COLORFORMAT_24BITABGR6666 ((XAuint32) 0x0000002B)
+
+typedef struct XADataFormat_RawImage_ {
+ XAuint32 formatType;
+ XAuint32 colorFormat;
+ XAuint32 height;
+ XAuint32 width;
+ XAuint32 stride;
+} XADataFormat_RawImage;
+
+typedef struct XADataLocator_Address_ {
+ XAuint32 locatorType;
+ void * pAddress;
+ XAuint32 length;
+} XADataLocator_Address;
+
+#define XA_IODEVICE_AUDIOINPUT ((XAuint32) 0x00000001)
+#define XA_IODEVICE_LEDARRAY ((XAuint32) 0x00000002)
+#define XA_IODEVICE_VIBRA ((XAuint32) 0x00000003)
+#define XA_IODEVICE_CAMERA ((XAuint32) 0x00000004)
+#define XA_IODEVICE_RADIO ((XAuint32) 0x00000005)
+
+typedef struct XADataLocator_IODevice_ {
+ XAuint32 locatorType;
+ XAuint32 deviceType;
+ XAuint32 deviceID;
+ XAObjectItf device;
+} XADataLocator_IODevice;
+
+typedef void * XANativeHandle;
+
+typedef struct XADataLocator_NativeDisplay_{
+ XAuint32 locatorType;
+ XANativeHandle hWindow;
+ XANativeHandle hDisplay;
+} XADataLocator_NativeDisplay;
+
+typedef struct XADataLocator_OutputMix {
+ XAuint32 locatorType;
+ XAObjectItf outputMix;
+} XADataLocator_OutputMix;
+
+typedef struct XADataLocator_URI_ {
+ XAuint32 locatorType;
+ XAchar * URI;
+} XADataLocator_URI;
+
+
+/* ENGINE */
+
+#define XA_DEFAULTDEVICEID_AUDIOINPUT ((XAuint32) 0xFFFFFFFF)
+#define XA_DEFAULTDEVICEID_AUDIOOUTPUT ((XAuint32) 0xFFFFFFFE)
+#define XA_DEFAULTDEVICEID_LED ((XAuint32) 0xFFFFFFFD)
+#define XA_DEFAULTDEVICEID_VIBRA ((XAuint32) 0xFFFFFFFC)
+#define XA_DEFAULTDEVICEID_CAMERA ((XAuint32) 0xFFFFFFFB)
+
+#define XA_ENGINEOPTION_THREADSAFE ((XAuint32) 0x00000001)
+#define XA_ENGINEOPTION_LOSSOFCONTROL ((XAuint32) 0x00000002)
+
+#define XA_OBJECTID_ENGINE ((XAuint32) 0x00000001)
+#define XA_OBJECTID_LEDDEVICE ((XAuint32) 0x00000002)
+#define XA_OBJECTID_VIBRADEVICE ((XAuint32) 0x00000003)
+#define XA_OBJECTID_MEDIAPLAYER ((XAuint32) 0x00000004)
+#define XA_OBJECTID_MEDIARECORDER ((XAuint32) 0x00000005)
+#define XA_OBJECTID_RADIODEVICE ((XAuint32) 0x00000006)
+#define XA_OBJECTID_OUTPUTMIX ((XAuint32) 0x00000007)
+#define XA_OBJECTID_METADATAEXTRACTOR ((XAuint32) 0x00000008)
+#define XA_OBJECTID_CAMERADEVICE ((XAuint32) 0x00000009)
+
+#define XA_PROFILES_MEDIA_PLAYER ((XAint16) 0x0001)
+#define XA_PROFILES_MEDIA_PLAYER_RECORDER ((XAint16) 0x0002)
+#define XA_PROFILES_PLUS_MIDI ((XAint16) 0x0004)
+
+typedef struct XAEngineOption_ {
+ XAuint32 feature;
+ XAuint32 data;
+} XAEngineOption;
+
+XA_API XAresult XAAPIENTRY xaCreateEngine(
+ XAObjectItf * pEngine,
+ XAuint32 numOptions,
+ const XAEngineOption * pEngineOptions,
+ XAuint32 numInterfaces,
+ const XAInterfaceID * pInterfaceIds,
+ const XAboolean * pInterfaceRequired
+);
+
+XA_API XAresult XAAPIENTRY xaQueryNumSupportedEngineInterfaces(
+ XAuint32 * pNumSupportedInterfaces
+);
+
+XA_API XAresult XAAPIENTRY xaQuerySupportedEngineInterfaces(
+ XAuint32 index,
+ XAInterfaceID * pInterfaceId
+);
+
+typedef struct XALEDDescriptor_ {
+ XAuint8 ledCount;
+ XAuint8 primaryLED;
+ XAuint32 colorMask;
+} XALEDDescriptor;
+
+typedef struct XAVibraDescriptor_ {
+ XAboolean supportsFrequency;
+ XAboolean supportsIntensity;
+ XAmilliHertz minFrequency;
+ XAmilliHertz maxFrequency;
+} XAVibraDescriptor;
+
+
+XA_API extern const XAInterfaceID XA_IID_ENGINE;
+
+struct XAEngineItf_;
+typedef const struct XAEngineItf_ * const * XAEngineItf;
+
+struct XAEngineItf_ {
+ XAresult (*CreateCameraDevice) (
+ XAEngineItf self,
+ XAObjectItf * pDevice,
+ XAuint32 deviceID,
+ XAuint32 numInterfaces,
+ const XAInterfaceID * pInterfaceIds,
+ const XAboolean * pInterfaceRequired
+ );
+ XAresult (*CreateRadioDevice) (
+ XAEngineItf self,
+ XAObjectItf * pDevice,
+ XAuint32 numInterfaces,
+ const XAInterfaceID * pInterfaceIds,
+ const XAboolean * pInterfaceRequired
+ );
+ XAresult (*CreateLEDDevice) (
+ XAEngineItf self,
+ XAObjectItf * pDevice,
+ XAuint32 deviceID,
+ XAuint32 numInterfaces,
+ const XAInterfaceID * pInterfaceIds,
+ const XAboolean * pInterfaceRequired
+ );
+ XAresult (*CreateVibraDevice) (
+ XAEngineItf self,
+ XAObjectItf * pDevice,
+ XAuint32 deviceID,
+ XAuint32 numInterfaces,
+ const XAInterfaceID * pInterfaceIds,
+ const XAboolean * pInterfaceRequired
+ );
+ XAresult (*CreateMediaPlayer) (
+ XAEngineItf self,
+ XAObjectItf * pPlayer,
+ XADataSource * pDataSrc,
+ XADataSource * pBankSrc,
+ XADataSink * pAudioSnk,
+ XADataSink * pImageVideoSnk,
+ XADataSink * pVibra,
+ XADataSink * pLEDArray,
+ XAuint32 numInterfaces,
+ const XAInterfaceID * pInterfaceIds,
+ const XAboolean * pInterfaceRequired
+ );
+ XAresult (*CreateMediaRecorder) (
+ XAEngineItf self,
+ XAObjectItf * pRecorder,
+ XADataSource * pAudioSrc,
+ XADataSource * pImageVideoSrc,
+ XADataSink * pDataSnk,
+ XAuint32 numInterfaces,
+ const XAInterfaceID * pInterfaceIds,
+ const XAboolean * pInterfaceRequired
+ );
+ XAresult (*CreateOutputMix) (
+ XAEngineItf self,
+ XAObjectItf * pMix,
+ XAuint32 numInterfaces,
+ const XAInterfaceID * pInterfaceIds,
+ const XAboolean * pInterfaceRequired
+ );
+ XAresult (*CreateMetadataExtractor) (
+ XAEngineItf self,
+ XAObjectItf * pMetadataExtractor,
+ XADataSource * pDataSource,
+ XAuint32 numInterfaces,
+ const XAInterfaceID * pInterfaceIds,
+ const XAboolean * pInterfaceRequired
+ );
+ XAresult (*CreateExtensionObject) (
+ XAEngineItf self,
+ XAObjectItf * pObject,
+ void * pParameters,
+ XAuint32 objectID,
+ XAuint32 numInterfaces,
+ const XAInterfaceID * pInterfaceIds,
+ const XAboolean * pInterfaceRequired
+ );
+ XAresult (*GetImplementationInfo) (
+ XAEngineItf self,
+ XAuint32 * pMajor,
+ XAuint32 * pMinor,
+ XAuint32 * pStep,
+ const XAchar * pImplementationText
+ );
+ XAresult (*QuerySupportedProfiles) (
+ XAEngineItf self,
+ XAint16 * pProfilesSupported
+ );
+ XAresult (*QueryNumSupportedInterfaces) (
+ XAEngineItf self,
+ XAuint32 objectID,
+ XAuint32 * pNumSupportedInterfaces
+ );
+ XAresult (*QuerySupportedInterfaces) (
+ XAEngineItf self,
+ XAuint32 objectID,
+ XAuint32 index,
+ XAInterfaceID * pInterfaceId
+ );
+ XAresult (*QueryNumSupportedExtensions) (
+ XAEngineItf self,
+ XAuint32 * pNumExtensions
+ );
+ XAresult (*QuerySupportedExtension) (
+ XAEngineItf self,
+ XAuint32 index,
+ XAchar * pExtensionName,
+ XAint16 * pNameLength
+ );
+ XAresult (*IsExtensionSupported) (
+ XAEngineItf self,
+ const XAchar * pExtensionName,
+ XAboolean * pSupported
+ );
+ XAresult (*QueryLEDCapabilities) (
+ XAEngineItf self,
+ XAuint32 *pIndex,
+ XAuint32 * pLEDDeviceID,
+ XALEDDescriptor * pDescriptor
+ );
+ XAresult (*QueryVibraCapabilities) (
+ XAEngineItf self,
+ XAuint32 *pIndex,
+ XAuint32 * pVibraDeviceID,
+ XAVibraDescriptor * pDescriptor
+ );
+};
+
+/* THREAD SYNC */
+
+XA_API extern const XAInterfaceID XA_IID_THREADSYNC;
+
+struct XAThreadSyncItf_;
+typedef const struct XAThreadSyncItf_ * const * XAThreadSyncItf;
+
+struct XAThreadSyncItf_ {
+ XAresult (*EnterCriticalSection) (
+ XAThreadSyncItf self
+ );
+ XAresult (*ExitCriticalSection) (
+ XAThreadSyncItf self
+ );
+};
+
+
+
+ /*****************************************************************/
+ /* PLAYBACK RELATED INTERFACES, STRUCTS AND DEFINES */
+ /*****************************************************************/
+
+/* PLAY */
+
+#define XA_TIME_UNKNOWN ((XAuint32) 0xFFFFFFFF)
+
+#define XA_PLAYEVENT_HEADATEND ((XAuint32) 0x00000001)
+#define XA_PLAYEVENT_HEADATMARKER ((XAuint32) 0x00000002)
+#define XA_PLAYEVENT_HEADATNEWPOS ((XAuint32) 0x00000004)
+#define XA_PLAYEVENT_HEADMOVING ((XAuint32) 0x00000008)
+#define XA_PLAYEVENT_HEADSTALLED ((XAuint32) 0x00000010)
+
+#define XA_PLAYSTATE_STOPPED ((XAuint32) 0x00000001)
+#define XA_PLAYSTATE_PAUSED ((XAuint32) 0x00000002)
+#define XA_PLAYSTATE_PLAYING ((XAuint32) 0x00000003)
+
+#define XA_PREFETCHEVENT_STATUSCHANGE ((XAuint32) 0x00000001)
+#define XA_PREFETCHEVENT_FILLLEVELCHANGE ((XAuint32) 0x00000002)
+
+#define XA_PREFETCHSTATUS_UNDERFLOW ((XAuint32) 0x00000001)
+#define XA_PREFETCHSTATUS_SUFFICIENTDATA ((XAuint32) 0x00000002)
+#define XA_PREFETCHSTATUS_OVERFLOW ((XAuint32) 0x00000003)
+
+#define XA_SEEKMODE_FAST ((XAuint32) 0x0001)
+#define XA_SEEKMODE_ACCURATE ((XAuint32) 0x0002)
+
+XA_API extern const XAInterfaceID XA_IID_PLAY;
+
+struct XAPlayItf_;
+typedef const struct XAPlayItf_ * const * XAPlayItf;
+
+typedef void (XAAPIENTRY * xaPlayCallback) (
+ XAPlayItf caller,
+ void * pContext,
+ XAuint32 event
+);
+
+struct XAPlayItf_ {
+ XAresult (*SetPlayState) (
+ XAPlayItf self,
+ XAuint32 state
+ );
+ XAresult (*GetPlayState) (
+ XAPlayItf self,
+ XAuint32 * pState
+ );
+ XAresult (*GetDuration) (
+ XAPlayItf self,
+ XAmillisecond * pMsec
+ );
+ XAresult (*GetPosition) (
+ XAPlayItf self,
+ XAmillisecond * pMsec
+ );
+ XAresult (*RegisterCallback) (
+ XAPlayItf self,
+ xaPlayCallback callback,
+ void * pContext
+ );
+ XAresult (*SetCallbackEventsMask) (
+ XAPlayItf self,
+ XAuint32 eventFlags
+ );
+ XAresult (*GetCallbackEventsMask) (
+ XAPlayItf self,
+ XAuint32 * pEventFlags
+ );
+ XAresult (*SetMarkerPosition) (
+ XAPlayItf self,
+ XAmillisecond mSec
+ );
+ XAresult (*ClearMarkerPosition) (
+ XAPlayItf self
+ );
+ XAresult (*GetMarkerPosition) (
+ XAPlayItf self,
+ XAmillisecond * pMsec
+ );
+ XAresult (*SetPositionUpdatePeriod) (
+ XAPlayItf self,
+ XAmillisecond mSec
+ );
+ XAresult (*GetPositionUpdatePeriod) (
+ XAPlayItf self,
+ XAmillisecond * pMsec
+ );
+};
+
+/* PLAYBACK RATE */
+
+#define XA_RATEPROP_STAGGEREDVIDEO ((XAuint32) 0x00000001)
+#define XA_RATEPROP_SMOOTHVIDEO ((XAuint32) 0x00000002)
+#define XA_RATEPROP_SILENTAUDIO ((XAuint32) 0x00000100)
+#define XA_RATEPROP_STAGGEREDAUDIO ((XAuint32) 0x00000200)
+#define XA_RATEPROP_NOPITCHCORAUDIO ((XAuint32) 0x00000400)
+#define XA_RATEPROP_PITCHCORAUDIO ((XAuint32) 0x00000800)
+
+XA_API extern const XAInterfaceID XA_IID_PLAYBACKRATE;
+
+struct XAPlaybackRateItf_;
+typedef const struct XAPlaybackRateItf_ * const * XAPlaybackRateItf;
+
+struct XAPlaybackRateItf_ {
+ XAresult (*SetRate) (
+ XAPlaybackRateItf self,
+ XApermille rate
+ );
+ XAresult (*GetRate) (
+ XAPlaybackRateItf self,
+ XApermille * pRate
+ );
+ XAresult (*SetPropertyConstraints) (
+ XAPlaybackRateItf self,
+ XAuint32 constraints
+ );
+ XAresult (*GetProperties) (
+ XAPlaybackRateItf self,
+ XAuint32 * pProperties
+ );
+ XAresult (*GetCapabilitiesOfRate) (
+ XAPlaybackRateItf self,
+ XApermille rate,
+ XAuint32 * pCapabilities
+ );
+ XAresult (*GetRateRange) (
+ XAPlaybackRateItf self,
+ XAuint8 index,
+ XApermille * pMinRate,
+ XApermille * pMaxRate,
+ XApermille * pStepSize,
+ XAuint32 * pCapabilities
+ );
+};
+
+/* PREFETCH STATUS */
+
+XA_API extern const XAInterfaceID XA_IID_PREFETCHSTATUS;
+
+struct XAPrefetchStatusItf_;
+typedef const struct XAPrefetchStatusItf_
+ * const * XAPrefetchStatusItf;
+
+typedef void (XAAPIENTRY * xaPrefetchCallback) (
+ XAPrefetchStatusItf caller,
+ void * pContext,
+ XAuint32 event
+);
+
+struct XAPrefetchStatusItf_ {
+ XAresult (*GetPrefetchStatus) (
+ XAPrefetchStatusItf self,
+ XAuint32 * pStatus
+ );
+ XAresult (*GetFillLevel) (
+ XAPrefetchStatusItf self,
+ XApermille * pLevel
+ );
+ XAresult (*RegisterCallback) (
+ XAPrefetchStatusItf self,
+ xaPrefetchCallback callback,
+ void * pContext
+ );
+ XAresult (*SetCallbackEventsMask) (
+ XAPrefetchStatusItf self,
+ XAuint32 eventFlags
+ );
+ XAresult (*GetCallbackEventsMask) (
+ XAPrefetchStatusItf self,
+ XAuint32 * pEventFlags
+ );
+ XAresult (*SetFillUpdatePeriod) (
+ XAPrefetchStatusItf self,
+ XApermille period
+ );
+ XAresult (*GetFillUpdatePeriod) (
+ XAPrefetchStatusItf self,
+ XApermille * pPeriod
+ );
+};
+
+/* SEEK */
+
+XA_API extern const XAInterfaceID XA_IID_SEEK;
+
+struct XASeekItf_;
+typedef const struct XASeekItf_ * const * XASeekItf;
+
+struct XASeekItf_ {
+ XAresult (*SetPosition) (
+ XASeekItf self,
+ XAmillisecond pos,
+ XAuint32 seekMode
+ );
+ XAresult (*SetLoop) (
+ XASeekItf self,
+ XAboolean loopEnable,
+ XAmillisecond startPos,
+ XAmillisecond endPos
+ );
+ XAresult (*GetLoop) (
+ XASeekItf self,
+ XAboolean * pLoopEnabled,
+ XAmillisecond * pStartPos,
+ XAmillisecond * pEndPos
+ );
+};
+
+/* VOLUME */
+
+XA_API extern const XAInterfaceID XA_IID_VOLUME;
+
+struct XAVolumeItf_;
+typedef const struct XAVolumeItf_ * const * XAVolumeItf;
+
+struct XAVolumeItf_ {
+ XAresult (*SetVolumeLevel) (
+ XAVolumeItf self,
+ XAmillibel level
+ );
+ XAresult (*GetVolumeLevel) (
+ XAVolumeItf self,
+ XAmillibel * pLevel
+ );
+ XAresult (*GetMaxVolumeLevel) (
+ XAVolumeItf self,
+ XAmillibel * pMaxLevel
+ );
+ XAresult (*SetMute) (
+ XAVolumeItf self,
+ XAboolean mute
+ );
+ XAresult (*GetMute) (
+ XAVolumeItf self,
+ XAboolean * pMute
+ );
+ XAresult (*EnableStereoPosition) (
+ XAVolumeItf self,
+ XAboolean enable
+ );
+ XAresult (*IsEnabledStereoPosition) (
+ XAVolumeItf self,
+ XAboolean * pEnable
+ );
+ XAresult (*SetStereoPosition) (
+ XAVolumeItf self,
+ XApermille stereoPosition
+ );
+ XAresult (*GetStereoPosition) (
+ XAVolumeItf self,
+ XApermille * pStereoPosition
+ );
+};
+
+/* IMAGE CONTROL */
+
+XA_API extern const XAInterfaceID XA_IID_IMAGECONTROLS;
+
+struct XAImageControlsItf_;
+typedef const struct XAImageControlsItf_ * const * XAImageControlsItf;
+
+struct XAImageControlsItf_ {
+ XAresult (*SetBrightness) (
+ XAImageControlsItf self,
+ XAuint32 brightness
+ );
+ XAresult (*GetBrightness) (
+ XAImageControlsItf self,
+ XAuint32 * pBrightness
+ );
+ XAresult (*SetContrast) (
+ XAImageControlsItf self,
+ XAint32 contrast
+ );
+ XAresult (*GetContrast) (
+ XAImageControlsItf self,
+ XAint32 * pContrast
+ );
+ XAresult (*SetGamma) (
+ XAImageControlsItf self,
+ XApermille gamma
+ );
+ XAresult (*GetGamma) (
+ XAImageControlsItf self,
+ XApermille * pGamma
+ );
+ XAresult (*GetSupportedGammaSettings) (
+ XAImageControlsItf self,
+ XApermille * pMinValue,
+ XApermille * pMaxValue,
+ XAuint32 * pNumSettings,
+ XApermille ** ppSettings
+ );
+};
+
+/* IMAGE EFFECT */
+
+#define XA_IMAGEEFFECT_MONOCHROME ((XAuint32) 0x00000001)
+#define XA_IMAGEEFFECT_NEGATIVE ((XAuint32) 0x00000002)
+#define XA_IMAGEEFFECT_SEPIA ((XAuint32) 0x00000003)
+#define XA_IMAGEEFFECT_EMBOSS ((XAuint32) 0x00000004)
+#define XA_IMAGEEFFECT_PAINTBRUSH ((XAuint32) 0x00000005)
+#define XA_IMAGEEFFECT_SOLARIZE ((XAuint32) 0x00000006)
+#define XA_IMAGEEFFECT_CARTOON ((XAuint32) 0x00000007)
+
+XA_API extern const XAInterfaceID XA_IID_IMAGEEFFECTS;
+
+struct XAImageEffectsItf_;
+typedef const struct XAImageEffectsItf_ * const * XAImageEffectsItf;
+
+struct XAImageEffectsItf_ {
+ XAresult (*QuerySupportedImageEffects) (
+ XAImageEffectsItf self,
+ XAuint32 index,
+ XAuint32 * pImageEffectId
+ );
+ XAresult (*EnableImageEffect) (
+ XAImageEffectsItf self,
+ XAuint32 imageEffectID
+ );
+ XAresult (*DisableImageEffect) (
+ XAImageEffectsItf self,
+ XAuint32 imageEffectID
+ );
+ XAresult (*IsImageEffectEnabled) (
+ XAImageEffectsItf self,
+ XAuint32 imageEffectID,
+ XAboolean * pEnabled
+ );
+};
+
+/* VIDEO POST PROCESSING */
+
+#define XA_VIDEOMIRROR_NONE ((XAuint32) 0x00000001)
+#define XA_VIDEOMIRROR_VERTICAL ((XAuint32) 0x00000002)
+#define XA_VIDEOMIRROR_HORIZONTAL ((XAuint32) 0x00000003)
+#define XA_VIDEOMIRROR_BOTH ((XAuint32) 0x00000004)
+
+#define XA_VIDEOSCALE_STRETCH ((XAuint32) 0x00000001)
+#define XA_VIDEOSCALE_FIT ((XAuint32) 0x00000002)
+#define XA_VIDEOSCALE_CROP ((XAuint32) 0x00000003)
+
+#define XA_RENDERINGHINT_NONE ((XAuint32) 0x00000000)
+#define XA_RENDERINGHINT_ANTIALIASING ((XAuint32) 0x00000001)
+
+typedef struct XARectangle_ {
+ XAuint32 left;
+ XAuint32 top;
+ XAuint32 width;
+ XAuint32 height;
+} XARectangle;
+
+XA_API extern const XAInterfaceID XA_IID_VIDEOPOSTPROCESSING;
+
+struct XAVideoPostProcessingItf_;
+typedef const struct XAVideoPostProcessingItf_ * const * XAVideoPostProcessingItf;
+
+struct XAVideoPostProcessingItf_ {
+ XAresult (*SetRotation) (
+ XAVideoPostProcessingItf self,
+ XAmillidegree rotation
+ );
+ XAresult (*IsArbitraryRotationSupported) (
+ XAVideoPostProcessingItf self,
+ XAboolean *pSupported
+ );
+ XAresult (*SetScaleOptions) (
+ XAVideoPostProcessingItf self,
+ XAuint32 scaleOptions,
+ XAuint32 backgroundColor,
+ XAuint32 renderingHints
+ );
+ XAresult (*SetSourceRectangle) (
+ XAVideoPostProcessingItf self,
+ const XARectangle *pSrcRect
+ );
+ XAresult (*SetDestinationRectangle) (
+ XAVideoPostProcessingItf self,
+ const XARectangle *pDestRect
+ );
+ XAresult (*SetMirror) (
+ XAVideoPostProcessingItf self,
+ XAuint32 mirror
+ );
+ XAresult (*Commit) (
+ XAVideoPostProcessingItf self
+ );
+};
+
+
+
+ /*****************************************************************/
+ /* CAPTURING INTERFACES, STRUCTS AND DEFINES */
+ /*****************************************************************/
+
+/* RECORD */
+
+#define XA_RECORDEVENT_HEADATLIMIT ((XAuint32) 0x00000001)
+#define XA_RECORDEVENT_HEADATMARKER ((XAuint32) 0x00000002)
+#define XA_RECORDEVENT_HEADATNEWPOS ((XAuint32) 0x00000004)
+#define XA_RECORDEVENT_HEADMOVING ((XAuint32) 0x00000008)
+#define XA_RECORDEVENT_HEADSTALLED ((XAuint32) 0x00000010)
+#define XA_RECORDEVENT_BUFFER_FULL ((XAuint32) 0x00000020)
+
+#define XA_RECORDSTATE_STOPPED ((XAuint32) 0x00000001)
+#define XA_RECORDSTATE_PAUSED ((XAuint32) 0x00000002)
+#define XA_RECORDSTATE_RECORDING ((XAuint32) 0x00000003)
+
+XA_API extern const XAInterfaceID XA_IID_RECORD;
+
+struct XARecordItf_;
+typedef const struct XARecordItf_ * const * XARecordItf;
+
+typedef void (XAAPIENTRY * xaRecordCallback) (
+ XARecordItf caller,
+ void * pContext,
+ XAuint32 event
+);
+
+struct XARecordItf_ {
+ XAresult (*SetRecordState) (
+ XARecordItf self,
+ XAuint32 state
+ );
+ XAresult (*GetRecordState) (
+ XARecordItf self,
+ XAuint32 * pState
+ );
+ XAresult (*SetDurationLimit) (
+ XARecordItf self,
+ XAmillisecond msec
+ );
+ XAresult (*GetPosition) (
+ XARecordItf self,
+ XAmillisecond * pMsec
+ );
+ XAresult (*RegisterCallback) (
+ XARecordItf self,
+ xaRecordCallback callback,
+ void * pContext
+ );
+ XAresult (*SetCallbackEventsMask) (
+ XARecordItf self,
+ XAuint32 eventFlags
+ );
+ XAresult (*GetCallbackEventsMask) (
+ XARecordItf self,
+ XAuint32 * pEventFlags
+ );
+ XAresult (*SetMarkerPosition) (
+ XARecordItf self,
+ XAmillisecond mSec
+ );
+ XAresult (*ClearMarkerPosition) (
+ XARecordItf self
+ );
+ XAresult (*GetMarkerPosition) (
+ XARecordItf self,
+ XAmillisecond * pMsec
+ );
+ XAresult (*SetPositionUpdatePeriod) (
+ XARecordItf self,
+ XAmillisecond mSec
+ );
+ XAresult (*GetPositionUpdatePeriod) (
+ XARecordItf self,
+ XAmillisecond * pMsec
+ );
+};
+
+/* SNAPSHOT */
+
+XA_API extern const XAInterfaceID XA_IID_SNAPSHOT;
+
+struct XASnapshotItf_;
+typedef const struct XASnapshotItf_ * const * XASnapshotItf;
+
+typedef void (XAAPIENTRY * xaSnapshotInitiatedCallback) (
+ XASnapshotItf caller,
+ void * context
+);
+
+typedef void (XAAPIENTRY * xaSnapshotTakenCallback) (
+ XASnapshotItf caller,
+ void * context,
+ XAuint32 numberOfPicsTaken,
+ const XADataSink * image
+);
+
+struct XASnapshotItf_ {
+ XAresult (*InitiateSnapshot) (
+ XASnapshotItf self,
+ XAuint32 numberOfPictures,
+ XAuint32 fps,
+ XAboolean freezeViewFinder,
+ XADataSink sink,
+ xaSnapshotInitiatedCallback initiatedCallback,
+ xaSnapshotTakenCallback takenCallback,
+ void * pContext
+ );
+ XAresult (*TakeSnapshot) (
+ XASnapshotItf self
+ );
+ XAresult (*CancelSnapshot) (
+ XASnapshotItf self
+ );
+ XAresult (*ReleaseBuffers) (
+ XASnapshotItf self,
+ XADataSink * image
+ );
+ XAresult (*GetMaxPicsPerBurst) (
+ XASnapshotItf self,
+ XAuint32 * maxNumberOfPictures
+ );
+ XAresult (*GetBurstFPSRange) (
+ XASnapshotItf self,
+ XAuint32 * minFPS,
+ XAuint32 * maxFPS
+ );
+ XAresult (*SetShutterFeedback) (
+ XASnapshotItf self,
+ XAboolean enabled
+ );
+ XAresult (*GetShutterFeedback) (
+ XASnapshotItf self,
+ XAboolean * enabled
+ );
+};
+
+
+
+ /*****************************************************************/
+ /* METADATA RELATED INTERFACES, STRUCTS AND DEFINES */
+ /*****************************************************************/
+
+/* METADATA (EXTRACTION, INSERTION, TRAVERSAL) */
+
+#define XA_NODE_PARENT ((XAuint32) 0xFFFFFFFF)
+
+#define XA_ROOT_NODE_ID ((XAint32) 0x7FFFFFFF)
+
+#define XA_NODETYPE_UNSPECIFIED ((XAuint32) 0x00000001)
+#define XA_NODETYPE_AUDIO ((XAuint32) 0x00000002)
+#define XA_NODETYPE_VIDEO ((XAuint32) 0x00000003)
+#define XA_NODETYPE_IMAGE ((XAuint32) 0x00000004)
+
+#define XA_CHARACTERENCODING_UNKNOWN ((XAuint32) 0x00000000)
+#define XA_CHARACTERENCODING_BINARY ((XAuint32) 0x00000001)
+#define XA_CHARACTERENCODING_ASCII ((XAuint32) 0x00000002)
+#define XA_CHARACTERENCODING_BIG5 ((XAuint32) 0x00000003)
+#define XA_CHARACTERENCODING_CODEPAGE1252 ((XAuint32) 0x00000004)
+#define XA_CHARACTERENCODING_GB2312 ((XAuint32) 0x00000005)
+#define XA_CHARACTERENCODING_HZGB2312 ((XAuint32) 0x00000006)
+#define XA_CHARACTERENCODING_GB12345 ((XAuint32) 0x00000007)
+#define XA_CHARACTERENCODING_GB18030 ((XAuint32) 0x00000008)
+#define XA_CHARACTERENCODING_GBK ((XAuint32) 0x00000009)
+#define XA_CHARACTERENCODING_IMAPUTF7 ((XAuint32) 0x0000000A)
+#define XA_CHARACTERENCODING_ISO2022JP ((XAuint32) 0x0000000B)
+#define XA_CHARACTERENCODING_ISO2022JP1 ((XAuint32) 0x0000000B)
+#define XA_CHARACTERENCODING_ISO88591 ((XAuint32) 0x0000000C)
+#define XA_CHARACTERENCODING_ISO885910 ((XAuint32) 0x0000000D)
+#define XA_CHARACTERENCODING_ISO885913 ((XAuint32) 0x0000000E)
+#define XA_CHARACTERENCODING_ISO885914 ((XAuint32) 0x0000000F)
+#define XA_CHARACTERENCODING_ISO885915 ((XAuint32) 0x00000010)
+#define XA_CHARACTERENCODING_ISO88592 ((XAuint32) 0x00000011)
+#define XA_CHARACTERENCODING_ISO88593 ((XAuint32) 0x00000012)
+#define XA_CHARACTERENCODING_ISO88594 ((XAuint32) 0x00000013)
+#define XA_CHARACTERENCODING_ISO88595 ((XAuint32) 0x00000014)
+#define XA_CHARACTERENCODING_ISO88596 ((XAuint32) 0x00000015)
+#define XA_CHARACTERENCODING_ISO88597 ((XAuint32) 0x00000016)
+#define XA_CHARACTERENCODING_ISO88598 ((XAuint32) 0x00000017)
+#define XA_CHARACTERENCODING_ISO88599 ((XAuint32) 0x00000018)
+#define XA_CHARACTERENCODING_ISOEUCJP ((XAuint32) 0x00000019)
+#define XA_CHARACTERENCODING_SHIFTJIS ((XAuint32) 0x0000001A)
+#define XA_CHARACTERENCODING_SMS7BIT ((XAuint32) 0x0000001B)
+#define XA_CHARACTERENCODING_UTF7 ((XAuint32) 0x0000001C)
+#define XA_CHARACTERENCODING_UTF8 ((XAuint32) 0x0000001D)
+#define XA_CHARACTERENCODING_JAVACONFORMANTUTF8 ((XAuint32) 0x0000001E)
+#define XA_CHARACTERENCODING_UTF16BE ((XAuint32) 0x0000001F)
+#define XA_CHARACTERENCODING_UTF16LE ((XAuint32) 0x00000020)
+
+#define XA_METADATA_FILTER_KEY ((XAuint8) 0x01)
+#define XA_METADATA_FILTER_LANG ((XAuint8) 0x02)
+#define XA_METADATA_FILTER_ENCODING ((XAuint8) 0x04)
+
+#define XA_METADATATRAVERSALMODE_ALL ((XAuint32) 0x00000001)
+#define XA_METADATATRAVERSALMODE_NODE ((XAuint32) 0x00000002)
+
+#ifndef _KHRONOS_KEYS_
+#define _KHRONOS_KEYS_
+#define KHRONOS_TITLE "KhronosTitle"
+#define KHRONOS_ALBUM "KhronosAlbum"
+#define KHRONOS_TRACK_NUMBER "KhronosTrackNumber"
+#define KHRONOS_ARTIST "KhronosArtist"
+#define KHRONOS_GENRE "KhronosGenre"
+#define KHRONOS_YEAR "KhronosYear"
+#define KHRONOS_COMMENT "KhronosComment"
+#define KHRONOS_ARTIST_URL "KhronosArtistURL"
+#define KHRONOS_CONTENT_URL "KhronosContentURL"
+#define KHRONOS_RATING "KhronosRating"
+#define KHRONOS_ALBUM_ART "KhronosAlbumArt"
+#define KHRONOS_COPYRIGHT "KhronosCopyright"
+#endif /* _KHRONOS_KEYS_ */
+
+
+typedef struct XAMetadataInfo_ {
+ XAuint32 size;
+ XAuint32 encoding;
+ const XAchar langCountry[16];
+ XAuint8 data[1];
+} XAMetadataInfo;
+
+XA_API extern const XAInterfaceID XA_IID_METADATAEXTRACTION;
+
+struct XAMetadataExtractionItf_;
+typedef const struct XAMetadataExtractionItf_
+ * const * XAMetadataExtractionItf;
+
+struct XAMetadataExtractionItf_ {
+ XAresult (*GetItemCount) (
+ XAMetadataExtractionItf self,
+ XAuint32 * pItemCount
+ );
+ XAresult (*GetKeySize) (
+ XAMetadataExtractionItf self,
+ XAuint32 index,
+ XAuint32 * pKeySize
+ );
+ XAresult (*GetKey) (
+ XAMetadataExtractionItf self,
+ XAuint32 index,
+ XAuint32 keySize,
+ XAMetadataInfo * pKey
+ );
+ XAresult (*GetValueSize) (
+ XAMetadataExtractionItf self,
+ XAuint32 index,
+ XAuint32 * pValueSize
+ );
+ XAresult (*GetValue) (
+ XAMetadataExtractionItf self,
+ XAuint32 index,
+ XAuint32 valueSize,
+ XAMetadataInfo * pValue
+ );
+ XAresult (*AddKeyFilter) (
+ XAMetadataExtractionItf self,
+ XAuint32 keySize,
+ const void * pKey,
+ XAuint32 keyEncoding,
+ const XAchar * pValueLangCountry,
+ XAuint32 valueEncoding,
+ XAuint8 filterMask
+ );
+ XAresult (*ClearKeyFilter) (
+ XAMetadataExtractionItf self
+ );
+};
+
+
+XA_API extern const XAInterfaceID XA_IID_METADATAINSERTION;
+
+struct XAMetadataInsertionItf_;
+typedef const struct XAMetadataInsertionItf_
+ * const * XAMetadataInsertionItf;
+
+typedef void (XAAPIENTRY * xaMetadataInsertionCallback) (
+ XAMetadataInsertionItf caller,
+ void * pContext,
+ XAMetadataInfo * pKey,
+ XAMetadataInfo * pValue,
+ XAint32 nodeID,
+ XAboolean result
+);
+
+struct XAMetadataInsertionItf_ {
+ XAresult (*CreateChildNode) (
+ XAMetadataInsertionItf self,
+ XAint32 parentNodeID,
+ XAuint32 type,
+ XAchar * mimeType,
+ XAint32 * pChildNodeID
+ );
+ XAresult (*GetSupportedKeysCount) (
+ XAMetadataInsertionItf self,
+ XAint32 nodeID,
+ XAboolean * pFreeKeys,
+ XAuint32 * pKeyCount,
+ XAuint32 * pEncodingCount
+ );
+ XAresult (*GetKeySize) (
+ XAMetadataInsertionItf self,
+ XAint32 nodeID,
+ XAuint32 keyIndex,
+ XAuint32 * pKeySize
+ );
+ XAresult (*GetKey) (
+ XAMetadataInsertionItf self,
+ XAint32 nodeID,
+ XAuint32 keyIndex,
+ XAuint32 keySize,
+ XAMetadataInfo * pKey
+ );
+ XAresult (*GetFreeKeysEncoding) (
+ XAMetadataInsertionItf self,
+ XAint32 nodeID,
+ XAuint32 encodingIndex,
+ XAuint32 * pEncoding
+ );
+ XAresult (*InsertMetadataItem) (
+ XAMetadataInsertionItf self,
+ XAint32 nodeID,
+ XAMetadataInfo * pKey,
+ XAMetadataInfo * pValue,
+ XAboolean overwrite
+ );
+ XAresult (*RegisterCallback) (
+ XAMetadataInsertionItf self,
+ xaMetadataInsertionCallback callback,
+ void * pContext
+ );
+};
+
+
+XA_API extern const XAInterfaceID XA_IID_METADATATRAVERSAL;
+
+struct XAMetadataTraversalItf_;
+typedef const struct XAMetadataTraversalItf_
+ * const * XAMetadataTraversalItf;
+
+struct XAMetadataTraversalItf_ {
+ XAresult (*SetMode) (
+ XAMetadataTraversalItf self,
+ XAuint32 mode
+ );
+ XAresult (*GetChildCount) (
+ XAMetadataTraversalItf self,
+ XAuint32 * pCount
+ );
+ XAresult (*GetChildMIMETypeSize) (
+ XAMetadataTraversalItf self,
+ XAuint32 index,
+ XAuint32 * pSize
+ );
+ XAresult (*GetChildInfo) (
+ XAMetadataTraversalItf self,
+ XAuint32 index,
+ XAint32 * pNodeID,
+ XAuint32 * pType,
+ XAuint32 size,
+ XAchar * pMimeType
+ );
+ XAresult (*SetActiveNode) (
+ XAMetadataTraversalItf self,
+ XAuint32 index
+ );
+};
+
+/* DYNAMIC SOURCE */
+
+XA_API extern const XAInterfaceID XA_IID_DYNAMICSOURCE;
+
+struct XADynamicSourceItf_;
+typedef const struct XADynamicSourceItf_ * const * XADynamicSourceItf;
+
+struct XADynamicSourceItf_ {
+ XAresult (*SetSource) (
+ XADynamicSourceItf self,
+ XADataSource * pDataSource
+ );
+};
+
+
+
+ /*****************************************************************/
+ /* I/O DEVICES RELATED INTERFACES, STRUCTS AND DEFINES */
+ /*****************************************************************/
+
+/* CAMERA AND CAMERA CAPABILITIES */
+
+#define XA_CAMERA_APERTUREMODE_MANUAL ((XAuint32) 0x00000001)
+#define XA_CAMERA_APERTUREMODE_AUTO ((XAuint32) 0x00000002)
+
+#define XA_CAMERA_AUTOEXPOSURESTATUS_SUCCESS ((XAuint32) 0x00000001)
+#define XA_CAMERA_AUTOEXPOSURESTATUS_UNDEREXPOSURE ((XAuint32) 0x00000002)
+#define XA_CAMERA_AUTOEXPOSURESTATUS_OVEREXPOSURE ((XAuint32) 0x00000003)
+
+#define XA_CAMERACBEVENT_ROTATION ((XAuint32) 0x00000001)
+#define XA_CAMERACBEVENT_FLASHREADY ((XAuint32) 0x00000002)
+#define XA_CAMERACBEVENT_FOCUSSTATUS ((XAuint32) 0x00000003)
+#define XA_CAMERACBEVENT_EXPOSURESTATUS ((XAuint32) 0x00000004)
+#define XA_CAMERACBEVENT_WHITEBALANCELOCKED ((XAuint32) 0x00000005)
+#define XA_CAMERACBEVENT_ZOOMSTATUS ((XAuint32) 0x00000006)
+
+#define XA_CAMERACAP_FLASH ((XAuint32) 0x00000001)
+#define XA_CAMERACAP_AUTOFOCUS ((XAuint32) 0x00000002)
+#define XA_CAMERACAP_CONTINUOUSAUTOFOCUS ((XAuint32) 0x00000004)
+#define XA_CAMERACAP_MANUALFOCUS ((XAuint32) 0x00000008)
+#define XA_CAMERACAP_AUTOEXPOSURE ((XAuint32) 0x00000010)
+#define XA_CAMERACAP_MANUALEXPOSURE ((XAuint32) 0x00000020)
+#define XA_CAMERACAP_AUTOISOSENSITIVITY ((XAuint32) 0x00000040)
+#define XA_CAMERACAP_MANUALISOSENSITIVITY ((XAuint32) 0x00000080)
+#define XA_CAMERACAP_AUTOAPERTURE ((XAuint32) 0x00000100)
+#define XA_CAMERACAP_MANUALAPERTURE ((XAuint32) 0x00000200)
+#define XA_CAMERACAP_AUTOSHUTTERSPEED ((XAuint32) 0x00000400)
+#define XA_CAMERACAP_MANUALSHUTTERSPEED ((XAuint32) 0x00000800)
+#define XA_CAMERACAP_AUTOWHITEBALANCE ((XAuint32) 0x00001000)
+#define XA_CAMERACAP_MANUALWHITEBALANCE ((XAuint32) 0x00002000)
+#define XA_CAMERACAP_OPTICALZOOM ((XAuint32) 0x00004000)
+#define XA_CAMERACAP_DIGITALZOOM ((XAuint32) 0x00008000)
+#define XA_CAMERACAP_METERING ((XAuint32) 0x00010000)
+#define XA_CAMERACAP_BRIGHTNESS ((XAuint32) 0x00020000)
+#define XA_CAMERACAP_CONTRAST ((XAuint32) 0x00040000)
+#define XA_CAMERACAP_GAMMA ((XAuint32) 0x00080000)
+
+
+#define XA_CAMERA_EXPOSUREMODE_MANUAL ((XAuint32) 0x00000001)
+#define XA_CAMERA_EXPOSUREMODE_AUTO ((XAuint32) 0x00000002)
+#define XA_CAMERA_EXPOSUREMODE_NIGHT ((XAuint32) 0x00000004)
+#define XA_CAMERA_EXPOSUREMODE_BACKLIGHT ((XAuint32) 0x00000008)
+#define XA_CAMERA_EXPOSUREMODE_SPOTLIGHT ((XAuint32) 0x00000010)
+#define XA_CAMERA_EXPOSUREMODE_SPORTS ((XAuint32) 0x00000020)
+#define XA_CAMERA_EXPOSUREMODE_SNOW ((XAuint32) 0x00000040)
+#define XA_CAMERA_EXPOSUREMODE_BEACH ((XAuint32) 0x00000080)
+#define XA_CAMERA_EXPOSUREMODE_LARGEAPERTURE ((XAuint32) 0x00000100)
+#define XA_CAMERA_EXPOSUREMODE_SMALLAPERTURE ((XAuint32) 0x00000200)
+#define XA_CAMERA_EXPOSUREMODE_PORTRAIT ((XAuint32) 0x0000400)
+#define XA_CAMERA_EXPOSUREMODE_NIGHTPORTRAIT ((XAuint32) 0x00000800)
+
+#define XA_CAMERA_FLASHMODE_OFF ((XAuint32) 0x00000001)
+#define XA_CAMERA_FLASHMODE_ON ((XAuint32) 0x00000002)
+#define XA_CAMERA_FLASHMODE_AUTO ((XAuint32) 0x00000004)
+#define XA_CAMERA_FLASHMODE_REDEYEREDUCTION ((XAuint32) 0x00000008)
+#define XA_CAMERA_FLASHMODE_REDEYEREDUCTION_AUTO ((XAuint32) 0x00000010)
+#define XA_CAMERA_FLASHMODE_FILLIN ((XAuint32) 0x00000020)
+#define XA_CAMERA_FLASHMODE_TORCH ((XAuint32) 0x00000040)
+
+#define XA_CAMERA_FOCUSMODE_MANUAL ((XAuint32) 0x00000001)
+#define XA_CAMERA_FOCUSMODE_AUTO ((XAuint32) 0x00000002)
+#define XA_CAMERA_FOCUSMODE_CENTROID ((XAuint32) 0x00000004)
+#define XA_CAMERA_FOCUSMODE_CONTINUOUS_AUTO ((XAuint32) 0x00000008)
+#define XA_CAMERA_FOCUSMODE_CONTINUOUS_CENTROID ((XAuint32) 0x00000010)
+
+#define XA_CAMERA_FOCUSMODESTATUS_OFF ((XAuint32) 0x00000001)
+#define XA_CAMERA_FOCUSMODESTATUS_REQUEST ((XAuint32) 0x00000002)
+#define XA_CAMERA_FOCUSMODESTATUS_REACHED ((XAuint32) 0x00000003)
+#define XA_CAMERA_FOCUSMODESTATUS_UNABLETOREACH ((XAuint32) 0x00000004)
+#define XA_CAMERA_FOCUSMODESTATUS_LOST ((XAuint32) 0x00000005)
+
+#define XA_CAMERA_ISOSENSITIVITYMODE_MANUAL ((XAuint32) 0x00000001)
+#define XA_CAMERA_ISOSENSITIVITYMODE_AUTO ((XAuint32) 0x00000002)
+
+#define XA_CAMERA_LOCK_AUTOFOCUS ((XAuint32) 0x00000001)
+#define XA_CAMERA_LOCK_AUTOEXPOSURE ((XAuint32) 0x00000002)
+#define XA_CAMERA_LOCK_AUTOWHITEBALANCE ((XAuint32) 0x00000004)
+
+#define XA_CAMERA_METERINGMODE_AVERAGE ((XAuint32) 0x00000001)
+#define XA_CAMERA_METERINGMODE_SPOT ((XAuint32) 0x00000002)
+#define XA_CAMERA_METERINGMODE_MATRIX ((XAuint32) 0x00000004)
+
+#define XA_CAMERA_SHUTTERSPEEDMODE_MANUAL ((XAuint32) 0x00000001)
+#define XA_CAMERA_SHUTTERSPEEDMODE_AUTO ((XAuint32) 0x00000002)
+
+#define XA_CAMERA_WHITEBALANCEMODE_MANUAL ((XAuint32) 0x00000001)
+#define XA_CAMERA_WHITEBALANCEMODE_AUTO ((XAuint32) 0x00000002)
+#define XA_CAMERA_WHITEBALANCEMODE_SUNLIGHT ((XAuint32) 0x00000004)
+#define XA_CAMERA_WHITEBALANCEMODE_CLOUDY ((XAuint32) 0x00000008)
+#define XA_CAMERA_WHITEBALANCEMODE_SHADE ((XAuint32) 0x00000010)
+#define XA_CAMERA_WHITEBALANCEMODE_TUNGSTEN ((XAuint32) 0x00000020)
+#define XA_CAMERA_WHITEBALANCEMODE_FLUORESCENT ((XAuint32) 0x00000040)
+#define XA_CAMERA_WHITEBALANCEMODE_INCANDESCENT ((XAuint32) 0x00000080)
+#define XA_CAMERA_WHITEBALANCEMODE_FLASH ((XAuint32) 0x00000100)
+#define XA_CAMERA_WHITEBALANCEMODE_SUNSET ((XAuint32) 0x00000200)
+
+#define XA_CAMERA_ZOOM_SLOW ((XAuint32) 50)
+#define XA_CAMERA_ZOOM_NORMAL ((XAuint32) 100)
+#define XA_CAMERA_ZOOM_FAST ((XAuint32) 200)
+#define XA_CAMERA_ZOOM_FASTEST ((XAuint32) 0xFFFFFFFF)
+
+#define XA_FOCUSPOINTS_ONE ((XAuint32) 0x00000001)
+#define XA_FOCUSPOINTS_THREE_3X1 ((XAuint32) 0x00000002)
+#define XA_FOCUSPOINTS_FIVE_CROSS ((XAuint32) 0x00000003)
+#define XA_FOCUSPOINTS_SEVEN_CROSS ((XAuint32) 0x00000004)
+#define XA_FOCUSPOINTS_NINE_SQUARE ((XAuint32) 0x00000005)
+#define XA_FOCUSPOINTS_ELEVEN_CROSS ((XAuint32) 0x00000006)
+#define XA_FOCUSPOINTS_TWELVE_3X4 ((XAuint32) 0x00000007)
+#define XA_FOCUSPOINTS_TWELVE_4X3 ((XAuint32) 0x00000008)
+#define XA_FOCUSPOINTS_SIXTEEN_SQUARE ((XAuint32) 0x00000009)
+#define XA_FOCUSPOINTS_CUSTOM ((XAuint32) 0x0000000A)
+
+typedef struct XAFocusPointPosition_ {
+ XAuint32 left;
+ XAuint32 top;
+ XAuint32 width;
+ XAuint32 height;
+} XAFocusPointPosition;
+
+#define XA_ORIENTATION_UNKNOWN ((XAuint32) 0x00000001)
+#define XA_ORIENTATION_OUTWARDS ((XAuint32) 0x00000002)
+#define XA_ORIENTATION_INWARDS ((XAuint32) 0x00000003)
+
+typedef struct XACameraDescriptor_ {
+ XAchar * name;
+ XAuint32 maxWidth;
+ XAuint32 maxHeight;
+ XAuint32 orientation;
+ XAuint32 featuresSupported;
+ XAuint32 exposureModesSupported;
+ XAuint32 flashModesSupported;
+ XAuint32 focusModesSupported;
+ XAuint32 meteringModesSupported;
+ XAuint32 whiteBalanceModesSupported;
+} XACameraDescriptor;
+
+XA_API extern const XAInterfaceID XA_IID_CAMERACAPABILITIES;
+
+struct XACameraCapabilitiesItf_;
+typedef const struct XACameraCapabilitiesItf_
+ * const * XACameraCapabilitiesItf;
+
+struct XACameraCapabilitiesItf_ {
+ XAresult (*GetCameraCapabilities) (
+ XACameraCapabilitiesItf self,
+ XAuint32 *pIndex,
+ XAuint32 * pCameraDeviceID,
+ XACameraDescriptor * pDescriptor
+ );
+ XAresult (*QueryFocusRegionPatterns) (
+ XACameraCapabilitiesItf self,
+ XAuint32 cameraDeviceID,
+ XAuint32 * pPatternID,
+ XAuint32 * pFocusPattern,
+ XAuint32 * pCustomPoints1,
+ XAuint32 * pCustomPoints2
+ );
+ XAresult (*GetSupportedAutoLocks) (
+ XACameraCapabilitiesItf self,
+ XAuint32 cameraDeviceID,
+ XAuint32 * pNumCombinations,
+ XAuint32 ** ppLocks
+ );
+ XAresult (*GetSupportedFocusManualSettings) (
+ XACameraCapabilitiesItf self,
+ XAuint32 cameraDeviceID,
+ XAboolean macroEnabled,
+ XAmillimeter * pMinValue,
+ XAmillimeter * pMaxValue,
+ XAuint32 * pNumSettings,
+ XAmillimeter ** ppSettings
+ );
+ XAresult (*GetSupportedISOSensitivitySettings) (
+ XACameraCapabilitiesItf self,
+ XAuint32 cameraDeviceID,
+ XAuint32 * pMinValue,
+ XAuint32 * pMaxValue,
+ XAuint32 * pNumSettings,
+ XAuint32 ** ppSettings
+ );
+ XAresult (*GetSupportedApertureManualSettings) (
+ XACameraCapabilitiesItf self,
+ XAuint32 cameraDeviceID,
+ XAuint32 * pMinValue,
+ XAuint32 * pMaxValue,
+ XAuint32 * pNumSettings,
+ XAuint32 ** ppSettings
+ );
+ XAresult (*GetSupportedShutterSpeedManualSettings) (
+ XACameraCapabilitiesItf self,
+ XAuint32 cameraDeviceID,
+ XAmicrosecond * pMinValue,
+ XAmicrosecond * pMaxValue,
+ XAuint32 * pNumSettings,
+ XAmicrosecond ** ppSettings
+ );
+ XAresult (*GetSupportedWhiteBalanceManualSettings) (
+ XACameraCapabilitiesItf self,
+ XAuint32 cameraDeviceID,
+ XAuint32 * pMinValue,
+ XAuint32 * pMaxValue,
+ XAuint32 * pNumSettings,
+ XAuint32 ** ppSettings
+ );
+ XAresult (*GetSupportedZoomSettings) (
+ XACameraCapabilitiesItf self,
+ XAuint32 cameraDeviceID,
+ XAboolean digitalEnabled,
+ XAboolean macroEnabled,
+ XApermille * pMaxValue,
+ XAuint32 * pNumSettings,
+ XApermille ** ppSettings,
+ XAboolean * pSpeedSupported
+
+ );
+};
+
+XA_API extern const XAInterfaceID XA_IID_CAMERA;
+
+struct XACameraItf_;
+typedef const struct XACameraItf_ * const * XACameraItf;
+
+typedef void (XAAPIENTRY * xaCameraCallback) (
+ XACameraItf caller,
+ void * pContext,
+ XAuint32 eventId,
+ XAuint32 eventData
+);
+
+struct XACameraItf_ {
+ XAresult (*RegisterCallback) (
+ XACameraItf self,
+ xaCameraCallback callback,
+ void * pContext
+ );
+ XAresult (*SetFlashMode) (
+ XACameraItf self,
+ XAuint32 flashMode
+ );
+ XAresult (*GetFlashMode) (
+ XACameraItf self,
+ XAuint32 * pFlashMode
+ );
+ XAresult (*IsFlashReady) (
+ XACameraItf self,
+ XAboolean * pReady
+ );
+ XAresult (*SetFocusMode) (
+ XACameraItf self,
+ XAuint32 focusMode,
+ XAmillimeter manualSetting,
+ XAboolean macroEnabled
+ );
+ XAresult (*GetFocusMode) (
+ XACameraItf self,
+ XAuint32 * pFocusMode,
+ XAmillimeter * pManualSetting,
+ XAboolean * pMacroEnabled
+ );
+ XAresult (*SetFocusRegionPattern) (
+ XACameraItf self,
+ XAuint32 focusPattern,
+ XAuint32 activePoints1,
+ XAuint32 activePoints2
+ );
+ XAresult (*GetFocusRegionPattern) (
+ XACameraItf self,
+ XAuint32 * pFocusPattern,
+ XAuint32 * pActivePoints1,
+ XAuint32 * pActivePoints2
+ );
+ XAresult (*GetFocusRegionPositions) (
+ XACameraItf self,
+ XAuint32 * pNumPositionEntries,
+ XAFocusPointPosition * pFocusPosition
+ );
+ XAresult (*GetFocusModeStatus) (
+ XACameraItf self,
+ XAuint32 * pFocusStatus,
+ XAuint32 * pRegionStatus1,
+ XAuint32 * pRegionStatus2
+ );
+ XAresult (*SetMeteringMode) (
+ XACameraItf self,
+ XAuint32 meteringMode
+ );
+ XAresult (*GetMeteringMode) (
+ XACameraItf self,
+ XAuint32 * pMeteringMode
+ );
+ XAresult (*SetExposureMode) (
+ XACameraItf self,
+ XAuint32 exposure,
+ XAuint32 compensation
+ );
+ XAresult (*GetExposureMode) (
+ XACameraItf self,
+ XAuint32 * pExposure,
+ XAuint32 * pCompensation
+ );
+ XAresult (*SetISOSensitivity) (
+ XACameraItf self,
+ XAuint32 isoSensitivity,
+ XAuint32 manualSetting
+ );
+ XAresult (*GetISOSensitivity) (
+ XACameraItf self,
+ XAuint32 * pIsoSensitivity,
+ XAuint32 * pManualSetting
+ );
+ XAresult (*SetAperture) (
+ XACameraItf self,
+ XAuint32 aperture,
+ XAuint32 manualSetting
+ );
+ XAresult (*GetAperture) (
+ XACameraItf self,
+ XAuint32 * pAperture,
+ XAuint32 * pManualSetting
+ );
+ XAresult (*SetShutterSpeed) (
+ XACameraItf self,
+ XAuint32 shutterSpeed,
+ XAmicrosecond manualSetting
+ );
+ XAresult (*GetShutterSpeed) (
+ XACameraItf self,
+ XAuint32 * pShutterSpeed,
+ XAmicrosecond * pManualSetting
+ );
+ XAresult (*SetWhiteBalance) (
+ XACameraItf self,
+ XAuint32 whiteBalance,
+ XAuint32 manualSetting
+ );
+ XAresult (*GetWhiteBalance) (
+ XACameraItf self,
+ XAuint32 * pWhiteBalance,
+ XAuint32 * pManualSetting
+ );
+ XAresult (*SetAutoLocks) (
+ XACameraItf self,
+ XAuint32 locks
+ );
+ XAresult (*GetAutoLocks) (
+ XACameraItf self,
+ XAuint32 * locks
+ );
+ XAresult (*SetZoom) (
+ XACameraItf self,
+ XApermille zoom,
+ XAboolean digitalEnabled,
+ XAuint32 speed,
+ XAboolean async
+ );
+ XAresult (*GetZoom) (
+ XACameraItf self,
+ XApermille * pZoom,
+ XAboolean * pDigital
+ );
+};
+
+/* AUDIO I/O DEVICE CAPABILITIES */
+
+#define XA_DEVCONNECTION_INTEGRATED ((XAint16) 0x0001)
+#define XA_DEVCONNECTION_ATTACHED_WIRED ((XAint16) 0x0100)
+#define XA_DEVCONNECTION_ATTACHED_WIRELESS ((XAint16) 0x0200)
+#define XA_DEVCONNECTION_NETWORK ((XAint16) 0x0400)
+
+#define XA_DEVLOCATION_HANDSET ((XAint16) 0x0001)
+#define XA_DEVLOCATION_HEADSET ((XAint16) 0x0002)
+#define XA_DEVLOCATION_CARKIT ((XAint16) 0x0003)
+#define XA_DEVLOCATION_DOCK ((XAint16) 0x0004)
+#define XA_DEVLOCATION_REMOTE ((XAint16) 0x0005)
+
+#define XA_DEVSCOPE_UNKNOWN ((XAint16) 0x0001)
+#define XA_DEVSCOPE_ENVIRONMENT ((XAint16) 0x0002)
+#define XA_DEVSCOPE_USER ((XAint16) 0x0003)
+
+typedef struct XAAudioInputDescriptor_ {
+ XAchar * deviceName;
+ XAint16 deviceConnection;
+ XAint16 deviceScope;
+ XAint16 deviceLocation;
+ XAboolean isForTelephony;
+ XAmilliHertz minSampleRate;
+ XAmilliHertz maxSampleRate;
+ XAboolean isFreqRangeContinuous;
+ XAmilliHertz * samplingRatesSupported;
+ XAint16 numOfSamplingRatesSupported;
+ XAint16 maxChannels;
+} XAAudioInputDescriptor;
+
+typedef struct XAAudioOutputDescriptor_ {
+ XAchar *pDeviceName;
+ XAint16 deviceConnection;
+ XAint16 deviceScope;
+ XAint16 deviceLocation;
+ XAboolean isForTelephony;
+ XAmilliHertz minSampleRate;
+ XAmilliHertz maxSampleRate;
+ XAboolean isFreqRangeContinuous;
+ XAmilliHertz *samplingRatesSupported;
+ XAint16 numOfSamplingRatesSupported;
+ XAint16 maxChannels;
+} XAAudioOutputDescriptor;
+
+XA_API extern const XAInterfaceID XA_IID_AUDIOIODEVICECAPABILITIES;
+
+struct XAAudioIODeviceCapabilitiesItf_;
+typedef const struct XAAudioIODeviceCapabilitiesItf_
+ * const * XAAudioIODeviceCapabilitiesItf;
+
+typedef void (XAAPIENTRY * xaAvailableAudioInputsChangedCallback) (
+ XAAudioIODeviceCapabilitiesItf caller,
+ void * pContext,
+ XAuint32 deviceID,
+ XAint32 numInputs,
+ XAboolean isNew
+);
+
+typedef void (XAAPIENTRY * xaAvailableAudioOutputsChangedCallback) (
+ XAAudioIODeviceCapabilitiesItf caller,
+ void * pContext,
+ XAuint32 deviceID,
+ XAint32 numOutputs,
+ XAboolean isNew
+);
+
+typedef void (XAAPIENTRY * xaDefaultDeviceIDMapChangedCallback) (
+ XAAudioIODeviceCapabilitiesItf caller,
+ void * pContext,
+ XAboolean isOutput,
+ XAint32 numDevices
+);
+
+struct XAAudioIODeviceCapabilitiesItf_ {
+ XAresult (*GetAvailableAudioInputs) (
+ XAAudioIODeviceCapabilitiesItf self,
+ XAint32 * pNumInputs,
+ XAuint32 * pInputDeviceIDs
+ );
+ XAresult (*QueryAudioInputCapabilities) (
+ XAAudioIODeviceCapabilitiesItf self,
+ XAuint32 deviceID,
+ XAAudioInputDescriptor * pDescriptor
+ );
+ XAresult (*RegisterAvailableAudioInputsChangedCallback) (
+ XAAudioIODeviceCapabilitiesItf self,
+ xaAvailableAudioInputsChangedCallback callback,
+ void * pContext
+ );
+ XAresult (*GetAvailableAudioOutputs) (
+ XAAudioIODeviceCapabilitiesItf self,
+ XAint32 * pNumOutputs,
+ XAuint32 * pOutputDeviceIDs
+ );
+ XAresult (*QueryAudioOutputCapabilities) (
+ XAAudioIODeviceCapabilitiesItf self,
+ XAuint32 deviceID,
+ XAAudioOutputDescriptor * pDescriptor
+ );
+ XAresult (*RegisterAvailableAudioOutputsChangedCallback) (
+ XAAudioIODeviceCapabilitiesItf self,
+ xaAvailableAudioOutputsChangedCallback callback,
+ void * pContext
+ );
+ XAresult (*RegisterDefaultDeviceIDMapChangedCallback) (
+ XAAudioIODeviceCapabilitiesItf self,
+ xaDefaultDeviceIDMapChangedCallback callback,
+ void * pContext
+ );
+ XAresult (*GetAssociatedAudioInputs) (
+ XAAudioIODeviceCapabilitiesItf self,
+ XAuint32 deviceID,
+ XAint32 * pNumAudioInputs,
+ XAuint32 * pAudioInputDeviceIDs
+ );
+ XAresult (*GetAssociatedAudioOutputs) (
+ XAAudioIODeviceCapabilitiesItf self,
+ XAuint32 deviceID,
+ XAint32 * pNumAudioOutputs,
+ XAuint32 * pAudioOutputDeviceIDs
+ );
+ XAresult (*GetDefaultAudioDevices) (
+ XAAudioIODeviceCapabilitiesItf self,
+ XAuint32 defaultDeviceID,
+ XAint32 *pNumAudioDevices,
+ XAuint32 *pAudioDeviceIDs
+ );
+ XAresult (*QuerySampleFormatsSupported) (
+ XAAudioIODeviceCapabilitiesItf self,
+ XAuint32 deviceID,
+ XAmilliHertz samplingRate,
+ XAint32 *pSampleFormats,
+ XAint32 *pNumOfSampleFormats
+ );
+};
+
+/* DEVICE VOLUME */
+
+XA_API extern const XAInterfaceID XA_IID_DEVICEVOLUME;
+
+struct XADeviceVolumeItf_;
+typedef const struct XADeviceVolumeItf_ * const * XADeviceVolumeItf;
+
+struct XADeviceVolumeItf_ {
+ XAresult (*GetVolumeScale) (
+ XADeviceVolumeItf self,
+ XAuint32 deviceID,
+ XAint32 * pMinValue,
+ XAint32 * pMaxValue,
+ XAboolean * pIsMillibelScale
+ );
+ XAresult (*SetVolume) (
+ XADeviceVolumeItf self,
+ XAuint32 deviceID,
+ XAint32 volume
+ );
+ XAresult (*GetVolume) (
+ XADeviceVolumeItf self,
+ XAuint32 deviceID,
+ XAint32 * pVolume
+ );
+};
+
+/* EQUALIZER */
+
+#define XA_EQUALIZER_UNDEFINED ((XAuint16) 0xFFFF)
+
+XA_API extern const XAInterfaceID XA_IID_EQUALIZER;
+
+struct XAEqualizerItf_;
+typedef const struct XAEqualizerItf_ * const * XAEqualizerItf;
+
+struct XAEqualizerItf_ {
+ XAresult (*SetEnabled) (
+ XAEqualizerItf self,
+ XAboolean enabled
+ );
+ XAresult (*IsEnabled) (
+ XAEqualizerItf self,
+ XAboolean * pEnabled
+ );
+ XAresult (*GetNumberOfBands) (
+ XAEqualizerItf self,
+ XAuint16 * pNumBands
+ );
+ XAresult (*GetBandLevelRange) (
+ XAEqualizerItf self,
+ XAmillibel * pMin,
+ XAmillibel * pMax
+ );
+ XAresult (*SetBandLevel) (
+ XAEqualizerItf self,
+ XAuint16 band,
+ XAmillibel level
+ );
+ XAresult (*GetBandLevel) (
+ XAEqualizerItf self,
+ XAuint16 band,
+ XAmillibel * pLevel
+ );
+ XAresult (*GetCenterFreq) (
+ XAEqualizerItf self,
+ XAuint16 band,
+ XAmilliHertz * pCenter
+ );
+ XAresult (*GetBandFreqRange) (
+ XAEqualizerItf self,
+ XAuint16 band,
+ XAmilliHertz * pMin,
+ XAmilliHertz * pMax
+ );
+ XAresult (*GetBand) (
+ XAEqualizerItf self,
+ XAmilliHertz frequency,
+ XAuint16 * pBand
+ );
+ XAresult (*GetCurrentPreset) (
+ XAEqualizerItf self,
+ XAuint16 * pPreset
+ );
+ XAresult (*UsePreset) (
+ XAEqualizerItf self,
+ XAuint16 index
+ );
+ XAresult (*GetNumberOfPresets) (
+ XAEqualizerItf self,
+ XAuint16 * pNumPresets
+ );
+ XAresult (*GetPresetName) (
+ XAEqualizerItf self,
+ XAuint16 index,
+ const XAchar ** ppName
+ );
+};
+
+/* OUTPUT MIX */
+
+XA_API extern const XAInterfaceID XA_IID_OUTPUTMIX;
+
+struct XAOutputMixItf_;
+typedef const struct XAOutputMixItf_ * const * XAOutputMixItf;
+
+typedef void (XAAPIENTRY * xaMixDeviceChangeCallback) (
+ XAOutputMixItf caller,
+ void * pContext
+);
+
+struct XAOutputMixItf_ {
+ XAresult (*GetDestinationOutputDeviceIDs) (
+ XAOutputMixItf self,
+ XAint32 * pNumDevices,
+ XAuint32 * pDeviceIDs
+ );
+ XAresult (*RegisterDeviceChangeCallback) (
+ XAOutputMixItf self,
+ xaMixDeviceChangeCallback callback,
+ void * pContext
+ );
+ XAresult (*ReRoute) (
+ XAOutputMixItf self,
+ XAint32 numOutputDevices,
+ XAuint32 * pOutputDeviceIDs
+ );
+};
+
+/* RADIO */
+
+#define XA_FREQRANGE_FMEUROAMERICA ((XAuint8) 0x01)
+#define XA_FREQRANGE_FMJAPAN ((XAuint8) 0x02)
+#define XA_FREQRANGE_AMLW ((XAuint8) 0x03)
+#define XA_FREQRANGE_AMMW ((XAuint8) 0x04)
+#define XA_FREQRANGE_AMSW ((XAuint8) 0x05)
+
+#define XA_RADIO_EVENT_ANTENNA_STATUS_CHANGED ((XAuint32) 0x00000001)
+#define XA_RADIO_EVENT_FREQUENCY_CHANGED ((XAuint32) 0x00000002)
+#define XA_RADIO_EVENT_FREQUENCY_RANGE_CHANGED ((XAuint32) 0x00000003)
+#define XA_RADIO_EVENT_PRESET_CHANGED ((XAuint32) 0x00000004)
+#define XA_RADIO_EVENT_SEEK_COMPLETED ((XAuint32) 0x00000005)
+
+#define XA_STEREOMODE_MONO ((XAuint32) 0x00000000)
+#define XA_STEREOMODE_STEREO ((XAuint32) 0x00000001)
+#define XA_STEREOMODE_AUTO ((XAuint32) 0x00000002)
+
+XA_API extern const XAInterfaceID XA_IID_RADIO;
+
+struct XARadioItf_;
+typedef const struct XARadioItf_ * const * XARadioItf;
+
+typedef void (XAAPIENTRY * xaRadioCallback) (
+ XARadioItf caller,
+ void * pContext,
+ XAuint32 event,
+ XAuint32 eventIntData,
+ XAboolean eventBooleanData
+);
+
+struct XARadioItf_ {
+ XAresult (*SetFreqRange) (
+ XARadioItf self,
+ XAuint8 range
+ );
+ XAresult (*GetFreqRange) (
+ XARadioItf self,
+ XAuint8 * pRange
+ );
+ XAresult (*IsFreqRangeSupported) (
+ XARadioItf self,
+ XAuint8 range,
+ XAboolean * pSupported
+ );
+ XAresult (*GetFreqRangeProperties) (
+ XARadioItf self,
+ XAuint8 range,
+ XAuint32 * pMinFreq,
+ XAuint32 * pMaxFreq,
+ XAuint32 * pFreqInterval
+ );
+ XAresult (*SetFrequency) (
+ XARadioItf self,
+ XAuint32 freq
+ );
+ XAresult (*CancelSetFrequency) (
+ XARadioItf self
+ );
+ XAresult (*GetFrequency) (
+ XARadioItf self,
+ XAuint32 * pFreq
+ );
+ XAresult (*SetSquelch) (
+ XARadioItf self,
+ XAboolean squelch
+ );
+ XAresult (*GetSquelch) (
+ XARadioItf self,
+ XAboolean * pSquelch
+ );
+ XAresult (*SetStereoMode) (
+ XARadioItf self,
+ XAuint32 mode
+ );
+ XAresult (*GetStereoMode) (
+ XARadioItf self,
+ XAuint32 * pMode
+ );
+ XAresult (*GetSignalStrength) (
+ XARadioItf self,
+ XAuint32 * pStrength
+ );
+ XAresult (*Seek) (
+ XARadioItf self,
+ XAboolean upwards
+ );
+ XAresult (*StopSeeking) (
+ XARadioItf self
+ );
+ XAresult (*GetNumberOfPresets) (
+ XARadioItf self,
+ XAuint32 * pNumPresets
+ );
+ XAresult (*SetPreset) (
+ XARadioItf self,
+ XAuint32 preset,
+ XAuint32 freq,
+ XAuint8 range,
+ XAuint32 mode,
+ const XAchar * pName
+ );
+ XAresult (*GetPreset) (
+ XARadioItf self,
+ XAuint32 preset,
+ XAuint32 * pFreq,
+ XAuint8 * pRange,
+ XAuint32 * pMode,
+ XAchar * pName,
+ XAuint16 * pNameLength
+ );
+ XAresult (*RegisterRadioCallback) (
+ XARadioItf self,
+ xaRadioCallback callback,
+ void * pContext
+ );
+};
+
+/* RDS */
+
+#define XA_RDS_EVENT_NEW_PI ((XAuint16) 0x0001)
+#define XA_RDS_EVENT_NEW_PTY ((XAuint16) 0x0002)
+#define XA_RDS_EVENT_NEW_PS ((XAuint16) 0x0004)
+#define XA_RDS_EVENT_NEW_RT ((XAuint16) 0x0008)
+#define XA_RDS_EVENT_NEW_RT_PLUS ((XAuint16) 0x0010)
+#define XA_RDS_EVENT_NEW_CT ((XAuint16) 0x0020)
+#define XA_RDS_EVENT_NEW_TA ((XAuint16) 0x0040)
+#define XA_RDS_EVENT_NEW_TP ((XAuint16) 0x0080)
+#define XA_RDS_EVENT_NEW_ALARM ((XAuint16) 0x0100)
+
+#define XA_RDSPROGRAMMETYPE_RDSPTY_NONE \
+ ((XAuint32) 0x00000000)
+#define XA_RDSPROGRAMMETYPE_RDSPTY_NEWS \
+ ((XAuint32) 0x00000001)
+#define XA_RDSPROGRAMMETYPE_RDSPTY_CURRENTAFFAIRS \
+ ((XAuint32) 0x00000002)
+#define XA_RDSPROGRAMMETYPE_RDSPTY_INFORMATION \
+ ((XAuint32) 0x00000003)
+#define XA_RDSPROGRAMMETYPE_RDSPTY_SPORT \
+ ((XAuint32) 0x00000004)
+#define XA_RDSPROGRAMMETYPE_RDSPTY_EDUCATION \
+ ((XAuint32) 0x00000005)
+#define XA_RDSPROGRAMMETYPE_RDSPTY_DRAMA \
+ ((XAuint32) 0x00000006)
+#define XA_RDSPROGRAMMETYPE_RDSPTY_CULTURE \
+ ((XAuint32) 0x00000007)
+#define XA_RDSPROGRAMMETYPE_RDSPTY_SCIENCE \
+ ((XAuint32) 0x00000008)
+#define XA_RDSPROGRAMMETYPE_RDSPTY_VARIEDSPEECH \
+ ((XAuint32) 0x00000009)
+#define XA_RDSPROGRAMMETYPE_RDSPTY_POPMUSIC \
+ ((XAuint32) 0x0000000A)
+#define XA_RDSPROGRAMMETYPE_RDSPTY_ROCKMUSIC \
+ ((XAuint32) 0x0000000B)
+#define XA_RDSPROGRAMMETYPE_RDSPTY_EASYLISTENING \
+ ((XAuint32) 0x0000000C)
+#define XA_RDSPROGRAMMETYPE_RDSPTY_LIGHTCLASSICAL \
+ ((XAuint32) 0x0000000D)
+#define XA_RDSPROGRAMMETYPE_RDSPTY_SERIOUSCLASSICAL \
+ ((XAuint32) 0x0000000E)
+#define XA_RDSPROGRAMMETYPE_RDSPTY_OTHERMUSIC \
+ ((XAuint32) 0x0000000F)
+#define XA_RDSPROGRAMMETYPE_RDSPTY_WEATHER \
+ ((XAuint32) 0x00000010)
+#define XA_RDSPROGRAMMETYPE_RDSPTY_FINANCE \
+ ((XAuint32) 0x00000011)
+#define XA_RDSPROGRAMMETYPE_RDSPTY_CHILDRENSPROGRAMMES \
+ ((XAuint32) 0x00000012)
+#define XA_RDSPROGRAMMETYPE_RDSPTY_SOCIALAFFAIRS \
+ ((XAuint32) 0x00000013)
+#define XA_RDSPROGRAMMETYPE_RDSPTY_RELIGION \
+ ((XAuint32) 0x00000014)
+#define XA_RDSPROGRAMMETYPE_RDSPTY_PHONEIN \
+ ((XAuint32) 0x00000015)
+#define XA_RDSPROGRAMMETYPE_RDSPTY_TRAVEL \
+ ((XAuint32) 0x00000016)
+#define XA_RDSPROGRAMMETYPE_RDSPTY_LEISURE \
+ ((XAuint32) 0x00000017)
+#define XA_RDSPROGRAMMETYPE_RDSPTY_JAZZMUSIC \
+ ((XAuint32) 0x00000018)
+#define XA_RDSPROGRAMMETYPE_RDSPTY_COUNTRYMUSIC \
+ ((XAuint32) 0x00000019)
+#define XA_RDSPROGRAMMETYPE_RDSPTY_NATIONALMUSIC \
+ ((XAuint32) 0x0000001A)
+#define XA_RDSPROGRAMMETYPE_RDSPTY_OLDIESMUSIC \
+ ((XAuint32) 0x0000001B)
+#define XA_RDSPROGRAMMETYPE_RDSPTY_FOLKMUSIC \
+ ((XAuint32) 0x0000001C)
+#define XA_RDSPROGRAMMETYPE_RDSPTY_DOCUMENTARY \
+ ((XAuint32) 0x0000001D)
+#define XA_RDSPROGRAMMETYPE_RDSPTY_ALARMTEST \
+ ((XAuint32) 0x0000001E)
+#define XA_RDSPROGRAMMETYPE_RDSPTY_ALARM \
+ ((XAuint32) 0x0000001F)
+
+#define XA_RDSPROGRAMMETYPE_RBDSPTY_NONE \
+ ((XAuint32) 0x00000000)
+#define XA_RDSPROGRAMMETYPE_RBDSPTY_NEWS \
+ ((XAuint32) 0x00000001)
+#define XA_RDSPROGRAMMETYPE_RBDSPTY_INFORMATION \
+ ((XAuint32) 0x00000002)
+#define XA_RDSPROGRAMMETYPE_RBDSPTY_SPORTS \
+ ((XAuint32) 0x00000003)
+#define XA_RDSPROGRAMMETYPE_RBDSPTY_TALK \
+ ((XAuint32) 0x00000004)
+#define XA_RDSPROGRAMMETYPE_RBDSPTY_ROCK \
+ ((XAuint32) 0x00000005)
+#define XA_RDSPROGRAMMETYPE_RBDSPTY_CLASSICROCK \
+ ((XAuint32) 0x00000006)
+#define XA_RDSPROGRAMMETYPE_RBDSPTY_ADULTHITS \
+ ((XAuint32) 0x00000007)
+#define XA_RDSPROGRAMMETYPE_RBDSPTY_SOFTROCK \
+ ((XAuint32) 0x00000008)
+#define XA_RDSPROGRAMMETYPE_RBDSPTY_TOP40 \
+ ((XAuint32) 0x00000009)
+#define XA_RDSPROGRAMMETYPE_RBDSPTY_COUNTRY \
+ ((XAuint32) 0x0000000A)
+#define XA_RDSPROGRAMMETYPE_RBDSPTY_OLDIES \
+ ((XAuint32) 0x0000000B)
+#define XA_RDSPROGRAMMETYPE_RBDSPTY_SOFT \
+ ((XAuint32) 0x0000000C)
+#define XA_RDSPROGRAMMETYPE_RBDSPTY_NOSTALGIA \
+ ((XAuint32) 0x0000000D)
+#define XA_RDSPROGRAMMETYPE_RBDSPTY_JAZZ \
+ ((XAuint32) 0x0000000E)
+#define XA_RDSPROGRAMMETYPE_RBDSPTY_CLASSICAL \
+ ((XAuint32) 0x0000000F)
+#define XA_RDSPROGRAMMETYPE_RBDSPTY_RHYTHMANDBLUES \
+ ((XAuint32) 0x00000010)
+#define XA_RDSPROGRAMMETYPE_RBDSPTY_SOFTRHYTHMANDBLUES \
+ ((XAuint32) 0x00000011)
+#define XA_RDSPROGRAMMETYPE_RBDSPTY_LANGUAGE \
+ ((XAuint32) 0x00000012)
+#define XA_RDSPROGRAMMETYPE_RBDSPTY_RELIGIOUSMUSIC \
+ ((XAuint32) 0x00000013)
+#define XA_RDSPROGRAMMETYPE_RBDSPTY_RELIGIOUSTALK \
+ ((XAuint32) 0x00000014)
+#define XA_RDSPROGRAMMETYPE_RBDSPTY_PERSONALITY \
+ ((XAuint32) 0x00000015)
+#define XA_RDSPROGRAMMETYPE_RBDSPTY_PUBLIC \
+ ((XAuint32) 0x00000016)
+#define XA_RDSPROGRAMMETYPE_RBDSPTY_COLLEGE \
+ ((XAuint32) 0x00000017)
+#define XA_RDSPROGRAMMETYPE_RBDSPTY_UNASSIGNED1 \
+ ((XAuint32) 0x00000018)
+#define XA_RDSPROGRAMMETYPE_RBDSPTY_UNASSIGNED2 \
+ ((XAuint32) 0x00000019)
+#define XA_RDSPROGRAMMETYPE_RBDSPTY_UNASSIGNED3 \
+ ((XAuint32) 0x0000001A)
+#define XA_RDSPROGRAMMETYPE_RBDSPTY_UNASSIGNED4 \
+ ((XAuint32) 0x0000001B)
+#define XA_RDSPROGRAMMETYPE_RBDSPTY_UNASSIGNED5 \
+ ((XAuint32) 0x0000001C)
+#define XA_RDSPROGRAMMETYPE_RBDSPTY_WEATHER \
+ ((XAuint32) 0x0000001D)
+#define XA_RDSPROGRAMMETYPE_RBDSPTY_EMERGENCYTEST \
+ ((XAuint32) 0x0000001E)
+#define XA_RDSPROGRAMMETYPE_RBDSPTY_EMERGENCY \
+ ((XAuint32) 0x0000001F)
+
+#define XA_RDSRTPLUS_ITEMTITLE ((XAuint8) 0x01)
+#define XA_RDSRTPLUS_ITEMALBUM ((XAuint8) 0x02)
+#define XA_RDSRTPLUS_ITEMTRACKNUMBER ((XAuint8) 0x03)
+#define XA_RDSRTPLUS_ITEMARTIST ((XAuint8) 0x04)
+#define XA_RDSRTPLUS_ITEMCOMPOSITION ((XAuint8) 0x05)
+#define XA_RDSRTPLUS_ITEMMOVEMENT ((XAuint8) 0x06)
+#define XA_RDSRTPLUS_ITEMCONDUCTOR ((XAuint8) 0x07)
+#define XA_RDSRTPLUS_ITEMCOMPOSER ((XAuint8) 0x08)
+#define XA_RDSRTPLUS_ITEMBAND ((XAuint8) 0x09)
+#define XA_RDSRTPLUS_ITEMCOMMENT ((XAuint8) 0x0A)
+#define XA_RDSRTPLUS_ITEMGENRE ((XAuint8) 0x0B)
+#define XA_RDSRTPLUS_INFONEWS ((XAuint8) 0x0C)
+#define XA_RDSRTPLUS_INFONEWSLOCAL ((XAuint8) 0x0D)
+#define XA_RDSRTPLUS_INFOSTOCKMARKET ((XAuint8) 0x0E)
+#define XA_RDSRTPLUS_INFOSPORT ((XAuint8) 0x0F)
+#define XA_RDSRTPLUS_INFOLOTTERY ((XAuint8) 0x10)
+#define XA_RDSRTPLUS_INFOHOROSCOPE ((XAuint8) 0x11)
+#define XA_RDSRTPLUS_INFODAILYDIVERSION ((XAuint8) 0x12)
+#define XA_RDSRTPLUS_INFOHEALTH ((XAuint8) 0x13)
+#define XA_RDSRTPLUS_INFOEVENT ((XAuint8) 0x14)
+#define XA_RDSRTPLUS_INFOSZENE ((XAuint8) 0x15)
+#define XA_RDSRTPLUS_INFOCINEMA ((XAuint8) 0x16)
+#define XA_RDSRTPLUS_INFOTV ((XAuint8) 0x17)
+#define XA_RDSRTPLUS_INFODATETIME ((XAuint8) 0x18)
+#define XA_RDSRTPLUS_INFOWEATHER ((XAuint8) 0x19)
+#define XA_RDSRTPLUS_INFOTRAFFIC ((XAuint8) 0x1A)
+#define XA_RDSRTPLUS_INFOALARM ((XAuint8) 0x1B)
+#define XA_RDSRTPLUS_INFOADVISERTISEMENT ((XAuint8) 0x1C)
+#define XA_RDSRTPLUS_INFOURL ((XAuint8) 0x1D)
+#define XA_RDSRTPLUS_INFOOTHER ((XAuint8) 0x1E)
+#define XA_RDSRTPLUS_STATIONNAMESHORT ((XAuint8) 0x1F)
+#define XA_RDSRTPLUS_STATIONNAMELONG ((XAuint8) 0x20)
+#define XA_RDSRTPLUS_PROGRAMNOW ((XAuint8) 0x21)
+#define XA_RDSRTPLUS_PROGRAMNEXT ((XAuint8) 0x22)
+#define XA_RDSRTPLUS_PROGRAMPART ((XAuint8) 0x23)
+#define XA_RDSRTPLUS_PROGRAMHOST ((XAuint8) 0x24)
+#define XA_RDSRTPLUS_PROFRAMEDITORIALSTAFF ((XAuint8) 0x25)
+#define XA_RDSRTPLUS_PROGRAMFREQUENCY ((XAuint8) 0x26)
+#define XA_RDSRTPLUS_PROGRAMHOMEPAGE ((XAuint8) 0x27)
+#define XA_RDSRTPLUS_PROGRAMSUBCHANNEL ((XAuint8) 0x28)
+#define XA_RDSRTPLUS_PHONEHOTLINE ((XAuint8) 0x29)
+#define XA_RDSRTPLUS_PHONESTUDIO ((XAuint8) 0x2A)
+#define XA_RDSRTPLUS_PHONEOTHER ((XAuint8) 0x2B)
+#define XA_RDSRTPLUS_SMSSTUDIO ((XAuint8) 0x2C)
+#define XA_RDSRTPLUS_SMSOTHER ((XAuint8) 0x2D)
+#define XA_RDSRTPLUS_EMAILHOTLINE ((XAuint8) 0x2E)
+#define XA_RDSRTPLUS_EMAILSTUDIO ((XAuint8) 0x2F)
+#define XA_RDSRTPLUS_EMAILOTHER ((XAuint8) 0x30)
+#define XA_RDSRTPLUS_MMSOTHER ((XAuint8) 0x31)
+#define XA_RDSRTPLUS_CHAT ((XAuint8) 0x32)
+#define XA_RDSRTPLUS_CHATCENTER ((XAuint8) 0x33)
+#define XA_RDSRTPLUS_VOTEQUESTION ((XAuint8) 0x34)
+#define XA_RDSRTPLUS_VOTECENTER ((XAuint8) 0x35)
+#define XA_RDSRTPLUS_OPENCLASS45 ((XAuint8) 0x36)
+#define XA_RDSRTPLUS_OPENCLASS55 ((XAuint8) 0x37)
+#define XA_RDSRTPLUS_OPENCLASS56 ((XAuint8) 0x38)
+#define XA_RDSRTPLUS_OPENCLASS57 ((XAuint8) 0x39)
+#define XA_RDSRTPLUS_OPENCLASS58 ((XAuint8) 0x3A)
+#define XA_RDSRTPLUS_PLACE ((XAuint8) 0x3B)
+#define XA_RDSRTPLUS_APPOINTMENT ((XAuint8) 0x3C)
+#define XA_RDSRTPLUS_IDENTIFIER ((XAuint8) 0x3D)
+#define XA_RDSRTPLUS_PURCHASE ((XAuint8) 0x3E)
+#define XA_RDSRTPLUS_GETDATA ((XAuint8) 0x3F)
+
+XA_API extern const XAInterfaceID XA_IID_RDS;
+
+struct XARDSItf_;
+typedef const struct XARDSItf_ * const * XARDSItf;
+
+typedef void (XAAPIENTRY * xaGetODAGroupCallback) (
+ XARadioItf caller,
+ void * pContext,
+ XAboolean success,
+ XAint16 group,
+ XAuint16 message
+);
+
+typedef void (XAAPIENTRY * xaNewODADataCallback) (
+ XARDSItf caller,
+ void * pContext,
+ XAint16 group,
+ XAuint64 data
+);
+
+typedef void (XAAPIENTRY * xaRDSCallback) (
+ XARDSItf caller,
+ void * pContext,
+ XAuint16 event,
+ XAuint8 eventData
+);
+
+struct XARDSItf_ {
+ XAresult (*QueryRDSSignal) (
+ XARDSItf self,
+ XAboolean * isSignal
+ );
+ XAresult (*GetProgrammeServiceName) (
+ XARDSItf self,
+ XAchar * ps
+ );
+ XAresult (*GetRadioText) (
+ XARDSItf self,
+ XAchar * rt
+ );
+ XAresult (*GetRadioTextPlus) (
+ XARDSItf self,
+ XAuint8 contentType,
+ XAchar * informationElement,
+ XAchar * descriptor,
+ XAuint8 * descriptorContentType
+ );
+ XAresult (*GetProgrammeType) (
+ XARDSItf self,
+ XAuint32 * pty
+ );
+ XAresult (*GetProgrammeTypeString) (
+ XARDSItf self,
+ XAboolean isLengthMax16,
+ XAchar * pty
+ );
+ XAresult (*GetProgrammeIdentificationCode) (
+ XARDSItf self,
+ XAint16 * pi
+ );
+ XAresult (*GetClockTime) (
+ XARDSItf self,
+ XAtime * dateAndTime
+ );
+ XAresult (*GetTrafficAnnouncement) (
+ XARDSItf self,
+ XAboolean * ta
+ );
+ XAresult (*GetTrafficProgramme) (
+ XARDSItf self,
+ XAboolean * tp
+ );
+ XAresult (*SeekByProgrammeType) (
+ XARDSItf self,
+ XAuint32 pty,
+ XAboolean upwards
+ );
+ XAresult (*SeekTrafficAnnouncement) (
+ XARDSItf self,
+ XAboolean upwards
+ );
+ XAresult (*SeekTrafficProgramme) (
+ XARDSItf self,
+ XAboolean upwards
+ );
+ XAresult (*SetAutomaticSwitching) (
+ XARDSItf self,
+ XAboolean automatic
+ );
+ XAresult (*GetAutomaticSwitching) (
+ XARDSItf self,
+ XAboolean * automatic
+ );
+ XAresult (*SetAutomaticTrafficAnnouncement) (
+ XARDSItf self,
+ XAboolean automatic
+ );
+ XAresult (*GetAutomaticTrafficAnnouncement) (
+ XARDSItf self,
+ XAboolean * automatic
+ );
+ XAresult (*GetODAGroup) (
+ XARDSItf self,
+ XAuint16 AID,
+ xaGetODAGroupCallback callback,
+ void * pContext
+ );
+ XAresult (*SubscribeODAGroup) (
+ XARDSItf self,
+ XAint16 group,
+ XAboolean useErrorCorrection
+ );
+ XAresult (*UnsubscribeODAGroup) (
+ XARDSItf self,
+ XAint16 group
+ );
+ XAresult (*ListODAGroupSubscriptions) (
+ XARDSItf self,
+ XAint16* pGroups,
+ XAuint32* pLength
+ );
+ XAresult (*RegisterRDSCallback) (
+ XARDSItf self,
+ xaRDSCallback callback,
+ void * pContext
+ );
+ XAresult (*RegisterODADataCallback) (
+ XARDSItf self,
+ xaNewODADataCallback callback,
+ void * pContext
+ );
+};
+
+/* VIBRA */
+
+XA_API extern const XAInterfaceID XA_IID_VIBRA;
+
+struct XAVibraItf_;
+typedef const struct XAVibraItf_ * const * XAVibraItf;
+
+struct XAVibraItf_ {
+ XAresult (*Vibrate) (
+ XAVibraItf self,
+ XAboolean vibrate
+ );
+ XAresult (*IsVibrating) (
+ XAVibraItf self,
+ XAboolean * pVibrating
+ );
+ XAresult (*SetFrequency) (
+ XAVibraItf self,
+ XAmilliHertz frequency
+ );
+ XAresult (*GetFrequency) (
+ XAVibraItf self,
+ XAmilliHertz * pFrequency
+ );
+ XAresult (*SetIntensity) (
+ XAVibraItf self,
+ XApermille intensity
+ );
+ XAresult (*GetIntensity) (
+ XAVibraItf self,
+ XApermille * pIntensity
+ );
+};
+
+/* LED ARRAY */
+
+typedef struct XAHSL_ {
+ XAmillidegree hue;
+ XApermille saturation;
+ XApermille lightness;
+} XAHSL;
+
+XA_API extern const XAInterfaceID XA_IID_LED;
+
+struct XALEDArrayItf_;
+typedef const struct XALEDArrayItf_ * const * XALEDArrayItf;
+
+struct XALEDArrayItf_ {
+ XAresult (*ActivateLEDArray) (
+ XALEDArrayItf self,
+ XAuint32 lightMask
+ );
+ XAresult (*IsLEDArrayActivated) (
+ XALEDArrayItf self,
+ XAuint32 * pLightMask
+ );
+ XAresult (*SetColor) (
+ XALEDArrayItf self,
+ XAuint8 index,
+ const XAHSL * pColor
+ );
+ XAresult (*GetColor) (
+ XALEDArrayItf self,
+ XAuint8 index,
+ XAHSL * pColor
+ );
+};
+
+
+
+ /*****************************************************************/
+ /* CODEC RELATED INTERFACES, STRUCTS AND DEFINES */
+ /*****************************************************************/
+
+/* AUDIO ENCODER AND AUDIO ENCODER/DECODER CAPABILITIES */
+
+#define XA_RATECONTROLMODE_CONSTANTBITRATE ((XAuint32) 0x00000001)
+#define XA_RATECONTROLMODE_VARIABLEBITRATE ((XAuint32) 0x00000002)
+
+#define XA_AUDIOCODEC_PCM ((XAuint32) 0x00000001)
+#define XA_AUDIOCODEC_MP3 ((XAuint32) 0x00000002)
+#define XA_AUDIOCODEC_AMR ((XAuint32) 0x00000003)
+#define XA_AUDIOCODEC_AMRWB ((XAuint32) 0x00000004)
+#define XA_AUDIOCODEC_AMRWBPLUS ((XAuint32) 0x00000005)
+#define XA_AUDIOCODEC_AAC ((XAuint32) 0x00000006)
+#define XA_AUDIOCODEC_WMA ((XAuint32) 0x00000007)
+#define XA_AUDIOCODEC_REAL ((XAuint32) 0x00000008)
+#define XA_AUDIOCODEC_VORBIS ((XAuint32) 0x00000009)
+
+#define XA_AUDIOPROFILE_PCM ((XAuint32) 0x00000001)
+
+#define XA_AUDIOPROFILE_MPEG1_L3 ((XAuint32) 0x00000001)
+#define XA_AUDIOPROFILE_MPEG2_L3 ((XAuint32) 0x00000002)
+#define XA_AUDIOPROFILE_MPEG25_L3 ((XAuint32) 0x00000003)
+
+#define XA_AUDIOCHANMODE_MP3_MONO ((XAuint32) 0x00000001)
+#define XA_AUDIOCHANMODE_MP3_STEREO ((XAuint32) 0x00000002)
+#define XA_AUDIOCHANMODE_MP3_JOINTSTEREO ((XAuint32) 0x00000003)
+#define XA_AUDIOCHANMODE_MP3_DUAL ((XAuint32) 0x00000004)
+
+#define XA_AUDIOPROFILE_AMR ((XAuint32) 0x00000001)
+
+#define XA_AUDIOSTREAMFORMAT_CONFORMANCE ((XAuint32) 0x00000001)
+#define XA_AUDIOSTREAMFORMAT_IF1 ((XAuint32) 0x00000002)
+#define XA_AUDIOSTREAMFORMAT_IF2 ((XAuint32) 0x00000003)
+#define XA_AUDIOSTREAMFORMAT_FSF ((XAuint32) 0x00000004)
+#define XA_AUDIOSTREAMFORMAT_RTPPAYLOAD ((XAuint32) 0x00000005)
+#define XA_AUDIOSTREAMFORMAT_ITU ((XAuint32) 0x00000006)
+
+#define XA_AUDIOPROFILE_AMRWB ((XAuint32) 0x00000001)
+
+#define XA_AUDIOPROFILE_AMRWBPLUS ((XAuint32) 0x00000001)
+
+#define XA_AUDIOPROFILE_AAC_AAC ((XAuint32) 0x00000001)
+
+#define XA_AUDIOMODE_AAC_MAIN ((XAuint32) 0x00000001)
+#define XA_AUDIOMODE_AAC_LC ((XAuint32) 0x00000002)
+#define XA_AUDIOMODE_AAC_SSR ((XAuint32) 0x00000003)
+#define XA_AUDIOMODE_AAC_LTP ((XAuint32) 0x00000004)
+#define XA_AUDIOMODE_AAC_HE ((XAuint32) 0x00000005)
+#define XA_AUDIOMODE_AAC_SCALABLE ((XAuint32) 0x00000006)
+#define XA_AUDIOMODE_AAC_ERLC ((XAuint32) 0x00000007)
+#define XA_AUDIOMODE_AAC_LD ((XAuint32) 0x00000008)
+#define XA_AUDIOMODE_AAC_HE_PS ((XAuint32) 0x00000009)
+#define XA_AUDIOMODE_AAC_HE_MPS ((XAuint32) 0x0000000A)
+
+#define XA_AUDIOSTREAMFORMAT_MP2ADTS ((XAuint32) 0x00000001)
+#define XA_AUDIOSTREAMFORMAT_MP4ADTS ((XAuint32) 0x00000002)
+#define XA_AUDIOSTREAMFORMAT_MP4LOAS ((XAuint32) 0x00000003)
+#define XA_AUDIOSTREAMFORMAT_MP4LATM ((XAuint32) 0x00000004)
+#define XA_AUDIOSTREAMFORMAT_ADIF ((XAuint32) 0x00000005)
+#define XA_AUDIOSTREAMFORMAT_MP4FF ((XAuint32) 0x00000006)
+#define XA_AUDIOSTREAMFORMAT_RAW ((XAuint32) 0x00000007)
+
+#define XA_AUDIOPROFILE_WMA7 ((XAuint32) 0x00000001)
+#define XA_AUDIOPROFILE_WMA8 ((XAuint32) 0x00000002)
+#define XA_AUDIOPROFILE_WMA9 ((XAuint32) 0x00000003)
+#define XA_AUDIOPROFILE_WMA10 ((XAuint32) 0x00000004)
+
+#define XA_AUDIOMODE_WMA_LEVEL1 ((XAuint32) 0x00000001)
+#define XA_AUDIOMODE_WMA_LEVEL2 ((XAuint32) 0x00000002)
+#define XA_AUDIOMODE_WMA_LEVEL3 ((XAuint32) 0x00000003)
+#define XA_AUDIOMODE_WMA_LEVEL4 ((XAuint32) 0x00000004)
+#define XA_AUDIOMODE_WMAPRO_LEVELM0 ((XAuint32) 0x00000005)
+#define XA_AUDIOMODE_WMAPRO_LEVELM1 ((XAuint32) 0x00000006)
+#define XA_AUDIOMODE_WMAPRO_LEVELM2 ((XAuint32) 0x00000007)
+#define XA_AUDIOMODE_WMAPRO_LEVELM3 ((XAuint32) 0x00000008)
+
+#define XA_AUDIOPROFILE_REALAUDIO ((XAuint32) 0x00000001)
+
+#define XA_AUDIOMODE_REALAUDIO_G2 ((XAuint32) 0x00000001)
+#define XA_AUDIOMODE_REALAUDIO_8 ((XAuint32) 0x00000002)
+#define XA_AUDIOMODE_REALAUDIO_10 ((XAuint32) 0x00000003)
+#define XA_AUDIOMODE_REALAUDIO_SURROUND ((XAuint32) 0x00000004)
+
+#define XA_AUDIOPROFILE_VORBIS ((XAuint32) 0x00000001)
+
+#define XA_AUDIOMODE_VORBIS ((XAuint32) 0x00000001)
+
+
+typedef struct XAAudioCodecDescriptor_ {
+ XAuint32 maxChannels;
+ XAuint32 minBitsPerSample;
+ XAuint32 maxBitsPerSample;
+ XAmilliHertz minSampleRate;
+ XAmilliHertz maxSampleRate;
+ XAboolean isFreqRangeContinuous;
+ XAmilliHertz * pSampleRatesSupported;
+ XAuint32 numSampleRatesSupported;
+ XAuint32 minBitRate;
+ XAuint32 maxBitRate;
+ XAboolean isBitrateRangeContinuous;
+ XAuint32 * pBitratesSupported;
+ XAuint32 numBitratesSupported;
+ XAuint32 profileSetting;
+ XAuint32 modeSetting;
+} XAAudioCodecDescriptor;
+
+typedef struct XAAudioEncoderSettings_ {
+ XAuint32 encoderId;
+ XAuint32 channelsIn;
+ XAuint32 channelsOut;
+ XAmilliHertz sampleRate;
+ XAuint32 bitRate;
+ XAuint32 bitsPerSample;
+ XAuint32 rateControl;
+ XAuint32 profileSetting;
+ XAuint32 levelSetting;
+ XAuint32 channelMode;
+ XAuint32 streamFormat;
+ XAuint32 encodeOptions;
+ XAuint32 blockAlignment;
+} XAAudioEncoderSettings;
+
+XA_API extern const XAInterfaceID XA_IID_AUDIODECODERCAPABILITIES;
+
+struct XAAudioDecoderCapabilitiesItf_;
+typedef const struct XAAudioDecoderCapabilitiesItf_
+ * const * XAAudioDecoderCapabilitiesItf;
+
+struct XAAudioDecoderCapabilitiesItf_ {
+ XAresult (*GetAudioDecoders) (
+ XAAudioDecoderCapabilitiesItf self,
+ XAuint32 * pNumDecoders,
+ XAuint32 * pDecoderIds
+ );
+ XAresult (*GetAudioDecoderCapabilities) (
+ XAAudioDecoderCapabilitiesItf self,
+ XAuint32 decoderId,
+ XAuint32 * pIndex,
+ XAAudioCodecDescriptor * pDescriptor
+ );
+};
+
+XA_API extern const XAInterfaceID XA_IID_AUDIOENCODER;
+
+struct XAAudioEncoderItf_;
+typedef const struct XAAudioEncoderItf_ * const * XAAudioEncoderItf;
+
+struct XAAudioEncoderItf_ {
+ XAresult (*SetEncoderSettings) (
+ XAAudioEncoderItf self,
+ XAAudioEncoderSettings * pSettings
+ );
+ XAresult (*GetEncoderSettings) (
+ XAAudioEncoderItf self,
+ XAAudioEncoderSettings * pSettings
+ );
+};
+
+XA_API extern const XAInterfaceID XA_IID_AUDIOENCODERCAPABILITIES;
+
+struct XAAudioEncoderCapabilitiesItf_;
+typedef const struct XAAudioEncoderCapabilitiesItf_
+ * const * XAAudioEncoderCapabilitiesItf;
+
+struct XAAudioEncoderCapabilitiesItf_ {
+ XAresult (*GetAudioEncoders) (
+ XAAudioEncoderCapabilitiesItf self,
+ XAuint32 * pNumEncoders,
+ XAuint32 * pEncoderIds
+ );
+ XAresult (*GetAudioEncoderCapabilities) (
+ XAAudioEncoderCapabilitiesItf self,
+ XAuint32 encoderId,
+ XAuint32 * pIndex,
+ XAAudioCodecDescriptor * pDescriptor
+ );
+};
+
+/* IMAGE ENCODER AND IMAGE ENCODER/DECODER CAPABILITIES */
+
+#define XA_IMAGECODEC_JPEG ((XAuint32) 0x00000001)
+#define XA_IMAGECODEC_GIF ((XAuint32) 0x00000002)
+#define XA_IMAGECODEC_BMP ((XAuint32) 0x00000003)
+#define XA_IMAGECODEC_PNG ((XAuint32) 0x00000004)
+#define XA_IMAGECODEC_TIFF ((XAuint32) 0x00000005)
+#define XA_IMAGECODEC_RAW ((XAuint32) 0x00000006)
+
+typedef struct XAImageCodecDescriptor_ {
+ XAuint32 codecId;
+ XAuint32 maxWidth;
+ XAuint32 maxHeight;
+} XAImageCodecDescriptor;
+
+typedef struct XAImageSettings_ {
+ XAuint32 encoderId;
+ XAuint32 width;
+ XAuint32 height;
+ XApermille compressionLevel;
+ XAuint32 colorFormat;
+} XAImageSettings;
+
+XA_API extern const XAInterfaceID XA_IID_IMAGEENCODERCAPABILITIES;
+
+struct XAImageEncoderCapabilitiesItf_;
+typedef const struct XAImageEncoderCapabilitiesItf_
+ * const * XAImageEncoderCapabilitiesItf;
+
+struct XAImageEncoderCapabilitiesItf_ {
+ XAresult (*GetImageEncoderCapabilities) (
+ XAImageEncoderCapabilitiesItf self,
+ XAuint32 * pEncoderId,
+ XAImageCodecDescriptor * pDescriptor
+ );
+ XAresult (*QueryColorFormats) (
+ const XAImageEncoderCapabilitiesItf self,
+ XAuint32 * pIndex,
+ XAuint32 * pColorFormat
+ );
+};
+
+XA_API extern const XAInterfaceID XA_IID_IMAGEDECODERCAPABILITIES;
+
+struct XAImageDecoderCapabilitiesItf_;
+typedef const struct XAImageDecoderCapabilitiesItf_
+ * const * XAImageDecoderCapabilitiesItf;
+
+struct XAImageDecoderCapabilitiesItf_ {
+ XAresult (*GetImageDecoderCapabilities) (
+ XAImageDecoderCapabilitiesItf self,
+ XAuint32 * pDecoderId,
+ XAImageCodecDescriptor * pDescriptor
+ );
+ XAresult (*QueryColorFormats) (
+ const XAImageDecoderCapabilitiesItf self,
+ XAuint32 * pIndex,
+ XAuint32 * pColorFormat
+ );
+};
+
+XA_API extern const XAInterfaceID XA_IID_IMAGEENCODER;
+
+struct XAImageEncoderItf_;
+typedef const struct XAImageEncoderItf_ * const * XAImageEncoderItf;
+
+struct XAImageEncoderItf_ {
+ XAresult (*SetImageSettings) (
+ XAImageEncoderItf self,
+ const XAImageSettings * pSettings
+ );
+ XAresult (*GetImageSettings) (
+ XAImageEncoderItf self,
+ XAImageSettings * pSettings
+ );
+ XAresult (*GetSizeEstimate) (
+ XAImageEncoderItf self,
+ XAuint32 * pSize
+ );
+};
+
+/* VIDEO ENCODER AND VIDEO ENCODER/DECODER CAPABILITIES */
+
+#define XA_VIDEOCODEC_MPEG2 ((XAuint32) 0x00000001)
+#define XA_VIDEOCODEC_H263 ((XAuint32) 0x00000002)
+#define XA_VIDEOCODEC_MPEG4 ((XAuint32) 0x00000003)
+#define XA_VIDEOCODEC_AVC ((XAuint32) 0x00000004)
+#define XA_VIDEOCODEC_VC1 ((XAuint32) 0x00000005)
+
+#define XA_VIDEOPROFILE_MPEG2_SIMPLE ((XAuint32) 0x00000001)
+#define XA_VIDEOPROFILE_MPEG2_MAIN ((XAuint32) 0x00000002)
+#define XA_VIDEOPROFILE_MPEG2_422 ((XAuint32) 0x00000003)
+#define XA_VIDEOPROFILE_MPEG2_SNR ((XAuint32) 0x00000004)
+#define XA_VIDEOPROFILE_MPEG2_SPATIAL ((XAuint32) 0x00000005)
+#define XA_VIDEOPROFILE_MPEG2_HIGH ((XAuint32) 0x00000006)
+
+#define XA_VIDEOLEVEL_MPEG2_LL ((XAuint32) 0x00000001)
+#define XA_VIDEOLEVEL_MPEG2_ML ((XAuint32) 0x00000002)
+#define XA_VIDEOLEVEL_MPEG2_H14 ((XAuint32) 0x00000003)
+#define XA_VIDEOLEVEL_MPEG2_HL ((XAuint32) 0x00000004)
+
+#define XA_VIDEOPROFILE_H263_BASELINE ((XAuint32) 0x00000001)
+#define XA_VIDEOPROFILE_H263_H320CODING ((XAuint32) 0x00000002)
+#define XA_VIDEOPROFILE_H263_BACKWARDCOMPATIBLE ((XAuint32) 0x00000003)
+#define XA_VIDEOPROFILE_H263_ISWV2 ((XAuint32) 0x00000004)
+#define XA_VIDEOPROFILE_H263_ISWV3 ((XAuint32) 0x00000005)
+#define XA_VIDEOPROFILE_H263_HIGHCOMPRESSION ((XAuint32) 0x00000006)
+#define XA_VIDEOPROFILE_H263_INTERNET ((XAuint32) 0x00000007)
+#define XA_VIDEOPROFILE_H263_INTERLACE ((XAuint32) 0x00000008)
+#define XA_VIDEOPROFILE_H263_HIGHLATENCY ((XAuint32) 0x00000009)
+
+#define XA_VIDEOLEVEL_H263_10 ((XAuint32) 0x00000001)
+#define XA_VIDEOLEVEL_H263_20 ((XAuint32) 0x00000002)
+#define XA_VIDEOLEVEL_H263_30 ((XAuint32) 0x00000003)
+#define XA_VIDEOLEVEL_H263_40 ((XAuint32) 0x00000004)
+#define XA_VIDEOLEVEL_H263_45 ((XAuint32) 0x00000005)
+#define XA_VIDEOLEVEL_H263_50 ((XAuint32) 0x00000006)
+#define XA_VIDEOLEVEL_H263_60 ((XAuint32) 0x00000007)
+#define XA_VIDEOLEVEL_H263_70 ((XAuint32) 0x00000008)
+
+#define XA_VIDEOPROFILE_MPEG4_SIMPLE ((XAuint32) 0x00000001)
+#define XA_VIDEOPROFILE_MPEG4_SIMPLESCALABLE ((XAuint32) 0x00000002)
+#define XA_VIDEOPROFILE_MPEG4_CORE ((XAuint32) 0x00000003)
+#define XA_VIDEOPROFILE_MPEG4_MAIN ((XAuint32) 0x00000004)
+#define XA_VIDEOPROFILE_MPEG4_NBIT ((XAuint32) 0x00000005)
+#define XA_VIDEOPROFILE_MPEG4_SCALABLETEXTURE ((XAuint32) 0x00000006)
+#define XA_VIDEOPROFILE_MPEG4_SIMPLEFACE ((XAuint32) 0x00000007)
+#define XA_VIDEOPROFILE_MPEG4_SIMPLEFBA ((XAuint32) 0x00000008)
+#define XA_VIDEOPROFILE_MPEG4_BASICANIMATED ((XAuint32) 0x00000009)
+#define XA_VIDEOPROFILE_MPEG4_HYBRID ((XAuint32) 0x0000000A)
+#define XA_VIDEOPROFILE_MPEG4_ADVANCEDREALTIME ((XAuint32) 0x0000000B)
+#define XA_VIDEOPROFILE_MPEG4_CORESCALABLE ((XAuint32) 0x0000000C)
+#define XA_VIDEOPROFILE_MPEG4_ADVANCEDCODING ((XAuint32) 0x0000000D)
+#define XA_VIDEOPROFILE_MPEG4_ADVANCEDCORE ((XAuint32) 0x0000000E)
+#define XA_VIDEOPROFILE_MPEG4_ADVANCEDSCALABLE ((XAuint32) 0x0000000F)
+
+#define XA_VIDEOLEVEL_MPEG4_0 ((XAuint32) 0x00000001)
+#define XA_VIDEOLEVEL_MPEG4_0b ((XAuint32) 0x00000002)
+#define XA_VIDEOLEVEL_MPEG4_1 ((XAuint32) 0x00000003)
+#define XA_VIDEOLEVEL_MPEG4_2 ((XAuint32) 0x00000004)
+#define XA_VIDEOLEVEL_MPEG4_3 ((XAuint32) 0x00000005)
+#define XA_VIDEOLEVEL_MPEG4_4 ((XAuint32) 0x00000006)
+#define XA_VIDEOLEVEL_MPEG4_4a ((XAuint32) 0x00000007)
+#define XA_VIDEOLEVEL_MPEG4_5 ((XAuint32) 0x00000008)
+
+#define XA_VIDEOPROFILE_AVC_BASELINE ((XAuint32) 0x00000001)
+#define XA_VIDEOPROFILE_AVC_MAIN ((XAuint32) 0x00000002)
+#define XA_VIDEOPROFILE_AVC_EXTENDED ((XAuint32) 0x00000003)
+#define XA_VIDEOPROFILE_AVC_HIGH ((XAuint32) 0x00000004)
+#define XA_VIDEOPROFILE_AVC_HIGH10 ((XAuint32) 0x00000005)
+#define XA_VIDEOPROFILE_AVC_HIGH422 ((XAuint32) 0x00000006)
+#define XA_VIDEOPROFILE_AVC_HIGH444 ((XAuint32) 0x00000007)
+
+#define XA_VIDEOLEVEL_AVC_1 ((XAuint32) 0x00000001)
+#define XA_VIDEOLEVEL_AVC_1B ((XAuint32) 0x00000002)
+#define XA_VIDEOLEVEL_AVC_11 ((XAuint32) 0x00000003)
+#define XA_VIDEOLEVEL_AVC_12 ((XAuint32) 0x00000004)
+#define XA_VIDEOLEVEL_AVC_13 ((XAuint32) 0x00000005)
+#define XA_VIDEOLEVEL_AVC_2 ((XAuint32) 0x00000006)
+#define XA_VIDEOLEVEL_AVC_21 ((XAuint32) 0x00000007)
+#define XA_VIDEOLEVEL_AVC_22 ((XAuint32) 0x00000008)
+#define XA_VIDEOLEVEL_AVC_3 ((XAuint32) 0x00000009)
+#define XA_VIDEOLEVEL_AVC_31 ((XAuint32) 0x0000000A)
+#define XA_VIDEOLEVEL_AVC_32 ((XAuint32) 0x0000000B)
+#define XA_VIDEOLEVEL_AVC_4 ((XAuint32) 0x0000000C)
+#define XA_VIDEOLEVEL_AVC_41 ((XAuint32) 0x0000000D)
+#define XA_VIDEOLEVEL_AVC_42 ((XAuint32) 0x0000000E)
+#define XA_VIDEOLEVEL_AVC_5 ((XAuint32) 0x0000000F)
+#define XA_VIDEOLEVEL_AVC_51 ((XAuint32) 0x00000010)
+
+#define XA_VIDEOLEVEL_VC1_SIMPLE ((XAuint32) 0x00000001)
+#define XA_VIDEOLEVEL_VC1_MAIN ((XAuint32) 0x00000002)
+#define XA_VIDEOLEVEL_VC1_ADVANCED ((XAuint32) 0x00000003)
+
+#define XA_VIDEOLEVEL_VC1_LOW ((XAuint32) 0x00000001)
+#define XA_VIDEOLEVEL_VC1_MEDIUM ((XAuint32) 0x00000002)
+#define XA_VIDEOLEVEL_VC1_HIGH ((XAuint32) 0x00000003)
+#define XA_VIDEOLEVEL_VC1_L0 ((XAuint32) 0x00000004)
+#define XA_VIDEOLEVEL_VC1_L1 ((XAuint32) 0x00000005)
+#define XA_VIDEOLEVEL_VC1_L2 ((XAuint32) 0x00000006)
+#define XA_VIDEOLEVEL_VC1_L3 ((XAuint32) 0x00000007)
+#define XA_VIDEOLEVEL_VC1_L4 ((XAuint32) 0x00000008)
+
+typedef struct XAVideoCodecDescriptor_ {
+ XAuint32 codecId;
+ XAuint32 maxWidth;
+ XAuint32 maxHeight;
+ XAuint32 maxFrameRate;
+ XAuint32 maxBitRate;
+ XAuint32 rateControlSupported;
+ XAuint32 profileSetting;
+ XAuint32 levelSetting;
+} XAVideoCodecDescriptor;
+
+typedef struct XAVideoSettings_ {
+ XAuint32 encoderId;
+ XAuint32 width;
+ XAuint32 height;
+ XAuint32 frameRate;
+ XAuint32 bitRate;
+ XAuint32 rateControl;
+ XAuint32 profileSetting;
+ XAuint32 levelSetting;
+ XAuint32 keyFrameInterval;
+} XAVideoSettings;
+
+XA_API extern const XAInterfaceID XA_IID_VIDEODECODERCAPABILITIES;
+
+struct XAVideoDecoderCapabilitiesItf_;
+typedef const struct XAVideoDecoderCapabilitiesItf_
+ * const * XAVideoDecoderCapabilitiesItf;
+
+struct XAVideoDecoderCapabilitiesItf_ {
+ XAresult (*GetVideoDecoders) (
+ XAVideoDecoderCapabilitiesItf self,
+ XAuint32 * pNumDecoders,
+ XAuint32 * pDecoderIds
+ );
+ XAresult (*GetVideoDecoderCapabilities) (
+ XAVideoDecoderCapabilitiesItf self,
+ XAuint32 decoderId,
+ XAuint32 * pIndex,
+ XAVideoCodecDescriptor * pDescriptor
+ );
+};
+
+XA_API extern const XAInterfaceID XA_IID_VIDEOENCODER;
+
+XA_API extern const XAInterfaceID XA_IID_VIDEOENCODERCAPABILITIES;
+
+struct XAVideoEncoderCapabilitiesItf_;
+typedef const struct XAVideoEncoderCapabilitiesItf_
+ * const * XAVideoEncoderCapabilitiesItf;
+
+struct XAVideoEncoderCapabilitiesItf_ {
+ XAresult (*GetVideoEncoders) (
+ XAVideoEncoderCapabilitiesItf self,
+ XAuint32 * pNumEncoders,
+ XAuint32 * pEncoderIds
+ );
+ XAresult (*GetVideoEncoderCapabilities) (
+ XAVideoEncoderCapabilitiesItf self,
+ XAuint32 encoderId,
+ XAuint32 * pIndex,
+ XAVideoCodecDescriptor * pDescriptor
+ );
+};
+
+struct XAVideoEncoderItf_;
+typedef const struct XAVideoEncoderItf_ * const * XAVideoEncoderItf;
+
+struct XAVideoEncoderItf_ {
+ XAresult (*SetVideoSettings) (
+ XAVideoEncoderItf self,
+ XAVideoSettings * pSettings
+ );
+ XAresult (*GetVideoSettings) (
+ XAVideoEncoderItf self,
+ XAVideoSettings * pSettings
+ );
+};
+
+/* STREAM INFORMATION */
+
+#define XA_DOMAINTYPE_AUDIO 0x00000001
+#define XA_DOMAINTYPE_VIDEO 0x00000002
+#define XA_DOMAINTYPE_IMAGE 0x00000003
+#define XA_DOMAINTYPE_TIMEDTEXT 0x00000004
+#define XA_DOMAINTYPE_MIDI 0x00000005
+#define XA_DOMAINTYPE_VENDOR 0xFFFFFFFE
+#define XA_DOMAINTYPE_UNKNOWN 0xFFFFFFFF
+
+#define XA_MIDIBANK_DEVICE 0x00000001
+#define XA_MIDIBANK_CUSTOM 0x00000002
+
+#define XA_MIDI_UNKNOWN 0xFFFFFFFF
+
+#define XA_STREAMCBEVENT_PROPERTYCHANGE ((XAuint32) 0x00000001)
+
+typedef struct XAMediaContainerInformation_ {
+ XAuint32 containerType;
+ XAmillisecond mediaDuration;
+ XAuint32 numStreams;
+} XAMediaContainerInformation;
+
+typedef struct XAVideoStreamInformation_ {
+ XAuint32 codecId;
+ XAuint32 width;
+ XAuint32 height;
+ XAuint32 frameRate;
+ XAuint32 bitRate;
+ XAmillisecond duration;
+} XAVideoStreamInformation;
+
+typedef struct XAAudioStreamInformation_ {
+ XAuint32 codecId;
+ XAuint32 channels;
+ XAmilliHertz sampleRate;
+ XAuint32 bitRate;
+ XAchar langCountry[16];
+ XAmillisecond duration;
+} XAAudioStreamInformation;
+
+typedef struct XAImageStreamInformation_ {
+ XAuint32 codecId;
+ XAuint32 width;
+ XAuint32 height;
+ XAmillisecond presentationDuration;
+} XAImageStreamInformation;
+
+typedef struct XATimedTextStreamInformation_ {
+ XAuint16 layer;
+ XAuint32 width;
+ XAuint32 height;
+ XAuint16 tx;
+ XAuint16 ty;
+ XAuint32 bitrate;
+ XAchar langCountry[16];
+ XAmillisecond duration;
+} XATimedTextStreamInformation;
+
+typedef struct XAMIDIStreamInformation_ {
+ XAuint32 channels;
+ XAuint32 tracks;
+ XAuint32 bankType;
+ XAchar langCountry[16];
+ XAmillisecond duration;
+} XAMIDIStreamInformation;
+
+typedef struct XAVendorStreamInformation_ {
+ void *VendorStreamInfo;
+} XAVendorStreamInformation;
+
+XA_API extern const XAInterfaceID XA_IID_STREAMINFORMATION;
+
+struct XAStreamInformationItf_;
+typedef const struct XAStreamInformationItf_ * const * XAStreamInformationItf;
+
+typedef void (XAAPIENTRY * xaStreamEventChangeCallback) (
+ XAStreamInformationItf caller,
+ XAuint32 eventId,
+ XAuint32 streamIndex,
+ void * pEventData,
+ void * pContext
+);
+
+struct XAStreamInformationItf_ {
+ XAresult (*QueryMediaContainerInformation) (
+ XAStreamInformationItf self,
+ XAMediaContainerInformation * info
+ );
+ XAresult (*QueryStreamType) (
+ XAStreamInformationItf self,
+ XAuint32 streamIndex,
+ XAuint32 *domain
+ );
+ XAresult (*QueryStreamInformation) (
+ XAStreamInformationItf self,
+ XAuint32 streamIndex,
+ void * info
+ );
+ XAresult (*QueryStreamName) (
+ XAStreamInformationItf self,
+ XAuint32 streamIndex,
+ XAuint16 * pNameSize,
+ XAchar * pName
+ );
+ XAresult (*RegisterStreamChangeCallback) (
+ XAStreamInformationItf self,
+ xaStreamEventChangeCallback callback,
+ void * pContext
+ );
+ XAresult (*QueryActiveStreams) (
+ XAStreamInformationItf self,
+ XAuint32 *numStreams,
+ XAboolean *activeStreams
+ );
+ XAresult (*SetActiveStream) (
+ XAStreamInformationItf self,
+ XAuint32 streamNum,
+ XAboolean active,
+ XAboolean commitNow
+ );
+};
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* _OPENMAXAL_H_ */
diff --git a/ndk/platforms/android-14/include/OMXAL/OpenMAXAL_Android.h b/ndk/platforms/android-14/include/OMXAL/OpenMAXAL_Android.h
new file mode 100644
index 0000000..10f36f4
--- /dev/null
+++ b/ndk/platforms/android-14/include/OMXAL/OpenMAXAL_Android.h
@@ -0,0 +1,171 @@
+/*
+ * 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 OPENMAX_AL_ANDROID_H_
+#define OPENMAX_AL_ANDROID_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*---------------------------------------------------------------------------*/
+/* Android common types */
+/*---------------------------------------------------------------------------*/
+
+typedef xa_int64_t XAAint64; /* 64 bit signed integer */
+
+typedef xa_uint64_t XAAuint64; /* 64 bit unsigned integer */
+
+/*---------------------------------------------------------------------------*/
+/* Android common types */
+/*---------------------------------------------------------------------------*/
+
+#define XA_ANDROID_VIDEOCODEC_VP8 ((XAuint32) 0x00000006)
+
+#define XA_ANDROID_VIDEOPROFILE_VP8_MAIN ((XAuint32) 0x00000001)
+
+#define XA_ANDROID_VIDEOLEVEL_VP8_VERSION0 ((XAuint32) 0x00000001)
+#define XA_ANDROID_VIDEOLEVEL_VP8_VERSION1 ((XAuint32) 0x00000002)
+#define XA_ANDROID_VIDEOLEVEL_VP8_VERSION2 ((XAuint32) 0x00000003)
+#define XA_ANDROID_VIDEOLEVEL_VP8_VERSION3 ((XAuint32) 0x00000004)
+
+/*---------------------------------------------------------------------------*/
+/* Android Buffer Queue Interface */
+/*---------------------------------------------------------------------------*/
+
+extern XA_API const XAInterfaceID XA_IID_ANDROIDBUFFERQUEUESOURCE;
+
+struct XAAndroidBufferQueueItf_;
+typedef const struct XAAndroidBufferQueueItf_ * const * XAAndroidBufferQueueItf;
+
+#define XA_ANDROID_ITEMKEY_NONE ((XAuint32) 0x00000000)
+#define XA_ANDROID_ITEMKEY_EOS ((XAuint32) 0x00000001)
+#define XA_ANDROID_ITEMKEY_DISCONTINUITY ((XAuint32) 0x00000002)
+#define XA_ANDROID_ITEMKEY_BUFFERQUEUEEVENT ((XAuint32) 0x00000003)
+#define XA_ANDROID_ITEMKEY_FORMAT_CHANGE ((XAuint32) 0x00000004)
+
+#define XA_ANDROIDBUFFERQUEUEEVENT_NONE ((XAuint32) 0x00000000)
+#define XA_ANDROIDBUFFERQUEUEEVENT_PROCESSED ((XAuint32) 0x00000001)
+#if 0 // reserved for future use
+#define XA_ANDROIDBUFFERQUEUEEVENT_UNREALIZED ((XAuint32) 0x00000002)
+#define XA_ANDROIDBUFFERQUEUEEVENT_CLEARED ((XAuint32) 0x00000004)
+#define XA_ANDROIDBUFFERQUEUEEVENT_STOPPED ((XAuint32) 0x00000008)
+#define XA_ANDROIDBUFFERQUEUEEVENT_ERROR ((XAuint32) 0x00000010)
+#define XA_ANDROIDBUFFERQUEUEEVENT_CONTENT_END ((XAuint32) 0x00000020)
+#endif
+
+typedef struct XAAndroidBufferItem_ {
+ XAuint32 itemKey; // identifies the item
+ XAuint32 itemSize;
+ XAuint8 itemData[0];
+} XAAndroidBufferItem;
+
+typedef XAresult (XAAPIENTRY *xaAndroidBufferQueueCallback)(
+ XAAndroidBufferQueueItf caller,/* input */
+ void *pCallbackContext, /* input */
+ void *pBufferContext, /* input */
+ void *pBufferData, /* input */
+ XAuint32 dataSize, /* input */
+ XAuint32 dataUsed, /* input */
+ const XAAndroidBufferItem *pItems,/* input */
+ XAuint32 itemsLength /* input */
+);
+
+typedef struct XAAndroidBufferQueueState_ {
+ XAuint32 count;
+ XAuint32 index;
+} XAAndroidBufferQueueState;
+
+struct XAAndroidBufferQueueItf_ {
+ XAresult (*RegisterCallback) (
+ XAAndroidBufferQueueItf self,
+ xaAndroidBufferQueueCallback callback,
+ void* pCallbackContext
+ );
+
+ XAresult (*Clear) (
+ XAAndroidBufferQueueItf self
+ );
+
+ XAresult (*Enqueue) (
+ XAAndroidBufferQueueItf self,
+ void *pBufferContext,
+ void *pData,
+ XAuint32 dataLength,
+ const XAAndroidBufferItem *pItems,
+ XAuint32 itemsLength
+ );
+
+ XAresult (*GetState) (
+ XAAndroidBufferQueueItf self,
+ XAAndroidBufferQueueState *pState
+ );
+
+
+ XAresult (*SetCallbackEventsMask) (
+ XAAndroidBufferQueueItf self,
+ XAuint32 eventFlags
+ );
+
+ XAresult (*GetCallbackEventsMask) (
+ XAAndroidBufferQueueItf self,
+ XAuint32 *pEventFlags
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Android Buffer Queue Data Locator */
+/*---------------------------------------------------------------------------*/
+
+/** Addendum to Data locator macros */
+#define XA_DATALOCATOR_ANDROIDBUFFERQUEUE ((XAuint32) 0x800007BE)
+
+/** Android Buffer Queue-based data locator definition,
+ * locatorType must be XA_DATALOCATOR_ANDROIDBUFFERQUEUE */
+typedef struct XADataLocator_AndroidBufferQueue_ {
+ XAuint32 locatorType;
+ XAuint32 numBuffers;
+} XADataLocator_AndroidBufferQueue;
+
+
+/*---------------------------------------------------------------------------*/
+/* Android File Descriptor Data Locator */
+/*---------------------------------------------------------------------------*/
+
+/** Addendum to Data locator macros */
+#define XA_DATALOCATOR_ANDROIDFD ((XAuint32) 0x800007BC)
+
+#define XA_DATALOCATOR_ANDROIDFD_USE_FILE_SIZE ((XAAint64) 0xFFFFFFFFFFFFFFFFll)
+
+/** File Descriptor-based data locator definition, locatorType must be XA_DATALOCATOR_ANDROIDFD */
+typedef struct XADataLocator_AndroidFD_ {
+ XAuint32 locatorType;
+ XAint32 fd;
+ XAAint64 offset;
+ XAAint64 length;
+} XADataLocator_AndroidFD;
+
+/**
+ * MIME types required for data in Android Buffer Queues
+ */
+#define XA_ANDROID_MIME_MP2TS ((XAchar *) "video/mp2ts")
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* OPENMAX_AL_ANDROID_H_ */
diff --git a/ndk/platforms/android-14/include/OMXAL/OpenMAXAL_Platform.h b/ndk/platforms/android-14/include/OMXAL/OpenMAXAL_Platform.h
new file mode 100644
index 0000000..23be77e
--- /dev/null
+++ b/ndk/platforms/android-14/include/OMXAL/OpenMAXAL_Platform.h
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2007-2010 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.
+ *
+ * OpenMAXAL_Platform.h - OpenMAX AL version 1.0.1
+ *
+ */
+
+/****************************************************************************/
+/* NOTE: This file contains definitions for the base types and the */
+/* XAAPIENTRY macro. This file **WILL NEED TO BE EDITED** to provide */
+/* the correct definitions specific to the platform being used. */
+/****************************************************************************/
+
+#ifndef _OPENMAXAL_PLATFORM_H_
+#define _OPENMAXAL_PLATFORM_H_
+
+typedef unsigned char xa_uint8_t;
+typedef signed char xa_int8_t;
+typedef unsigned short xa_uint16_t;
+typedef signed short xa_int16_t;
+typedef unsigned int /*long*/ xa_uint32_t;
+typedef signed int /*long*/ xa_int32_t;
+typedef long long xa_int64_t;
+typedef unsigned long long xa_uint64_t;
+
+#ifndef XAAPIENTRY
+#define XAAPIENTRY /* override per-platform */
+#endif
+
+/** The XA_API is a platform-specific macro used
+ * to declare OPENMAX AL function prototypes. It is modified to meet the
+ * requirements for a particular platform
+ *
+ * Example:
+ * #ifdef __SYMBIAN32__
+ * # define XA_API __declspec(dllimport)
+ * #endif
+ */
+
+#ifndef XA_API
+#ifdef __GNUC__
+#define XA_API
+#else
+#define XA_API __declspec(dllimport)
+#endif
+#endif
+
+#endif /* _OPENMAXAL_PLATFORM_H_ */
diff --git a/ndk/platforms/android-14/include/SLES/OpenSLES.h b/ndk/platforms/android-14/include/SLES/OpenSLES.h
new file mode 100644
index 0000000..8686997
--- /dev/null
+++ b/ndk/platforms/android-14/include/SLES/OpenSLES.h
@@ -0,0 +1,2774 @@
+/*
+ * 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.h - OpenSL ES version 1.0.1
+ *
+ */
+
+/****************************************************************************/
+/* NOTE: This file is a standard OpenSL ES header file and should not be */
+/* modified in any way. */
+/****************************************************************************/
+
+#ifndef OPENSL_ES_H_
+#define OPENSL_ES_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "OpenSLES_Platform.h"
+
+
+/*****************************************************************************/
+/* Common types, structures, and defines */
+/*****************************************************************************/
+
+#ifndef _KHRONOS_KEYS_
+#define _KHRONOS_KEYS_
+
+#define KHRONOS_TITLE "KhronosTitle"
+#define KHRONOS_ALBUM "KhronosAlbum"
+#define KHRONOS_TRACK_NUMBER "KhronosTrackNumber"
+#define KHRONOS_ARTIST "KhronosArtist"
+#define KHRONOS_GENRE "KhronosGenre"
+#define KHRONOS_YEAR "KhronosYear"
+#define KHRONOS_COMMENT "KhronosComment"
+#define KHRONOS_ARTIST_URL "KhronosArtistURL"
+#define KHRONOS_CONTENT_URL "KhronosContentURL"
+#define KHRONOS_RATING "KhronosRating"
+#define KHRONOS_ALBUM_ART "KhronosAlbumArt"
+#define KHRONOS_COPYRIGHT "KhronosCopyright"
+
+#endif
+
+
+/* remap common types to SL types for clarity */
+typedef sl_int8_t SLint8; /* 8 bit signed integer */
+typedef sl_uint8_t SLuint8; /* 8 bit unsigned integer */
+typedef sl_int16_t SLint16; /* 16 bit signed integer */
+typedef sl_uint16_t SLuint16; /* 16 bit unsigned integer */
+typedef sl_int32_t SLint32; /* 32 bit signed integer */
+typedef sl_uint32_t SLuint32; /* 32 bit unsigned integer */
+
+typedef SLuint32 SLboolean;
+#define SL_BOOLEAN_FALSE ((SLboolean) 0x00000000)
+#define SL_BOOLEAN_TRUE ((SLboolean) 0x00000001)
+
+typedef SLuint8 SLchar; /* UTF-8 is to be used */
+typedef SLint16 SLmillibel;
+typedef SLuint32 SLmillisecond;
+typedef SLuint32 SLmilliHertz;
+typedef SLint32 SLmillimeter;
+typedef SLint32 SLmillidegree;
+typedef SLint16 SLpermille;
+typedef SLuint32 SLmicrosecond;
+typedef SLuint32 SLresult;
+
+#define SL_MILLIBEL_MAX ((SLmillibel) 0x7FFF)
+#define SL_MILLIBEL_MIN ((SLmillibel) (-SL_MILLIBEL_MAX-1))
+
+#define SL_MILLIHERTZ_MAX ((SLmilliHertz) 0xFFFFFFFF)
+#define SL_MILLIMETER_MAX ((SLmillimeter) 0x7FFFFFFF)
+
+/** Interface ID defined as a UUID */
+typedef const struct SLInterfaceID_ {
+ SLuint32 time_low;
+ SLuint16 time_mid;
+ SLuint16 time_hi_and_version;
+ SLuint16 clock_seq;
+ SLuint8 node[6];
+} * SLInterfaceID;
+
+/* Forward declaration for the object interface */
+struct SLObjectItf_;
+
+typedef const struct SLObjectItf_ * const * SLObjectItf;
+
+/* Objects ID's */
+
+#define SL_OBJECTID_ENGINE ((SLuint32) 0x00001001)
+#define SL_OBJECTID_LEDDEVICE ((SLuint32) 0x00001002)
+#define SL_OBJECTID_VIBRADEVICE ((SLuint32) 0x00001003)
+#define SL_OBJECTID_AUDIOPLAYER ((SLuint32) 0x00001004)
+#define SL_OBJECTID_AUDIORECORDER ((SLuint32) 0x00001005)
+#define SL_OBJECTID_MIDIPLAYER ((SLuint32) 0x00001006)
+#define SL_OBJECTID_LISTENER ((SLuint32) 0x00001007)
+#define SL_OBJECTID_3DGROUP ((SLuint32) 0x00001008)
+#define SL_OBJECTID_OUTPUTMIX ((SLuint32) 0x00001009)
+#define SL_OBJECTID_METADATAEXTRACTOR ((SLuint32) 0x0000100A)
+
+
+/* SL Profiles */
+
+#define SL_PROFILES_PHONE ((SLuint16) 0x0001)
+#define SL_PROFILES_MUSIC ((SLuint16) 0x0002)
+#define SL_PROFILES_GAME ((SLuint16) 0x0004)
+
+/* Types of voices supported by the system */
+
+#define SL_VOICETYPE_2D_AUDIO ((SLuint16) 0x0001)
+#define SL_VOICETYPE_MIDI ((SLuint16) 0x0002)
+#define SL_VOICETYPE_3D_AUDIO ((SLuint16) 0x0004)
+#define SL_VOICETYPE_3D_MIDIOUTPUT ((SLuint16) 0x0008)
+
+/* Convenient macros representing various different priority levels, for use with the SetPriority method */
+
+#define SL_PRIORITY_LOWEST ((SLint32) (-0x7FFFFFFF-1))
+#define SL_PRIORITY_VERYLOW ((SLint32) -0x60000000)
+#define SL_PRIORITY_LOW ((SLint32) -0x40000000)
+#define SL_PRIORITY_BELOWNORMAL ((SLint32) -0x20000000)
+#define SL_PRIORITY_NORMAL ((SLint32) 0x00000000)
+#define SL_PRIORITY_ABOVENORMAL ((SLint32) 0x20000000)
+#define SL_PRIORITY_HIGH ((SLint32) 0x40000000)
+#define SL_PRIORITY_VERYHIGH ((SLint32) 0x60000000)
+#define SL_PRIORITY_HIGHEST ((SLint32) 0x7FFFFFFF)
+
+
+/** These macros list the various sample formats that are possible on audio input and output devices. */
+
+#define SL_PCMSAMPLEFORMAT_FIXED_8 ((SLuint16) 0x0008)
+#define SL_PCMSAMPLEFORMAT_FIXED_16 ((SLuint16) 0x0010)
+#define SL_PCMSAMPLEFORMAT_FIXED_20 ((SLuint16) 0x0014)
+#define SL_PCMSAMPLEFORMAT_FIXED_24 ((SLuint16) 0x0018)
+#define SL_PCMSAMPLEFORMAT_FIXED_28 ((SLuint16) 0x001C)
+#define SL_PCMSAMPLEFORMAT_FIXED_32 ((SLuint16) 0x0020)
+
+
+/** These macros specify the commonly used sampling rates (in milliHertz) supported by most audio I/O devices. */
+
+#define SL_SAMPLINGRATE_8 ((SLuint32) 8000000)
+#define SL_SAMPLINGRATE_11_025 ((SLuint32) 11025000)
+#define SL_SAMPLINGRATE_12 ((SLuint32) 12000000)
+#define SL_SAMPLINGRATE_16 ((SLuint32) 16000000)
+#define SL_SAMPLINGRATE_22_05 ((SLuint32) 22050000)
+#define SL_SAMPLINGRATE_24 ((SLuint32) 24000000)
+#define SL_SAMPLINGRATE_32 ((SLuint32) 32000000)
+#define SL_SAMPLINGRATE_44_1 ((SLuint32) 44100000)
+#define SL_SAMPLINGRATE_48 ((SLuint32) 48000000)
+#define SL_SAMPLINGRATE_64 ((SLuint32) 64000000)
+#define SL_SAMPLINGRATE_88_2 ((SLuint32) 88200000)
+#define SL_SAMPLINGRATE_96 ((SLuint32) 96000000)
+#define SL_SAMPLINGRATE_192 ((SLuint32) 192000000)
+
+#define SL_SPEAKER_FRONT_LEFT ((SLuint32) 0x00000001)
+#define SL_SPEAKER_FRONT_RIGHT ((SLuint32) 0x00000002)
+#define SL_SPEAKER_FRONT_CENTER ((SLuint32) 0x00000004)
+#define SL_SPEAKER_LOW_FREQUENCY ((SLuint32) 0x00000008)
+#define SL_SPEAKER_BACK_LEFT ((SLuint32) 0x00000010)
+#define SL_SPEAKER_BACK_RIGHT ((SLuint32) 0x00000020)
+#define SL_SPEAKER_FRONT_LEFT_OF_CENTER ((SLuint32) 0x00000040)
+#define SL_SPEAKER_FRONT_RIGHT_OF_CENTER ((SLuint32) 0x00000080)
+#define SL_SPEAKER_BACK_CENTER ((SLuint32) 0x00000100)
+#define SL_SPEAKER_SIDE_LEFT ((SLuint32) 0x00000200)
+#define SL_SPEAKER_SIDE_RIGHT ((SLuint32) 0x00000400)
+#define SL_SPEAKER_TOP_CENTER ((SLuint32) 0x00000800)
+#define SL_SPEAKER_TOP_FRONT_LEFT ((SLuint32) 0x00001000)
+#define SL_SPEAKER_TOP_FRONT_CENTER ((SLuint32) 0x00002000)
+#define SL_SPEAKER_TOP_FRONT_RIGHT ((SLuint32) 0x00004000)
+#define SL_SPEAKER_TOP_BACK_LEFT ((SLuint32) 0x00008000)
+#define SL_SPEAKER_TOP_BACK_CENTER ((SLuint32) 0x00010000)
+#define SL_SPEAKER_TOP_BACK_RIGHT ((SLuint32) 0x00020000)
+
+
+/*****************************************************************************/
+/* Errors */
+/* */
+/*****************************************************************************/
+
+#define SL_RESULT_SUCCESS ((SLuint32) 0x00000000)
+#define SL_RESULT_PRECONDITIONS_VIOLATED ((SLuint32) 0x00000001)
+#define SL_RESULT_PARAMETER_INVALID ((SLuint32) 0x00000002)
+#define SL_RESULT_MEMORY_FAILURE ((SLuint32) 0x00000003)
+#define SL_RESULT_RESOURCE_ERROR ((SLuint32) 0x00000004)
+#define SL_RESULT_RESOURCE_LOST ((SLuint32) 0x00000005)
+#define SL_RESULT_IO_ERROR ((SLuint32) 0x00000006)
+#define SL_RESULT_BUFFER_INSUFFICIENT ((SLuint32) 0x00000007)
+#define SL_RESULT_CONTENT_CORRUPTED ((SLuint32) 0x00000008)
+#define SL_RESULT_CONTENT_UNSUPPORTED ((SLuint32) 0x00000009)
+#define SL_RESULT_CONTENT_NOT_FOUND ((SLuint32) 0x0000000A)
+#define SL_RESULT_PERMISSION_DENIED ((SLuint32) 0x0000000B)
+#define SL_RESULT_FEATURE_UNSUPPORTED ((SLuint32) 0x0000000C)
+#define SL_RESULT_INTERNAL_ERROR ((SLuint32) 0x0000000D)
+#define SL_RESULT_UNKNOWN_ERROR ((SLuint32) 0x0000000E)
+#define SL_RESULT_OPERATION_ABORTED ((SLuint32) 0x0000000F)
+#define SL_RESULT_CONTROL_LOST ((SLuint32) 0x00000010)
+
+
+/* Object state definitions */
+
+#define SL_OBJECT_STATE_UNREALIZED ((SLuint32) 0x00000001)
+#define SL_OBJECT_STATE_REALIZED ((SLuint32) 0x00000002)
+#define SL_OBJECT_STATE_SUSPENDED ((SLuint32) 0x00000003)
+
+/* Object event definitions */
+
+#define SL_OBJECT_EVENT_RUNTIME_ERROR ((SLuint32) 0x00000001)
+#define SL_OBJECT_EVENT_ASYNC_TERMINATION ((SLuint32) 0x00000002)
+#define SL_OBJECT_EVENT_RESOURCES_LOST ((SLuint32) 0x00000003)
+#define SL_OBJECT_EVENT_RESOURCES_AVAILABLE ((SLuint32) 0x00000004)
+#define SL_OBJECT_EVENT_ITF_CONTROL_TAKEN ((SLuint32) 0x00000005)
+#define SL_OBJECT_EVENT_ITF_CONTROL_RETURNED ((SLuint32) 0x00000006)
+#define SL_OBJECT_EVENT_ITF_PARAMETERS_CHANGED ((SLuint32) 0x00000007)
+
+
+/*****************************************************************************/
+/* Interface definitions */
+/*****************************************************************************/
+
+/** NULL Interface */
+
+extern SL_API const SLInterfaceID SL_IID_NULL;
+
+/*---------------------------------------------------------------------------*/
+/* Data Source and Data Sink Structures */
+/*---------------------------------------------------------------------------*/
+
+/** Data locator macros */
+#define SL_DATALOCATOR_URI ((SLuint32) 0x00000001)
+#define SL_DATALOCATOR_ADDRESS ((SLuint32) 0x00000002)
+#define SL_DATALOCATOR_IODEVICE ((SLuint32) 0x00000003)
+#define SL_DATALOCATOR_OUTPUTMIX ((SLuint32) 0x00000004)
+#define SL_DATALOCATOR_RESERVED5 ((SLuint32) 0x00000005)
+#define SL_DATALOCATOR_BUFFERQUEUE ((SLuint32) 0x00000006)
+#define SL_DATALOCATOR_MIDIBUFFERQUEUE ((SLuint32) 0x00000007)
+#define SL_DATALOCATOR_RESERVED8 ((SLuint32) 0x00000008)
+
+
+
+/** URI-based data locator definition where locatorType must be SL_DATALOCATOR_URI*/
+typedef struct SLDataLocator_URI_ {
+ SLuint32 locatorType;
+ SLchar * URI;
+} SLDataLocator_URI;
+
+/** Address-based data locator definition where locatorType must be SL_DATALOCATOR_ADDRESS*/
+typedef struct SLDataLocator_Address_ {
+ SLuint32 locatorType;
+ void *pAddress;
+ SLuint32 length;
+} SLDataLocator_Address;
+
+/** IODevice-types */
+#define SL_IODEVICE_AUDIOINPUT ((SLuint32) 0x00000001)
+#define SL_IODEVICE_LEDARRAY ((SLuint32) 0x00000002)
+#define SL_IODEVICE_VIBRA ((SLuint32) 0x00000003)
+#define SL_IODEVICE_RESERVED4 ((SLuint32) 0x00000004)
+#define SL_IODEVICE_RESERVED5 ((SLuint32) 0x00000005)
+
+/** IODevice-based data locator definition where locatorType must be SL_DATALOCATOR_IODEVICE*/
+typedef struct SLDataLocator_IODevice_ {
+ SLuint32 locatorType;
+ SLuint32 deviceType;
+ SLuint32 deviceID;
+ SLObjectItf device;
+} SLDataLocator_IODevice;
+
+/** OutputMix-based data locator definition where locatorType must be SL_DATALOCATOR_OUTPUTMIX*/
+typedef struct SLDataLocator_OutputMix {
+ SLuint32 locatorType;
+ SLObjectItf outputMix;
+} SLDataLocator_OutputMix;
+
+
+/** BufferQueue-based data locator definition where locatorType must be SL_DATALOCATOR_BUFFERQUEUE*/
+typedef struct SLDataLocator_BufferQueue {
+ SLuint32 locatorType;
+ SLuint32 numBuffers;
+} SLDataLocator_BufferQueue;
+
+/** MidiBufferQueue-based data locator definition where locatorType must be SL_DATALOCATOR_MIDIBUFFERQUEUE*/
+typedef struct SLDataLocator_MIDIBufferQueue {
+ SLuint32 locatorType;
+ SLuint32 tpqn;
+ SLuint32 numBuffers;
+} SLDataLocator_MIDIBufferQueue;
+
+/** Data format defines */
+#define SL_DATAFORMAT_MIME ((SLuint32) 0x00000001)
+#define SL_DATAFORMAT_PCM ((SLuint32) 0x00000002)
+#define SL_DATAFORMAT_RESERVED3 ((SLuint32) 0x00000003)
+
+
+/** MIME-type-based data format definition where formatType must be SL_DATAFORMAT_MIME*/
+typedef struct SLDataFormat_MIME_ {
+ SLuint32 formatType;
+ SLchar * mimeType;
+ SLuint32 containerType;
+} SLDataFormat_MIME;
+
+/* Byte order of a block of 16- or 32-bit data */
+#define SL_BYTEORDER_BIGENDIAN ((SLuint32) 0x00000001)
+#define SL_BYTEORDER_LITTLEENDIAN ((SLuint32) 0x00000002)
+
+/* Container type */
+#define SL_CONTAINERTYPE_UNSPECIFIED ((SLuint32) 0x00000001)
+#define SL_CONTAINERTYPE_RAW ((SLuint32) 0x00000002)
+#define SL_CONTAINERTYPE_ASF ((SLuint32) 0x00000003)
+#define SL_CONTAINERTYPE_AVI ((SLuint32) 0x00000004)
+#define SL_CONTAINERTYPE_BMP ((SLuint32) 0x00000005)
+#define SL_CONTAINERTYPE_JPG ((SLuint32) 0x00000006)
+#define SL_CONTAINERTYPE_JPG2000 ((SLuint32) 0x00000007)
+#define SL_CONTAINERTYPE_M4A ((SLuint32) 0x00000008)
+#define SL_CONTAINERTYPE_MP3 ((SLuint32) 0x00000009)
+#define SL_CONTAINERTYPE_MP4 ((SLuint32) 0x0000000A)
+#define SL_CONTAINERTYPE_MPEG_ES ((SLuint32) 0x0000000B)
+#define SL_CONTAINERTYPE_MPEG_PS ((SLuint32) 0x0000000C)
+#define SL_CONTAINERTYPE_MPEG_TS ((SLuint32) 0x0000000D)
+#define SL_CONTAINERTYPE_QT ((SLuint32) 0x0000000E)
+#define SL_CONTAINERTYPE_WAV ((SLuint32) 0x0000000F)
+#define SL_CONTAINERTYPE_XMF_0 ((SLuint32) 0x00000010)
+#define SL_CONTAINERTYPE_XMF_1 ((SLuint32) 0x00000011)
+#define SL_CONTAINERTYPE_XMF_2 ((SLuint32) 0x00000012)
+#define SL_CONTAINERTYPE_XMF_3 ((SLuint32) 0x00000013)
+#define SL_CONTAINERTYPE_XMF_GENERIC ((SLuint32) 0x00000014)
+#define SL_CONTAINERTYPE_AMR ((SLuint32) 0x00000015)
+#define SL_CONTAINERTYPE_AAC ((SLuint32) 0x00000016)
+#define SL_CONTAINERTYPE_3GPP ((SLuint32) 0x00000017)
+#define SL_CONTAINERTYPE_3GA ((SLuint32) 0x00000018)
+#define SL_CONTAINERTYPE_RM ((SLuint32) 0x00000019)
+#define SL_CONTAINERTYPE_DMF ((SLuint32) 0x0000001A)
+#define SL_CONTAINERTYPE_SMF ((SLuint32) 0x0000001B)
+#define SL_CONTAINERTYPE_MOBILE_DLS ((SLuint32) 0x0000001C)
+#define SL_CONTAINERTYPE_OGG ((SLuint32) 0x0000001D)
+
+
+/** PCM-type-based data format definition where formatType must be SL_DATAFORMAT_PCM*/
+typedef struct SLDataFormat_PCM_ {
+ SLuint32 formatType;
+ SLuint32 numChannels;
+ SLuint32 samplesPerSec;
+ SLuint32 bitsPerSample;
+ SLuint32 containerSize;
+ SLuint32 channelMask;
+ SLuint32 endianness;
+} SLDataFormat_PCM;
+
+typedef struct SLDataSource_ {
+ void *pLocator;
+ void *pFormat;
+} SLDataSource;
+
+
+typedef struct SLDataSink_ {
+ void *pLocator;
+ void *pFormat;
+} SLDataSink;
+
+
+
+
+
+
+/*---------------------------------------------------------------------------*/
+/* Standard Object Interface */
+/*---------------------------------------------------------------------------*/
+
+extern SL_API const SLInterfaceID SL_IID_OBJECT;
+
+/** Object callback */
+
+
+typedef void (SLAPIENTRY *slObjectCallback) (
+ SLObjectItf caller,
+ const void * pContext,
+ SLuint32 event,
+ SLresult result,
+ SLuint32 param,
+ void *pInterface
+);
+
+
+struct SLObjectItf_ {
+ SLresult (*Realize) (
+ SLObjectItf self,
+ SLboolean async
+ );
+ SLresult (*Resume) (
+ SLObjectItf self,
+ SLboolean async
+ );
+ SLresult (*GetState) (
+ SLObjectItf self,
+ SLuint32 * pState
+ );
+ SLresult (*GetInterface) (
+ SLObjectItf self,
+ const SLInterfaceID iid,
+ void * pInterface
+ );
+ SLresult (*RegisterCallback) (
+ SLObjectItf self,
+ slObjectCallback callback,
+ void * pContext
+ );
+ void (*AbortAsyncOperation) (
+ SLObjectItf self
+ );
+ void (*Destroy) (
+ SLObjectItf self
+ );
+ SLresult (*SetPriority) (
+ SLObjectItf self,
+ SLint32 priority,
+ SLboolean preemptable
+ );
+ SLresult (*GetPriority) (
+ SLObjectItf self,
+ SLint32 *pPriority,
+ SLboolean *pPreemptable
+ );
+ SLresult (*SetLossOfControlInterfaces) (
+ SLObjectItf self,
+ SLint16 numInterfaces,
+ SLInterfaceID * pInterfaceIDs,
+ SLboolean enabled
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Audio IO Device capabilities interface */
+/*---------------------------------------------------------------------------*/
+
+#define SL_DEFAULTDEVICEID_AUDIOINPUT ((SLuint32) 0xFFFFFFFF)
+#define SL_DEFAULTDEVICEID_AUDIOOUTPUT ((SLuint32) 0xFFFFFFFE)
+#define SL_DEFAULTDEVICEID_LED ((SLuint32) 0xFFFFFFFD)
+#define SL_DEFAULTDEVICEID_VIBRA ((SLuint32) 0xFFFFFFFC)
+#define SL_DEFAULTDEVICEID_RESERVED1 ((SLuint32) 0xFFFFFFFB)
+
+
+#define SL_DEVCONNECTION_INTEGRATED ((SLint16) 0x0001)
+#define SL_DEVCONNECTION_ATTACHED_WIRED ((SLint16) 0x0100)
+#define SL_DEVCONNECTION_ATTACHED_WIRELESS ((SLint16) 0x0200)
+#define SL_DEVCONNECTION_NETWORK ((SLint16) 0x0400)
+
+
+#define SL_DEVLOCATION_HANDSET ((SLuint16) 0x0001)
+#define SL_DEVLOCATION_HEADSET ((SLuint16) 0x0002)
+#define SL_DEVLOCATION_CARKIT ((SLuint16) 0x0003)
+#define SL_DEVLOCATION_DOCK ((SLuint16) 0x0004)
+#define SL_DEVLOCATION_REMOTE ((SLuint16) 0x0005)
+/* Note: SL_DEVLOCATION_RESLTE is deprecated, use SL_DEVLOCATION_REMOTE instead. */
+#define SL_DEVLOCATION_RESLTE ((SLuint16) 0x0005)
+
+
+#define SL_DEVSCOPE_UNKNOWN ((SLuint16) 0x0001)
+#define SL_DEVSCOPE_ENVIRONMENT ((SLuint16) 0x0002)
+#define SL_DEVSCOPE_USER ((SLuint16) 0x0003)
+
+
+typedef struct SLAudioInputDescriptor_ {
+ SLchar *deviceName;
+ SLint16 deviceConnection;
+ SLint16 deviceScope;
+ SLint16 deviceLocation;
+ SLboolean isForTelephony;
+ SLmilliHertz minSampleRate;
+ SLmilliHertz maxSampleRate;
+ SLboolean isFreqRangeContinuous;
+ SLmilliHertz *samplingRatesSupported;
+ SLint16 numOfSamplingRatesSupported;
+ SLint16 maxChannels;
+} SLAudioInputDescriptor;
+
+
+typedef struct SLAudioOutputDescriptor_ {
+ SLchar *pDeviceName;
+ SLint16 deviceConnection;
+ SLint16 deviceScope;
+ SLint16 deviceLocation;
+ SLboolean isForTelephony;
+ SLmilliHertz minSampleRate;
+ SLmilliHertz maxSampleRate;
+ SLboolean isFreqRangeContinuous;
+ SLmilliHertz *samplingRatesSupported;
+ SLint16 numOfSamplingRatesSupported;
+ SLint16 maxChannels;
+} SLAudioOutputDescriptor;
+
+
+
+extern SL_API const SLInterfaceID SL_IID_AUDIOIODEVICECAPABILITIES;
+
+struct SLAudioIODeviceCapabilitiesItf_;
+typedef const struct SLAudioIODeviceCapabilitiesItf_ * const * SLAudioIODeviceCapabilitiesItf;
+
+
+typedef void (SLAPIENTRY *slAvailableAudioInputsChangedCallback) (
+ SLAudioIODeviceCapabilitiesItf caller,
+ void *pContext,
+ SLuint32 deviceID,
+ SLint32 numInputs,
+ SLboolean isNew
+);
+
+
+typedef void (SLAPIENTRY *slAvailableAudioOutputsChangedCallback) (
+ SLAudioIODeviceCapabilitiesItf caller,
+ void *pContext,
+ SLuint32 deviceID,
+ SLint32 numOutputs,
+ SLboolean isNew
+);
+
+typedef void (SLAPIENTRY *slDefaultDeviceIDMapChangedCallback) (
+ SLAudioIODeviceCapabilitiesItf caller,
+ void *pContext,
+ SLboolean isOutput,
+ SLint32 numDevices
+);
+
+
+struct SLAudioIODeviceCapabilitiesItf_ {
+ SLresult (*GetAvailableAudioInputs)(
+ SLAudioIODeviceCapabilitiesItf self,
+ SLint32 *pNumInputs,
+ SLuint32 *pInputDeviceIDs
+ );
+ SLresult (*QueryAudioInputCapabilities)(
+ SLAudioIODeviceCapabilitiesItf self,
+ SLuint32 deviceId,
+ SLAudioInputDescriptor *pDescriptor
+ );
+ SLresult (*RegisterAvailableAudioInputsChangedCallback) (
+ SLAudioIODeviceCapabilitiesItf self,
+ slAvailableAudioInputsChangedCallback callback,
+ void *pContext
+ );
+ SLresult (*GetAvailableAudioOutputs)(
+ SLAudioIODeviceCapabilitiesItf self,
+ SLint32 *pNumOutputs,
+ SLuint32 *pOutputDeviceIDs
+ );
+ SLresult (*QueryAudioOutputCapabilities)(
+ SLAudioIODeviceCapabilitiesItf self,
+ SLuint32 deviceId,
+ SLAudioOutputDescriptor *pDescriptor
+ );
+ SLresult (*RegisterAvailableAudioOutputsChangedCallback) (
+ SLAudioIODeviceCapabilitiesItf self,
+ slAvailableAudioOutputsChangedCallback callback,
+ void *pContext
+ );
+ SLresult (*RegisterDefaultDeviceIDMapChangedCallback) (
+ SLAudioIODeviceCapabilitiesItf self,
+ slDefaultDeviceIDMapChangedCallback callback,
+ void *pContext
+ );
+ SLresult (*GetAssociatedAudioInputs) (
+ SLAudioIODeviceCapabilitiesItf self,
+ SLuint32 deviceId,
+ SLint32 *pNumAudioInputs,
+ SLuint32 *pAudioInputDeviceIDs
+ );
+ SLresult (*GetAssociatedAudioOutputs) (
+ SLAudioIODeviceCapabilitiesItf self,
+ SLuint32 deviceId,
+ SLint32 *pNumAudioOutputs,
+ SLuint32 *pAudioOutputDeviceIDs
+ );
+ SLresult (*GetDefaultAudioDevices) (
+ SLAudioIODeviceCapabilitiesItf self,
+ SLuint32 defaultDeviceID,
+ SLint32 *pNumAudioDevices,
+ SLuint32 *pAudioDeviceIDs
+ );
+ SLresult (*QuerySampleFormatsSupported)(
+ SLAudioIODeviceCapabilitiesItf self,
+ SLuint32 deviceId,
+ SLmilliHertz samplingRate,
+ SLint32 *pSampleFormats,
+ SLint32 *pNumOfSampleFormats
+ );
+};
+
+
+
+/*---------------------------------------------------------------------------*/
+/* Capabilities of the LED array IODevice */
+/*---------------------------------------------------------------------------*/
+
+typedef struct SLLEDDescriptor_ {
+ SLuint8 ledCount;
+ SLuint8 primaryLED;
+ SLuint32 colorMask;
+} SLLEDDescriptor;
+
+
+/*---------------------------------------------------------------------------*/
+/* LED Array interface */
+/*---------------------------------------------------------------------------*/
+
+typedef struct SLHSL_ {
+ SLmillidegree hue;
+ SLpermille saturation;
+ SLpermille lightness;
+} SLHSL;
+
+
+extern SL_API const SLInterfaceID SL_IID_LED;
+
+struct SLLEDArrayItf_;
+typedef const struct SLLEDArrayItf_ * const * SLLEDArrayItf;
+
+struct SLLEDArrayItf_ {
+ SLresult (*ActivateLEDArray) (
+ SLLEDArrayItf self,
+ SLuint32 lightMask
+ );
+ SLresult (*IsLEDArrayActivated) (
+ SLLEDArrayItf self,
+ SLuint32 *lightMask
+ );
+ SLresult (*SetColor) (
+ SLLEDArrayItf self,
+ SLuint8 index,
+ const SLHSL *color
+ );
+ SLresult (*GetColor) (
+ SLLEDArrayItf self,
+ SLuint8 index,
+ SLHSL *color
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* Capabilities of the Vibra IODevice */
+/*---------------------------------------------------------------------------*/
+
+typedef struct SLVibraDescriptor_ {
+ SLboolean supportsFrequency;
+ SLboolean supportsIntensity;
+ SLmilliHertz minFrequency;
+ SLmilliHertz maxFrequency;
+} SLVibraDescriptor;
+
+
+
+/*---------------------------------------------------------------------------*/
+/* Vibra interface */
+/*---------------------------------------------------------------------------*/
+
+
+extern SL_API const SLInterfaceID SL_IID_VIBRA;
+
+
+struct SLVibraItf_;
+typedef const struct SLVibraItf_ * const * SLVibraItf;
+
+struct SLVibraItf_ {
+ SLresult (*Vibrate) (
+ SLVibraItf self,
+ SLboolean vibrate
+ );
+ SLresult (*IsVibrating) (
+ SLVibraItf self,
+ SLboolean *pVibrating
+ );
+ SLresult (*SetFrequency) (
+ SLVibraItf self,
+ SLmilliHertz frequency
+ );
+ SLresult (*GetFrequency) (
+ SLVibraItf self,
+ SLmilliHertz *pFrequency
+ );
+ SLresult (*SetIntensity) (
+ SLVibraItf self,
+ SLpermille intensity
+ );
+ SLresult (*GetIntensity) (
+ SLVibraItf self,
+ SLpermille *pIntensity
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Meta data extraction related types and interface */
+/*---------------------------------------------------------------------------*/
+
+#define SL_CHARACTERENCODING_UNKNOWN ((SLuint32) 0x00000000)
+#define SL_CHARACTERENCODING_BINARY ((SLuint32) 0x00000001)
+#define SL_CHARACTERENCODING_ASCII ((SLuint32) 0x00000002)
+#define SL_CHARACTERENCODING_BIG5 ((SLuint32) 0x00000003)
+#define SL_CHARACTERENCODING_CODEPAGE1252 ((SLuint32) 0x00000004)
+#define SL_CHARACTERENCODING_GB2312 ((SLuint32) 0x00000005)
+#define SL_CHARACTERENCODING_HZGB2312 ((SLuint32) 0x00000006)
+#define SL_CHARACTERENCODING_GB12345 ((SLuint32) 0x00000007)
+#define SL_CHARACTERENCODING_GB18030 ((SLuint32) 0x00000008)
+#define SL_CHARACTERENCODING_GBK ((SLuint32) 0x00000009)
+#define SL_CHARACTERENCODING_IMAPUTF7 ((SLuint32) 0x0000000A)
+#define SL_CHARACTERENCODING_ISO2022JP ((SLuint32) 0x0000000B)
+#define SL_CHARACTERENCODING_ISO2022JP1 ((SLuint32) 0x0000000B)
+#define SL_CHARACTERENCODING_ISO88591 ((SLuint32) 0x0000000C)
+#define SL_CHARACTERENCODING_ISO885910 ((SLuint32) 0x0000000D)
+#define SL_CHARACTERENCODING_ISO885913 ((SLuint32) 0x0000000E)
+#define SL_CHARACTERENCODING_ISO885914 ((SLuint32) 0x0000000F)
+#define SL_CHARACTERENCODING_ISO885915 ((SLuint32) 0x00000010)
+#define SL_CHARACTERENCODING_ISO88592 ((SLuint32) 0x00000011)
+#define SL_CHARACTERENCODING_ISO88593 ((SLuint32) 0x00000012)
+#define SL_CHARACTERENCODING_ISO88594 ((SLuint32) 0x00000013)
+#define SL_CHARACTERENCODING_ISO88595 ((SLuint32) 0x00000014)
+#define SL_CHARACTERENCODING_ISO88596 ((SLuint32) 0x00000015)
+#define SL_CHARACTERENCODING_ISO88597 ((SLuint32) 0x00000016)
+#define SL_CHARACTERENCODING_ISO88598 ((SLuint32) 0x00000017)
+#define SL_CHARACTERENCODING_ISO88599 ((SLuint32) 0x00000018)
+#define SL_CHARACTERENCODING_ISOEUCJP ((SLuint32) 0x00000019)
+#define SL_CHARACTERENCODING_SHIFTJIS ((SLuint32) 0x0000001A)
+#define SL_CHARACTERENCODING_SMS7BIT ((SLuint32) 0x0000001B)
+#define SL_CHARACTERENCODING_UTF7 ((SLuint32) 0x0000001C)
+#define SL_CHARACTERENCODING_UTF8 ((SLuint32) 0x0000001D)
+#define SL_CHARACTERENCODING_JAVACONFORMANTUTF8 ((SLuint32) 0x0000001E)
+#define SL_CHARACTERENCODING_UTF16BE ((SLuint32) 0x0000001F)
+#define SL_CHARACTERENCODING_UTF16LE ((SLuint32) 0x00000020)
+
+
+#define SL_METADATA_FILTER_KEY ((SLuint8) 0x01)
+#define SL_METADATA_FILTER_LANG ((SLuint8) 0x02)
+#define SL_METADATA_FILTER_ENCODING ((SLuint8) 0x04)
+
+
+typedef struct SLMetadataInfo_ {
+ SLuint32 size;
+ SLuint32 encoding;
+ SLchar langCountry[16];
+ SLuint8 data[1];
+} SLMetadataInfo;
+
+extern SL_API const SLInterfaceID SL_IID_METADATAEXTRACTION;
+
+struct SLMetadataExtractionItf_;
+typedef const struct SLMetadataExtractionItf_ * const * SLMetadataExtractionItf;
+
+
+struct SLMetadataExtractionItf_ {
+ SLresult (*GetItemCount) (
+ SLMetadataExtractionItf self,
+ SLuint32 *pItemCount
+ );
+ SLresult (*GetKeySize) (
+ SLMetadataExtractionItf self,
+ SLuint32 index,
+ SLuint32 *pKeySize
+ );
+ SLresult (*GetKey) (
+ SLMetadataExtractionItf self,
+ SLuint32 index,
+ SLuint32 keySize,
+ SLMetadataInfo *pKey
+ );
+ SLresult (*GetValueSize) (
+ SLMetadataExtractionItf self,
+ SLuint32 index,
+ SLuint32 *pValueSize
+ );
+ SLresult (*GetValue) (
+ SLMetadataExtractionItf self,
+ SLuint32 index,
+ SLuint32 valueSize,
+ SLMetadataInfo *pValue
+ );
+ SLresult (*AddKeyFilter) (
+ SLMetadataExtractionItf self,
+ SLuint32 keySize,
+ const void *pKey,
+ SLuint32 keyEncoding,
+ const SLchar *pValueLangCountry,
+ SLuint32 valueEncoding,
+ SLuint8 filterMask
+ );
+ SLresult (*ClearKeyFilter) (
+ SLMetadataExtractionItf self
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Meta data traversal related types and interface */
+/*---------------------------------------------------------------------------*/
+
+#define SL_METADATATRAVERSALMODE_ALL ((SLuint32) 0x00000001)
+#define SL_METADATATRAVERSALMODE_NODE ((SLuint32) 0x00000002)
+
+
+#define SL_NODETYPE_UNSPECIFIED ((SLuint32) 0x00000001)
+#define SL_NODETYPE_AUDIO ((SLuint32) 0x00000002)
+#define SL_NODETYPE_VIDEO ((SLuint32) 0x00000003)
+#define SL_NODETYPE_IMAGE ((SLuint32) 0x00000004)
+
+#define SL_NODE_PARENT 0xFFFFFFFF
+
+extern SL_API const SLInterfaceID SL_IID_METADATATRAVERSAL;
+
+struct SLMetadataTraversalItf_;
+typedef const struct SLMetadataTraversalItf_ * const * SLMetadataTraversalItf;
+
+struct SLMetadataTraversalItf_ {
+ SLresult (*SetMode) (
+ SLMetadataTraversalItf self,
+ SLuint32 mode
+ );
+ SLresult (*GetChildCount) (
+ SLMetadataTraversalItf self,
+ SLuint32 *pCount
+ );
+ SLresult (*GetChildMIMETypeSize) (
+ SLMetadataTraversalItf self,
+ SLuint32 index,
+ SLuint32 *pSize
+ );
+ SLresult (*GetChildInfo) (
+ SLMetadataTraversalItf self,
+ SLuint32 index,
+ SLint32 *pNodeID,
+ SLuint32 *pType,
+ SLuint32 size,
+ SLchar *pMimeType
+ );
+ SLresult (*SetActiveNode) (
+ SLMetadataTraversalItf self,
+ SLuint32 index
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* Dynamic Source types and interface */
+/*---------------------------------------------------------------------------*/
+
+extern SL_API const SLInterfaceID SL_IID_DYNAMICSOURCE;
+
+struct SLDynamicSourceItf_;
+typedef const struct SLDynamicSourceItf_ * const * SLDynamicSourceItf;
+
+struct SLDynamicSourceItf_ {
+ SLresult (*SetSource) (
+ SLDynamicSourceItf self,
+ SLDataSource *pDataSource
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* Output Mix interface */
+/*---------------------------------------------------------------------------*/
+
+extern SL_API const SLInterfaceID SL_IID_OUTPUTMIX;
+
+struct SLOutputMixItf_;
+typedef const struct SLOutputMixItf_ * const * SLOutputMixItf;
+
+typedef void (SLAPIENTRY *slMixDeviceChangeCallback) (
+ SLOutputMixItf caller,
+ void *pContext
+);
+
+
+struct SLOutputMixItf_ {
+ SLresult (*GetDestinationOutputDeviceIDs) (
+ SLOutputMixItf self,
+ SLint32 *pNumDevices,
+ SLuint32 *pDeviceIDs
+ );
+ SLresult (*RegisterDeviceChangeCallback) (
+ SLOutputMixItf self,
+ slMixDeviceChangeCallback callback,
+ void *pContext
+ );
+ SLresult (*ReRoute)(
+ SLOutputMixItf self,
+ SLint32 numOutputDevices,
+ SLuint32 *pOutputDeviceIDs
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Playback interface */
+/*---------------------------------------------------------------------------*/
+
+/** Playback states */
+#define SL_PLAYSTATE_STOPPED ((SLuint32) 0x00000001)
+#define SL_PLAYSTATE_PAUSED ((SLuint32) 0x00000002)
+#define SL_PLAYSTATE_PLAYING ((SLuint32) 0x00000003)
+
+/** Play events **/
+#define SL_PLAYEVENT_HEADATEND ((SLuint32) 0x00000001)
+#define SL_PLAYEVENT_HEADATMARKER ((SLuint32) 0x00000002)
+#define SL_PLAYEVENT_HEADATNEWPOS ((SLuint32) 0x00000004)
+#define SL_PLAYEVENT_HEADMOVING ((SLuint32) 0x00000008)
+#define SL_PLAYEVENT_HEADSTALLED ((SLuint32) 0x00000010)
+
+#define SL_TIME_UNKNOWN ((SLuint32) 0xFFFFFFFF)
+
+
+extern SL_API const SLInterfaceID SL_IID_PLAY;
+
+/** Playback interface methods */
+
+struct SLPlayItf_;
+typedef const struct SLPlayItf_ * const * SLPlayItf;
+
+typedef void (SLAPIENTRY *slPlayCallback) (
+ SLPlayItf caller,
+ void *pContext,
+ SLuint32 event
+);
+
+struct SLPlayItf_ {
+ SLresult (*SetPlayState) (
+ SLPlayItf self,
+ SLuint32 state
+ );
+ SLresult (*GetPlayState) (
+ SLPlayItf self,
+ SLuint32 *pState
+ );
+ SLresult (*GetDuration) (
+ SLPlayItf self,
+ SLmillisecond *pMsec
+ );
+ SLresult (*GetPosition) (
+ SLPlayItf self,
+ SLmillisecond *pMsec
+ );
+ SLresult (*RegisterCallback) (
+ SLPlayItf self,
+ slPlayCallback callback,
+ void *pContext
+ );
+ SLresult (*SetCallbackEventsMask) (
+ SLPlayItf self,
+ SLuint32 eventFlags
+ );
+ SLresult (*GetCallbackEventsMask) (
+ SLPlayItf self,
+ SLuint32 *pEventFlags
+ );
+ SLresult (*SetMarkerPosition) (
+ SLPlayItf self,
+ SLmillisecond mSec
+ );
+ SLresult (*ClearMarkerPosition) (
+ SLPlayItf self
+ );
+ SLresult (*GetMarkerPosition) (
+ SLPlayItf self,
+ SLmillisecond *pMsec
+ );
+ SLresult (*SetPositionUpdatePeriod) (
+ SLPlayItf self,
+ SLmillisecond mSec
+ );
+ SLresult (*GetPositionUpdatePeriod) (
+ SLPlayItf self,
+ SLmillisecond *pMsec
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* Prefetch status interface */
+/*---------------------------------------------------------------------------*/
+
+#define SL_PREFETCHEVENT_STATUSCHANGE ((SLuint32) 0x00000001)
+#define SL_PREFETCHEVENT_FILLLEVELCHANGE ((SLuint32) 0x00000002)
+
+#define SL_PREFETCHSTATUS_UNDERFLOW ((SLuint32) 0x00000001)
+#define SL_PREFETCHSTATUS_SUFFICIENTDATA ((SLuint32) 0x00000002)
+#define SL_PREFETCHSTATUS_OVERFLOW ((SLuint32) 0x00000003)
+
+
+extern SL_API const SLInterfaceID SL_IID_PREFETCHSTATUS;
+
+
+/** Prefetch status interface methods */
+
+struct SLPrefetchStatusItf_;
+typedef const struct SLPrefetchStatusItf_ * const * SLPrefetchStatusItf;
+
+typedef void (SLAPIENTRY *slPrefetchCallback) (
+ SLPrefetchStatusItf caller,
+ void *pContext,
+ SLuint32 event
+);
+
+struct SLPrefetchStatusItf_ {
+ SLresult (*GetPrefetchStatus) (
+ SLPrefetchStatusItf self,
+ SLuint32 *pStatus
+ );
+ SLresult (*GetFillLevel) (
+ SLPrefetchStatusItf self,
+ SLpermille *pLevel
+ );
+ SLresult (*RegisterCallback) (
+ SLPrefetchStatusItf self,
+ slPrefetchCallback callback,
+ void *pContext
+ );
+ SLresult (*SetCallbackEventsMask) (
+ SLPrefetchStatusItf self,
+ SLuint32 eventFlags
+ );
+ SLresult (*GetCallbackEventsMask) (
+ SLPrefetchStatusItf self,
+ SLuint32 *pEventFlags
+ );
+ SLresult (*SetFillUpdatePeriod) (
+ SLPrefetchStatusItf self,
+ SLpermille period
+ );
+ SLresult (*GetFillUpdatePeriod) (
+ SLPrefetchStatusItf self,
+ SLpermille *pPeriod
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* Playback Rate interface */
+/*---------------------------------------------------------------------------*/
+
+#define SL_RATEPROP_RESERVED1 ((SLuint32) 0x00000001)
+#define SL_RATEPROP_RESERVED2 ((SLuint32) 0x00000002)
+#define SL_RATEPROP_SILENTAUDIO ((SLuint32) 0x00000100)
+#define SL_RATEPROP_STAGGEREDAUDIO ((SLuint32) 0x00000200)
+#define SL_RATEPROP_NOPITCHCORAUDIO ((SLuint32) 0x00000400)
+#define SL_RATEPROP_PITCHCORAUDIO ((SLuint32) 0x00000800)
+
+
+extern SL_API const SLInterfaceID SL_IID_PLAYBACKRATE;
+
+struct SLPlaybackRateItf_;
+typedef const struct SLPlaybackRateItf_ * const * SLPlaybackRateItf;
+
+struct SLPlaybackRateItf_ {
+ SLresult (*SetRate)(
+ SLPlaybackRateItf self,
+ SLpermille rate
+ );
+ SLresult (*GetRate)(
+ SLPlaybackRateItf self,
+ SLpermille *pRate
+ );
+ SLresult (*SetPropertyConstraints)(
+ SLPlaybackRateItf self,
+ SLuint32 constraints
+ );
+ SLresult (*GetProperties)(
+ SLPlaybackRateItf self,
+ SLuint32 *pProperties
+ );
+ SLresult (*GetCapabilitiesOfRate)(
+ SLPlaybackRateItf self,
+ SLpermille rate,
+ SLuint32 *pCapabilities
+ );
+ SLresult (*GetRateRange) (
+ SLPlaybackRateItf self,
+ SLuint8 index,
+ SLpermille *pMinRate,
+ SLpermille *pMaxRate,
+ SLpermille *pStepSize,
+ SLuint32 *pCapabilities
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* Seek Interface */
+/*---------------------------------------------------------------------------*/
+
+#define SL_SEEKMODE_FAST ((SLuint32) 0x0001)
+#define SL_SEEKMODE_ACCURATE ((SLuint32) 0x0002)
+
+extern SL_API const SLInterfaceID SL_IID_SEEK;
+
+struct SLSeekItf_;
+typedef const struct SLSeekItf_ * const * SLSeekItf;
+
+struct SLSeekItf_ {
+ SLresult (*SetPosition)(
+ SLSeekItf self,
+ SLmillisecond pos,
+ SLuint32 seekMode
+ );
+ SLresult (*SetLoop)(
+ SLSeekItf self,
+ SLboolean loopEnable,
+ SLmillisecond startPos,
+ SLmillisecond endPos
+ );
+ SLresult (*GetLoop)(
+ SLSeekItf self,
+ SLboolean *pLoopEnabled,
+ SLmillisecond *pStartPos,
+ SLmillisecond *pEndPos
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* Standard Recording Interface */
+/*---------------------------------------------------------------------------*/
+
+/** Recording states */
+#define SL_RECORDSTATE_STOPPED ((SLuint32) 0x00000001)
+#define SL_RECORDSTATE_PAUSED ((SLuint32) 0x00000002)
+#define SL_RECORDSTATE_RECORDING ((SLuint32) 0x00000003)
+
+
+/** Record event **/
+#define SL_RECORDEVENT_HEADATLIMIT ((SLuint32) 0x00000001)
+#define SL_RECORDEVENT_HEADATMARKER ((SLuint32) 0x00000002)
+#define SL_RECORDEVENT_HEADATNEWPOS ((SLuint32) 0x00000004)
+#define SL_RECORDEVENT_HEADMOVING ((SLuint32) 0x00000008)
+#define SL_RECORDEVENT_HEADSTALLED ((SLuint32) 0x00000010)
+/* Note: SL_RECORDEVENT_BUFFER_INSUFFICIENT is deprecated, use SL_RECORDEVENT_BUFFER_FULL instead. */
+#define SL_RECORDEVENT_BUFFER_INSUFFICIENT ((SLuint32) 0x00000020)
+#define SL_RECORDEVENT_BUFFER_FULL ((SLuint32) 0x00000020)
+
+
+extern SL_API const SLInterfaceID SL_IID_RECORD;
+
+struct SLRecordItf_;
+typedef const struct SLRecordItf_ * const * SLRecordItf;
+
+typedef void (SLAPIENTRY *slRecordCallback) (
+ SLRecordItf caller,
+ void *pContext,
+ SLuint32 event
+);
+
+/** Recording interface methods */
+struct SLRecordItf_ {
+ SLresult (*SetRecordState) (
+ SLRecordItf self,
+ SLuint32 state
+ );
+ SLresult (*GetRecordState) (
+ SLRecordItf self,
+ SLuint32 *pState
+ );
+ SLresult (*SetDurationLimit) (
+ SLRecordItf self,
+ SLmillisecond msec
+ );
+ SLresult (*GetPosition) (
+ SLRecordItf self,
+ SLmillisecond *pMsec
+ );
+ SLresult (*RegisterCallback) (
+ SLRecordItf self,
+ slRecordCallback callback,
+ void *pContext
+ );
+ SLresult (*SetCallbackEventsMask) (
+ SLRecordItf self,
+ SLuint32 eventFlags
+ );
+ SLresult (*GetCallbackEventsMask) (
+ SLRecordItf self,
+ SLuint32 *pEventFlags
+ );
+ SLresult (*SetMarkerPosition) (
+ SLRecordItf self,
+ SLmillisecond mSec
+ );
+ SLresult (*ClearMarkerPosition) (
+ SLRecordItf self
+ );
+ SLresult (*GetMarkerPosition) (
+ SLRecordItf self,
+ SLmillisecond *pMsec
+ );
+ SLresult (*SetPositionUpdatePeriod) (
+ SLRecordItf self,
+ SLmillisecond mSec
+ );
+ SLresult (*GetPositionUpdatePeriod) (
+ SLRecordItf self,
+ SLmillisecond *pMsec
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* Equalizer interface */
+/*---------------------------------------------------------------------------*/
+
+#define SL_EQUALIZER_UNDEFINED ((SLuint16) 0xFFFF)
+
+extern SL_API const SLInterfaceID SL_IID_EQUALIZER;
+
+struct SLEqualizerItf_;
+typedef const struct SLEqualizerItf_ * const * SLEqualizerItf;
+
+struct SLEqualizerItf_ {
+ SLresult (*SetEnabled)(
+ SLEqualizerItf self,
+ SLboolean enabled
+ );
+ SLresult (*IsEnabled)(
+ SLEqualizerItf self,
+ SLboolean *pEnabled
+ );
+ SLresult (*GetNumberOfBands)(
+ SLEqualizerItf self,
+ SLuint16 *pAmount
+ );
+ SLresult (*GetBandLevelRange)(
+ SLEqualizerItf self,
+ SLmillibel *pMin,
+ SLmillibel *pMax
+ );
+ SLresult (*SetBandLevel)(
+ SLEqualizerItf self,
+ SLuint16 band,
+ SLmillibel level
+ );
+ SLresult (*GetBandLevel)(
+ SLEqualizerItf self,
+ SLuint16 band,
+ SLmillibel *pLevel
+ );
+ SLresult (*GetCenterFreq)(
+ SLEqualizerItf self,
+ SLuint16 band,
+ SLmilliHertz *pCenter
+ );
+ SLresult (*GetBandFreqRange)(
+ SLEqualizerItf self,
+ SLuint16 band,
+ SLmilliHertz *pMin,
+ SLmilliHertz *pMax
+ );
+ SLresult (*GetBand)(
+ SLEqualizerItf self,
+ SLmilliHertz frequency,
+ SLuint16 *pBand
+ );
+ SLresult (*GetCurrentPreset)(
+ SLEqualizerItf self,
+ SLuint16 *pPreset
+ );
+ SLresult (*UsePreset)(
+ SLEqualizerItf self,
+ SLuint16 index
+ );
+ SLresult (*GetNumberOfPresets)(
+ SLEqualizerItf self,
+ SLuint16 *pNumPresets
+ );
+ SLresult (*GetPresetName)(
+ SLEqualizerItf self,
+ SLuint16 index,
+ const SLchar ** ppName
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* Volume Interface */
+/* --------------------------------------------------------------------------*/
+
+extern SL_API const SLInterfaceID SL_IID_VOLUME;
+
+struct SLVolumeItf_;
+typedef const struct SLVolumeItf_ * const * SLVolumeItf;
+
+struct SLVolumeItf_ {
+ SLresult (*SetVolumeLevel) (
+ SLVolumeItf self,
+ SLmillibel level
+ );
+ SLresult (*GetVolumeLevel) (
+ SLVolumeItf self,
+ SLmillibel *pLevel
+ );
+ SLresult (*GetMaxVolumeLevel) (
+ SLVolumeItf self,
+ SLmillibel *pMaxLevel
+ );
+ SLresult (*SetMute) (
+ SLVolumeItf self,
+ SLboolean mute
+ );
+ SLresult (*GetMute) (
+ SLVolumeItf self,
+ SLboolean *pMute
+ );
+ SLresult (*EnableStereoPosition) (
+ SLVolumeItf self,
+ SLboolean enable
+ );
+ SLresult (*IsEnabledStereoPosition) (
+ SLVolumeItf self,
+ SLboolean *pEnable
+ );
+ SLresult (*SetStereoPosition) (
+ SLVolumeItf self,
+ SLpermille stereoPosition
+ );
+ SLresult (*GetStereoPosition) (
+ SLVolumeItf self,
+ SLpermille *pStereoPosition
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Device Volume Interface */
+/* --------------------------------------------------------------------------*/
+
+extern SL_API const SLInterfaceID SL_IID_DEVICEVOLUME;
+
+struct SLDeviceVolumeItf_;
+typedef const struct SLDeviceVolumeItf_ * const * SLDeviceVolumeItf;
+
+struct SLDeviceVolumeItf_ {
+ SLresult (*GetVolumeScale) (
+ SLDeviceVolumeItf self,
+ SLuint32 deviceID,
+ SLint32 *pMinValue,
+ SLint32 *pMaxValue,
+ SLboolean *pIsMillibelScale
+ );
+ SLresult (*SetVolume) (
+ SLDeviceVolumeItf self,
+ SLuint32 deviceID,
+ SLint32 volume
+ );
+ SLresult (*GetVolume) (
+ SLDeviceVolumeItf self,
+ SLuint32 deviceID,
+ SLint32 *pVolume
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Buffer Queue Interface */
+/*---------------------------------------------------------------------------*/
+
+extern SL_API const SLInterfaceID SL_IID_BUFFERQUEUE;
+
+struct SLBufferQueueItf_;
+typedef const struct SLBufferQueueItf_ * const * SLBufferQueueItf;
+
+typedef void (SLAPIENTRY *slBufferQueueCallback)(
+ SLBufferQueueItf caller,
+ void *pContext
+);
+
+/** Buffer queue state **/
+
+typedef struct SLBufferQueueState_ {
+ SLuint32 count;
+ SLuint32 playIndex;
+} SLBufferQueueState;
+
+
+struct SLBufferQueueItf_ {
+ SLresult (*Enqueue) (
+ SLBufferQueueItf self,
+ const void *pBuffer,
+ SLuint32 size
+ );
+ SLresult (*Clear) (
+ SLBufferQueueItf self
+ );
+ SLresult (*GetState) (
+ SLBufferQueueItf self,
+ SLBufferQueueState *pState
+ );
+ SLresult (*RegisterCallback) (
+ SLBufferQueueItf self,
+ slBufferQueueCallback callback,
+ void* pContext
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* PresetReverb */
+/*---------------------------------------------------------------------------*/
+
+#define SL_REVERBPRESET_NONE ((SLuint16) 0x0000)
+#define SL_REVERBPRESET_SMALLROOM ((SLuint16) 0x0001)
+#define SL_REVERBPRESET_MEDIUMROOM ((SLuint16) 0x0002)
+#define SL_REVERBPRESET_LARGEROOM ((SLuint16) 0x0003)
+#define SL_REVERBPRESET_MEDIUMHALL ((SLuint16) 0x0004)
+#define SL_REVERBPRESET_LARGEHALL ((SLuint16) 0x0005)
+#define SL_REVERBPRESET_PLATE ((SLuint16) 0x0006)
+
+
+extern SL_API const SLInterfaceID SL_IID_PRESETREVERB;
+
+struct SLPresetReverbItf_;
+typedef const struct SLPresetReverbItf_ * const * SLPresetReverbItf;
+
+struct SLPresetReverbItf_ {
+ SLresult (*SetPreset) (
+ SLPresetReverbItf self,
+ SLuint16 preset
+ );
+ SLresult (*GetPreset) (
+ SLPresetReverbItf self,
+ SLuint16 *pPreset
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* EnvironmentalReverb */
+/*---------------------------------------------------------------------------*/
+
+#define SL_I3DL2_ENVIRONMENT_PRESET_DEFAULT \
+ { SL_MILLIBEL_MIN, 0, 1000, 500, SL_MILLIBEL_MIN, 20, SL_MILLIBEL_MIN, 40, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_GENERIC \
+ { -1000, -100, 1490, 830, -2602, 7, 200, 11, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_PADDEDCELL \
+ { -1000,-6000, 170, 100, -1204, 1, 207, 2, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_ROOM \
+ { -1000, -454, 400, 830, -1646, 2, 53, 3, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_BATHROOM \
+ { -1000,-1200, 1490, 540, -370, 7, 1030, 11, 1000, 600 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_LIVINGROOM \
+ { -1000,-6000, 500, 100, -1376, 3, -1104, 4, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_STONEROOM \
+ { -1000, -300, 2310, 640, -711, 12, 83, 17, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_AUDITORIUM \
+ { -1000, -476, 4320, 590, -789, 20, -289, 30, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_CONCERTHALL \
+ { -1000, -500, 3920, 700, -1230, 20, -2, 29, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_CAVE \
+ { -1000, 0, 2910, 1300, -602, 15, -302, 22, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_ARENA \
+ { -1000, -698, 7240, 330, -1166, 20, 16, 30, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_HANGAR \
+ { -1000,-1000, 10050, 230, -602, 20, 198, 30, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_CARPETEDHALLWAY \
+ { -1000,-4000, 300, 100, -1831, 2, -1630, 30, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_HALLWAY \
+ { -1000, -300, 1490, 590, -1219, 7, 441, 11, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_STONECORRIDOR \
+ { -1000, -237, 2700, 790, -1214, 13, 395, 20, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_ALLEY \
+ { -1000, -270, 1490, 860, -1204, 7, -4, 11, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_FOREST \
+ { -1000,-3300, 1490, 540, -2560, 162, -613, 88, 790,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_CITY \
+ { -1000, -800, 1490, 670, -2273, 7, -2217, 11, 500,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_MOUNTAINS \
+ { -1000,-2500, 1490, 210, -2780, 300, -2014, 100, 270,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_QUARRY \
+ { -1000,-1000, 1490, 830, SL_MILLIBEL_MIN, 61, 500, 25, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_PLAIN \
+ { -1000,-2000, 1490, 500, -2466, 179, -2514, 100, 210,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_PARKINGLOT \
+ { -1000, 0, 1650, 1500, -1363, 8, -1153, 12, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_SEWERPIPE \
+ { -1000,-1000, 2810, 140, 429, 14, 648, 21, 800, 600 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_UNDERWATER \
+ { -1000,-4000, 1490, 100, -449, 7, 1700, 11, 1000,1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_SMALLROOM \
+ { -1000,-600, 1100, 830, -400, 5, 500, 10, 1000, 1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_MEDIUMROOM \
+ { -1000,-600, 1300, 830, -1000, 20, -200, 20, 1000, 1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_LARGEROOM \
+ { -1000,-600, 1500, 830, -1600, 5, -1000, 40, 1000, 1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_MEDIUMHALL \
+ { -1000,-600, 1800, 700, -1300, 15, -800, 30, 1000, 1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_LARGEHALL \
+ { -1000,-600, 1800, 700, -2000, 30, -1400, 60, 1000, 1000 }
+#define SL_I3DL2_ENVIRONMENT_PRESET_PLATE \
+ { -1000,-200, 1300, 900, 0, 2, 0, 10, 1000, 750 }
+
+
+typedef struct SLEnvironmentalReverbSettings_ {
+ SLmillibel roomLevel;
+ SLmillibel roomHFLevel;
+ SLmillisecond decayTime;
+ SLpermille decayHFRatio;
+ SLmillibel reflectionsLevel;
+ SLmillisecond reflectionsDelay;
+ SLmillibel reverbLevel;
+ SLmillisecond reverbDelay;
+ SLpermille diffusion;
+ SLpermille density;
+} SLEnvironmentalReverbSettings;
+
+
+
+
+extern SL_API const SLInterfaceID SL_IID_ENVIRONMENTALREVERB;
+
+
+struct SLEnvironmentalReverbItf_;
+typedef const struct SLEnvironmentalReverbItf_ * const * SLEnvironmentalReverbItf;
+
+struct SLEnvironmentalReverbItf_ {
+ SLresult (*SetRoomLevel) (
+ SLEnvironmentalReverbItf self,
+ SLmillibel room
+ );
+ SLresult (*GetRoomLevel) (
+ SLEnvironmentalReverbItf self,
+ SLmillibel *pRoom
+ );
+ SLresult (*SetRoomHFLevel) (
+ SLEnvironmentalReverbItf self,
+ SLmillibel roomHF
+ );
+ SLresult (*GetRoomHFLevel) (
+ SLEnvironmentalReverbItf self,
+ SLmillibel *pRoomHF
+ );
+ SLresult (*SetDecayTime) (
+ SLEnvironmentalReverbItf self,
+ SLmillisecond decayTime
+ );
+ SLresult (*GetDecayTime) (
+ SLEnvironmentalReverbItf self,
+ SLmillisecond *pDecayTime
+ );
+ SLresult (*SetDecayHFRatio) (
+ SLEnvironmentalReverbItf self,
+ SLpermille decayHFRatio
+ );
+ SLresult (*GetDecayHFRatio) (
+ SLEnvironmentalReverbItf self,
+ SLpermille *pDecayHFRatio
+ );
+ SLresult (*SetReflectionsLevel) (
+ SLEnvironmentalReverbItf self,
+ SLmillibel reflectionsLevel
+ );
+ SLresult (*GetReflectionsLevel) (
+ SLEnvironmentalReverbItf self,
+ SLmillibel *pReflectionsLevel
+ );
+ SLresult (*SetReflectionsDelay) (
+ SLEnvironmentalReverbItf self,
+ SLmillisecond reflectionsDelay
+ );
+ SLresult (*GetReflectionsDelay) (
+ SLEnvironmentalReverbItf self,
+ SLmillisecond *pReflectionsDelay
+ );
+ SLresult (*SetReverbLevel) (
+ SLEnvironmentalReverbItf self,
+ SLmillibel reverbLevel
+ );
+ SLresult (*GetReverbLevel) (
+ SLEnvironmentalReverbItf self,
+ SLmillibel *pReverbLevel
+ );
+ SLresult (*SetReverbDelay) (
+ SLEnvironmentalReverbItf self,
+ SLmillisecond reverbDelay
+ );
+ SLresult (*GetReverbDelay) (
+ SLEnvironmentalReverbItf self,
+ SLmillisecond *pReverbDelay
+ );
+ SLresult (*SetDiffusion) (
+ SLEnvironmentalReverbItf self,
+ SLpermille diffusion
+ );
+ SLresult (*GetDiffusion) (
+ SLEnvironmentalReverbItf self,
+ SLpermille *pDiffusion
+ );
+ SLresult (*SetDensity) (
+ SLEnvironmentalReverbItf self,
+ SLpermille density
+ );
+ SLresult (*GetDensity) (
+ SLEnvironmentalReverbItf self,
+ SLpermille *pDensity
+ );
+ SLresult (*SetEnvironmentalReverbProperties) (
+ SLEnvironmentalReverbItf self,
+ const SLEnvironmentalReverbSettings *pProperties
+ );
+ SLresult (*GetEnvironmentalReverbProperties) (
+ SLEnvironmentalReverbItf self,
+ SLEnvironmentalReverbSettings *pProperties
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* Effects Send Interface */
+/*---------------------------------------------------------------------------*/
+
+
+extern SL_API const SLInterfaceID SL_IID_EFFECTSEND;
+
+struct SLEffectSendItf_;
+typedef const struct SLEffectSendItf_ * const * SLEffectSendItf;
+
+struct SLEffectSendItf_ {
+ SLresult (*EnableEffectSend) (
+ SLEffectSendItf self,
+ const void *pAuxEffect,
+ SLboolean enable,
+ SLmillibel initialLevel
+ );
+ SLresult (*IsEnabled) (
+ SLEffectSendItf self,
+ const void * pAuxEffect,
+ SLboolean *pEnable
+ );
+ SLresult (*SetDirectLevel) (
+ SLEffectSendItf self,
+ SLmillibel directLevel
+ );
+ SLresult (*GetDirectLevel) (
+ SLEffectSendItf self,
+ SLmillibel *pDirectLevel
+ );
+ SLresult (*SetSendLevel) (
+ SLEffectSendItf self,
+ const void *pAuxEffect,
+ SLmillibel sendLevel
+ );
+ SLresult (*GetSendLevel)(
+ SLEffectSendItf self,
+ const void *pAuxEffect,
+ SLmillibel *pSendLevel
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* 3D Grouping Interface */
+/*---------------------------------------------------------------------------*/
+
+
+extern SL_API const SLInterfaceID SL_IID_3DGROUPING;
+
+
+struct SL3DGroupingItf_ ;
+typedef const struct SL3DGroupingItf_ * const * SL3DGroupingItf;
+
+struct SL3DGroupingItf_ {
+ SLresult (*Set3DGroup) (
+ SL3DGroupingItf self,
+ SLObjectItf group
+ );
+ SLresult (*Get3DGroup) (
+ SL3DGroupingItf self,
+ SLObjectItf *pGroup
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* 3D Commit Interface */
+/*---------------------------------------------------------------------------*/
+
+
+extern SL_API const SLInterfaceID SL_IID_3DCOMMIT;
+
+struct SL3DCommitItf_;
+typedef const struct SL3DCommitItf_* const * SL3DCommitItf;
+
+struct SL3DCommitItf_ {
+ SLresult (*Commit) (
+ SL3DCommitItf self
+ );
+ SLresult (*SetDeferred) (
+ SL3DCommitItf self,
+ SLboolean deferred
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* 3D Location Interface */
+/*---------------------------------------------------------------------------*/
+
+typedef struct SLVec3D_ {
+ SLint32 x;
+ SLint32 y;
+ SLint32 z;
+} SLVec3D;
+
+extern SL_API const SLInterfaceID SL_IID_3DLOCATION;
+
+struct SL3DLocationItf_;
+typedef const struct SL3DLocationItf_ * const * SL3DLocationItf;
+
+struct SL3DLocationItf_ {
+ SLresult (*SetLocationCartesian) (
+ SL3DLocationItf self,
+ const SLVec3D *pLocation
+ );
+ SLresult (*SetLocationSpherical) (
+ SL3DLocationItf self,
+ SLmillidegree azimuth,
+ SLmillidegree elevation,
+ SLmillimeter distance
+ );
+ SLresult (*Move) (
+ SL3DLocationItf self,
+ const SLVec3D *pMovement
+ );
+ SLresult (*GetLocationCartesian) (
+ SL3DLocationItf self,
+ SLVec3D *pLocation
+ );
+ SLresult (*SetOrientationVectors) (
+ SL3DLocationItf self,
+ const SLVec3D *pFront,
+ const SLVec3D *pAbove
+ );
+ SLresult (*SetOrientationAngles) (
+ SL3DLocationItf self,
+ SLmillidegree heading,
+ SLmillidegree pitch,
+ SLmillidegree roll
+ );
+ SLresult (*Rotate) (
+ SL3DLocationItf self,
+ SLmillidegree theta,
+ const SLVec3D *pAxis
+ );
+ SLresult (*GetOrientationVectors) (
+ SL3DLocationItf self,
+ SLVec3D *pFront,
+ SLVec3D *pUp
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* 3D Doppler Interface */
+/*---------------------------------------------------------------------------*/
+
+
+extern SL_API const SLInterfaceID SL_IID_3DDOPPLER;
+
+struct SL3DDopplerItf_;
+typedef const struct SL3DDopplerItf_ * const * SL3DDopplerItf;
+
+struct SL3DDopplerItf_ {
+ SLresult (*SetVelocityCartesian) (
+ SL3DDopplerItf self,
+ const SLVec3D *pVelocity
+ );
+ SLresult (*SetVelocitySpherical) (
+ SL3DDopplerItf self,
+ SLmillidegree azimuth,
+ SLmillidegree elevation,
+ SLmillimeter speed
+ );
+ SLresult (*GetVelocityCartesian) (
+ SL3DDopplerItf self,
+ SLVec3D *pVelocity
+ );
+ SLresult (*SetDopplerFactor) (
+ SL3DDopplerItf self,
+ SLpermille dopplerFactor
+ );
+ SLresult (*GetDopplerFactor) (
+ SL3DDopplerItf self,
+ SLpermille *pDopplerFactor
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* 3D Source Interface and associated defines */
+/* --------------------------------------------------------------------------*/
+
+#define SL_ROLLOFFMODEL_EXPONENTIAL ((SLuint32) 0x00000000)
+#define SL_ROLLOFFMODEL_LINEAR ((SLuint32) 0x00000001)
+
+
+extern SL_API const SLInterfaceID SL_IID_3DSOURCE;
+
+struct SL3DSourceItf_;
+typedef const struct SL3DSourceItf_ * const * SL3DSourceItf;
+
+struct SL3DSourceItf_ {
+ SLresult (*SetHeadRelative) (
+ SL3DSourceItf self,
+ SLboolean headRelative
+ );
+ SLresult (*GetHeadRelative) (
+ SL3DSourceItf self,
+ SLboolean *pHeadRelative
+ );
+ SLresult (*SetRolloffDistances) (
+ SL3DSourceItf self,
+ SLmillimeter minDistance,
+ SLmillimeter maxDistance
+ );
+ SLresult (*GetRolloffDistances) (
+ SL3DSourceItf self,
+ SLmillimeter *pMinDistance,
+ SLmillimeter *pMaxDistance
+ );
+ SLresult (*SetRolloffMaxDistanceMute) (
+ SL3DSourceItf self,
+ SLboolean mute
+ );
+ SLresult (*GetRolloffMaxDistanceMute) (
+ SL3DSourceItf self,
+ SLboolean *pMute
+ );
+ SLresult (*SetRolloffFactor) (
+ SL3DSourceItf self,
+ SLpermille rolloffFactor
+ );
+ SLresult (*GetRolloffFactor) (
+ SL3DSourceItf self,
+ SLpermille *pRolloffFactor
+ );
+ SLresult (*SetRoomRolloffFactor) (
+ SL3DSourceItf self,
+ SLpermille roomRolloffFactor
+ );
+ SLresult (*GetRoomRolloffFactor) (
+ SL3DSourceItf self,
+ SLpermille *pRoomRolloffFactor
+ );
+ SLresult (*SetRolloffModel) (
+ SL3DSourceItf self,
+ SLuint8 model
+ );
+ SLresult (*GetRolloffModel) (
+ SL3DSourceItf self,
+ SLuint8 *pModel
+ );
+ SLresult (*SetCone) (
+ SL3DSourceItf self,
+ SLmillidegree innerAngle,
+ SLmillidegree outerAngle,
+ SLmillibel outerLevel
+ );
+ SLresult (*GetCone) (
+ SL3DSourceItf self,
+ SLmillidegree *pInnerAngle,
+ SLmillidegree *pOuterAngle,
+ SLmillibel *pOuterLevel
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* 3D Macroscopic Interface */
+/* --------------------------------------------------------------------------*/
+
+extern SL_API const SLInterfaceID SL_IID_3DMACROSCOPIC;
+
+struct SL3DMacroscopicItf_;
+typedef const struct SL3DMacroscopicItf_ * const * SL3DMacroscopicItf;
+
+struct SL3DMacroscopicItf_ {
+ SLresult (*SetSize) (
+ SL3DMacroscopicItf self,
+ SLmillimeter width,
+ SLmillimeter height,
+ SLmillimeter depth
+ );
+ SLresult (*GetSize) (
+ SL3DMacroscopicItf self,
+ SLmillimeter *pWidth,
+ SLmillimeter *pHeight,
+ SLmillimeter *pDepth
+ );
+ SLresult (*SetOrientationAngles) (
+ SL3DMacroscopicItf self,
+ SLmillidegree heading,
+ SLmillidegree pitch,
+ SLmillidegree roll
+ );
+ SLresult (*SetOrientationVectors) (
+ SL3DMacroscopicItf self,
+ const SLVec3D *pFront,
+ const SLVec3D *pAbove
+ );
+ SLresult (*Rotate) (
+ SL3DMacroscopicItf self,
+ SLmillidegree theta,
+ const SLVec3D *pAxis
+ );
+ SLresult (*GetOrientationVectors) (
+ SL3DMacroscopicItf self,
+ SLVec3D *pFront,
+ SLVec3D *pUp
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* Mute Solo Interface */
+/* --------------------------------------------------------------------------*/
+
+
+extern SL_API const SLInterfaceID SL_IID_MUTESOLO;
+
+struct SLMuteSoloItf_;
+typedef const struct SLMuteSoloItf_ * const * SLMuteSoloItf;
+
+struct SLMuteSoloItf_ {
+ SLresult (*SetChannelMute) (
+ SLMuteSoloItf self,
+ SLuint8 chan,
+ SLboolean mute
+ );
+ SLresult (*GetChannelMute) (
+ SLMuteSoloItf self,
+ SLuint8 chan,
+ SLboolean *pMute
+ );
+ SLresult (*SetChannelSolo) (
+ SLMuteSoloItf self,
+ SLuint8 chan,
+ SLboolean solo
+ );
+ SLresult (*GetChannelSolo) (
+ SLMuteSoloItf self,
+ SLuint8 chan,
+ SLboolean *pSolo
+ );
+ SLresult (*GetNumChannels) (
+ SLMuteSoloItf self,
+ SLuint8 *pNumChannels
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Dynamic Interface Management Interface and associated types and macros */
+/* --------------------------------------------------------------------------*/
+
+#define SL_DYNAMIC_ITF_EVENT_RUNTIME_ERROR ((SLuint32) 0x00000001)
+#define SL_DYNAMIC_ITF_EVENT_ASYNC_TERMINATION ((SLuint32) 0x00000002)
+#define SL_DYNAMIC_ITF_EVENT_RESOURCES_LOST ((SLuint32) 0x00000003)
+#define SL_DYNAMIC_ITF_EVENT_RESOURCES_LOST_PERMANENTLY ((SLuint32) 0x00000004)
+#define SL_DYNAMIC_ITF_EVENT_RESOURCES_AVAILABLE ((SLuint32) 0x00000005)
+
+
+
+
+extern SL_API const SLInterfaceID SL_IID_DYNAMICINTERFACEMANAGEMENT;
+
+struct SLDynamicInterfaceManagementItf_;
+typedef const struct SLDynamicInterfaceManagementItf_ * const * SLDynamicInterfaceManagementItf;
+
+typedef void (SLAPIENTRY *slDynamicInterfaceManagementCallback) (
+ SLDynamicInterfaceManagementItf caller,
+ void * pContext,
+ SLuint32 event,
+ SLresult result,
+ const SLInterfaceID iid
+);
+
+
+struct SLDynamicInterfaceManagementItf_ {
+ SLresult (*AddInterface) (
+ SLDynamicInterfaceManagementItf self,
+ const SLInterfaceID iid,
+ SLboolean async
+ );
+ SLresult (*RemoveInterface) (
+ SLDynamicInterfaceManagementItf self,
+ const SLInterfaceID iid
+ );
+ SLresult (*ResumeInterface) (
+ SLDynamicInterfaceManagementItf self,
+ const SLInterfaceID iid,
+ SLboolean async
+ );
+ SLresult (*RegisterCallback) (
+ SLDynamicInterfaceManagementItf self,
+ slDynamicInterfaceManagementCallback callback,
+ void * pContext
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* Midi Message Interface and associated types */
+/* --------------------------------------------------------------------------*/
+
+#define SL_MIDIMESSAGETYPE_NOTE_ON_OFF ((SLuint32) 0x00000001)
+#define SL_MIDIMESSAGETYPE_POLY_PRESSURE ((SLuint32) 0x00000002)
+#define SL_MIDIMESSAGETYPE_CONTROL_CHANGE ((SLuint32) 0x00000003)
+#define SL_MIDIMESSAGETYPE_PROGRAM_CHANGE ((SLuint32) 0x00000004)
+#define SL_MIDIMESSAGETYPE_CHANNEL_PRESSURE ((SLuint32) 0x00000005)
+#define SL_MIDIMESSAGETYPE_PITCH_BEND ((SLuint32) 0x00000006)
+#define SL_MIDIMESSAGETYPE_SYSTEM_MESSAGE ((SLuint32) 0x00000007)
+
+
+extern SL_API const SLInterfaceID SL_IID_MIDIMESSAGE;
+
+struct SLMIDIMessageItf_;
+typedef const struct SLMIDIMessageItf_ * const * SLMIDIMessageItf;
+
+typedef void (SLAPIENTRY *slMetaEventCallback) (
+ SLMIDIMessageItf caller,
+ void *pContext,
+ SLuint8 type,
+ SLuint32 length,
+ const SLuint8 *pData,
+ SLuint32 tick,
+ SLuint16 track
+);
+
+typedef void (SLAPIENTRY *slMIDIMessageCallback) (
+ SLMIDIMessageItf caller,
+ void *pContext,
+ SLuint8 statusByte,
+ SLuint32 length,
+ const SLuint8 *pData,
+ SLuint32 tick,
+ SLuint16 track
+);
+
+struct SLMIDIMessageItf_ {
+ SLresult (*SendMessage) (
+ SLMIDIMessageItf self,
+ const SLuint8 *data,
+ SLuint32 length
+ );
+ SLresult (*RegisterMetaEventCallback) (
+ SLMIDIMessageItf self,
+ slMetaEventCallback callback,
+ void *pContext
+ );
+ SLresult (*RegisterMIDIMessageCallback) (
+ SLMIDIMessageItf self,
+ slMIDIMessageCallback callback,
+ void *pContext
+ );
+ SLresult (*AddMIDIMessageCallbackFilter) (
+ SLMIDIMessageItf self,
+ SLuint32 messageType
+ );
+ SLresult (*ClearMIDIMessageCallbackFilter) (
+ SLMIDIMessageItf self
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Midi Mute Solo interface */
+/* --------------------------------------------------------------------------*/
+
+
+extern SL_API const SLInterfaceID SL_IID_MIDIMUTESOLO;
+
+struct SLMIDIMuteSoloItf_;
+typedef const struct SLMIDIMuteSoloItf_ * const * SLMIDIMuteSoloItf;
+
+struct SLMIDIMuteSoloItf_ {
+ SLresult (*SetChannelMute) (
+ SLMIDIMuteSoloItf self,
+ SLuint8 channel,
+ SLboolean mute
+ );
+ SLresult (*GetChannelMute) (
+ SLMIDIMuteSoloItf self,
+ SLuint8 channel,
+ SLboolean *pMute
+ );
+ SLresult (*SetChannelSolo) (
+ SLMIDIMuteSoloItf self,
+ SLuint8 channel,
+ SLboolean solo
+ );
+ SLresult (*GetChannelSolo) (
+ SLMIDIMuteSoloItf self,
+ SLuint8 channel,
+ SLboolean *pSolo
+ );
+ SLresult (*GetTrackCount) (
+ SLMIDIMuteSoloItf self,
+ SLuint16 *pCount
+ );
+ SLresult (*SetTrackMute) (
+ SLMIDIMuteSoloItf self,
+ SLuint16 track,
+ SLboolean mute
+ );
+ SLresult (*GetTrackMute) (
+ SLMIDIMuteSoloItf self,
+ SLuint16 track,
+ SLboolean *pMute
+ );
+ SLresult (*SetTrackSolo) (
+ SLMIDIMuteSoloItf self,
+ SLuint16 track,
+ SLboolean solo
+ );
+ SLresult (*GetTrackSolo) (
+ SLMIDIMuteSoloItf self,
+ SLuint16 track,
+ SLboolean *pSolo
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Midi Tempo interface */
+/* --------------------------------------------------------------------------*/
+
+
+extern SL_API const SLInterfaceID SL_IID_MIDITEMPO;
+
+struct SLMIDITempoItf_;
+typedef const struct SLMIDITempoItf_ * const * SLMIDITempoItf;
+
+struct SLMIDITempoItf_ {
+ SLresult (*SetTicksPerQuarterNote) (
+ SLMIDITempoItf self,
+ SLuint32 tpqn
+ );
+ SLresult (*GetTicksPerQuarterNote) (
+ SLMIDITempoItf self,
+ SLuint32 *pTpqn
+ );
+ SLresult (*SetMicrosecondsPerQuarterNote) (
+ SLMIDITempoItf self,
+ SLmicrosecond uspqn
+ );
+ SLresult (*GetMicrosecondsPerQuarterNote) (
+ SLMIDITempoItf self,
+ SLmicrosecond *uspqn
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Midi Time interface */
+/* --------------------------------------------------------------------------*/
+
+
+extern SL_API const SLInterfaceID SL_IID_MIDITIME;
+
+struct SLMIDITimeItf_;
+typedef const struct SLMIDITimeItf_ * const * SLMIDITimeItf;
+
+struct SLMIDITimeItf_ {
+ SLresult (*GetDuration) (
+ SLMIDITimeItf self,
+ SLuint32 *pDuration
+ );
+ SLresult (*SetPosition) (
+ SLMIDITimeItf self,
+ SLuint32 position
+ );
+ SLresult (*GetPosition) (
+ SLMIDITimeItf self,
+ SLuint32 *pPosition
+ );
+ SLresult (*SetLoopPoints) (
+ SLMIDITimeItf self,
+ SLuint32 startTick,
+ SLuint32 numTicks
+ );
+ SLresult (*GetLoopPoints) (
+ SLMIDITimeItf self,
+ SLuint32 *pStartTick,
+ SLuint32 *pNumTicks
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Audio Decoder Capabilities Interface */
+/* --------------------------------------------------------------------------*/
+
+/*Audio Codec related defines*/
+
+#define SL_RATECONTROLMODE_CONSTANTBITRATE ((SLuint32) 0x00000001)
+#define SL_RATECONTROLMODE_VARIABLEBITRATE ((SLuint32) 0x00000002)
+
+#define SL_AUDIOCODEC_PCM ((SLuint32) 0x00000001)
+#define SL_AUDIOCODEC_MP3 ((SLuint32) 0x00000002)
+#define SL_AUDIOCODEC_AMR ((SLuint32) 0x00000003)
+#define SL_AUDIOCODEC_AMRWB ((SLuint32) 0x00000004)
+#define SL_AUDIOCODEC_AMRWBPLUS ((SLuint32) 0x00000005)
+#define SL_AUDIOCODEC_AAC ((SLuint32) 0x00000006)
+#define SL_AUDIOCODEC_WMA ((SLuint32) 0x00000007)
+#define SL_AUDIOCODEC_REAL ((SLuint32) 0x00000008)
+
+#define SL_AUDIOPROFILE_PCM ((SLuint32) 0x00000001)
+
+#define SL_AUDIOPROFILE_MPEG1_L3 ((SLuint32) 0x00000001)
+#define SL_AUDIOPROFILE_MPEG2_L3 ((SLuint32) 0x00000002)
+#define SL_AUDIOPROFILE_MPEG25_L3 ((SLuint32) 0x00000003)
+
+#define SL_AUDIOCHANMODE_MP3_MONO ((SLuint32) 0x00000001)
+#define SL_AUDIOCHANMODE_MP3_STEREO ((SLuint32) 0x00000002)
+#define SL_AUDIOCHANMODE_MP3_JOINTSTEREO ((SLuint32) 0x00000003)
+#define SL_AUDIOCHANMODE_MP3_DUAL ((SLuint32) 0x00000004)
+
+#define SL_AUDIOPROFILE_AMR ((SLuint32) 0x00000001)
+
+#define SL_AUDIOSTREAMFORMAT_CONFORMANCE ((SLuint32) 0x00000001)
+#define SL_AUDIOSTREAMFORMAT_IF1 ((SLuint32) 0x00000002)
+#define SL_AUDIOSTREAMFORMAT_IF2 ((SLuint32) 0x00000003)
+#define SL_AUDIOSTREAMFORMAT_FSF ((SLuint32) 0x00000004)
+#define SL_AUDIOSTREAMFORMAT_RTPPAYLOAD ((SLuint32) 0x00000005)
+#define SL_AUDIOSTREAMFORMAT_ITU ((SLuint32) 0x00000006)
+
+#define SL_AUDIOPROFILE_AMRWB ((SLuint32) 0x00000001)
+
+#define SL_AUDIOPROFILE_AMRWBPLUS ((SLuint32) 0x00000001)
+
+#define SL_AUDIOPROFILE_AAC_AAC ((SLuint32) 0x00000001)
+
+#define SL_AUDIOMODE_AAC_MAIN ((SLuint32) 0x00000001)
+#define SL_AUDIOMODE_AAC_LC ((SLuint32) 0x00000002)
+#define SL_AUDIOMODE_AAC_SSR ((SLuint32) 0x00000003)
+#define SL_AUDIOMODE_AAC_LTP ((SLuint32) 0x00000004)
+#define SL_AUDIOMODE_AAC_HE ((SLuint32) 0x00000005)
+#define SL_AUDIOMODE_AAC_SCALABLE ((SLuint32) 0x00000006)
+#define SL_AUDIOMODE_AAC_ERLC ((SLuint32) 0x00000007)
+#define SL_AUDIOMODE_AAC_LD ((SLuint32) 0x00000008)
+#define SL_AUDIOMODE_AAC_HE_PS ((SLuint32) 0x00000009)
+#define SL_AUDIOMODE_AAC_HE_MPS ((SLuint32) 0x0000000A)
+
+#define SL_AUDIOSTREAMFORMAT_MP2ADTS ((SLuint32) 0x00000001)
+#define SL_AUDIOSTREAMFORMAT_MP4ADTS ((SLuint32) 0x00000002)
+#define SL_AUDIOSTREAMFORMAT_MP4LOAS ((SLuint32) 0x00000003)
+#define SL_AUDIOSTREAMFORMAT_MP4LATM ((SLuint32) 0x00000004)
+#define SL_AUDIOSTREAMFORMAT_ADIF ((SLuint32) 0x00000005)
+#define SL_AUDIOSTREAMFORMAT_MP4FF ((SLuint32) 0x00000006)
+#define SL_AUDIOSTREAMFORMAT_RAW ((SLuint32) 0x00000007)
+
+#define SL_AUDIOPROFILE_WMA7 ((SLuint32) 0x00000001)
+#define SL_AUDIOPROFILE_WMA8 ((SLuint32) 0x00000002)
+#define SL_AUDIOPROFILE_WMA9 ((SLuint32) 0x00000003)
+#define SL_AUDIOPROFILE_WMA10 ((SLuint32) 0x00000004)
+
+#define SL_AUDIOMODE_WMA_LEVEL1 ((SLuint32) 0x00000001)
+#define SL_AUDIOMODE_WMA_LEVEL2 ((SLuint32) 0x00000002)
+#define SL_AUDIOMODE_WMA_LEVEL3 ((SLuint32) 0x00000003)
+#define SL_AUDIOMODE_WMA_LEVEL4 ((SLuint32) 0x00000004)
+#define SL_AUDIOMODE_WMAPRO_LEVELM0 ((SLuint32) 0x00000005)
+#define SL_AUDIOMODE_WMAPRO_LEVELM1 ((SLuint32) 0x00000006)
+#define SL_AUDIOMODE_WMAPRO_LEVELM2 ((SLuint32) 0x00000007)
+#define SL_AUDIOMODE_WMAPRO_LEVELM3 ((SLuint32) 0x00000008)
+
+#define SL_AUDIOPROFILE_REALAUDIO ((SLuint32) 0x00000001)
+
+#define SL_AUDIOMODE_REALAUDIO_G2 ((SLuint32) 0x00000001)
+#define SL_AUDIOMODE_REALAUDIO_8 ((SLuint32) 0x00000002)
+#define SL_AUDIOMODE_REALAUDIO_10 ((SLuint32) 0x00000003)
+#define SL_AUDIOMODE_REALAUDIO_SURROUND ((SLuint32) 0x00000004)
+
+typedef struct SLAudioCodecDescriptor_ {
+ SLuint32 maxChannels;
+ SLuint32 minBitsPerSample;
+ SLuint32 maxBitsPerSample;
+ SLmilliHertz minSampleRate;
+ SLmilliHertz maxSampleRate;
+ SLboolean isFreqRangeContinuous;
+ SLmilliHertz *pSampleRatesSupported;
+ SLuint32 numSampleRatesSupported;
+ SLuint32 minBitRate;
+ SLuint32 maxBitRate;
+ SLboolean isBitrateRangeContinuous;
+ SLuint32 *pBitratesSupported;
+ SLuint32 numBitratesSupported;
+ SLuint32 profileSetting;
+ SLuint32 modeSetting;
+} SLAudioCodecDescriptor;
+
+/*Structure used to retrieve the profile and level settings supported by an audio encoder */
+
+typedef struct SLAudioCodecProfileMode_ {
+ SLuint32 profileSetting;
+ SLuint32 modeSetting;
+} SLAudioCodecProfileMode;
+
+extern SL_API const SLInterfaceID SL_IID_AUDIODECODERCAPABILITIES;
+
+struct SLAudioDecoderCapabilitiesItf_;
+typedef const struct SLAudioDecoderCapabilitiesItf_ * const * SLAudioDecoderCapabilitiesItf;
+
+struct SLAudioDecoderCapabilitiesItf_ {
+ SLresult (*GetAudioDecoders) (
+ SLAudioDecoderCapabilitiesItf self,
+ SLuint32 * pNumDecoders ,
+ SLuint32 *pDecoderIds
+ );
+ SLresult (*GetAudioDecoderCapabilities) (
+ SLAudioDecoderCapabilitiesItf self,
+ SLuint32 decoderId,
+ SLuint32 *pIndex,
+ SLAudioCodecDescriptor *pDescriptor
+ );
+};
+
+
+
+
+/*---------------------------------------------------------------------------*/
+/* Audio Encoder Capabilities Interface */
+/* --------------------------------------------------------------------------*/
+
+/* Structure used when setting audio encoding parameters */
+
+typedef struct SLAudioEncoderSettings_ {
+ SLuint32 encoderId;
+ SLuint32 channelsIn;
+ SLuint32 channelsOut;
+ SLmilliHertz sampleRate;
+ SLuint32 bitRate;
+ SLuint32 bitsPerSample;
+ SLuint32 rateControl;
+ SLuint32 profileSetting;
+ SLuint32 levelSetting;
+ SLuint32 channelMode;
+ SLuint32 streamFormat;
+ SLuint32 encodeOptions;
+ SLuint32 blockAlignment;
+} SLAudioEncoderSettings;
+
+extern SL_API const SLInterfaceID SL_IID_AUDIOENCODERCAPABILITIES;
+
+struct SLAudioEncoderCapabilitiesItf_;
+typedef const struct SLAudioEncoderCapabilitiesItf_ * const * SLAudioEncoderCapabilitiesItf;
+
+struct SLAudioEncoderCapabilitiesItf_ {
+ SLresult (*GetAudioEncoders) (
+ SLAudioEncoderCapabilitiesItf self,
+ SLuint32 *pNumEncoders ,
+ SLuint32 *pEncoderIds
+ );
+ SLresult (*GetAudioEncoderCapabilities) (
+ SLAudioEncoderCapabilitiesItf self,
+ SLuint32 encoderId,
+ SLuint32 *pIndex,
+ SLAudioCodecDescriptor * pDescriptor
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Audio Encoder Interface */
+/* --------------------------------------------------------------------------*/
+
+
+extern SL_API const SLInterfaceID SL_IID_AUDIOENCODER;
+
+struct SLAudioEncoderItf_;
+typedef const struct SLAudioEncoderItf_ * const * SLAudioEncoderItf;
+
+struct SLAudioEncoderItf_ {
+ SLresult (*SetEncoderSettings) (
+ SLAudioEncoderItf self,
+ SLAudioEncoderSettings *pSettings
+ );
+ SLresult (*GetEncoderSettings) (
+ SLAudioEncoderItf self,
+ SLAudioEncoderSettings *pSettings
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Bass Boost Interface */
+/* --------------------------------------------------------------------------*/
+
+
+extern SL_API const SLInterfaceID SL_IID_BASSBOOST;
+
+struct SLBassBoostItf_;
+typedef const struct SLBassBoostItf_ * const * SLBassBoostItf;
+
+struct SLBassBoostItf_ {
+ SLresult (*SetEnabled)(
+ SLBassBoostItf self,
+ SLboolean enabled
+ );
+ SLresult (*IsEnabled)(
+ SLBassBoostItf self,
+ SLboolean *pEnabled
+ );
+ SLresult (*SetStrength)(
+ SLBassBoostItf self,
+ SLpermille strength
+ );
+ SLresult (*GetRoundedStrength)(
+ SLBassBoostItf self,
+ SLpermille *pStrength
+ );
+ SLresult (*IsStrengthSupported)(
+ SLBassBoostItf self,
+ SLboolean *pSupported
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* Pitch Interface */
+/* --------------------------------------------------------------------------*/
+
+
+extern SL_API const SLInterfaceID SL_IID_PITCH;
+
+struct SLPitchItf_;
+typedef const struct SLPitchItf_ * const * SLPitchItf;
+
+struct SLPitchItf_ {
+ SLresult (*SetPitch) (
+ SLPitchItf self,
+ SLpermille pitch
+ );
+ SLresult (*GetPitch) (
+ SLPitchItf self,
+ SLpermille *pPitch
+ );
+ SLresult (*GetPitchCapabilities) (
+ SLPitchItf self,
+ SLpermille *pMinPitch,
+ SLpermille *pMaxPitch
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Rate Pitch Interface */
+/* RatePitchItf is an interface for controlling the rate a sound is played */
+/* back. A change in rate will cause a change in pitch. */
+/* --------------------------------------------------------------------------*/
+
+
+extern SL_API const SLInterfaceID SL_IID_RATEPITCH;
+
+struct SLRatePitchItf_;
+typedef const struct SLRatePitchItf_ * const * SLRatePitchItf;
+
+struct SLRatePitchItf_ {
+ SLresult (*SetRate) (
+ SLRatePitchItf self,
+ SLpermille rate
+ );
+ SLresult (*GetRate) (
+ SLRatePitchItf self,
+ SLpermille *pRate
+ );
+ SLresult (*GetRatePitchCapabilities) (
+ SLRatePitchItf self,
+ SLpermille *pMinRate,
+ SLpermille *pMaxRate
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Virtualizer Interface */
+/* --------------------------------------------------------------------------*/
+
+
+extern SL_API const SLInterfaceID SL_IID_VIRTUALIZER;
+
+struct SLVirtualizerItf_;
+typedef const struct SLVirtualizerItf_ * const * SLVirtualizerItf;
+
+struct SLVirtualizerItf_ {
+ SLresult (*SetEnabled)(
+ SLVirtualizerItf self,
+ SLboolean enabled
+ );
+ SLresult (*IsEnabled)(
+ SLVirtualizerItf self,
+ SLboolean *pEnabled
+ );
+ SLresult (*SetStrength)(
+ SLVirtualizerItf self,
+ SLpermille strength
+ );
+ SLresult (*GetRoundedStrength)(
+ SLVirtualizerItf self,
+ SLpermille *pStrength
+ );
+ SLresult (*IsStrengthSupported)(
+ SLVirtualizerItf self,
+ SLboolean *pSupported
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* Visualization Interface */
+/* --------------------------------------------------------------------------*/
+
+
+extern SL_API const SLInterfaceID SL_IID_VISUALIZATION;
+
+struct SLVisualizationItf_;
+typedef const struct SLVisualizationItf_ * const * SLVisualizationItf;
+
+typedef void (SLAPIENTRY *slVisualizationCallback) (
+ void *pContext,
+ const SLuint8 waveform[],
+ const SLuint8 fft[],
+ SLmilliHertz samplerate
+);
+
+struct SLVisualizationItf_{
+ SLresult (*RegisterVisualizationCallback)(
+ SLVisualizationItf self,
+ slVisualizationCallback callback,
+ void *pContext,
+ SLmilliHertz rate
+ );
+ SLresult (*GetMaxRate)(
+ SLVisualizationItf self,
+ SLmilliHertz* pRate
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Engine Interface */
+/* --------------------------------------------------------------------------*/
+
+
+extern SL_API const SLInterfaceID SL_IID_ENGINE;
+
+struct SLEngineItf_;
+typedef const struct SLEngineItf_ * const * SLEngineItf;
+
+
+struct SLEngineItf_ {
+
+ SLresult (*CreateLEDDevice) (
+ SLEngineItf self,
+ SLObjectItf * pDevice,
+ SLuint32 deviceID,
+ SLuint32 numInterfaces,
+ const SLInterfaceID * pInterfaceIds,
+ const SLboolean * pInterfaceRequired
+ );
+ SLresult (*CreateVibraDevice) (
+ SLEngineItf self,
+ SLObjectItf * pDevice,
+ SLuint32 deviceID,
+ SLuint32 numInterfaces,
+ const SLInterfaceID * pInterfaceIds,
+ const SLboolean * pInterfaceRequired
+ );
+ SLresult (*CreateAudioPlayer) (
+ SLEngineItf self,
+ SLObjectItf * pPlayer,
+ SLDataSource *pAudioSrc,
+ SLDataSink *pAudioSnk,
+ SLuint32 numInterfaces,
+ const SLInterfaceID * pInterfaceIds,
+ const SLboolean * pInterfaceRequired
+ );
+ SLresult (*CreateAudioRecorder) (
+ SLEngineItf self,
+ SLObjectItf * pRecorder,
+ SLDataSource *pAudioSrc,
+ SLDataSink *pAudioSnk,
+ SLuint32 numInterfaces,
+ const SLInterfaceID * pInterfaceIds,
+ const SLboolean * pInterfaceRequired
+ );
+ SLresult (*CreateMidiPlayer) (
+ SLEngineItf self,
+ SLObjectItf * pPlayer,
+ SLDataSource *pMIDISrc,
+ SLDataSource *pBankSrc,
+ SLDataSink *pAudioOutput,
+ SLDataSink *pVibra,
+ SLDataSink *pLEDArray,
+ SLuint32 numInterfaces,
+ const SLInterfaceID * pInterfaceIds,
+ const SLboolean * pInterfaceRequired
+ );
+ SLresult (*CreateListener) (
+ SLEngineItf self,
+ SLObjectItf * pListener,
+ SLuint32 numInterfaces,
+ const SLInterfaceID * pInterfaceIds,
+ const SLboolean * pInterfaceRequired
+ );
+ SLresult (*Create3DGroup) (
+ SLEngineItf self,
+ SLObjectItf * pGroup,
+ SLuint32 numInterfaces,
+ const SLInterfaceID * pInterfaceIds,
+ const SLboolean * pInterfaceRequired
+ );
+ SLresult (*CreateOutputMix) (
+ SLEngineItf self,
+ SLObjectItf * pMix,
+ SLuint32 numInterfaces,
+ const SLInterfaceID * pInterfaceIds,
+ const SLboolean * pInterfaceRequired
+ );
+ SLresult (*CreateMetadataExtractor) (
+ SLEngineItf self,
+ SLObjectItf * pMetadataExtractor,
+ SLDataSource * pDataSource,
+ SLuint32 numInterfaces,
+ const SLInterfaceID * pInterfaceIds,
+ const SLboolean * pInterfaceRequired
+ );
+ SLresult (*CreateExtensionObject) (
+ SLEngineItf self,
+ SLObjectItf * pObject,
+ void * pParameters,
+ SLuint32 objectID,
+ SLuint32 numInterfaces,
+ const SLInterfaceID * pInterfaceIds,
+ const SLboolean * pInterfaceRequired
+ );
+ SLresult (*QueryNumSupportedInterfaces) (
+ SLEngineItf self,
+ SLuint32 objectID,
+ SLuint32 * pNumSupportedInterfaces
+ );
+ SLresult (*QuerySupportedInterfaces) (
+ SLEngineItf self,
+ SLuint32 objectID,
+ SLuint32 index,
+ SLInterfaceID * pInterfaceId
+ );
+ SLresult (*QueryNumSupportedExtensions) (
+ SLEngineItf self,
+ SLuint32 * pNumExtensions
+ );
+ SLresult (*QuerySupportedExtension) (
+ SLEngineItf self,
+ SLuint32 index,
+ SLchar * pExtensionName,
+ SLint16 * pNameLength
+ );
+ SLresult (*IsExtensionSupported) (
+ SLEngineItf self,
+ const SLchar * pExtensionName,
+ SLboolean * pSupported
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* Engine Capabilities Interface */
+/* --------------------------------------------------------------------------*/
+
+
+extern SL_API const SLInterfaceID SL_IID_ENGINECAPABILITIES;
+
+struct SLEngineCapabilitiesItf_;
+typedef const struct SLEngineCapabilitiesItf_ * const * SLEngineCapabilitiesItf;
+
+struct SLEngineCapabilitiesItf_ {
+ SLresult (*QuerySupportedProfiles) (
+ SLEngineCapabilitiesItf self,
+ SLuint16 *pProfilesSupported
+ );
+ SLresult (*QueryAvailableVoices) (
+ SLEngineCapabilitiesItf self,
+ SLuint16 voiceType,
+ SLint16 *pNumMaxVoices,
+ SLboolean *pIsAbsoluteMax,
+ SLint16 *pNumFreeVoices
+ );
+ SLresult (*QueryNumberOfMIDISynthesizers) (
+ SLEngineCapabilitiesItf self,
+ SLint16 *pNumMIDIsynthesizers
+ );
+ SLresult (*QueryAPIVersion) (
+ SLEngineCapabilitiesItf self,
+ SLint16 *pMajor,
+ SLint16 *pMinor,
+ SLint16 *pStep
+ );
+ SLresult (*QueryLEDCapabilities) (
+ SLEngineCapabilitiesItf self,
+ SLuint32 *pIndex,
+ SLuint32 *pLEDDeviceID,
+ SLLEDDescriptor *pDescriptor
+ );
+ SLresult (*QueryVibraCapabilities) (
+ SLEngineCapabilitiesItf self,
+ SLuint32 *pIndex,
+ SLuint32 *pVibraDeviceID,
+ SLVibraDescriptor *pDescriptor
+ );
+ SLresult (*IsThreadSafe) (
+ SLEngineCapabilitiesItf self,
+ SLboolean *pIsThreadSafe
+ );
+};
+
+/*---------------------------------------------------------------------------*/
+/* Thread Sync Interface */
+/* --------------------------------------------------------------------------*/
+
+
+extern SL_API const SLInterfaceID SL_IID_THREADSYNC;
+
+struct SLThreadSyncItf_;
+typedef const struct SLThreadSyncItf_ * const * SLThreadSyncItf;
+
+
+struct SLThreadSyncItf_ {
+ SLresult (*EnterCriticalSection) (
+ SLThreadSyncItf self
+ );
+ SLresult (*ExitCriticalSection) (
+ SLThreadSyncItf self
+ );
+};
+
+
+/*****************************************************************************/
+/* SL engine constructor */
+/*****************************************************************************/
+
+#define SL_ENGINEOPTION_THREADSAFE ((SLuint32) 0x00000001)
+#define SL_ENGINEOPTION_LOSSOFCONTROL ((SLuint32) 0x00000002)
+
+typedef struct SLEngineOption_ {
+ SLuint32 feature;
+ SLuint32 data;
+} SLEngineOption;
+
+
+SL_API SLresult SLAPIENTRY slCreateEngine(
+ SLObjectItf *pEngine,
+ SLuint32 numOptions,
+ const SLEngineOption *pEngineOptions,
+ SLuint32 numInterfaces,
+ const SLInterfaceID *pInterfaceIds,
+ const SLboolean * pInterfaceRequired
+);
+
+SL_API SLresult SLAPIENTRY slQueryNumSupportedEngineInterfaces(
+ SLuint32 * pNumSupportedInterfaces
+);
+
+SL_API SLresult SLAPIENTRY slQuerySupportedEngineInterfaces(
+ SLuint32 index,
+ SLInterfaceID * pInterfaceId
+);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* OPENSL_ES_H_ */
diff --git a/ndk/platforms/android-14/include/SLES/OpenSLES_Android.h b/ndk/platforms/android-14/include/SLES/OpenSLES_Android.h
new file mode 100644
index 0000000..f295518
--- /dev/null
+++ b/ndk/platforms/android-14/include/SLES/OpenSLES_Android.h
@@ -0,0 +1,349 @@
+/*
+ * 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_AndroidConfiguration.h"
+#include "OpenSLES_AndroidMetadata.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 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;
+
+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
+ );
+};
+
+
+/*---------------------------------------------------------------------------*/
+/* 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")
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* OPENSL_ES_ANDROID_H_ */
diff --git a/ndk/platforms/android-14/include/SLES/OpenSLES_AndroidConfiguration.h b/ndk/platforms/android-14/include/SLES/OpenSLES_AndroidConfiguration.h
new file mode 100644
index 0000000..01f460d
--- /dev/null
+++ b/ndk/platforms/android-14/include/SLES/OpenSLES_AndroidConfiguration.h
@@ -0,0 +1,73 @@
+/*
+ * 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)
+
+/*---------------------------------------------------------------------------*/
+/* 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)
+
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* OPENSL_ES_ANDROIDCONFIGURATION_H_ */
diff --git a/ndk/platforms/android-14/include/SLES/OpenSLES_AndroidMetadata.h b/ndk/platforms/android-14/include/SLES/OpenSLES_AndroidMetadata.h
new file mode 100644
index 0000000..01e33b8
--- /dev/null
+++ b/ndk/platforms/android-14/include/SLES/OpenSLES_AndroidMetadata.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_ */
diff --git a/ndk/platforms/android-14/include/SLES/OpenSLES_Platform.h b/ndk/platforms/android-14/include/SLES/OpenSLES_Platform.h
new file mode 100644
index 0000000..527693d
--- /dev/null
+++ b/ndk/platforms/android-14/include/SLES/OpenSLES_Platform.h
@@ -0,0 +1,57 @@
+/*
+ * 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
+
+#endif /* _OPENSLES_PLATFORM_H_ */
diff --git a/ndk/platforms/android-14/samples/native-media/README.txt b/ndk/platforms/android-14/samples/native-media/README.txt
new file mode 100644
index 0000000..516698a
--- /dev/null
+++ b/ndk/platforms/android-14/samples/native-media/README.txt
@@ -0,0 +1,2 @@
+The documentation for Android native media based on OpenMAX AL 1.0.1
+references this directory, but the example is not yet available.
diff --git a/ndk/platforms/android-3/arch-arm/lib/libthread_db.a b/ndk/platforms/android-3/arch-arm/lib/libthread_db.a
deleted file mode 100644
index 9d634be..0000000
--- a/ndk/platforms/android-3/arch-arm/lib/libthread_db.a
+++ /dev/null
Binary files differ
diff --git a/ndk/platforms/android-3/include/android/api-level.h b/ndk/platforms/android-3/include/android/api-level.h
deleted file mode 100644
index 2ff8ed4..0000000
--- a/ndk/platforms/android-3/include/android/api-level.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-#ifndef ANDROID_API_LEVEL_H
-#define ANDROID_API_LEVEL_H
-
-#define __ANDROID_API__ 3
-
-#endif /* ANDROID_API_LEVEL_H */
diff --git a/ndk/platforms/android-3/include/time.h b/ndk/platforms/android-3/include/time.h
index b5227d7..caf6aa7 100644
--- a/ndk/platforms/android-3/include/time.h
+++ b/ndk/platforms/android-3/include/time.h
@@ -96,8 +96,10 @@
extern clock_t clock(void);
/* BIONIC: extra linux clock goodies */
-extern int clock_getres(int, struct timespec *);
-extern int clock_gettime(int, struct timespec *);
+extern int clock_getres(clockid_t, struct timespec *);
+extern int clock_gettime(clockid_t, struct timespec *);
+extern int clock_settime(clockid_t, const struct timespec *);
+extern int clock_nanosleep(clockid_t, int, const struct timespec *, struct timespec *);
#define CLOCK_REALTIME 0
#define CLOCK_MONOTONIC 1
diff --git a/ndk/platforms/android-4/include/GLES/gl.h b/ndk/platforms/android-4/include/GLES/gl.h
index 2e8b971..5b8d85a 100644
--- a/ndk/platforms/android-4/include/GLES/gl.h
+++ b/ndk/platforms/android-4/include/GLES/gl.h
@@ -1,7 +1,7 @@
#ifndef __gl_h_
#define __gl_h_
-/* $Revision: 7172 $ on $Date:: 2009-01-09 11:17:41 -0800 #$ */
+/* $Revision: 10601 $ on $Date:: 2010-03-04 22:15:27 -0800 #$ */
#include <GLES/glplatform.h>
@@ -15,6 +15,7 @@
*/
typedef void GLvoid;
+typedef char GLchar;
typedef unsigned int GLenum;
typedef unsigned char GLboolean;
typedef unsigned int GLbitfield;
@@ -678,7 +679,7 @@
GL_API void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *params);
GL_API void GL_APIENTRY glGetLightxv (GLenum light, GLenum pname, GLfixed *params);
GL_API void GL_APIENTRY glGetMaterialxv (GLenum face, GLenum pname, GLfixed *params);
-GL_API void GL_APIENTRY glGetPointerv (GLenum pname, void **params);
+GL_API void GL_APIENTRY glGetPointerv (GLenum pname, GLvoid **params);
GL_API const GLubyte * GL_APIENTRY glGetString (GLenum name);
GL_API void GL_APIENTRY glGetTexEnviv (GLenum env, GLenum pname, GLint *params);
GL_API void GL_APIENTRY glGetTexEnvxv (GLenum env, GLenum pname, GLfixed *params);
diff --git a/ndk/platforms/android-4/include/GLES/glext.h b/ndk/platforms/android-4/include/GLES/glext.h
index a8fe2e9..65ab5e4 100644
--- a/ndk/platforms/android-4/include/GLES/glext.h
+++ b/ndk/platforms/android-4/include/GLES/glext.h
@@ -1,7 +1,7 @@
#ifndef __glext_h_
#define __glext_h_
-/* $Revision: 7172 $ on $Date:: 2009-01-09 11:17:41 -0800 #$ */
+/* $Revision: 10965 $ on $Date:: 2010-04-09 02:11:29 -0700 #$ */
#ifdef __cplusplus
extern "C" {
@@ -68,6 +68,11 @@
typedef void* GLeglImageOES;
#endif
+/* GL_OES_element_index_uint */
+#ifndef GL_OES_element_index_uint
+#define GL_UNSIGNED_INT 0x1405
+#endif
+
/* GL_OES_fixed_point */
#ifndef GL_OES_fixed_point
#define GL_FIXED_OES 0x140C
@@ -201,6 +206,19 @@
#define GL_MIRRORED_REPEAT_OES 0x8370
#endif
+/* GL_OES_vertex_array_object */
+#ifndef GL_OES_vertex_array_object
+#define GL_VERTEX_ARRAY_BINDING_OES 0x85B5
+#endif
+
+/* GL_OES_EGL_image_external */
+#ifndef GL_OES_EGL_image_external
+#define GL_TEXTURE_EXTERNAL_OES 0x8D65
+#define GL_SAMPLER_EXTERNAL_OES 0x8D66
+#define GL_TEXTURE_BINDING_EXTERNAL_OES 0x8D67
+#define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES 0x8D68
+#endif
+
/*------------------------------------------------------------------------*
* AMD extension tokens
*------------------------------------------------------------------------*/
@@ -219,15 +237,191 @@
#endif
/*------------------------------------------------------------------------*
+ * APPLE extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_APPLE_texture_2D_limited_npot */
+/* No new tokens introduced by this extension. */
+
+/*------------------------------------------------------------------------*
* EXT extension tokens
*------------------------------------------------------------------------*/
+/* GL_EXT_blend_minmax */
+#ifndef GL_EXT_blend_minmax
+#define GL_MIN_EXT 0x8007
+#define GL_MAX_EXT 0x8008
+#endif
+
+/* GL_EXT_discard_framebuffer */
+#ifndef GL_EXT_discard_framebuffer
+#define GL_COLOR_EXT 0x1800
+#define GL_DEPTH_EXT 0x1801
+#define GL_STENCIL_EXT 0x1802
+#endif
+
+/* GL_EXT_multi_draw_arrays */
+/* No new tokens introduced by this extension. */
+
+/* GL_EXT_read_format_bgra */
+#ifndef GL_EXT_read_format_bgra
+#define GL_BGRA_EXT 0x80E1
+#define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT 0x8365
+#define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT 0x8366
+#endif
+
/* GL_EXT_texture_filter_anisotropic */
#ifndef GL_EXT_texture_filter_anisotropic
#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
#endif
+/* GL_EXT_texture_format_BGRA8888 */
+#ifndef GL_EXT_texture_format_BGRA8888
+#define GL_BGRA_EXT 0x80E1
+#endif
+
+/* GL_EXT_texture_lod_bias */
+#ifndef GL_EXT_texture_lod_bias
+#define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD
+#define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500
+#define GL_TEXTURE_LOD_BIAS_EXT 0x8501
+#endif
+
+/*------------------------------------------------------------------------*
+ * IMG extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_IMG_read_format */
+#ifndef GL_IMG_read_format
+#define GL_BGRA_IMG 0x80E1
+#define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG 0x8365
+#endif
+
+/* GL_IMG_texture_compression_pvrtc */
+#ifndef GL_IMG_texture_compression_pvrtc
+#define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00
+#define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01
+#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02
+#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03
+#endif
+
+/* GL_IMG_texture_env_enhanced_fixed_function */
+#ifndef GL_IMG_texture_env_enhanced_fixed_function
+#define GL_MODULATE_COLOR_IMG 0x8C04
+#define GL_RECIP_ADD_SIGNED_ALPHA_IMG 0x8C05
+#define GL_TEXTURE_ALPHA_MODULATE_IMG 0x8C06
+#define GL_FACTOR_ALPHA_MODULATE_IMG 0x8C07
+#define GL_FRAGMENT_ALPHA_MODULATE_IMG 0x8C08
+#define GL_ADD_BLEND_IMG 0x8C09
+#define GL_DOT3_RGBA_IMG 0x86AF
+#endif
+
+/* GL_IMG_user_clip_plane */
+#ifndef GL_IMG_user_clip_plane
+#define GL_CLIP_PLANE0_IMG 0x3000
+#define GL_CLIP_PLANE1_IMG 0x3001
+#define GL_CLIP_PLANE2_IMG 0x3002
+#define GL_CLIP_PLANE3_IMG 0x3003
+#define GL_CLIP_PLANE4_IMG 0x3004
+#define GL_CLIP_PLANE5_IMG 0x3005
+#define GL_MAX_CLIP_PLANES_IMG 0x0D32
+#endif
+
+/* GL_IMG_multisampled_render_to_texture */
+#ifndef GL_IMG_multisampled_render_to_texture
+#define GL_RENDERBUFFER_SAMPLES_IMG 0x9133
+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG 0x9134
+#define GL_MAX_SAMPLES_IMG 0x9135
+#define GL_TEXTURE_SAMPLES_IMG 0x9136
+#endif
+
+/*------------------------------------------------------------------------*
+ * NV extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_NV_fence */
+#ifndef GL_NV_fence
+#define GL_ALL_COMPLETED_NV 0x84F2
+#define GL_FENCE_STATUS_NV 0x84F3
+#define GL_FENCE_CONDITION_NV 0x84F4
+#endif
+
+/*------------------------------------------------------------------------*
+ * QCOM extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_QCOM_driver_control */
+/* No new tokens introduced by this extension. */
+
+/* GL_QCOM_extended_get */
+#ifndef GL_QCOM_extended_get
+#define GL_TEXTURE_WIDTH_QCOM 0x8BD2
+#define GL_TEXTURE_HEIGHT_QCOM 0x8BD3
+#define GL_TEXTURE_DEPTH_QCOM 0x8BD4
+#define GL_TEXTURE_INTERNAL_FORMAT_QCOM 0x8BD5
+#define GL_TEXTURE_FORMAT_QCOM 0x8BD6
+#define GL_TEXTURE_TYPE_QCOM 0x8BD7
+#define GL_TEXTURE_IMAGE_VALID_QCOM 0x8BD8
+#define GL_TEXTURE_NUM_LEVELS_QCOM 0x8BD9
+#define GL_TEXTURE_TARGET_QCOM 0x8BDA
+#define GL_TEXTURE_OBJECT_VALID_QCOM 0x8BDB
+#define GL_STATE_RESTORE 0x8BDC
+#endif
+
+/* GL_QCOM_extended_get2 */
+/* No new tokens introduced by this extension. */
+
+/* GL_QCOM_perfmon_global_mode */
+#ifndef GL_QCOM_perfmon_global_mode
+#define GL_PERFMON_GLOBAL_MODE_QCOM 0x8FA0
+#endif
+
+/* GL_QCOM_writeonly_rendering */
+#ifndef GL_QCOM_writeonly_rendering
+#define GL_WRITEONLY_RENDERING_QCOM 0x8823
+#endif
+
+/* GL_QCOM_tiled_rendering */
+#ifndef GL_QCOM_tiled_rendering
+#define GL_COLOR_BUFFER_BIT0_QCOM 0x00000001
+#define GL_COLOR_BUFFER_BIT1_QCOM 0x00000002
+#define GL_COLOR_BUFFER_BIT2_QCOM 0x00000004
+#define GL_COLOR_BUFFER_BIT3_QCOM 0x00000008
+#define GL_COLOR_BUFFER_BIT4_QCOM 0x00000010
+#define GL_COLOR_BUFFER_BIT5_QCOM 0x00000020
+#define GL_COLOR_BUFFER_BIT6_QCOM 0x00000040
+#define GL_COLOR_BUFFER_BIT7_QCOM 0x00000080
+#define GL_DEPTH_BUFFER_BIT0_QCOM 0x00000100
+#define GL_DEPTH_BUFFER_BIT1_QCOM 0x00000200
+#define GL_DEPTH_BUFFER_BIT2_QCOM 0x00000400
+#define GL_DEPTH_BUFFER_BIT3_QCOM 0x00000800
+#define GL_DEPTH_BUFFER_BIT4_QCOM 0x00001000
+#define GL_DEPTH_BUFFER_BIT5_QCOM 0x00002000
+#define GL_DEPTH_BUFFER_BIT6_QCOM 0x00004000
+#define GL_DEPTH_BUFFER_BIT7_QCOM 0x00008000
+#define GL_STENCIL_BUFFER_BIT0_QCOM 0x00010000
+#define GL_STENCIL_BUFFER_BIT1_QCOM 0x00020000
+#define GL_STENCIL_BUFFER_BIT2_QCOM 0x00040000
+#define GL_STENCIL_BUFFER_BIT3_QCOM 0x00080000
+#define GL_STENCIL_BUFFER_BIT4_QCOM 0x00100000
+#define GL_STENCIL_BUFFER_BIT5_QCOM 0x00200000
+#define GL_STENCIL_BUFFER_BIT6_QCOM 0x00400000
+#define GL_STENCIL_BUFFER_BIT7_QCOM 0x00800000
+#define GL_MULTISAMPLE_BUFFER_BIT0_QCOM 0x01000000
+#define GL_MULTISAMPLE_BUFFER_BIT1_QCOM 0x02000000
+#define GL_MULTISAMPLE_BUFFER_BIT2_QCOM 0x04000000
+#define GL_MULTISAMPLE_BUFFER_BIT3_QCOM 0x08000000
+#define GL_MULTISAMPLE_BUFFER_BIT4_QCOM 0x10000000
+#define GL_MULTISAMPLE_BUFFER_BIT5_QCOM 0x20000000
+#define GL_MULTISAMPLE_BUFFER_BIT6_QCOM 0x40000000
+#define GL_MULTISAMPLE_BUFFER_BIT7_QCOM 0x80000000
+#endif
+
+/*------------------------------------------------------------------------*
+ * End of extension tokens, start of corresponding extension functions
+ *------------------------------------------------------------------------*/
+
/*------------------------------------------------------------------------*
* OES extension functions
*------------------------------------------------------------------------*/
@@ -456,11 +650,11 @@
#ifdef GL_GLEXT_PROTOTYPES
GL_API void* GL_APIENTRY glMapBufferOES (GLenum target, GLenum access);
GL_API GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target);
-GL_API void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, void** params);
+GL_API void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, GLvoid ** params);
#endif
typedef void* (GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access);
typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target);
-typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, void** params);
+typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, GLvoid ** params);
#endif
/* GL_OES_matrix_get */
@@ -576,6 +770,26 @@
#define GL_OES_texture_mirrored_repeat 1
#endif
+/* GL_OES_vertex_array_object */
+#ifndef GL_OES_vertex_array_object
+#define GL_OES_vertex_array_object 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API void GL_APIENTRY glBindVertexArrayOES (GLuint array);
+GL_API void GL_APIENTRY glDeleteVertexArraysOES (GLsizei n, const GLuint *arrays);
+GL_API void GL_APIENTRY glGenVertexArraysOES (GLsizei n, GLuint *arrays);
+GL_API GLboolean GL_APIENTRY glIsVertexArrayOES (GLuint array);
+#endif
+typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYOESPROC) (GLuint array);
+typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays);
+typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays);
+typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array);
+#endif
+
+/* GL_OES_EGL_image_external */
+#ifndef GL_OES_EGL_image_external
+#define GL_OES_EGL_image_external 1
+#endif
+
/*------------------------------------------------------------------------*
* AMD extension functions
*------------------------------------------------------------------------*/
@@ -591,14 +805,207 @@
#endif
/*------------------------------------------------------------------------*
+ * APPLE extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_APPLE_texture_2D_limited_npot */
+#ifndef GL_APPLE_texture_2D_limited_npot
+#define GL_APPLE_texture_2D_limited_npot 1
+#endif
+
+/*------------------------------------------------------------------------*
* EXT extension functions
*------------------------------------------------------------------------*/
+/* GL_EXT_blend_minmax */
+#ifndef GL_EXT_blend_minmax
+#define GL_EXT_blend_minmax 1
+#endif
+
+/* GL_EXT_discard_framebuffer */
+#ifndef GL_EXT_discard_framebuffer
+#define GL_EXT_discard_framebuffer 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments);
+#endif
+typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);
+#endif
+
+/* GL_EXT_multi_draw_arrays */
+#ifndef GL_EXT_multi_draw_arrays
+#define GL_EXT_multi_draw_arrays 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API void GL_APIENTRY glMultiDrawArraysEXT (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
+GL_API void GL_APIENTRY glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
+typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
+#endif
+
+/* GL_EXT_read_format_bgra */
+#ifndef GL_EXT_read_format_bgra
+#define GL_EXT_read_format_bgra 1
+#endif
+
/* GL_EXT_texture_filter_anisotropic */
#ifndef GL_EXT_texture_filter_anisotropic
#define GL_EXT_texture_filter_anisotropic 1
#endif
+/* GL_EXT_texture_format_BGRA8888 */
+#ifndef GL_EXT_texture_format_BGRA8888
+#define GL_EXT_texture_format_BGRA8888 1
+#endif
+
+/* GL_EXT_texture_lod_bias */
+#ifndef GL_EXT_texture_lod_bias
+#define GL_EXT_texture_lod_bias 1
+#endif
+
+/*------------------------------------------------------------------------*
+ * IMG extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_IMG_read_format */
+#ifndef GL_IMG_read_format
+#define GL_IMG_read_format 1
+#endif
+
+/* GL_IMG_texture_compression_pvrtc */
+#ifndef GL_IMG_texture_compression_pvrtc
+#define GL_IMG_texture_compression_pvrtc 1
+#endif
+
+/* GL_IMG_texture_env_enhanced_fixed_function */
+#ifndef GL_IMG_texture_env_enhanced_fixed_function
+#define GL_IMG_texture_env_enhanced_fixed_function 1
+#endif
+
+/* GL_IMG_user_clip_plane */
+#ifndef GL_IMG_user_clip_plane
+#define GL_IMG_user_clip_plane 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API void GL_APIENTRY glClipPlanefIMG (GLenum p, const GLfloat *eqn);
+GL_API void GL_APIENTRY glClipPlanexIMG (GLenum p, const GLfixed *eqn);
+#endif
+typedef void (GL_APIENTRYP PFNGLCLIPPLANEFIMGPROC) (GLenum p, const GLfloat *eqn);
+typedef void (GL_APIENTRYP PFNGLCLIPPLANEXIMGPROC) (GLenum p, const GLfixed *eqn);
+#endif
+
+/* GL_IMG_multisampled_render_to_texture */
+#ifndef GL_IMG_multisampled_render_to_texture
+#define GL_IMG_multisampled_render_to_texture 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+GL_API void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
+#endif
+typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMG) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMG) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
+#endif
+
+/*------------------------------------------------------------------------*
+ * NV extension functions
+ *------------------------------------------------------------------------*/
+
+/* NV_fence */
+#ifndef GL_NV_fence
+#define GL_NV_fence 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API void GL_APIENTRY glDeleteFencesNV (GLsizei n, const GLuint *fences);
+GL_API void GL_APIENTRY glGenFencesNV (GLsizei n, GLuint *fences);
+GL_API GLboolean GL_APIENTRY glIsFenceNV (GLuint fence);
+GL_API GLboolean GL_APIENTRY glTestFenceNV (GLuint fence);
+GL_API void GL_APIENTRY glGetFenceivNV (GLuint fence, GLenum pname, GLint *params);
+GL_API void GL_APIENTRY glFinishFenceNV (GLuint fence);
+GL_API void GL_APIENTRY glSetFenceNV (GLuint fence, GLenum condition);
+#endif
+typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
+typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
+typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);
+typedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);
+typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
+typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
+typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
+#endif
+
+/*------------------------------------------------------------------------*
+ * QCOM extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_QCOM_driver_control */
+#ifndef GL_QCOM_driver_control
+#define GL_QCOM_driver_control 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls);
+GL_API void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
+GL_API void GL_APIENTRY glEnableDriverControlQCOM (GLuint driverControl);
+GL_API void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl);
+#endif
+typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls);
+typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
+typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
+typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
+#endif
+
+/* GL_QCOM_extended_get */
+#ifndef GL_QCOM_extended_get
+#define GL_QCOM_extended_get 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, GLint maxTextures, GLint *numTextures);
+GL_API void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
+GL_API void GL_APIENTRY glExtGetRenderbuffersQCOM (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
+GL_API void GL_APIENTRY glExtGetFramebuffersQCOM (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
+GL_API void GL_APIENTRY glExtGetTexLevelParameterivQCOM (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
+GL_API void GL_APIENTRY glExtTexObjectStateOverrideiQCOM (GLenum target, GLenum pname, GLint param);
+GL_API void GL_APIENTRY glExtGetTexSubImageQCOM (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels);
+GL_API void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, GLvoid **params);
+#endif
+typedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, GLint maxTextures, GLint *numTextures);
+typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
+typedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
+typedef void (GL_APIENTRYP PFNGLEXTGETFRAMEBUFFERSQCOMPROC) (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
+typedef void (GL_APIENTRYP PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
+typedef void (GL_APIENTRYP PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) (GLenum target, GLenum pname, GLint param);
+typedef void (GL_APIENTRYP PFNGLEXTGETTEXSUBIMAGEQCOMPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels);
+typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, GLvoid **params);
+#endif
+
+/* GL_QCOM_extended_get2 */
+#ifndef GL_QCOM_extended_get2
+#define GL_QCOM_extended_get2 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, GLint maxShaders, GLint *numShaders);
+GL_API void GL_APIENTRY glExtGetProgramsQCOM (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
+GL_API GLboolean GL_APIENTRY glExtIsProgramBinaryQCOM (GLuint program);
+GL_API void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, GLenum shadertype, GLchar *source, GLint *length);
+#endif
+typedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, GLint maxShaders, GLint *numShaders);
+typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
+typedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) (GLuint program);
+typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint program, GLenum shadertype, GLchar *source, GLint *length);
+#endif
+
+/* GL_QCOM_perfmon_global_mode */
+#ifndef GL_QCOM_perfmon_global_mode
+#define GL_QCOM_perfmon_global_mode 1
+#endif
+
+/* GL_QCOM_writeonly_rendering */
+#ifndef GL_QCOM_writeonly_rendering
+#define GL_QCOM_writeonly_rendering 1
+#endif
+
+/* GL_QCOM_tiled_rendering */
+#ifndef GL_QCOM_tiled_rendering
+#define GL_QCOM_tiled_rendering 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API void GL_APIENTRY glStartTilingQCOM (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
+GL_API void GL_APIENTRY glEndTilingQCOM (GLbitfield preserveMask);
+#endif
+typedef void (GL_APIENTRYP PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
+typedef void (GL_APIENTRYP PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask);
+#endif
+
#ifdef __cplusplus
}
#endif
diff --git a/ndk/platforms/android-4/include/GLES/glplatform.h b/ndk/platforms/android-4/include/GLES/glplatform.h
index a38ea4c..2db6ee2 100644
--- a/ndk/platforms/android-4/include/GLES/glplatform.h
+++ b/ndk/platforms/android-4/include/GLES/glplatform.h
@@ -1,7 +1,7 @@
#ifndef __glplatform_h_
#define __glplatform_h_
-/* $Revision: 7172 $ on $Date:: 2009-01-09 11:17:41 -0800 #$ */
+/* $Revision: 10601 $ on $Date:: 2010-03-04 22:15:27 -0800 #$ */
/*
* This document is licensed under the SGI Free Software B License Version
@@ -9,7 +9,6 @@
*/
/* Platform-specific types and definitions for OpenGL ES 1.X gl.h
- * Last modified on 2008/12/19
*
* 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
@@ -24,16 +23,8 @@
#define GL_API KHRONOS_APICALL
#endif
-#if defined(__ANDROID__)
-
+#ifndef GL_APIENTRY
#define GL_APIENTRY KHRONOS_APIENTRY
-
-// XXX: this should probably not be here
-#define GL_DIRECT_TEXTURE_2D_QUALCOMM 0x7E80
-
-// XXX: not sure how this is intended to be used
-#define GL_GLEXT_PROTOTYPES
-
#endif
#endif /* __glplatform_h_ */
diff --git a/ndk/platforms/android-4/include/android/api-level.h b/ndk/platforms/android-4/include/android/api-level.h
deleted file mode 100644
index 7e085c5..0000000
--- a/ndk/platforms/android-4/include/android/api-level.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-#ifndef ANDROID_API_LEVEL_H
-#define ANDROID_API_LEVEL_H
-
-#define __ANDROID_API__ 4
-
-#endif /* ANDROID_API_LEVEL_H */
diff --git a/ndk/platforms/android-4/samples/san-angeles/jni/importgl.h b/ndk/platforms/android-4/samples/san-angeles/jni/importgl.h
index b05e0c8..a19a3a7 100644
--- a/ndk/platforms/android-4/samples/san-angeles/jni/importgl.h
+++ b/ndk/platforms/android-4/samples/san-angeles/jni/importgl.h
@@ -36,12 +36,6 @@
#include <GLES/egl.h>
#endif /* !ANDROID_NDK */
-/* Use DISABLE_IMPORTGL if you want to link the OpenGL ES at
- * compile/link time and not import it dynamically runtime.
- */
-#ifndef DISABLE_IMPORTGL
-
-
/* Dynamically fetches pointers to the egl & gl functions.
* Should be called once on application initialization.
* Returns non-zero on success and 0 on failure.
@@ -52,6 +46,11 @@
*/
extern void importGLDeinit();
+/* Use DISABLE_IMPORTGL if you want to link the OpenGL ES at
+ * compile/link time and not import it dynamically runtime.
+ */
+#ifndef DISABLE_IMPORTGL
+
#ifndef IMPORTGL_API
#define IMPORTGL_API extern
diff --git a/ndk/platforms/android-4/samples/san-angeles/res/layout/main.xml b/ndk/platforms/android-4/samples/san-angeles/res/layout/main.xml
index ca19a18..3e76662 100644
--- a/ndk/platforms/android-4/samples/san-angeles/res/layout/main.xml
+++ b/ndk/platforms/android-4/samples/san-angeles/res/layout/main.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
>
<TextView
- android:layout_width="match_parent"
+ android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Hello World, DemoActivity"
/>
diff --git a/ndk/platforms/android-5/include/GLES2/gl2.h b/ndk/platforms/android-5/include/GLES2/gl2.h
index 0182a67..e1d3b87 100644
--- a/ndk/platforms/android-5/include/GLES2/gl2.h
+++ b/ndk/platforms/android-5/include/GLES2/gl2.h
@@ -1,7 +1,7 @@
#ifndef __gl2_h_
#define __gl2_h_
-/* $Revision: 7173 $ on $Date:: 2009-01-09 11:18:21 -0800 #$ */
+/* $Revision: 10602 $ on $Date:: 2010-03-04 22:35:34 -0800 #$ */
#include <GLES2/gl2platform.h>
@@ -19,6 +19,7 @@
*-----------------------------------------------------------------------*/
typedef void GLvoid;
+typedef char GLchar;
typedef unsigned int GLenum;
typedef unsigned char GLboolean;
typedef unsigned int GLbitfield;
@@ -472,7 +473,7 @@
GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture);
GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader);
-GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const char* name);
+GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar* name);
GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);
GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);
@@ -482,8 +483,8 @@
GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
-GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void* data, GLenum usage);
-GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void* data);
+GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage);
+GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data);
GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target);
GL_APICALL void GL_APIENTRY glClear (GLbitfield mask);
GL_APICALL void GL_APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
@@ -491,8 +492,8 @@
GL_APICALL void GL_APIENTRY glClearStencil (GLint s);
GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader);
-GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data);
-GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data);
+GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data);
+GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data);
GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
GL_APICALL GLuint GL_APIENTRY glCreateProgram (void);
@@ -511,7 +512,7 @@
GL_APICALL void GL_APIENTRY glDisable (GLenum cap);
GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index);
GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
-GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const void* indices);
+GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid* indices);
GL_APICALL void GL_APIENTRY glEnable (GLenum cap);
GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index);
GL_APICALL void GL_APIENTRY glFinish (void);
@@ -524,10 +525,10 @@
GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint* framebuffers);
GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint* renderbuffers);
GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint* textures);
-GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name);
-GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name);
+GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
+GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
-GL_APICALL int GL_APIENTRY glGetAttribLocation (GLuint program, const char* name);
+GL_APICALL int GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar* name);
GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean* params);
GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint* params);
GL_APICALL GLenum GL_APIENTRY glGetError (void);
@@ -535,21 +536,21 @@
GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params);
GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint* params);
GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint* params);
-GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei* length, char* infolog);
+GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog);
GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params);
GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint* params);
-GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog);
+GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog);
GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
-GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufsize, GLsizei* length, char* source);
+GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source);
GL_APICALL const GLubyte* GL_APIENTRY glGetString (GLenum name);
GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat* params);
GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint* params);
GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat* params);
GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint* params);
-GL_APICALL int GL_APIENTRY glGetUniformLocation (GLuint program, const char* name);
+GL_APICALL int GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar* name);
GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params);
GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint* params);
-GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void** pointer);
+GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid** pointer);
GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode);
GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer);
GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap);
@@ -562,25 +563,25 @@
GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program);
GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
-GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void* pixels);
+GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);
GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void);
GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
GL_APICALL void GL_APIENTRY glSampleCoverage (GLclampf value, GLboolean invert);
GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length);
-GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const char** string, const GLint* length);
+GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length);
+GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar** string, const GLint* length);
GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask);
GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);
GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
-GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
+GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat* params);
GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint* params);
-GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels);
+GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels);
GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat x);
GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat* v);
GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint x);
@@ -610,7 +611,7 @@
GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint indx, const GLfloat* values);
GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint indx, const GLfloat* values);
-GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr);
+GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr);
GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
#ifdef __cplusplus
diff --git a/ndk/platforms/android-5/include/GLES2/gl2ext.h b/ndk/platforms/android-5/include/GLES2/gl2ext.h
index 72f1ae7..9db4e25 100644
--- a/ndk/platforms/android-5/include/GLES2/gl2ext.h
+++ b/ndk/platforms/android-5/include/GLES2/gl2ext.h
@@ -1,7 +1,7 @@
#ifndef __gl2ext_h_
#define __gl2ext_h_
-/* $Revision: 8271 $ on $Date:: 2009-05-21 09:33:40 -0700 #$ */
+/* $Revision: 10969 $ on $Date:: 2010-04-09 02:27:15 -0700 #$ */
#ifdef __cplusplus
extern "C" {
@@ -57,6 +57,11 @@
typedef void* GLeglImageOES;
#endif
+/* GL_OES_element_index_uint */
+#ifndef GL_OES_element_index_uint
+#define GL_UNSIGNED_INT 0x1405
+#endif
+
/* GL_OES_get_program_binary */
#ifndef GL_OES_get_program_binary
#define GL_PROGRAM_BINARY_LENGTH_OES 0x8741
@@ -100,8 +105,8 @@
#define GL_STENCIL_INDEX4_OES 0x8D47
#endif
-/* GL_OES_texture3D */
-#ifndef GL_OES_texture3D
+/* GL_OES_texture_3D */
+#ifndef GL_OES_texture_3D
#define GL_TEXTURE_WRAP_R_OES 0x8072
#define GL_TEXTURE_3D_OES 0x806F
#define GL_TEXTURE_BINDING_3D_OES 0x806A
@@ -110,11 +115,28 @@
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES 0x8CD4
#endif
+/* GL_OES_texture_float */
+/* No new tokens introduced by this extension. */
+
+/* GL_OES_texture_float_linear */
+/* No new tokens introduced by this extension. */
+
/* GL_OES_texture_half_float */
#ifndef GL_OES_texture_half_float
#define GL_HALF_FLOAT_OES 0x8D61
#endif
+/* GL_OES_texture_half_float_linear */
+/* No new tokens introduced by this extension. */
+
+/* GL_OES_texture_npot */
+/* No new tokens introduced by this extension. */
+
+/* GL_OES_vertex_array_object */
+#ifndef GL_OES_vertex_array_object
+#define GL_VERTEX_ARRAY_BINDING_OES 0x85B5
+#endif
+
/* GL_OES_vertex_half_float */
/* GL_HALF_FLOAT_OES defined in GL_OES_texture_half_float already. */
@@ -124,6 +146,14 @@
#define GL_INT_10_10_10_2_OES 0x8DF7
#endif
+/* GL_OES_EGL_image_external */
+#ifndef GL_OES_EGL_image_external
+#define GL_TEXTURE_EXTERNAL_OES 0x8D65
+#define GL_SAMPLER_EXTERNAL_OES 0x8D66
+#define GL_TEXTURE_BINDING_EXTERNAL_OES 0x8D67
+#define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES 0x8D68
+#endif
+
/*------------------------------------------------------------------------*
* AMD extension tokens
*------------------------------------------------------------------------*/
@@ -141,11 +171,6 @@
#define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE
#endif
-/* GL_AMD_program_binary_Z400 */
-#ifndef GL_AMD_program_binary_Z400
-#define GL_Z400_BINARY_AMD 0x8740
-#endif
-
/* GL_AMD_performance_monitor */
#ifndef GL_AMD_performance_monitor
#define GL_COUNTER_TYPE_AMD 0x8BC0
@@ -157,35 +182,78 @@
#define GL_PERFMON_RESULT_AMD 0x8BC6
#endif
+/* GL_AMD_program_binary_Z400 */
+#ifndef GL_AMD_program_binary_Z400
+#define GL_Z400_BINARY_AMD 0x8740
+#endif
+
/*------------------------------------------------------------------------*
* EXT extension tokens
*------------------------------------------------------------------------*/
+/* GL_EXT_blend_minmax */
+#ifndef GL_EXT_blend_minmax
+#define GL_MIN_EXT 0x8007
+#define GL_MAX_EXT 0x8008
+#endif
+
+/* GL_EXT_discard_framebuffer */
+#ifndef GL_EXT_discard_framebuffer
+#define GL_COLOR_EXT 0x1800
+#define GL_DEPTH_EXT 0x1801
+#define GL_STENCIL_EXT 0x1802
+#endif
+
+/* GL_EXT_multi_draw_arrays */
+/* No new tokens introduced by this extension. */
+
+/* GL_EXT_read_format_bgra */
+#ifndef GL_EXT_read_format_bgra
+#define GL_BGRA_EXT 0x80E1
+#define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT 0x8365
+#define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT 0x8366
+#endif
+
/* GL_EXT_texture_filter_anisotropic */
#ifndef GL_EXT_texture_filter_anisotropic
#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
#endif
+/* GL_EXT_texture_format_BGRA8888 */
+#ifndef GL_EXT_texture_format_BGRA8888
+#define GL_BGRA_EXT 0x80E1
+#endif
+
/* GL_EXT_texture_type_2_10_10_10_REV */
#ifndef GL_EXT_texture_type_2_10_10_10_REV
#define GL_UNSIGNED_INT_2_10_10_10_REV_EXT 0x8368
#endif
-/* GL_EXT_texture_format_BGRA8888 */
-#ifndef GL_EXT_texture_format_BGRA8888
-#define GL_BGRA 0x80E1
+/* GL_EXT_texture_compression_dxt1 */
+#ifndef GL_EXT_texture_compression_dxt1
+#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
+#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
#endif
/*------------------------------------------------------------------------*
* IMG extension tokens
*------------------------------------------------------------------------*/
+/* GL_IMG_program_binary */
+#ifndef GL_IMG_program_binary
+#define GL_SGX_PROGRAM_BINARY_IMG 0x9130
+#endif
+
/* GL_IMG_read_format */
#ifndef GL_IMG_read_format
-#define GL_BGRA 0x80E1
-#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
-#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
+#define GL_BGRA_IMG 0x80E1
+#define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG 0x8365
+#endif
+
+/* GL_IMG_shader_binary */
+#ifndef GL_IMG_shader_binary
+#define GL_SGX_BINARY_IMG 0x8C0A
#endif
/* GL_IMG_texture_compression_pvrtc */
@@ -196,6 +264,14 @@
#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03
#endif
+/* GL_IMG_multisampled_render_to_texture */
+#ifndef GL_IMG_multisampled_render_to_texture
+#define GL_RENDERBUFFER_SAMPLES_IMG 0x9133
+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG 0x9134
+#define GL_MAX_SAMPLES_IMG 0x9135
+#define GL_TEXTURE_SAMPLES_IMG 0x9136
+#endif
+
/*------------------------------------------------------------------------*
* NV extension tokens
*------------------------------------------------------------------------*/
@@ -207,6 +283,24 @@
#define GL_FENCE_CONDITION_NV 0x84F4
#endif
+/* GL_NV_coverage_sample */
+#ifndef GL_NV_coverage_sample
+#define GL_COVERAGE_COMPONENT_NV 0x8ED0
+#define GL_COVERAGE_COMPONENT4_NV 0x8ED1
+#define GL_COVERAGE_ATTACHMENT_NV 0x8ED2
+#define GL_COVERAGE_BUFFERS_NV 0x8ED3
+#define GL_COVERAGE_SAMPLES_NV 0x8ED4
+#define GL_COVERAGE_ALL_FRAGMENTS_NV 0x8ED5
+#define GL_COVERAGE_EDGE_FRAGMENTS_NV 0x8ED6
+#define GL_COVERAGE_AUTOMATIC_NV 0x8ED7
+#define GL_COVERAGE_BUFFER_BIT_NV 0x8000
+#endif
+
+/* GL_NV_depth_nonlinear */
+#ifndef GL_NV_depth_nonlinear
+#define GL_DEPTH_COMPONENT16_NONLINEAR_NV 0x8E2C
+#endif
+
/*------------------------------------------------------------------------*
* QCOM extension tokens
*------------------------------------------------------------------------*/
@@ -214,11 +308,70 @@
/* GL_QCOM_driver_control */
/* No new tokens introduced by this extension. */
+/* GL_QCOM_extended_get */
+#ifndef GL_QCOM_extended_get
+#define GL_TEXTURE_WIDTH_QCOM 0x8BD2
+#define GL_TEXTURE_HEIGHT_QCOM 0x8BD3
+#define GL_TEXTURE_DEPTH_QCOM 0x8BD4
+#define GL_TEXTURE_INTERNAL_FORMAT_QCOM 0x8BD5
+#define GL_TEXTURE_FORMAT_QCOM 0x8BD6
+#define GL_TEXTURE_TYPE_QCOM 0x8BD7
+#define GL_TEXTURE_IMAGE_VALID_QCOM 0x8BD8
+#define GL_TEXTURE_NUM_LEVELS_QCOM 0x8BD9
+#define GL_TEXTURE_TARGET_QCOM 0x8BDA
+#define GL_TEXTURE_OBJECT_VALID_QCOM 0x8BDB
+#define GL_STATE_RESTORE 0x8BDC
+#endif
+
+/* GL_QCOM_extended_get2 */
+/* No new tokens introduced by this extension. */
+
/* GL_QCOM_perfmon_global_mode */
#ifndef GL_QCOM_perfmon_global_mode
#define GL_PERFMON_GLOBAL_MODE_QCOM 0x8FA0
#endif
+/* GL_QCOM_writeonly_rendering */
+#ifndef GL_QCOM_writeonly_rendering
+#define GL_WRITEONLY_RENDERING_QCOM 0x8823
+#endif
+
+/* GL_QCOM_tiled_rendering */
+#ifndef GL_QCOM_tiled_rendering
+#define GL_COLOR_BUFFER_BIT0_QCOM 0x00000001
+#define GL_COLOR_BUFFER_BIT1_QCOM 0x00000002
+#define GL_COLOR_BUFFER_BIT2_QCOM 0x00000004
+#define GL_COLOR_BUFFER_BIT3_QCOM 0x00000008
+#define GL_COLOR_BUFFER_BIT4_QCOM 0x00000010
+#define GL_COLOR_BUFFER_BIT5_QCOM 0x00000020
+#define GL_COLOR_BUFFER_BIT6_QCOM 0x00000040
+#define GL_COLOR_BUFFER_BIT7_QCOM 0x00000080
+#define GL_DEPTH_BUFFER_BIT0_QCOM 0x00000100
+#define GL_DEPTH_BUFFER_BIT1_QCOM 0x00000200
+#define GL_DEPTH_BUFFER_BIT2_QCOM 0x00000400
+#define GL_DEPTH_BUFFER_BIT3_QCOM 0x00000800
+#define GL_DEPTH_BUFFER_BIT4_QCOM 0x00001000
+#define GL_DEPTH_BUFFER_BIT5_QCOM 0x00002000
+#define GL_DEPTH_BUFFER_BIT6_QCOM 0x00004000
+#define GL_DEPTH_BUFFER_BIT7_QCOM 0x00008000
+#define GL_STENCIL_BUFFER_BIT0_QCOM 0x00010000
+#define GL_STENCIL_BUFFER_BIT1_QCOM 0x00020000
+#define GL_STENCIL_BUFFER_BIT2_QCOM 0x00040000
+#define GL_STENCIL_BUFFER_BIT3_QCOM 0x00080000
+#define GL_STENCIL_BUFFER_BIT4_QCOM 0x00100000
+#define GL_STENCIL_BUFFER_BIT5_QCOM 0x00200000
+#define GL_STENCIL_BUFFER_BIT6_QCOM 0x00400000
+#define GL_STENCIL_BUFFER_BIT7_QCOM 0x00800000
+#define GL_MULTISAMPLE_BUFFER_BIT0_QCOM 0x01000000
+#define GL_MULTISAMPLE_BUFFER_BIT1_QCOM 0x02000000
+#define GL_MULTISAMPLE_BUFFER_BIT2_QCOM 0x04000000
+#define GL_MULTISAMPLE_BUFFER_BIT3_QCOM 0x08000000
+#define GL_MULTISAMPLE_BUFFER_BIT4_QCOM 0x10000000
+#define GL_MULTISAMPLE_BUFFER_BIT5_QCOM 0x20000000
+#define GL_MULTISAMPLE_BUFFER_BIT6_QCOM 0x40000000
+#define GL_MULTISAMPLE_BUFFER_BIT7_QCOM 0x80000000
+#endif
+
/*------------------------------------------------------------------------*
* End of extension tokens, start of corresponding extension functions
*------------------------------------------------------------------------*/
@@ -237,17 +390,6 @@
#define GL_OES_compressed_paletted_texture 1
#endif
-/* GL_OES_EGL_image */
-#ifndef GL_OES_EGL_image
-#define GL_OES_EGL_image 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);
-GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);
-#endif
-typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
-typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
-#endif
-
/* GL_OES_depth24 */
#ifndef GL_OES_depth24
#define GL_OES_depth24 1
@@ -263,6 +405,17 @@
#define GL_OES_depth_texture 1
#endif
+/* GL_OES_EGL_image */
+#ifndef GL_OES_EGL_image
+#define GL_OES_EGL_image 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);
+GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);
+#endif
+typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
+typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
+#endif
+
/* GL_OES_element_index_uint */
#ifndef GL_OES_element_index_uint
#define GL_OES_element_index_uint 1
@@ -282,11 +435,11 @@
#ifndef GL_OES_get_program_binary
#define GL_OES_get_program_binary 1
#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glGetProgramBinaryOES (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
-GL_APICALL void GL_APIENTRY glProgramBinaryOES (GLuint program, GLenum binaryFormat, const void *binary, GLint length);
+GL_APICALL void GL_APIENTRY glGetProgramBinaryOES (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);
+GL_APICALL void GL_APIENTRY glProgramBinaryOES (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length);
#endif
-typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYOESPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
-typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYOESPROC) (GLuint program, GLenum binaryFormat, const void *binary, GLint length);
+typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYOESPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);
+typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYOESPROC) (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length);
#endif
/* GL_OES_mapbuffer */
@@ -295,11 +448,11 @@
#ifdef GL_GLEXT_PROTOTYPES
GL_APICALL void* GL_APIENTRY glMapBufferOES (GLenum target, GLenum access);
GL_APICALL GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target);
-GL_APICALL void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, void** params);
+GL_APICALL void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, GLvoid** params);
#endif
typedef void* (GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access);
typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target);
-typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, void** params);
+typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, GLvoid** params);
#endif
/* GL_OES_packed_depth_stencil */
@@ -331,46 +484,61 @@
#ifndef GL_OES_texture_3D
#define GL_OES_texture_3D 1
#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void* pixels);
-GL_APICALL void GL_APIENTRY glTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void* pixels);
+GL_APICALL void GL_APIENTRY glTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
+GL_APICALL void GL_APIENTRY glTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels);
GL_APICALL void GL_APIENTRY glCopyTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-GL_APICALL void GL_APIENTRY glCompressedTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void* data);
-GL_APICALL void GL_APIENTRY glCompressedTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void* data);
+GL_APICALL void GL_APIENTRY glCompressedTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data);
+GL_APICALL void GL_APIENTRY glCompressedTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data);
GL_APICALL void GL_APIENTRY glFramebufferTexture3DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
#endif
typedef void (GL_APIENTRYP PFNGLTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
-typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void* pixels);
+typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels);
typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
-typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void* data);
-typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void* data);
+typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data);
+typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data);
typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DOES) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
#endif
-/* GL_OES_texture_float_linear */
-#ifndef GL_OES_texture_float_linear
-#define GL_OES_texture_float_linear 1
-#endif
-
-/* GL_OES_texture_half_float_linear */
-#ifndef GL_OES_texture_half_float_linear
-#define GL_OES_texture_half_float_linear 1
-#endif
-
/* GL_OES_texture_float */
#ifndef GL_OES_texture_float
#define GL_OES_texture_float 1
#endif
+/* GL_OES_texture_float_linear */
+#ifndef GL_OES_texture_float_linear
+#define GL_OES_texture_float_linear 1
+#endif
+
/* GL_OES_texture_half_float */
#ifndef GL_OES_texture_half_float
#define GL_OES_texture_half_float 1
#endif
+/* GL_OES_texture_half_float_linear */
+#ifndef GL_OES_texture_half_float_linear
+#define GL_OES_texture_half_float_linear 1
+#endif
+
/* GL_OES_texture_npot */
#ifndef GL_OES_texture_npot
#define GL_OES_texture_npot 1
#endif
+/* GL_OES_vertex_array_object */
+#ifndef GL_OES_vertex_array_object
+#define GL_OES_vertex_array_object 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glBindVertexArrayOES (GLuint array);
+GL_APICALL void GL_APIENTRY glDeleteVertexArraysOES (GLsizei n, const GLuint *arrays);
+GL_APICALL void GL_APIENTRY glGenVertexArraysOES (GLsizei n, GLuint *arrays);
+GL_APICALL GLboolean GL_APIENTRY glIsVertexArrayOES (GLuint array);
+#endif
+typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYOESPROC) (GLuint array);
+typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays);
+typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays);
+typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array);
+#endif
+
/* GL_OES_vertex_half_float */
#ifndef GL_OES_vertex_half_float
#define GL_OES_vertex_half_float 1
@@ -381,6 +549,11 @@
#define GL_OES_vertex_type_10_10_10_2 1
#endif
+/* GL_OES_EGL_image_external */
+#ifndef GL_OES_EGL_image_external
+#define GL_OES_EGL_image_external 1
+#endif
+
/*------------------------------------------------------------------------*
* AMD extension functions
*------------------------------------------------------------------------*/
@@ -395,20 +568,15 @@
#define GL_AMD_compressed_ATC_texture 1
#endif
-/* GL_AMD_program_binary_Z400 */
-#ifndef GL_AMD_program_binary_Z400
-#define GL_AMD_program_binary_Z400 1
-#endif
-
/* AMD_performance_monitor */
#ifndef GL_AMD_performance_monitor
#define GL_AMD_performance_monitor 1
#ifdef GL_GLEXT_PROTOTYPES
GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
GL_APICALL void GL_APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
-GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, char *groupString);
-GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, char *counterString);
-GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, void *data);
+GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
+GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
+GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, GLvoid *data);
GL_APICALL void GL_APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors);
GL_APICALL void GL_APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors);
GL_APICALL void GL_APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList);
@@ -418,9 +586,9 @@
#endif
typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
-typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, char *groupString);
-typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, char *counterString);
-typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, void *data);
+typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
+typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
+typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, GLvoid *data);
typedef void (GL_APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
typedef void (GL_APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
typedef void (GL_APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList);
@@ -429,39 +597,99 @@
typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
#endif
+/* GL_AMD_program_binary_Z400 */
+#ifndef GL_AMD_program_binary_Z400
+#define GL_AMD_program_binary_Z400 1
+#endif
+
/*------------------------------------------------------------------------*
* EXT extension functions
*------------------------------------------------------------------------*/
+/* GL_EXT_blend_minmax */
+#ifndef GL_EXT_blend_minmax
+#define GL_EXT_blend_minmax 1
+#endif
+
+/* GL_EXT_discard_framebuffer */
+#ifndef GL_EXT_discard_framebuffer
+#define GL_EXT_discard_framebuffer 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments);
+#endif
+typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);
+#endif
+
+#ifndef GL_EXT_multi_draw_arrays
+#define GL_EXT_multi_draw_arrays 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glMultiDrawArraysEXT (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
+GL_APICALL void GL_APIENTRY glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
+typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
+#endif
+
+/* GL_EXT_read_format_bgra */
+#ifndef GL_EXT_read_format_bgra
+#define GL_EXT_read_format_bgra 1
+#endif
+
/* GL_EXT_texture_filter_anisotropic */
#ifndef GL_EXT_texture_filter_anisotropic
#define GL_EXT_texture_filter_anisotropic 1
#endif
-/* GL_EXT_texture_type_2_10_10_10_REV */
-#ifndef GL_EXT_texture_type_2_10_10_10_REV
-#define GL_EXT_texture_type_2_10_10_10_REV 1
-#endif
-
/* GL_EXT_texture_format_BGRA8888 */
#ifndef GL_EXT_texture_format_BGRA8888
#define GL_EXT_texture_format_BGRA8888 1
#endif
+/* GL_EXT_texture_type_2_10_10_10_REV */
+#ifndef GL_EXT_texture_type_2_10_10_10_REV
+#define GL_EXT_texture_type_2_10_10_10_REV 1
+#endif
+
+/* GL_EXT_texture_compression_dxt1 */
+#ifndef GL_EXT_texture_compression_dxt1
+#define GL_EXT_texture_compression_dxt1 1
+#endif
+
/*------------------------------------------------------------------------*
* IMG extension functions
*------------------------------------------------------------------------*/
+/* GL_IMG_program_binary */
+#ifndef GL_IMG_program_binary
+#define GL_IMG_program_binary 1
+#endif
+
/* GL_IMG_read_format */
#ifndef GL_IMG_read_format
#define GL_IMG_read_format 1
#endif
+/* GL_IMG_shader_binary */
+#ifndef GL_IMG_shader_binary
+#define GL_IMG_shader_binary 1
+#endif
+
/* GL_IMG_texture_compression_pvrtc */
#ifndef GL_IMG_texture_compression_pvrtc
#define GL_IMG_texture_compression_pvrtc 1
#endif
+/* GL_IMG_multisampled_render_to_texture */
+#ifndef GL_IMG_multisampled_render_to_texture
+#define GL_IMG_multisampled_render_to_texture 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
+#endif
+typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMG) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMG) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
+#endif
+
/*------------------------------------------------------------------------*
* NV extension functions
*------------------------------------------------------------------------*/
@@ -487,6 +715,22 @@
typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
#endif
+/* GL_NV_coverage_sample */
+#ifndef GL_NV_coverage_sample
+#define GL_NV_coverage_sample 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glCoverageMaskNV (GLboolean mask);
+GL_APICALL void GL_APIENTRY glCoverageOperationNV (GLenum operation);
+#endif
+typedef void (GL_APIENTRYP PFNGLCOVERAGEMASKNVPROC) (GLboolean mask);
+typedef void (GL_APIENTRYP PFNGLCOVERAGEOPERATIONNVPROC) (GLenum operation);
+#endif
+
+/* GL_NV_depth_nonlinear */
+#ifndef GL_NV_depth_nonlinear
+#define GL_NV_depth_nonlinear 1
+#endif
+
/*------------------------------------------------------------------------*
* QCOM extension functions
*------------------------------------------------------------------------*/
@@ -496,21 +740,75 @@
#define GL_QCOM_driver_control 1
#ifdef GL_GLEXT_PROTOTYPES
GL_APICALL void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls);
-GL_APICALL void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, char *driverControlString);
+GL_APICALL void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
GL_APICALL void GL_APIENTRY glEnableDriverControlQCOM (GLuint driverControl);
GL_APICALL void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl);
#endif
typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls);
-typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, char *driverControlString);
+typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
#endif
+/* GL_QCOM_extended_get */
+#ifndef GL_QCOM_extended_get
+#define GL_QCOM_extended_get 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, GLint maxTextures, GLint *numTextures);
+GL_APICALL void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
+GL_APICALL void GL_APIENTRY glExtGetRenderbuffersQCOM (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
+GL_APICALL void GL_APIENTRY glExtGetFramebuffersQCOM (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
+GL_APICALL void GL_APIENTRY glExtGetTexLevelParameterivQCOM (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glExtTexObjectStateOverrideiQCOM (GLenum target, GLenum pname, GLint param);
+GL_APICALL void GL_APIENTRY glExtGetTexSubImageQCOM (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels);
+GL_APICALL void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, GLvoid **params);
+#endif
+typedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, GLint maxTextures, GLint *numTextures);
+typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
+typedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
+typedef void (GL_APIENTRYP PFNGLEXTGETFRAMEBUFFERSQCOMPROC) (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
+typedef void (GL_APIENTRYP PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
+typedef void (GL_APIENTRYP PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) (GLenum target, GLenum pname, GLint param);
+typedef void (GL_APIENTRYP PFNGLEXTGETTEXSUBIMAGEQCOMPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels);
+typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, GLvoid **params);
+#endif
+
+/* GL_QCOM_extended_get2 */
+#ifndef GL_QCOM_extended_get2
+#define GL_QCOM_extended_get2 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, GLint maxShaders, GLint *numShaders);
+GL_APICALL void GL_APIENTRY glExtGetProgramsQCOM (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
+GL_APICALL GLboolean GL_APIENTRY glExtIsProgramBinaryQCOM (GLuint program);
+GL_APICALL void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, GLenum shadertype, GLchar *source, GLint *length);
+#endif
+typedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, GLint maxShaders, GLint *numShaders);
+typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
+typedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) (GLuint program);
+typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint program, GLenum shadertype, GLchar *source, GLint *length);
+#endif
+
/* GL_QCOM_perfmon_global_mode */
#ifndef GL_QCOM_perfmon_global_mode
#define GL_QCOM_perfmon_global_mode 1
#endif
+/* GL_QCOM_writeonly_rendering */
+#ifndef GL_QCOM_writeonly_rendering
+#define GL_QCOM_writeonly_rendering 1
+#endif
+
+/* GL_QCOM_tiled_rendering */
+#ifndef GL_QCOM_tiled_rendering
+#define GL_QCOM_tiled_rendering 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glStartTilingQCOM (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
+GL_APICALL void GL_APIENTRY glEndTilingQCOM (GLbitfield preserveMask);
+#endif
+typedef void (GL_APIENTRYP PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
+typedef void (GL_APIENTRYP PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask);
+#endif
+
#ifdef __cplusplus
}
#endif
diff --git a/ndk/platforms/android-5/include/GLES2/gl2platform.h b/ndk/platforms/android-5/include/GLES2/gl2platform.h
index 3e9036c..c9fa3c4 100644
--- a/ndk/platforms/android-5/include/GLES2/gl2platform.h
+++ b/ndk/platforms/android-5/include/GLES2/gl2platform.h
@@ -1,7 +1,7 @@
#ifndef __gl2platform_h_
#define __gl2platform_h_
-/* $Revision: 7173 $ on $Date:: 2009-01-09 11:18:21 -0800 #$ */
+/* $Revision: 10602 $ on $Date:: 2010-03-04 22:35:34 -0800 #$ */
/*
* This document is licensed under the SGI Free Software B License Version
@@ -9,7 +9,6 @@
*/
/* Platform-specific types and definitions for OpenGL ES 2.X gl2.h
- * Last modified on 2008/12/19
*
* 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
@@ -24,6 +23,8 @@
#define GL_APICALL KHRONOS_APICALL
#endif
+#ifndef GL_APIENTRY
#define GL_APIENTRY KHRONOS_APIENTRY
+#endif
#endif /* __gl2platform_h_ */
diff --git a/ndk/platforms/android-5/include/android/api-level.h b/ndk/platforms/android-5/include/android/api-level.h
deleted file mode 100644
index 2280147..0000000
--- a/ndk/platforms/android-5/include/android/api-level.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-#ifndef ANDROID_API_LEVEL_H
-#define ANDROID_API_LEVEL_H
-
-#define __ANDROID_API__ 5
-
-#endif /* ANDROID_API_LEVEL_H */
diff --git a/ndk/platforms/android-8/include/android/api-level.h b/ndk/platforms/android-8/include/android/api-level.h
deleted file mode 100644
index e580d72..0000000
--- a/ndk/platforms/android-8/include/android/api-level.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-#ifndef ANDROID_API_LEVEL_H
-#define ANDROID_API_LEVEL_H
-
-#define __ANDROID_API__ 8
-
-#endif /* ANDROID_API_LEVEL_H */
diff --git a/ndk/platforms/android-9/arch-x86/include/fenv.h b/ndk/platforms/android-9/arch-x86/include/fenv.h
index 5fe64e2..710494c 100644
--- a/ndk/platforms/android-9/arch-x86/include/fenv.h
+++ b/ndk/platforms/android-9/arch-x86/include/fenv.h
@@ -45,13 +45,6 @@
char __other[16];
} fenv_t;
-#define __get_mxcsr(env) (((env).__mxcsr_hi << 16) | \
- ((env).__mxcsr_lo))
-#define __set_mxcsr(env, x) do { \
- (env).__mxcsr_hi = (__uint32_t)(x) >> 16; \
- (env).__mxcsr_lo = (__uint16_t)(x); \
-} while (0)
-
typedef __uint16_t fexcept_t;
/* Exception flags */
@@ -72,168 +65,35 @@
#define _ROUND_MASK (FE_TONEAREST | FE_DOWNWARD | \
FE_UPWARD | FE_TOWARDZERO)
-/*
- * As compared to the x87 control word, the SSE unit's control word
- * has the rounding control bits offset by 3 and the exception mask
- * bits offset by 7.
- */
-#define _SSE_ROUND_SHIFT 3
-#define _SSE_EMASK_SHIFT 7
-
-/* After testing for SSE support once, we cache the result in __has_sse. */
-enum __sse_support { __SSE_YES, __SSE_NO, __SSE_UNK };
-extern enum __sse_support __has_sse;
-int __test_sse(void);
-#ifdef __SSE__
-#define __HAS_SSE() 1
-#else
-#define __HAS_SSE() (__has_sse == __SSE_YES || \
- (__has_sse == __SSE_UNK && __test_sse()))
-#endif
-
__BEGIN_DECLS
/* Default floating-point environment */
extern const fenv_t __fe_dfl_env;
#define FE_DFL_ENV (&__fe_dfl_env)
-#define __fldcw(__cw) __asm __volatile("fldcw %0" : : "m" (__cw))
-#define __fldenv(__env) __asm __volatile("fldenv %0" : : "m" (__env))
-#define __fnclex() __asm __volatile("fnclex")
-#define __fnstenv(__env) __asm __volatile("fnstenv %0" : "=m" (*(__env)))
-#define __fnstcw(__cw) __asm __volatile("fnstcw %0" : "=m" (*(__cw)))
-#define __fnstsw(__sw) __asm __volatile("fnstsw %0" : "=a" (*(__sw)))
-#define __fwait() __asm __volatile("fwait")
-#define __ldmxcsr(__csr) __asm __volatile("ldmxcsr %0" : : "m" (__csr))
-#define __stmxcsr(__csr) __asm __volatile("stmxcsr %0" : "=m" (*(__csr)))
+/* C99 floating-point exception functions */
+int feclearexcept(int excepts);
+int fegetexceptflag(fexcept_t *flagp, int excepts);
+int fesetexceptflag(const fexcept_t *flagp, int excepts);
+/* feraiseexcept does not set the inexact flag on overflow/underflow */
+int feraiseexcept(int excepts);
+int fetestexcept(int excepts);
-static __inline int
-feclearexcept(int __excepts)
-{
- fenv_t __env;
- int __mxcsr;
+/* C99 rounding control functions */
+int fegetround(void);
+int fesetround(int round);
- if (__excepts == FE_ALL_EXCEPT) {
- __fnclex();
- } else {
- __fnstenv(&__env);
- __env.__status &= ~__excepts;
- __fldenv(__env);
- }
- if (__HAS_SSE()) {
- __stmxcsr(&__mxcsr);
- __mxcsr &= ~__excepts;
- __ldmxcsr(__mxcsr);
- }
- return (0);
-}
-
-static __inline int
-fegetexceptflag(fexcept_t *__flagp, int __excepts)
-{
- int __mxcsr;
- short __status;
-
- __fnstsw(&__status);
- if (__HAS_SSE())
- __stmxcsr(&__mxcsr);
- else
- __mxcsr = 0;
- *__flagp = (__mxcsr | __status) & __excepts;
- return (0);
-}
-
-int fesetexceptflag(const fexcept_t *__flagp, int __excepts);
-int feraiseexcept(int __excepts);
-
-static __inline int
-fetestexcept(int __excepts)
-{
- int __mxcsr;
- short __status;
-
- __fnstsw(&__status);
- if (__HAS_SSE())
- __stmxcsr(&__mxcsr);
- else
- __mxcsr = 0;
- return ((__status | __mxcsr) & __excepts);
-}
-
-static __inline int
-fegetround(void)
-{
- int __control;
-
- /*
- * We assume that the x87 and the SSE unit agree on the
- * rounding mode. Reading the control word on the x87 turns
- * out to be about 5 times faster than reading it on the SSE
- * unit on an Opteron 244.
- */
- __fnstcw(&__control);
- return (__control & _ROUND_MASK);
-}
-
-static __inline int
-fesetround(int __round)
-{
- int __mxcsr, __control;
-
- if (__round & ~_ROUND_MASK)
- return (-1);
-
- __fnstcw(&__control);
- __control &= ~_ROUND_MASK;
- __control |= __round;
- __fldcw(__control);
-
- if (__HAS_SSE()) {
- __stmxcsr(&__mxcsr);
- __mxcsr &= ~(_ROUND_MASK << _SSE_ROUND_SHIFT);
- __mxcsr |= __round << _SSE_ROUND_SHIFT;
- __ldmxcsr(__mxcsr);
- }
-
- return (0);
-}
-
+/* C99 floating-point environment functions */
int fegetenv(fenv_t *__envp);
int feholdexcept(fenv_t *__envp);
-
-static __inline int
-fesetenv(const fenv_t *__envp)
-{
- fenv_t __env = *__envp;
- int __mxcsr;
-
- __mxcsr = __get_mxcsr(__env);
- __set_mxcsr(__env, 0xffffffff);
- __fldenv(__env);
- if (__HAS_SSE())
- __ldmxcsr(__mxcsr);
- return (0);
-}
-
+int fesetenv(const fenv_t *envp);
int feupdateenv(const fenv_t *__envp);
#if __BSD_VISIBLE
-
+/* Additional support functions to set/query floating point traps */
int feenableexcept(int __mask);
int fedisableexcept(int __mask);
-
-static __inline int
-fegetexcept(void)
-{
- int __control;
-
- /*
- * We assume that the masks for the x87 and the SSE unit are
- * the same.
- */
- __fnstcw(&__control);
- return (~__control & FE_ALL_EXCEPT);
-}
+int fegetexcept(void);
#endif /* __BSD_VISIBLE */
diff --git a/ndk/platforms/android-9/arch-x86/lib/libthread_db.a b/ndk/platforms/android-9/arch-x86/lib/libthread_db.a
deleted file mode 100644
index 9525ff1..0000000
--- a/ndk/platforms/android-9/arch-x86/lib/libthread_db.a
+++ /dev/null
Binary files differ
diff --git a/ndk/platforms/android-9/arch-x86/symbols/libm.so.functions.txt b/ndk/platforms/android-9/arch-x86/symbols/libm.so.functions.txt
index 2899b42..53affc0 100644
--- a/ndk/platforms/android-9/arch-x86/symbols/libm.so.functions.txt
+++ b/ndk/platforms/android-9/arch-x86/symbols/libm.so.functions.txt
@@ -1,6 +1,4 @@
__exp__D
-__fedisableexcept
-__feenableexcept
__fpclassifyd
__fpclassifyf
__fpclassifyl
@@ -27,7 +25,7 @@
__signbit
__signbitf
__signbitl
-__test_sse
+_scan_nan
acos
acosf
acosh
@@ -72,10 +70,19 @@
fdim
fdimf
fdiml
+feclearexcept
+fedisableexcept
+feenableexcept
fegetenv
+fegetexcept
+fegetexceptflag
+fegetround
feholdexcept
feraiseexcept
+fesetenv
fesetexceptflag
+fesetround
+fetestexcept
feupdateenv
finite
finitef
@@ -137,6 +144,8 @@
lroundl
modf
modff
+nan
+nanf
nearbyint
nearbyintf
nextafter
@@ -174,6 +183,7 @@
tanh
tanhf
tgamma
+tgammaf
trunc
truncf
truncl
diff --git a/ndk/platforms/android-9/include/EGL/eglext.h b/ndk/platforms/android-9/include/EGL/eglext.h
index 1123e16..a08932a 100644
--- a/ndk/platforms/android-9/include/EGL/eglext.h
+++ b/ndk/platforms/android-9/include/EGL/eglext.h
@@ -226,7 +226,7 @@
#ifndef EGL_ANDROID_image_native_buffer
#define EGL_ANDROID_image_native_buffer 1
struct ANativeWindowBuffer;
-#define EGL_NATIVE_BUFFER_ANDROID 0x3140 /* eglCreateImageKHR target */
+#define EGL_NATIVE_BUFFER_ANDROID 0x3140 /* eglCreateImageKHR target */
#endif
#ifndef EGL_ANDROID_swap_rectangle
@@ -237,6 +237,25 @@
typedef EGLBoolean (EGLAPIENTRYP PFNEGLSETSWAPRECTANGLEANDROIDPROC) (EGLDisplay dpy, EGLSurface draw, EGLint left, EGLint top, EGLint width, EGLint height);
#endif
+#ifndef EGL_ANDROID_recordable
+#define EGL_ANDROID_recordable 1
+#define EGL_RECORDABLE_ANDROID 0x3142 /* EGLConfig attribute */
+#endif
+
+/* EGL_NV_system_time
+ */
+#ifndef EGL_NV_system_time
+#define EGL_NV_system_time 1
+typedef khronos_int64_t EGLint64NV;
+typedef khronos_uint64_t EGLuint64NV;
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeFrequencyNV(void);
+EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeNV(void);
+#endif
+typedef EGLuint64NV (EGLAPIENTRYP PFNEGLGETSYSTEMTIMEFREQUENCYNVPROC)(void);
+typedef EGLuint64NV (EGLAPIENTRYP PFNEGLGETSYSTEMTIMENVPROC)(void);
+#endif
+
#ifdef __cplusplus
}
#endif
diff --git a/ndk/platforms/android-9/include/android/api-level.h b/ndk/platforms/android-9/include/android/api-level.h
deleted file mode 100644
index a644a66..0000000
--- a/ndk/platforms/android-9/include/android/api-level.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-#ifndef ANDROID_API_LEVEL_H
-#define ANDROID_API_LEVEL_H
-
-#define __ANDROID_API__ 9
-
-#endif /* ANDROID_API_LEVEL_H */
diff --git a/ndk/platforms/android-9/samples/native-audio/jni/native-audio-jni.c b/ndk/platforms/android-9/samples/native-audio/jni/native-audio-jni.c
index bc1ad85..105c64a 100644
--- a/ndk/platforms/android-9/samples/native-audio/jni/native-audio-jni.c
+++ b/ndk/platforms/android-9/samples/native-audio/jni/native-audio-jni.c
@@ -30,7 +30,7 @@
// for native audio
#include <SLES/OpenSLES.h>
-#include "SLES/OpenSLES_Android.h"
+#include <SLES/OpenSLES_Android.h>
// for native asset manager
#include <sys/types.h>
@@ -60,6 +60,8 @@
static SLPlayItf bqPlayerPlay;
static SLAndroidSimpleBufferQueueItf bqPlayerBufferQueue;
static SLEffectSendItf bqPlayerEffectSend;
+static SLMuteSoloItf bqPlayerMuteSolo;
+static SLVolumeItf bqPlayerVolume;
// aux effect on the output mix, used by the buffer queue player
static const SLEnvironmentalReverbSettings reverbSettings =
@@ -69,11 +71,15 @@
static SLObjectItf uriPlayerObject = NULL;
static SLPlayItf uriPlayerPlay;
static SLSeekItf uriPlayerSeek;
+static SLMuteSoloItf uriPlayerMuteSolo;
+static SLVolumeItf uriPlayerVolume;
// file descriptor player interfaces
static SLObjectItf fdPlayerObject = NULL;
static SLPlayItf fdPlayerPlay;
static SLSeekItf fdPlayerSeek;
+static SLMuteSoloItf fdPlayerMuteSolo;
+static SLVolumeItf fdPlayerVolume;
// recorder interfaces
static SLObjectItf recorderObject = NULL;
@@ -199,10 +205,12 @@
SLDataSink audioSnk = {&loc_outmix, NULL};
// create audio player
- const SLInterfaceID ids[2] = {SL_IID_BUFFERQUEUE, SL_IID_EFFECTSEND};
- const SLboolean req[2] = {SL_BOOLEAN_TRUE, SL_BOOLEAN_TRUE};
+ const SLInterfaceID ids[3] = {SL_IID_BUFFERQUEUE, SL_IID_EFFECTSEND,
+ /*SL_IID_MUTESOLO,*/ SL_IID_VOLUME};
+ const SLboolean req[3] = {SL_BOOLEAN_TRUE, SL_BOOLEAN_TRUE,
+ /*SL_BOOLEAN_TRUE,*/ SL_BOOLEAN_TRUE};
result = (*engineEngine)->CreateAudioPlayer(engineEngine, &bqPlayerObject, &audioSrc, &audioSnk,
- 2, ids, req);
+ 3, ids, req);
assert(SL_RESULT_SUCCESS == result);
// realize the player
@@ -227,6 +235,16 @@
&bqPlayerEffectSend);
assert(SL_RESULT_SUCCESS == result);
+#if 0 // mute/solo is not supported for sources that are known to be mono, as this is
+ // get the mute/solo interface
+ result = (*bqPlayerObject)->GetInterface(bqPlayerObject, SL_IID_MUTESOLO, &bqPlayerMuteSolo);
+ assert(SL_RESULT_SUCCESS == result);
+#endif
+
+ // get the volume interface
+ result = (*bqPlayerObject)->GetInterface(bqPlayerObject, SL_IID_VOLUME, &bqPlayerVolume);
+ assert(SL_RESULT_SUCCESS == result);
+
// set the player's state to playing
result = (*bqPlayerPlay)->SetPlayState(bqPlayerPlay, SL_PLAYSTATE_PLAYING);
assert(SL_RESULT_SUCCESS == result);
@@ -255,10 +273,10 @@
SLDataSink audioSnk = {&loc_outmix, NULL};
// create audio player
- const SLInterfaceID ids[1] = {SL_IID_SEEK};
- const SLboolean req[1] = {SL_BOOLEAN_TRUE};
+ const SLInterfaceID ids[3] = {SL_IID_SEEK, SL_IID_MUTESOLO, SL_IID_VOLUME};
+ const SLboolean req[3] = {SL_BOOLEAN_TRUE, SL_BOOLEAN_TRUE, SL_BOOLEAN_TRUE};
result = (*engineEngine)->CreateAudioPlayer(engineEngine, &uriPlayerObject, &audioSrc,
- &audioSnk, 1, ids, req);
+ &audioSnk, 3, ids, req);
// note that an invalid URI is not detected here, but during prepare/prefetch on Android,
// or possibly during Realize on other platforms
assert(SL_RESULT_SUCCESS == result);
@@ -283,8 +301,12 @@
result = (*uriPlayerObject)->GetInterface(uriPlayerObject, SL_IID_SEEK, &uriPlayerSeek);
assert(SL_RESULT_SUCCESS == result);
- // enable whole file looping
- result = (*uriPlayerSeek)->SetLoop(uriPlayerSeek, SL_BOOLEAN_TRUE, 0, SL_TIME_UNKNOWN);
+ // get the mute/solo interface
+ result = (*uriPlayerObject)->GetInterface(uriPlayerObject, SL_IID_MUTESOLO, &uriPlayerMuteSolo);
+ assert(SL_RESULT_SUCCESS == result);
+
+ // get the volume interface
+ result = (*uriPlayerObject)->GetInterface(uriPlayerObject, SL_IID_VOLUME, &uriPlayerVolume);
assert(SL_RESULT_SUCCESS == result);
return JNI_TRUE;
@@ -292,6 +314,7 @@
// set the playing state for the URI audio player
+// to PLAYING (true) or PAUSED (false)
void Java_com_example_nativeaudio_NativeAudio_setPlayingUriAudioPlayer(JNIEnv* env,
jclass clazz, jboolean isPlaying)
{
@@ -310,6 +333,134 @@
}
+// set the whole file looping state for the URI audio player
+void Java_com_example_nativeaudio_NativeAudio_setLoopingUriAudioPlayer(JNIEnv* env,
+ jclass clazz, jboolean isLooping)
+{
+ SLresult result;
+
+ // make sure the URI audio player was created
+ if (NULL != uriPlayerSeek) {
+
+ // set the looping state
+ result = (*uriPlayerSeek)->SetLoop(uriPlayerSeek, (SLboolean) isLooping, 0,
+ SL_TIME_UNKNOWN);
+ assert(SL_RESULT_SUCCESS == result);
+
+ }
+
+}
+
+
+// expose the mute/solo APIs to Java for one of the 3 players
+
+static SLMuteSoloItf getMuteSolo()
+{
+ if (uriPlayerMuteSolo != NULL)
+ return uriPlayerMuteSolo;
+ else if (fdPlayerMuteSolo != NULL)
+ return fdPlayerMuteSolo;
+ else
+ return bqPlayerMuteSolo;
+}
+
+void Java_com_example_nativeaudio_NativeAudio_setChannelMuteUriAudioPlayer(JNIEnv* env,
+ jclass clazz, jint chan, jboolean mute)
+{
+ SLresult result;
+ SLMuteSoloItf muteSoloItf = getMuteSolo();
+ if (NULL != muteSoloItf) {
+ result = (*muteSoloItf)->SetChannelMute(muteSoloItf, chan, mute);
+ assert(SL_RESULT_SUCCESS == result);
+ }
+}
+
+void Java_com_example_nativeaudio_NativeAudio_setChannelSoloUriAudioPlayer(JNIEnv* env,
+ jclass clazz, jint chan, jboolean solo)
+{
+ SLresult result;
+ SLMuteSoloItf muteSoloItf = getMuteSolo();
+ if (NULL != muteSoloItf) {
+ result = (*muteSoloItf)->SetChannelSolo(muteSoloItf, chan, solo);
+ assert(SL_RESULT_SUCCESS == result);
+ }
+}
+
+int Java_com_example_nativeaudio_NativeAudio_getNumChannelsUriAudioPlayer(JNIEnv* env, jclass clazz)
+{
+ SLuint8 numChannels;
+ SLresult result;
+ SLMuteSoloItf muteSoloItf = getMuteSolo();
+ if (NULL != muteSoloItf) {
+ result = (*muteSoloItf)->GetNumChannels(muteSoloItf, &numChannels);
+ if (SL_RESULT_PRECONDITIONS_VIOLATED == result) {
+ // channel count is not yet known
+ numChannels = 0;
+ } else {
+ assert(SL_RESULT_SUCCESS == result);
+ }
+ } else {
+ numChannels = 0;
+ }
+ return numChannels;
+}
+
+// expose the volume APIs to Java for one of the 3 players
+
+static SLVolumeItf getVolume()
+{
+ if (uriPlayerVolume != NULL)
+ return uriPlayerVolume;
+ else if (fdPlayerVolume != NULL)
+ return fdPlayerVolume;
+ else
+ return bqPlayerVolume;
+}
+
+void Java_com_example_nativeaudio_NativeAudio_setVolumeUriAudioPlayer(JNIEnv* env, jclass clazz,
+ jint millibel)
+{
+ SLresult result;
+ SLVolumeItf volumeItf = getVolume();
+ if (NULL != volumeItf) {
+ result = (*volumeItf)->SetVolumeLevel(volumeItf, millibel);
+ assert(SL_RESULT_SUCCESS == result);
+ }
+}
+
+void Java_com_example_nativeaudio_NativeAudio_setMuteUriAudioPlayer(JNIEnv* env, jclass clazz,
+ jboolean mute)
+{
+ SLresult result;
+ SLVolumeItf volumeItf = getVolume();
+ if (NULL != volumeItf) {
+ result = (*volumeItf)->SetMute(volumeItf, mute);
+ assert(SL_RESULT_SUCCESS == result);
+ }
+}
+
+void Java_com_example_nativeaudio_NativeAudio_enableStereoPositionUriAudioPlayer(JNIEnv* env,
+ jclass clazz, jboolean enable)
+{
+ SLresult result;
+ SLVolumeItf volumeItf = getVolume();
+ if (NULL != volumeItf) {
+ result = (*volumeItf)->EnableStereoPosition(volumeItf, enable);
+ assert(SL_RESULT_SUCCESS == result);
+ }
+}
+
+void Java_com_example_nativeaudio_NativeAudio_setStereoPositionUriAudioPlayer(JNIEnv* env,
+ jclass clazz, jint permille)
+{
+ SLresult result;
+ SLVolumeItf volumeItf = getVolume();
+ if (NULL != volumeItf) {
+ result = (*volumeItf)->SetStereoPosition(volumeItf, permille);
+ assert(SL_RESULT_SUCCESS == result);
+ }
+}
+
// enable reverb on the buffer queue player
jboolean Java_com_example_nativeaudio_NativeAudio_enableReverb(JNIEnv* env, jclass clazz,
jboolean enabled)
@@ -426,10 +577,10 @@
SLDataSink audioSnk = {&loc_outmix, NULL};
// create audio player
- const SLInterfaceID ids[1] = {SL_IID_SEEK};
- const SLboolean req[1] = {SL_BOOLEAN_TRUE};
+ const SLInterfaceID ids[3] = {SL_IID_SEEK, SL_IID_MUTESOLO, SL_IID_VOLUME};
+ const SLboolean req[3] = {SL_BOOLEAN_TRUE, SL_BOOLEAN_TRUE, SL_BOOLEAN_TRUE};
result = (*engineEngine)->CreateAudioPlayer(engineEngine, &fdPlayerObject, &audioSrc, &audioSnk,
- 1, ids, req);
+ 3, ids, req);
assert(SL_RESULT_SUCCESS == result);
// realize the player
@@ -444,6 +595,14 @@
result = (*fdPlayerObject)->GetInterface(fdPlayerObject, SL_IID_SEEK, &fdPlayerSeek);
assert(SL_RESULT_SUCCESS == result);
+ // get the mute/solo interface
+ result = (*fdPlayerObject)->GetInterface(fdPlayerObject, SL_IID_MUTESOLO, &fdPlayerMuteSolo);
+ assert(SL_RESULT_SUCCESS == result);
+
+ // get the volume interface
+ result = (*fdPlayerObject)->GetInterface(fdPlayerObject, SL_IID_VOLUME, &fdPlayerVolume);
+ assert(SL_RESULT_SUCCESS == result);
+
// enable whole file looping
result = (*fdPlayerSeek)->SetLoop(fdPlayerSeek, SL_BOOLEAN_TRUE, 0, SL_TIME_UNKNOWN);
assert(SL_RESULT_SUCCESS == result);
@@ -562,6 +721,8 @@
bqPlayerPlay = NULL;
bqPlayerBufferQueue = NULL;
bqPlayerEffectSend = NULL;
+ bqPlayerMuteSolo = NULL;
+ bqPlayerVolume = NULL;
}
// destroy file descriptor audio player object, and invalidate all associated interfaces
@@ -570,6 +731,8 @@
fdPlayerObject = NULL;
fdPlayerPlay = NULL;
fdPlayerSeek = NULL;
+ fdPlayerMuteSolo = NULL;
+ fdPlayerVolume = NULL;
}
// destroy URI audio player object, and invalidate all associated interfaces
@@ -578,6 +741,8 @@
uriPlayerObject = NULL;
uriPlayerPlay = NULL;
uriPlayerSeek = NULL;
+ uriPlayerMuteSolo = NULL;
+ uriPlayerVolume = NULL;
}
// destroy audio recorder object, and invalidate all associated interfaces
diff --git a/ndk/platforms/android-9/samples/native-audio/res/layout/main.xml b/ndk/platforms/android-9/samples/native-audio/res/layout/main.xml
index b9fb95a..eca928a 100644
--- a/ndk/platforms/android-9/samples/native-audio/res/layout/main.xml
+++ b/ndk/platforms/android-9/samples/native-audio/res/layout/main.xml
@@ -26,6 +26,11 @@
android:layout_height="wrap_content"
android:text="@string/hello"
/>
+<LinearLayout
+ android:orientation="horizontal"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ >
<Button
android:id="@+id/hello"
android:text="Hello"
@@ -45,20 +50,123 @@
android:layout_height="wrap_content"
/>
<Button
+ android:id="@+id/embedded_soundtrack"
+ android:text="Embedded\nsoundtrack"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ />
+</LinearLayout>
+<LinearLayout
+ android:orientation="horizontal"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ >
+<Button
android:id="@+id/reverb"
android:text="Reverb"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<Button
- android:id="@+id/embedded_soundtrack"
- android:text="Embedded soundtrack"
+ android:id="@+id/mute_uri"
+ android:text="Mute"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<Button
+ android:id="@+id/enable_stereo_position_uri"
+ android:text="Enable SP"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ />
+</LinearLayout>
+<LinearLayout
+ android:orientation="horizontal"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ >
+<Spinner
+ android:id="@+id/uri_spinner"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="URI spinner"
+ />
+</LinearLayout>
+<LinearLayout
+ android:orientation="horizontal"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ >
+<Button
android:id="@+id/uri_soundtrack"
- android:text="URI soundtrack"
+ android:text="URI\nsoundtrack"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ />
+<Button
+ android:id="@+id/pause_uri"
+ android:text="Pause\nURI"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ />
+<Button
+ android:id="@+id/play_uri"
+ android:text="Play\nURI"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ />
+<Button
+ android:id="@+id/loop_uri"
+ android:text="Loop\nURI"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ />
+</LinearLayout>
+<LinearLayout
+ android:orientation="horizontal"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ >
+ <Button
+ android:id="@+id/mute_left_uri"
+ android:text="mute left"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ />
+ <Button
+ android:id="@+id/mute_right_uri"
+ android:text="mute right"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ />
+ <Button
+ android:id="@+id/solo_left_uri"
+ android:text="solo left"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ />
+ <Button
+ android:id="@+id/solo_right_uri"
+ android:text="solo right"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ />
+</LinearLayout>
+<Button
+ android:id="@+id/channels_uri"
+ android:text="Get channels"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ />
+<SeekBar
+ android:id="@+id/volume_uri"
+ android:text="Volume"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ />
+<SeekBar
+ android:id="@+id/pan_uri"
+ android:text="Pan"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
diff --git a/ndk/platforms/android-9/samples/native-audio/res/values/strings.xml b/ndk/platforms/android-9/samples/native-audio/res/values/strings.xml
index 280c103..f6f2834 100644
--- a/ndk/platforms/android-9/samples/native-audio/res/values/strings.xml
+++ b/ndk/platforms/android-9/samples/native-audio/res/values/strings.xml
@@ -19,4 +19,10 @@
<resources>
<string name="hello">Hello, Android using native audio!</string>
<string name="app_name">NativeAudio</string>
+
+ <string-array name="uri_spinner_array">
+ <item>http://upload.wikimedia.org/wikipedia/commons/6/6d/Banana.ogg</item>
+ <item>http://www.freesound.org/data/previews/18/18765_18799-lq.mp3</item>
+ </string-array>
+
</resources>
diff --git a/ndk/platforms/android-9/samples/native-audio/src/com/example/nativeaudio/NativeAudio.java b/ndk/platforms/android-9/samples/native-audio/src/com/example/nativeaudio/NativeAudio.java
index 5a7b3ef..7138123 100644
--- a/ndk/platforms/android-9/samples/native-audio/src/com/example/nativeaudio/NativeAudio.java
+++ b/ndk/platforms/android-9/samples/native-audio/src/com/example/nativeaudio/NativeAudio.java
@@ -19,24 +19,35 @@
import android.app.Activity;
import android.content.res.AssetManager;
import android.os.Bundle;
+//import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
+import android.widget.AdapterView;
+import android.widget.ArrayAdapter;
import android.widget.Button;
+import android.widget.SeekBar;
+import android.widget.SeekBar.OnSeekBarChangeListener;
+import android.widget.Spinner;
+import android.widget.Toast;
public class NativeAudio extends Activity {
+ //static final String TAG = "NativeAudio";
+
static final int CLIP_NONE = 0;
static final int CLIP_HELLO = 1;
static final int CLIP_ANDROID = 2;
static final int CLIP_SAWTOOTH = 3;
static final int CLIP_PLAYBACK = 4;
- static final String URI = "http://upload.wikimedia.org/wikipedia/commons/6/6d/Banana.ogg";
+ static String URI;
static AssetManager assetManager;
static boolean isPlayingAsset = false;
static boolean isPlayingUri = false;
+ static int numChannelsUri = 0;
+
/** Called when the activity is first created. */
@Override
protected void onCreate(Bundle icicle) {
@@ -50,6 +61,24 @@
createEngine();
createBufferQueueAudioPlayer();
+ // initialize URI spinner
+ Spinner uriSpinner = (Spinner) findViewById(R.id.uri_spinner);
+ ArrayAdapter<CharSequence> uriAdapter = ArrayAdapter.createFromResource(
+ this, R.array.uri_spinner_array, android.R.layout.simple_spinner_item);
+ uriAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
+ uriSpinner.setAdapter(uriAdapter);
+ uriSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
+
+ public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) {
+ URI = parent.getItemAtPosition(pos).toString();
+ }
+
+ public void onNothingSelected(AdapterView parent) {
+ URI = null;
+ }
+
+ });
+
// initialize button click handlers
((Button) findViewById(R.id.hello)).setOnClickListener(new OnClickListener() {
@@ -99,16 +128,122 @@
((Button) findViewById(R.id.uri_soundtrack)).setOnClickListener(new OnClickListener() {
boolean created = false;
public void onClick(View view) {
- if (!created) {
+ if (!created && URI != null) {
created = createUriAudioPlayer(URI);
}
- if (created) {
- isPlayingUri = !isPlayingUri;
- setPlayingUriAudioPlayer(isPlayingUri);
- }
}
});
+ ((Button) findViewById(R.id.pause_uri)).setOnClickListener(new OnClickListener() {
+ public void onClick(View view) {
+ setPlayingUriAudioPlayer(false);
+ }
+ });
+
+ ((Button) findViewById(R.id.play_uri)).setOnClickListener(new OnClickListener() {
+ public void onClick(View view) {
+ setPlayingUriAudioPlayer(true);
+ }
+ });
+
+ ((Button) findViewById(R.id.loop_uri)).setOnClickListener(new OnClickListener() {
+ boolean isLooping = false;
+ public void onClick(View view) {
+ isLooping = !isLooping;
+ setLoopingUriAudioPlayer(isLooping);
+ }
+ });
+
+ ((Button) findViewById(R.id.mute_left_uri)).setOnClickListener(new OnClickListener() {
+ boolean muted = false;
+ public void onClick(View view) {
+ muted = !muted;
+ setChannelMuteUriAudioPlayer(0, muted);
+ }
+ });
+
+ ((Button) findViewById(R.id.mute_right_uri)).setOnClickListener(new OnClickListener() {
+ boolean muted = false;
+ public void onClick(View view) {
+ muted = !muted;
+ setChannelMuteUriAudioPlayer(1, muted);
+ }
+ });
+
+ ((Button) findViewById(R.id.solo_left_uri)).setOnClickListener(new OnClickListener() {
+ boolean soloed = false;
+ public void onClick(View view) {
+ soloed = !soloed;
+ setChannelSoloUriAudioPlayer(0, soloed);
+ }
+ });
+
+ ((Button) findViewById(R.id.solo_right_uri)).setOnClickListener(new OnClickListener() {
+ boolean soloed = false;
+ public void onClick(View view) {
+ soloed = !soloed;
+ setChannelSoloUriAudioPlayer(1, soloed);
+ }
+ });
+
+ ((Button) findViewById(R.id.mute_uri)).setOnClickListener(new OnClickListener() {
+ boolean muted = false;
+ public void onClick(View view) {
+ muted = !muted;
+ setMuteUriAudioPlayer(muted);
+ }
+ });
+
+ ((Button) findViewById(R.id.enable_stereo_position_uri)).setOnClickListener(
+ new OnClickListener() {
+ boolean enabled = false;
+ public void onClick(View view) {
+ enabled = !enabled;
+ enableStereoPositionUriAudioPlayer(enabled);
+ }
+ });
+
+ ((Button) findViewById(R.id.channels_uri)).setOnClickListener(new OnClickListener() {
+ public void onClick(View view) {
+ if (numChannelsUri == 0) {
+ numChannelsUri = getNumChannelsUriAudioPlayer();
+ }
+ Toast.makeText(NativeAudio.this, "Channels: " + numChannelsUri,
+ Toast.LENGTH_SHORT).show();
+ }
+ });
+
+ ((SeekBar) findViewById(R.id.volume_uri)).setOnSeekBarChangeListener(
+ new OnSeekBarChangeListener() {
+ int lastProgress = 100;
+ public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
+ assert progress >= 0 && progress <= 100;
+ lastProgress = progress;
+ }
+ public void onStartTrackingTouch(SeekBar seekBar) {
+ }
+ public void onStopTrackingTouch(SeekBar seekBar) {
+ int attenuation = 100 - lastProgress;
+ int millibel = attenuation * -50;
+ setVolumeUriAudioPlayer(millibel);
+ }
+ });
+
+ ((SeekBar) findViewById(R.id.pan_uri)).setOnSeekBarChangeListener(
+ new OnSeekBarChangeListener() {
+ int lastProgress = 100;
+ public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
+ assert progress >= 0 && progress <= 100;
+ lastProgress = progress;
+ }
+ public void onStartTrackingTouch(SeekBar seekBar) {
+ }
+ public void onStopTrackingTouch(SeekBar seekBar) {
+ int permille = (lastProgress - 50) * 20;
+ setStereoPositionUriAudioPlayer(permille);
+ }
+ });
+
((Button) findViewById(R.id.record)).setOnClickListener(new OnClickListener() {
boolean created = false;
public void onClick(View view) {
@@ -155,9 +290,18 @@
public static native void createEngine();
public static native void createBufferQueueAudioPlayer();
public static native boolean createAssetAudioPlayer(AssetManager assetManager, String filename);
+ // true == PLAYING, false == PAUSED
public static native void setPlayingAssetAudioPlayer(boolean isPlaying);
public static native boolean createUriAudioPlayer(String uri);
public static native void setPlayingUriAudioPlayer(boolean isPlaying);
+ public static native void setLoopingUriAudioPlayer(boolean isLooping);
+ public static native void setChannelMuteUriAudioPlayer(int chan, boolean mute);
+ public static native void setChannelSoloUriAudioPlayer(int chan, boolean solo);
+ public static native int getNumChannelsUriAudioPlayer();
+ public static native void setVolumeUriAudioPlayer(int millibel);
+ public static native void setMuteUriAudioPlayer(boolean mute);
+ public static native void enableStereoPositionUriAudioPlayer(boolean enable);
+ public static native void setStereoPositionUriAudioPlayer(int permille);
public static native boolean selectClip(int which, int count);
public static native boolean enableReverb(boolean enabled);
public static native boolean createAudioRecorder();
diff --git a/samples/ApiDemos/AndroidManifest.xml b/samples/ApiDemos/AndroidManifest.xml
index 2bda4a7..4e63dde 100644
--- a/samples/ApiDemos/AndroidManifest.xml
+++ b/samples/ApiDemos/AndroidManifest.xml
@@ -542,7 +542,7 @@
</activity>
<!-- ============================ -->
- <!-- Accessibility examples strings -->
+ <!-- Accessibility examples -->
<!-- ============================ -->
<activity android:name=".accessibility.ClockBackActivity"
@@ -580,6 +580,15 @@
android:resource="@xml/taskbackconfig" />
</service>
+ <activity android:name=".accessibility.CustomViewAccessibilityActivity"
+ android:label="@string/accessibility_custom_view"
+ android:enabled="@bool/atLeastIceCreamSandwich">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.SAMPLE_CODE" />
+ </intent-filter>
+ </activity>
+
<!-- Instrumentation Samples -->
<activity android:name=".app.LocalSample" android:label="@string/activity_local_sample">
@@ -952,6 +961,15 @@
</intent-filter>
</activity>
+ <activity android:name=".preference.SwitchPreference"
+ android:label="@string/switch_preference"
+ android:enabled="@bool/atLeastIceCreamSandwich">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.SAMPLE_CODE" />
+ </intent-filter>
+ </activity>
+
<!-- ************************************* -->
<!-- CONTENT PACKAGE SAMPLES -->
<!-- ************************************* -->
diff --git a/samples/ApiDemos/_index.html b/samples/ApiDemos/_index.html
index 281364c..3c45843 100644
--- a/samples/ApiDemos/_index.html
+++ b/samples/ApiDemos/_index.html
@@ -39,6 +39,10 @@
<li><a
href="src/com/example/android/apis/accessibility/TaskBackService.html">Window
Querying Accessibility Service</a></li>
+<li><a
+ href="src/com/example/android/apis/accessibility/CustomViewAccessibilityActivity.html">Custom View
+ Accessibility</a></li>
+
</ul>
</div>
diff --git a/samples/ApiDemos/res/layout/custom_view_accessibility.xml b/samples/ApiDemos/res/layout/custom_view_accessibility.xml
new file mode 100644
index 0000000..ceb6b61
--- /dev/null
+++ b/samples/ApiDemos/res/layout/custom_view_accessibility.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="50dip"
+ android:text="@string/accessibility_custom_view_instructions">
+ </TextView>
+
+ <view
+ class="com.example.android.apis.accessibility.CustomViewAccessibilityActivity$AccessibleCompoundButtonInheritance"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:padding="20dip"
+ android:clickable="true" >
+ </view>
+
+ <view
+ class="com.example.android.apis.accessibility.CustomViewAccessibilityActivity$AccessibleCompoundButtonComposition"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:padding="20dip"
+ android:clickable="true" >
+ </view>
+
+</LinearLayout>
diff --git a/samples/ApiDemos/res/values/strings.xml b/samples/ApiDemos/res/values/strings.xml
index b1a57b0..2913844 100644
--- a/samples/ApiDemos/res/values/strings.xml
+++ b/samples/ApiDemos/res/values/strings.xml
@@ -525,6 +525,7 @@
<string name="advanced_preferences">Preference/6. Advanced preferences</string>
<string name="fragment_preferences">Preference/7. Fragment</string>
<string name="preference_with_headers">Preference/8. Headers</string>
+ <string name="switch_preference">Preference/9. Switch</string>
<string name="launch_preference_activity">Launch PreferenceActivity</string>
<string name="counter_value_is">The counter value is</string>
@@ -1295,7 +1296,7 @@
<string name="accessibility_service_label">ClockBack</string>
<string name="accessibility_service_instructions">
1. Enable TalkBack (Settings -> Accessibility -> TalkBack).
- \n\n2. Enable Explore-byTouch (Settings -> Accessibility -> Explore by Touch).
+ \n\n2. Enable Explore-by-Touch (Settings -> Accessibility -> Explore by Touch).
\n\n3. Touch explore the Clock application and the home screen.
\n\n4. Go to the Clock application and change the time of an alarm.
\n\n5. Enable ClockBack (Settings -> Accessibility -> ClockBack).
@@ -1315,10 +1316,19 @@
<string name="accessibility_query_window_description">Task App Accessibility Service</string>
<string name="accessibility_query_window_instructions">
1. Enable QueryBack (Settings -> Accessibility -> QueryBack).
- \n\n2. Enable Explore-byTouch (Settings -> Accessibility -> Explore by Touch).
+ \n\n2. Enable Explore-by-Touch (Settings -> Accessibility -> Explore by Touch).
\n\n3. Touch explore the list.
</string>
+ <string name="accessibility_custom_view">Accessibility/Custom View</string>
+ <string name="accessibility_custom_view_instructions">
+ 1. Enable TalkBack (Settings -> Accessibility -> TalkBack).
+ \n\n2. Enable Explore-by-Touch (Settings -> Accessibility -> Explore by Touch).
+ \n\n3. Touch explore/poke the buttons.
+ </string>
+ <string name="accessibility_custom_on">On</string>
+ <string name="accessibility_custom_off">Off</string>
+
<string name="task_name">Task</string>
<string name="task_complete_template">Task %1$s %2$s</string>
<string name="task_complete">is complete</string>
diff --git a/samples/ApiDemos/res/xml/default_values.xml b/samples/ApiDemos/res/xml/default_values.xml
index 5638c00..ef06c3e 100644
--- a/samples/ApiDemos/res/xml/default_values.xml
+++ b/samples/ApiDemos/res/xml/default_values.xml
@@ -25,12 +25,6 @@
android:title="@string/title_checkbox_preference"
android:summary="@string/summary_checkbox_preference" />
- <SwitchPreference
- android:key="default_switch"
- android:defaultValue="false"
- android:title="@string/title_switch_preference"
- android:summary="@string/summary_switch_preference" />
-
<EditTextPreference
android:key="default_edittext"
android:defaultValue="@string/default_value_edittext_preference"
diff --git a/samples/ApiDemos/res/xml/fragmented_preferences.xml b/samples/ApiDemos/res/xml/fragmented_preferences.xml
index da6f3f1..71cb21c 100644
--- a/samples/ApiDemos/res/xml/fragmented_preferences.xml
+++ b/samples/ApiDemos/res/xml/fragmented_preferences.xml
@@ -27,11 +27,6 @@
android:title="@string/title_checkbox_preference"
android:summary="@string/summary_checkbox_preference" />
- <SwitchPreference
- android:key="checkbox_preference"
- android:title="@string/title_switch_preference"
- android:summary="@string/summary_switch_preference" />
-
</PreferenceCategory>
<PreferenceCategory
diff --git a/samples/ApiDemos/res/xml/preference_switch b/samples/ApiDemos/res/xml/preference_switch
new file mode 100644
index 0000000..fceb3a1
--- /dev/null
+++ b/samples/ApiDemos/res/xml/preference_switch
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<!-- This is a primitive example showing the different types of preferences available. -->
+<!-- BEGIN_INCLUDE(preferences) -->
+<PreferenceScreen
+ xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <PreferenceCategory
+ android:title="@string/inline_preferences">
+
+ <CheckBoxPreference
+ android:key="checkbox_preference"
+ android:title="@string/title_checkbox_preference"
+ android:summary="@string/summary_checkbox_preference" />
+
+ <SwitchPreference
+ android:key="checkbox_preference"
+ android:title="@string/title_switch_preference"
+ android:summary="@string/summary_switch_preference" />
+
+ <SwitchPreference
+ android:key="checkbox_preference"
+ android:title="@string/title_switch_preference"
+ android:summary="@string/summary_switch_preference_yes_no"
+ android:switchTextOn = "YES"
+ android:switchTextOff = "NO"
+ android:defaultValue="true" />
+
+ </PreferenceCategory>
+
+</PreferenceScreen>
+<!-- END_INCLUDE(preferences) -->
diff --git a/samples/ApiDemos/res/xml/preferences.xml b/samples/ApiDemos/res/xml/preferences.xml
index 3316aa5..6f3faee 100644
--- a/samples/ApiDemos/res/xml/preferences.xml
+++ b/samples/ApiDemos/res/xml/preferences.xml
@@ -27,18 +27,6 @@
android:title="@string/title_checkbox_preference"
android:summary="@string/summary_checkbox_preference" />
- <SwitchPreference
- android:key="checkbox_preference"
- android:title="@string/title_switch_preference"
- android:summary="@string/summary_switch_preference" />
-
- <SwitchPreference
- android:key="checkbox_preference"
- android:title="@string/title_switch_preference"
- android:summary="@string/summary_switch_preference_yes_no"
- android:switchTextOn = "YES"
- android:switchTextOff = "NO" />
-
</PreferenceCategory>
<PreferenceCategory
diff --git a/samples/ApiDemos/src/com/example/android/apis/ApiDemosApplication.java b/samples/ApiDemos/src/com/example/android/apis/ApiDemosApplication.java
index 5ed1714..4ad5d35 100644
--- a/samples/ApiDemos/src/com/example/android/apis/ApiDemosApplication.java
+++ b/samples/ApiDemos/src/com/example/android/apis/ApiDemosApplication.java
@@ -17,12 +17,12 @@
package com.example.android.apis;
import android.app.Application;
-import android.preference.PreferenceManager;
/**
- * This is an example of a {@link android.app.Application} class. Ordinarily you would use
- * a class like this as a central repository for information that might be shared between multiple
- * activities.
+ * This is an example of a {@link android.app.Application} class. This can
+ * be used as a central repository for per-process information about your app;
+ * however it is recommended to use singletons for that instead rather than merge
+ * all of these globals from across your application into one place here.
*
* In this case, we have not defined any specific work for this Application.
*
@@ -30,17 +30,7 @@
* of how to perform unit tests on an Application object.
*/
public class ApiDemosApplication extends Application {
-
@Override
public void onCreate() {
- /*
- * This populates the default values from the preferences XML file. See
- * {@link DefaultValues} for more details.
- */
- PreferenceManager.setDefaultValues(this, R.xml.default_values, false);
- }
-
- @Override
- public void onTerminate() {
}
}
diff --git a/samples/ApiDemos/src/com/example/android/apis/accessibility/CustomViewAccessibilityActivity.java b/samples/ApiDemos/src/com/example/android/apis/accessibility/CustomViewAccessibilityActivity.java
new file mode 100644
index 0000000..8facfba
--- /dev/null
+++ b/samples/ApiDemos/src/com/example/android/apis/accessibility/CustomViewAccessibilityActivity.java
@@ -0,0 +1,280 @@
+/*
+ * 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.
+ */
+
+package com.example.android.apis.accessibility;
+
+import android.app.Activity;
+import android.content.Context;
+import android.graphics.Canvas;
+import android.graphics.Paint;
+import android.os.Build;
+import android.os.Bundle;
+import android.text.Layout;
+import android.text.StaticLayout;
+import android.text.TextPaint;
+import android.text.TextUtils;
+import android.util.AttributeSet;
+import android.util.TypedValue;
+import android.view.View;
+import android.view.accessibility.AccessibilityEvent;
+import android.view.accessibility.AccessibilityNodeInfo;
+
+import com.example.android.apis.R;
+
+/**
+ * Demonstrates how to implement accessibility support of custom views. Custom view
+ * is a tailored widget developed by extending the base classes in the android.view
+ * package. This sample shows how to implement the accessibility behavior via both
+ * inheritance (non backwards compatible) and composition (backwards compatible).
+ * <p>
+ * While the Android framework has a diverse portfolio of views tailored for various
+ * use cases, sometimes a developer needs a specific functionality not implemented
+ * by the standard views. A solution is to write a custom view that extends one the
+ * base view classes. While implementing the desired functionality a developer should
+ * also implement accessibility support for that new functionality such that
+ * disabled users can leverage it.
+ * </p>
+ */
+public class CustomViewAccessibilityActivity extends Activity {
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.custom_view_accessibility);
+ }
+
+ /**
+ * Demonstrates how to enhance the accessibility support via inheritance.
+ * <p>
+ * <strong>Note:</strong> Using inheritance may break your application's
+ * backwards compatibility. In particular, overriding a method that takes as
+ * an argument or returns a class not present on an older platform
+ * version will prevent your application from running on that platform.
+ * For example, {@link AccessibilityNodeInfo} was introduced in
+ * {@link Build.VERSION_CODES#ICE_CREAM_SANDWICH API 14}, thus overriding
+ * {@link View#onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo)
+ * View.onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo)}
+ * will prevent you application from running on a platform older than
+ * {@link Build.VERSION_CODES#ICE_CREAM_SANDWICH API 14}.
+ * </p>
+ */
+ public static class AccessibleCompoundButtonInheritance extends BaseToggleButton {
+
+ public AccessibleCompoundButtonInheritance(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ }
+
+ @Override
+ public void onInitializeAccessibilityEvent(AccessibilityEvent event) {
+ super.onInitializeAccessibilityEvent(event);
+ // We called the super implementation to let super classes
+ // set appropriate event properties. Then we add the new property
+ // (checked) which is not supported by a super class.
+ event.setChecked(isChecked());
+ }
+
+ @Override
+ public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) {
+ super.onInitializeAccessibilityNodeInfo(info);
+ // We called the super implementation to let super classes set
+ // appropriate info properties. Then we add our properties
+ // (checkable and checked) which are not supported by a super class.
+ info.setCheckable(true);
+ info.setChecked(isChecked());
+ // Very often you will need to add only the text on the custom view.
+ CharSequence text = getText();
+ if (!TextUtils.isEmpty(text)) {
+ info.setText(text);
+ }
+ }
+
+ @Override
+ public void onPopulateAccessibilityEvent(AccessibilityEvent event) {
+ super.onPopulateAccessibilityEvent(event);
+ // We called the super implementation to populate its text to the
+ // event. Then we add our text not present in a super class.
+ // Very often you will need to add only the text on the custom view.
+ CharSequence text = getText();
+ if (!TextUtils.isEmpty(text)) {
+ event.getText().add(text);
+ }
+ }
+ }
+
+ /**
+ * Demonstrates how to enhance the accessibility support via composition.
+ * <p>
+ * <strong>Note:</strong> Using composition ensures that your application is
+ * backwards compatible. The android-support-v4 library has API that allow
+ * using the accessibility APIs in a backwards compatible manner.
+ * </p>
+ */
+ public static class AccessibleCompoundButtonComposition extends BaseToggleButton {
+
+ public AccessibleCompoundButtonComposition(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ tryInstallAccessibilityDelegate();
+ }
+
+ public void tryInstallAccessibilityDelegate() {
+ // If the API version of the platform we are running is too old
+ // and does not support the AccessibilityDelegate APIs, do not
+ // call View.setAccessibilityDelegate(AccessibilityDelegate) or
+ // refer to AccessibilityDelegate, otherwise an exception will
+ // be thrown.
+ // NOTE: The android-support-v4 library contains APIs the enable
+ // using the accessibility APIs in a backwards compatible fashion.
+ if (Build.VERSION.SDK_INT < 14) {
+ return;
+ }
+ // AccessibilityDelegate allows clients to override its methods that
+ // correspond to the accessibility methods in View and register the
+ // delegate in the View essentially injecting the accessibility support.
+ setAccessibilityDelegate(new AccessibilityDelegate() {
+ @Override
+ public void onInitializeAccessibilityEvent(View host, AccessibilityEvent event) {
+ super.onInitializeAccessibilityEvent(host, event);
+ // We called the super implementation to let super classes
+ // set appropriate event properties. Then we add the new property
+ // (checked) which is not supported by a super class.
+ event.setChecked(isChecked());
+ }
+
+ @Override
+ public void onInitializeAccessibilityNodeInfo(View host,
+ AccessibilityNodeInfo info) {
+ super.onInitializeAccessibilityNodeInfo(host, info);
+ // We called the super implementation to let super classes set
+ // appropriate info properties. Then we add our properties
+ // (checkable and checked) which are not supported by a super class.
+ info.setCheckable(true);
+ info.setChecked(isChecked());
+ // Very often you will need to add only the text on the custom view.
+ CharSequence text = getText();
+ if (!TextUtils.isEmpty(text)) {
+ info.setText(text);
+ }
+ }
+
+ @Override
+ public void onPopulateAccessibilityEvent(View host, AccessibilityEvent event) {
+ super.onPopulateAccessibilityEvent(host, event);
+ // We called the super implementation to populate its text to the
+ // event. Then we add our text not present in a super class.
+ // Very often you will need to add only the text on the custom view.
+ CharSequence text = getText();
+ if (!TextUtils.isEmpty(text)) {
+ event.getText().add(text);
+ }
+ }
+ });
+ }
+ }
+
+ /**
+ * This is a base toggle button class whose accessibility is not tailored
+ * to reflect the new functionality it implements.
+ * <p>
+ * <strong>Note:</strong> This is not a sample implementation of a toggle
+ * button, rather a simple class needed to demonstrate how to refine the
+ * accessibility support of a custom View.
+ * </p>
+ */
+ private static class BaseToggleButton extends View {
+ private boolean mChecked;
+
+ private CharSequence mTextOn;
+ private CharSequence mTextOff;
+
+ private Layout mOnLayout;
+ private Layout mOffLayout;
+
+ private TextPaint mTextPaint;
+
+ public BaseToggleButton(Context context, AttributeSet attrs) {
+ this(context, attrs, android.R.attr.buttonStyle);
+ }
+
+ public BaseToggleButton(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+
+ mTextPaint = new TextPaint(Paint.ANTI_ALIAS_FLAG);
+
+ TypedValue typedValue = new TypedValue();
+ context.getTheme().resolveAttribute(android.R.attr.textSize, typedValue, true);
+ final int textSize = (int) typedValue.getDimension(
+ context.getResources().getDisplayMetrics());
+ mTextPaint.setTextSize(textSize);
+
+ context.getTheme().resolveAttribute(android.R.attr.textColorPrimary, typedValue, true);
+ final int textColor = context.getResources().getColor(typedValue.resourceId);
+ mTextPaint.setColor(textColor);
+
+ mTextOn = context.getString(R.string.accessibility_custom_on);
+ mTextOff = context.getString(R.string.accessibility_custom_off);
+ }
+
+ public boolean isChecked() {
+ return mChecked;
+ }
+
+ public CharSequence getText() {
+ return mChecked ? mTextOn : mTextOff;
+ }
+
+ @Override
+ public boolean performClick() {
+ final boolean handled = super.performClick();
+ if (!handled) {
+ mChecked ^= true;
+ invalidate();
+ }
+ return handled;
+ }
+
+ @Override
+ public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ if (mOnLayout == null) {
+ mOnLayout = makeLayout(mTextOn);
+ }
+ if (mOffLayout == null) {
+ mOffLayout = makeLayout(mTextOff);
+ }
+ final int minWidth = Math.max(mOnLayout.getWidth(), mOffLayout.getWidth())
+ + getPaddingLeft() + getPaddingRight();
+ final int minHeight = Math.max(mOnLayout.getHeight(), mOffLayout.getHeight())
+ + getPaddingLeft() + getPaddingRight();
+ setMeasuredDimension(resolveSizeAndState(minWidth, widthMeasureSpec, 0),
+ resolveSizeAndState(minHeight, heightMeasureSpec, 0));
+ }
+
+ private Layout makeLayout(CharSequence text) {
+ return new StaticLayout(text, mTextPaint,
+ (int) Math.ceil(Layout.getDesiredWidth(text, mTextPaint)),
+ Layout.Alignment.ALIGN_NORMAL, 1.f, 0, true);
+ }
+
+ @Override
+ protected void onDraw(Canvas canvas) {
+ super.onDraw(canvas);
+ canvas.save();
+ canvas.translate(getPaddingLeft(), getPaddingRight());
+ Layout switchText = mChecked ? mOnLayout : mOffLayout;
+ switchText.draw(canvas);
+ canvas.restore();
+ }
+ }
+}
diff --git a/samples/ApiDemos/src/com/example/android/apis/accessibility/_index.html b/samples/ApiDemos/src/com/example/android/apis/accessibility/_index.html
index 7506cb3..713d913 100644
--- a/samples/ApiDemos/src/com/example/android/apis/accessibility/_index.html
+++ b/samples/ApiDemos/src/com/example/android/apis/accessibility/_index.html
@@ -9,7 +9,7 @@
how to provide dynamic, context-dependent feedback — feedback type changes depending on
the ringer mode.
</dd>
-<dt>
+</dl>
<dl>
<dt><a href="TaskBackService.html">Window Querying Accessibility Service</a></dt>
@@ -21,3 +21,12 @@
AccessibilityRecords.
</dd>
</dl>
+
+<dl>
+ <dt><a href="CustomViewAccessibilityActivity.html">Custom View Accessibility</a></dt>
+ <dd>Demonstrates how to implement accessibility support of custom views. Custom view
+ is a tailored widget developed by extending the base classes in the android.view
+ package. This sample shows how to implement the accessibility behavior via both
+ inheritance (non backwards compatible) and composition (backwards compatible).
+ </dd>
+</dl>
diff --git a/samples/ApiDemos/src/com/example/android/apis/preference/DefaultValues.java b/samples/ApiDemos/src/com/example/android/apis/preference/DefaultValues.java
index 69cf499..84cd5b2 100644
--- a/samples/ApiDemos/src/com/example/android/apis/preference/DefaultValues.java
+++ b/samples/ApiDemos/src/com/example/android/apis/preference/DefaultValues.java
@@ -16,9 +16,9 @@
package com.example.android.apis.preference;
-import com.example.android.apis.ApiDemosApplication;
import com.example.android.apis.R;
+import android.content.Context;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceActivity;
@@ -34,20 +34,28 @@
* {@link PreferenceManager#setDefaultValues(android.content.Context, int, boolean)}.
* <p>
* This should be called early, typically when the application is first created.
- * This ensures any of the application's activities, services, etc. will have
- * the default values present, even if the user has not wandered into the
- * application's settings. For ApiDemos, this is {@link ApiDemosApplication},
- * and you can find the call to
- * {@link PreferenceManager#setDefaultValues(android.content.Context, int, boolean)}
- * in its {@link ApiDemosApplication#onCreate() onCreate}.
+ * An easy way to do this is to have a common function for retrieving the
+ * SharedPreferences that takes care of calling it.
*/
public class DefaultValues extends PreferenceActivity {
+ // This is the global (to the .apk) name under which we store these
+ // preferences. We want this to be unique from other preferences so that
+ // we do not have unexpected name conflicts, and the framework can correctly
+ // determine whether these preferences' defaults have already been written.
+ static final String PREFS_NAME = "defaults";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
+ getPrefs(this);
+ getPreferenceManager().setSharedPreferencesName(PREFS_NAME);
addPreferencesFromResource(R.xml.default_values);
}
+ static SharedPreferences getPrefs(Context context) {
+ PreferenceManager.setDefaultValues(context, PREFS_NAME, MODE_PRIVATE,
+ R.xml.default_values, false);
+ return context.getSharedPreferences(PREFS_NAME, MODE_PRIVATE);
+ }
}
diff --git a/samples/ApiDemos/src/com/example/android/apis/preference/LaunchingPreferences.java b/samples/ApiDemos/src/com/example/android/apis/preference/LaunchingPreferences.java
index 066477b..573330c 100644
--- a/samples/ApiDemos/src/com/example/android/apis/preference/LaunchingPreferences.java
+++ b/samples/ApiDemos/src/com/example/android/apis/preference/LaunchingPreferences.java
@@ -44,12 +44,9 @@
super.onCreate(savedInstanceState);
/*
- * If this were my app's main activity, I would load the default values
- * so they're set even if the user does not go into the preferences
- * screen. Another good place to call this method would be from a
- * subclass of Application, so your default values would be loaded
- * regardless of entry into your application (for example, a service or
- * activity).
+ * These preferences have defaults, so before using them go apply those
+ * defaults. This will only execute once -- when the defaults are applied
+ * a boolean preference is set so they will not be applied again.
*/
PreferenceManager.setDefaultValues(this, R.xml.advanced_preferences, false);
diff --git a/samples/ApiDemos/src/com/example/android/apis/preference/PreferenceWithHeaders.java b/samples/ApiDemos/src/com/example/android/apis/preference/PreferenceWithHeaders.java
index 6437e1e..b4dbdb4 100644
--- a/samples/ApiDemos/src/com/example/android/apis/preference/PreferenceWithHeaders.java
+++ b/samples/ApiDemos/src/com/example/android/apis/preference/PreferenceWithHeaders.java
@@ -21,6 +21,7 @@
import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.preference.PreferenceFragment;
+import android.preference.PreferenceManager;
import android.util.Log;
import android.widget.Button;
@@ -60,6 +61,12 @@
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
+ // Make sure default values are applied. In a real app, you would
+ // want this in a shared function that is used to retrieve the
+ // SharedPreferences wherever they are needed.
+ PreferenceManager.setDefaultValues(getActivity(),
+ R.xml.advanced_preferences, false);
+
// Load the preferences from an XML resource
addPreferencesFromResource(R.xml.fragmented_preferences);
}
diff --git a/samples/ApiDemos/src/com/example/android/apis/preference/SwitchPreference.java b/samples/ApiDemos/src/com/example/android/apis/preference/SwitchPreference.java
new file mode 100644
index 0000000..191c6ac
--- /dev/null
+++ b/samples/ApiDemos/src/com/example/android/apis/preference/SwitchPreference.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2007 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.
+ */
+
+package com.example.android.apis.preference;
+
+import com.example.android.apis.R;
+
+import android.os.Bundle;
+import android.preference.PreferenceActivity;
+import android.preference.PreferenceManager;
+
+public class SwitchPreference extends PreferenceActivity {
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ PreferenceManager.setDefaultValues(this, "switch", MODE_PRIVATE,
+ R.xml.default_values, false);
+
+ // Load the preferences from an XML resource
+ getPreferenceManager().setSharedPreferencesName("switch");
+ addPreferencesFromResource(R.xml.preference_switch);
+ }
+}
diff --git a/samples/ApiDemos/src/com/example/android/apis/view/Focus1.java b/samples/ApiDemos/src/com/example/android/apis/view/Focus1.java
index c816b31..00e19bf 100644
--- a/samples/ApiDemos/src/com/example/android/apis/view/Focus1.java
+++ b/samples/ApiDemos/src/com/example/android/apis/view/Focus1.java
@@ -37,7 +37,7 @@
WebView webView = (WebView) findViewById(R.id.rssWebView);
webView.loadData(
"<html><body>Can I focus?<br /><a href=\"#\">No I cannot!</a>.</body></html>",
- "text/html", "utf-8");
+ "text/html", null);
ListView listView = (ListView) findViewById(R.id.rssListView);
listView.setAdapter(new ArrayAdapter<String>(this,
diff --git a/samples/ApiDemos/src/com/example/android/apis/view/WebView1.java b/samples/ApiDemos/src/com/example/android/apis/view/WebView1.java
index 1cef034..d6a4efe 100644
--- a/samples/ApiDemos/src/com/example/android/apis/view/WebView1.java
+++ b/samples/ApiDemos/src/com/example/android/apis/view/WebView1.java
@@ -35,38 +35,37 @@
setContentView(R.layout.webview_1);
final String mimeType = "text/html";
- final String encoding = "utf-8";
WebView wv;
wv = (WebView) findViewById(R.id.wv1);
- wv.loadData("<a href='x'>Hello World! - 1</a>", mimeType, encoding);
+ wv.loadData("<a href='x'>Hello World! - 1</a>", mimeType, null);
wv = (WebView) findViewById(R.id.wv2);
- wv.loadData("<a href='x'>Hello World! - 2</a>", mimeType, encoding);
+ wv.loadData("<a href='x'>Hello World! - 2</a>", mimeType, null);
wv = (WebView) findViewById(R.id.wv3);
- wv.loadData("<a href='x'>Hello World! - 3</a>", mimeType, encoding);
+ wv.loadData("<a href='x'>Hello World! - 3</a>", mimeType, null);
wv = (WebView) findViewById(R.id.wv4);
- wv.loadData("<a href='x'>Hello World! - 4</a>", mimeType, encoding);
+ wv.loadData("<a href='x'>Hello World! - 4</a>", mimeType, null);
wv = (WebView) findViewById(R.id.wv5);
- wv.loadData("<a href='x'>Hello World! - 5</a>", mimeType, encoding);
+ wv.loadData("<a href='x'>Hello World! - 5</a>", mimeType, null);
wv = (WebView) findViewById(R.id.wv6);
- wv.loadData("<a href='x'>Hello World! - 6</a>", mimeType, encoding);
+ wv.loadData("<a href='x'>Hello World! - 6</a>", mimeType, null);
wv = (WebView) findViewById(R.id.wv7);
- wv.loadData("<a href='x'>Hello World! - 7</a>", mimeType, encoding);
+ wv.loadData("<a href='x'>Hello World! - 7</a>", mimeType, null);
wv = (WebView) findViewById(R.id.wv8);
- wv.loadData("<a href='x'>Hello World! - 8</a>", mimeType, encoding);
+ wv.loadData("<a href='x'>Hello World! - 8</a>", mimeType, null);
wv = (WebView) findViewById(R.id.wv9);
- wv.loadData("<a href='x'>Hello World! - 9</a>", mimeType, encoding);
+ wv.loadData("<a href='x'>Hello World! - 9</a>", mimeType, null);
wv = (WebView) findViewById(R.id.wv10);
- wv.loadData("<a href='x'>Hello World! - 10</a>", mimeType, encoding);
+ wv.loadData("<a href='x'>Hello World! - 10</a>", mimeType, null);
}
}
diff --git a/samples/MySampleRss/src/com/example/codelab/rssexample/MyRssReader5.java b/samples/MySampleRss/src/com/example/codelab/rssexample/MyRssReader5.java
index 0d59bfd..b479d95 100644
--- a/samples/MySampleRss/src/com/example/codelab/rssexample/MyRssReader5.java
+++ b/samples/MySampleRss/src/com/example/codelab/rssexample/MyRssReader5.java
@@ -95,12 +95,12 @@
mLogger.warning("MyRssReader5.onItemSelected() couldn't get the content" +
"from the cursor " + e.getMessage());
}
- mWebView.loadData(content, "text/html", "utf-8");
+ mWebView.loadData(content, "text/html", null);
}
//END_INCLUDE(5_4)
public void onNothingSelected(AdapterView parent){
- mWebView.loadData("<html><body><p>No selection chosen</p></body></html>", "text/html", "utf-8");
+ mWebView.loadData("<html><body><p>No selection chosen</p></body></html>", "text/html", null);
}
// Store our state before we are potentially bumped from memory.
diff --git a/samples/SampleSyncAdapter/AndroidManifest.xml b/samples/SampleSyncAdapter/AndroidManifest.xml
index 54c1594..285abfb 100644
--- a/samples/SampleSyncAdapter/AndroidManifest.xml
+++ b/samples/SampleSyncAdapter/AndroidManifest.xml
@@ -128,5 +128,35 @@
android:mimeType="vnd.android.cursor.item/group" />
</intent-filter>
</activity>
+
+ <activity
+ android:name=".activities.ViewStreamItemActivity"
+ android:theme="@android:style/Theme.Dialog">
+ <!--
+ We use the VIEW intent to view a stream item in our app.
+ It always comes with a lookup URI.
+ -->
+ <intent-filter>
+ <action
+ android:name="android.intent.action.VIEW" />
+ <data
+ android:mimeType="vnd.android.cursor.item/stream_item" />
+ </intent-filter>
+ </activity>
+
+ <activity
+ android:name=".activities.ViewStreamItemPhotoActivity"
+ android:theme="@android:style/Theme.Dialog">
+ <!--
+ We use the VIEW intent to view a stream item photo in our app.
+ It always comes with a lookup URI.
+ -->
+ <intent-filter>
+ <action
+ android:name="android.intent.action.VIEW" />
+ <data
+ android:mimeType="vnd.android.cursor.item/stream_item_photo" />
+ </intent-filter>
+ </activity>
</application>
</manifest>
diff --git a/samples/SampleSyncAdapter/res/layout/view_stream_item_activity.xml b/samples/SampleSyncAdapter/res/layout/view_stream_item_activity.xml
new file mode 100644
index 0000000..a04d07f
--- /dev/null
+++ b/samples/SampleSyncAdapter/res/layout/view_stream_item_activity.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+/**
+ * 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.
+ */
+-->
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content">
+ <TextView
+ android:text="@string/view_stream_item_description"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content" />
+ <TextView
+ android:id="@+id/view_stream_item_uri"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content" />
+</LinearLayout>
diff --git a/samples/SampleSyncAdapter/res/layout/view_stream_item_photo_activity.xml b/samples/SampleSyncAdapter/res/layout/view_stream_item_photo_activity.xml
new file mode 100644
index 0000000..ddc09d0
--- /dev/null
+++ b/samples/SampleSyncAdapter/res/layout/view_stream_item_photo_activity.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+/**
+ * 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.
+ */
+-->
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content">
+ <TextView
+ android:text="@string/view_stream_item_photo_description"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content" />
+ <TextView
+ android:id="@+id/view_stream_item_photo_uri"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content" />
+</LinearLayout>
diff --git a/samples/SampleSyncAdapter/res/values/strings.xml b/samples/SampleSyncAdapter/res/values/strings.xml
index 84c94d1..22fe14e 100644
--- a/samples/SampleSyncAdapter/res/values/strings.xml
+++ b/samples/SampleSyncAdapter/res/values/strings.xml
@@ -129,4 +129,14 @@
This is the group uri:</string>
+ <!-- The description for the view stream item -->
+ <string name="view_stream_item_description">This would now show the details of the stream item.
+
+ This is the uri of the stream item:</string>
+
+ <!-- The description for the view stream item photo -->
+ <string name="view_stream_item_photo_description">This would now show the details of the stream item photo.
+
+ This is the uri of the photo:</string>
+
</resources>
\ No newline at end of file
diff --git a/samples/SampleSyncAdapter/res/xml-v14/contacts.xml b/samples/SampleSyncAdapter/res/xml-v14/contacts.xml
index b4ad2a0..48e079a 100644
--- a/samples/SampleSyncAdapter/res/xml-v14/contacts.xml
+++ b/samples/SampleSyncAdapter/res/xml-v14/contacts.xml
@@ -24,6 +24,8 @@
viewContactNotifyService="com.example.android.samplesync.notifier.NotifierService"
viewGroupActivity="com.example.android.samplesync.activities.ViewGroupActivity"
viewGroupActionLabel="@string/view_group_action_label"
+ viewStreamItemActivity="com.example.android.samplesync.activities.ViewStreamItemActivity"
+ viewStreamItemPhotoActivity="com.example.android.samplesync.activities.ViewStreamItemPhotoActivity"
>
<ContactsDataKind
diff --git a/samples/SampleSyncAdapter/src/com/example/android/samplesync/activities/ViewStreamItemActivity.java b/samples/SampleSyncAdapter/src/com/example/android/samplesync/activities/ViewStreamItemActivity.java
new file mode 100644
index 0000000..6d54f31
--- /dev/null
+++ b/samples/SampleSyncAdapter/src/com/example/android/samplesync/activities/ViewStreamItemActivity.java
@@ -0,0 +1,41 @@
+/*
+ * 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.
+ */
+package com.example.android.samplesync.activities;
+
+import com.example.android.samplesync.R;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.widget.TextView;
+
+/**
+ * Activity to handle view a stream-item. In a real app, this would show a rich view of the
+ * item.
+ */
+public class ViewStreamItemActivity extends Activity {
+ private static final String TAG = "ViewStreamItemActivity";
+
+ private TextView mUriTextView;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.view_stream_item_activity);
+
+ mUriTextView = (TextView) findViewById(R.id.view_stream_item_uri);
+ mUriTextView.setText(getIntent().getDataString());
+ }
+}
diff --git a/samples/SampleSyncAdapter/src/com/example/android/samplesync/activities/ViewStreamItemPhotoActivity.java b/samples/SampleSyncAdapter/src/com/example/android/samplesync/activities/ViewStreamItemPhotoActivity.java
new file mode 100644
index 0000000..962bc70
--- /dev/null
+++ b/samples/SampleSyncAdapter/src/com/example/android/samplesync/activities/ViewStreamItemPhotoActivity.java
@@ -0,0 +1,41 @@
+/*
+ * 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.
+ */
+package com.example.android.samplesync.activities;
+
+import com.example.android.samplesync.R;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.widget.TextView;
+
+/**
+ * Activity to view a stream-item-photo. In a real app, this would show a fullscreen view of the
+ * photo, potentially with ways to interact with it
+ */
+public class ViewStreamItemPhotoActivity extends Activity {
+ private static final String TAG = "ViewStreamItemPhotoActivity";
+
+ private TextView mUriTextView;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.view_stream_item_photo_activity);
+
+ mUriTextView = (TextView) findViewById(R.id.view_stream_item_photo_uri);
+ mUriTextView.setText(getIntent().getDataString());
+ }
+}
diff --git a/samples/Support13Demos/res/layout/fragment_pager.xml b/samples/Support13Demos/res/layout/fragment_pager.xml
index 46c8cbe..3fe844d 100644
--- a/samples/Support13Demos/res/layout/fragment_pager.xml
+++ b/samples/Support13Demos/res/layout/fragment_pager.xml
@@ -16,6 +16,7 @@
<!-- Top-level content view for the simple fragment sample. -->
+<!-- BEGIN_INCLUDE(complete) -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:padding="4dip"
android:gravity="center_horizontal"
@@ -42,3 +43,4 @@
</Button>
</LinearLayout>
</LinearLayout>
+<!-- END_INCLUDE(complete) -->
diff --git a/samples/Support13Demos/res/layout/fragment_pager_list.xml b/samples/Support13Demos/res/layout/fragment_pager_list.xml
index bbe7b1d..189cfff 100644
--- a/samples/Support13Demos/res/layout/fragment_pager_list.xml
+++ b/samples/Support13Demos/res/layout/fragment_pager_list.xml
@@ -14,6 +14,7 @@
limitations under the License.
-->
+<!-- BEGIN_INCLUDE(complete) -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
@@ -50,3 +51,4 @@
</FrameLayout>
</LinearLayout>
+<!-- END_INCLUDE(complete) -->
diff --git a/samples/Support13Demos/src/com/example/android/supportv13/app/ActionBarTabsPager.java b/samples/Support13Demos/src/com/example/android/supportv13/app/ActionBarTabsPager.java
index 433f7e9..301a2f8 100644
--- a/samples/Support13Demos/src/com/example/android/supportv13/app/ActionBarTabsPager.java
+++ b/samples/Support13Demos/src/com/example/android/supportv13/app/ActionBarTabsPager.java
@@ -33,6 +33,7 @@
* This demonstrates the use of action bar tabs and how they interact
* with other action bar features.
*/
+//BEGIN_INCLUDE(complete)
public class ActionBarTabsPager extends Activity {
ViewPager mViewPager;
TabsAdapter mTabsAdapter;
@@ -157,3 +158,4 @@
}
}
}
+//END_INCLUDE(complete)
diff --git a/samples/Support13Demos/src/com/example/android/supportv13/app/FragmentPagerSupport.java b/samples/Support13Demos/src/com/example/android/supportv13/app/FragmentPagerSupport.java
index ae2f481..04532b8 100644
--- a/samples/Support13Demos/src/com/example/android/supportv13/app/FragmentPagerSupport.java
+++ b/samples/Support13Demos/src/com/example/android/supportv13/app/FragmentPagerSupport.java
@@ -37,6 +37,7 @@
import android.widget.ListView;
import android.widget.TextView;
+//BEGIN_INCLUDE(complete)
public class FragmentPagerSupport extends Activity {
static final int NUM_ITEMS = 10;
@@ -138,3 +139,4 @@
}
}
}
+//END_INCLUDE(complete)
diff --git a/samples/Support13Demos/src/com/example/android/supportv13/app/FragmentStatePagerSupport.java b/samples/Support13Demos/src/com/example/android/supportv13/app/FragmentStatePagerSupport.java
index 4e6ebda..e60c268 100644
--- a/samples/Support13Demos/src/com/example/android/supportv13/app/FragmentStatePagerSupport.java
+++ b/samples/Support13Demos/src/com/example/android/supportv13/app/FragmentStatePagerSupport.java
@@ -37,6 +37,7 @@
import android.widget.ListView;
import android.widget.TextView;
+//BEGIN_INCLUDE(complete)
public class FragmentStatePagerSupport extends Activity {
static final int NUM_ITEMS = 10;
@@ -138,3 +139,4 @@
}
}
}
+//END_INCLUDE(complete)
diff --git a/samples/Support4Demos/res/layout/fragment_pager.xml b/samples/Support4Demos/res/layout/fragment_pager.xml
index 46c8cbe..3fe844d 100644
--- a/samples/Support4Demos/res/layout/fragment_pager.xml
+++ b/samples/Support4Demos/res/layout/fragment_pager.xml
@@ -16,6 +16,7 @@
<!-- Top-level content view for the simple fragment sample. -->
+<!-- BEGIN_INCLUDE(complete) -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:padding="4dip"
android:gravity="center_horizontal"
@@ -42,3 +43,4 @@
</Button>
</LinearLayout>
</LinearLayout>
+<!-- END_INCLUDE(complete) -->
diff --git a/samples/Support4Demos/res/layout/fragment_pager_list.xml b/samples/Support4Demos/res/layout/fragment_pager_list.xml
index bbe7b1d..189cfff 100644
--- a/samples/Support4Demos/res/layout/fragment_pager_list.xml
+++ b/samples/Support4Demos/res/layout/fragment_pager_list.xml
@@ -14,6 +14,7 @@
limitations under the License.
-->
+<!-- BEGIN_INCLUDE(complete) -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
@@ -50,3 +51,4 @@
</FrameLayout>
</LinearLayout>
+<!-- END_INCLUDE(complete) -->
diff --git a/samples/Support4Demos/src/com/example/android/supportv4/accessibility/AccessibilityManagerSupportActivity.java b/samples/Support4Demos/src/com/example/android/supportv4/accessibility/AccessibilityManagerSupportActivity.java
index 1004270..4be078b 100644
--- a/samples/Support4Demos/src/com/example/android/supportv4/accessibility/AccessibilityManagerSupportActivity.java
+++ b/samples/Support4Demos/src/com/example/android/supportv4/accessibility/AccessibilityManagerSupportActivity.java
@@ -21,7 +21,7 @@
import android.app.Service;
import android.content.pm.ResolveInfo;
import android.os.Bundle;
-import android.support.v4.android.accessibilityservice.AccessibilityServiceInfoCompat;
+import android.support.v4.accessibilityservice.AccessibilityServiceInfoCompat;
import android.support.v4.view.accessibility.AccessibilityManagerCompat;
import android.support.v4.view.accessibility.AccessibilityManagerCompat.AccessibilityStateChangeListenerCompat;
import android.view.accessibility.AccessibilityManager;
diff --git a/samples/Support4Demos/src/com/example/android/supportv4/app/FragmentMenuSupport.java b/samples/Support4Demos/src/com/example/android/supportv4/app/FragmentMenuSupport.java
index 37a132d..f2f5ec1 100644
--- a/samples/Support4Demos/src/com/example/android/supportv4/app/FragmentMenuSupport.java
+++ b/samples/Support4Demos/src/com/example/android/supportv4/app/FragmentMenuSupport.java
@@ -22,7 +22,7 @@
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
-import android.support.v4.view.MenuCompat;
+import android.support.v4.view.MenuItemCompat;
import android.os.Bundle;
import android.view.Menu;
@@ -112,9 +112,9 @@
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
MenuItem item;
item = menu.add("Menu 1a");
- MenuCompat.setShowAsAction(item, MenuItem.SHOW_AS_ACTION_IF_ROOM);
+ MenuItemCompat.setShowAsAction(item, MenuItemCompat.SHOW_AS_ACTION_IF_ROOM);
item = menu.add("Menu 1b");
- MenuCompat.setShowAsAction(item, MenuItem.SHOW_AS_ACTION_IF_ROOM);
+ MenuItemCompat.setShowAsAction(item, MenuItemCompat.SHOW_AS_ACTION_IF_ROOM);
}
}
@@ -133,7 +133,7 @@
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
MenuItem item;
item = menu.add("Menu 2");
- MenuCompat.setShowAsAction(item, MenuItem.SHOW_AS_ACTION_IF_ROOM);
+ MenuItemCompat.setShowAsAction(item, MenuItemCompat.SHOW_AS_ACTION_IF_ROOM);
}
}
}
diff --git a/samples/Support4Demos/src/com/example/android/supportv4/app/FragmentPagerSupport.java b/samples/Support4Demos/src/com/example/android/supportv4/app/FragmentPagerSupport.java
index c10890b..f413744 100644
--- a/samples/Support4Demos/src/com/example/android/supportv4/app/FragmentPagerSupport.java
+++ b/samples/Support4Demos/src/com/example/android/supportv4/app/FragmentPagerSupport.java
@@ -36,6 +36,7 @@
import android.widget.ListView;
import android.widget.TextView;
+//BEGIN_INCLUDE(complete)
public class FragmentPagerSupport extends FragmentActivity {
static final int NUM_ITEMS = 10;
@@ -137,3 +138,4 @@
}
}
}
+//END_INCLUDE(complete)
diff --git a/samples/Support4Demos/src/com/example/android/supportv4/app/FragmentReceiveResultSupport.java b/samples/Support4Demos/src/com/example/android/supportv4/app/FragmentReceiveResultSupport.java
index cdc895e..f63826c 100644
--- a/samples/Support4Demos/src/com/example/android/supportv4/app/FragmentReceiveResultSupport.java
+++ b/samples/Support4Demos/src/com/example/android/supportv4/app/FragmentReceiveResultSupport.java
@@ -40,8 +40,8 @@
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(
- ViewGroup.LayoutParams.MATCH_PARENT,
- ViewGroup.LayoutParams.MATCH_PARENT);
+ ViewGroup.LayoutParams.FILL_PARENT,
+ ViewGroup.LayoutParams.FILL_PARENT);
FrameLayout frame = new FrameLayout(this);
frame.setId(R.id.simple_fragment);
setContentView(frame, lp);
diff --git a/samples/Support4Demos/src/com/example/android/supportv4/app/FragmentStatePagerSupport.java b/samples/Support4Demos/src/com/example/android/supportv4/app/FragmentStatePagerSupport.java
index 8a52896..2939b0e 100644
--- a/samples/Support4Demos/src/com/example/android/supportv4/app/FragmentStatePagerSupport.java
+++ b/samples/Support4Demos/src/com/example/android/supportv4/app/FragmentStatePagerSupport.java
@@ -37,6 +37,7 @@
import com.example.android.supportv4.Cheeses;
import com.example.android.supportv4.R;
+//BEGIN_INCLUDE(complete)
public class FragmentStatePagerSupport extends FragmentActivity {
static final int NUM_ITEMS = 10;
@@ -138,3 +139,4 @@
}
}
}
+//END_INCLUDE(complete)
diff --git a/samples/Support4Demos/src/com/example/android/supportv4/app/LoaderCursorSupport.java b/samples/Support4Demos/src/com/example/android/supportv4/app/LoaderCursorSupport.java
index 096316c..dd4237b 100644
--- a/samples/Support4Demos/src/com/example/android/supportv4/app/LoaderCursorSupport.java
+++ b/samples/Support4Demos/src/com/example/android/supportv4/app/LoaderCursorSupport.java
@@ -22,16 +22,21 @@
import android.support.v4.app.LoaderManager;
import android.support.v4.content.CursorLoader;
import android.support.v4.content.Loader;
+import android.support.v4.view.MenuItemCompat;
+import android.support.v4.widget.SearchViewCompat;
+import android.support.v4.widget.SearchViewCompat.OnQueryTextListenerCompat;
import android.support.v4.widget.SimpleCursorAdapter;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
-import android.provider.ContactsContract.Contacts;
+import android.provider.BaseColumns;
+import android.provider.Contacts.People;
import android.text.TextUtils;
import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
+import android.view.MenuItem;
import android.view.View;
import android.widget.ListView;
@@ -39,6 +44,7 @@
* Demonstration of the use of a CursorLoader to load and display contacts
* data in a fragment.
*/
+@SuppressWarnings("all")
public class LoaderCursorSupport extends FragmentActivity {
@Override
@@ -76,9 +82,9 @@
// Create an empty adapter we will use to display the loaded data.
mAdapter = new SimpleCursorAdapter(getActivity(),
- android.R.layout.simple_list_item_2, null,
- new String[] { Contacts.DISPLAY_NAME, Contacts.CONTACT_STATUS },
- new int[] { android.R.id.text1, android.R.id.text2 }, 0);
+ android.R.layout.simple_list_item_1, null,
+ new String[] { People.DISPLAY_NAME },
+ new int[] { android.R.id.text1}, 0);
setListAdapter(mAdapter);
// Start out with a progress indicator.
@@ -91,21 +97,25 @@
@Override public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
// Place an action bar item for searching.
- //MenuItem item = menu.add("Search");
- //item.setIcon(android.R.drawable.ic_menu_search);
- //item.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
- //SearchView sv = new SearchView(getActivity());
- //sv.setOnQueryTextListener(this);
- //item.setActionView(sv);
- }
-
- public boolean onQueryTextChange(String newText) {
- // Called when the action bar search text has changed. Update
- // the search filter, and restart the loader to do a new query
- // with this filter.
- mCurFilter = !TextUtils.isEmpty(newText) ? newText : null;
- getLoaderManager().restartLoader(0, null, this);
- return true;
+ MenuItem item = menu.add("Search");
+ item.setIcon(android.R.drawable.ic_menu_search);
+ MenuItemCompat.setShowAsAction(item, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
+ View searchView = SearchViewCompat.newSearchView(getActivity());
+ if (searchView != null) {
+ SearchViewCompat.setOnQueryTextListener(searchView,
+ new OnQueryTextListenerCompat() {
+ @Override
+ public boolean onQueryTextChange(String newText) {
+ // Called when the action bar search text has changed. Update
+ // the search filter, and restart the loader to do a new query
+ // with this filter.
+ mCurFilter = !TextUtils.isEmpty(newText) ? newText : null;
+ getLoaderManager().restartLoader(0, null, CursorLoaderListFragment.this);
+ return true;
+ }
+ });
+ MenuItemCompat.setActionView(item, searchView);
+ }
}
@Override public void onListItemClick(ListView l, View v, int position, long id) {
@@ -115,12 +125,8 @@
// These are the Contacts rows that we will retrieve.
static final String[] CONTACTS_SUMMARY_PROJECTION = new String[] {
- Contacts._ID,
- Contacts.DISPLAY_NAME,
- Contacts.CONTACT_STATUS,
- Contacts.CONTACT_PRESENCE,
- Contacts.PHOTO_ID,
- Contacts.LOOKUP_KEY,
+ People._ID,
+ People.DISPLAY_NAME,
};
public Loader<Cursor> onCreateLoader(int id, Bundle args) {
@@ -130,20 +136,18 @@
// currently filtering.
Uri baseUri;
if (mCurFilter != null) {
- baseUri = Uri.withAppendedPath(Contacts.CONTENT_FILTER_URI,
- Uri.encode(mCurFilter));
+ baseUri = Uri.withAppendedPath(People.CONTENT_FILTER_URI, Uri.encode(mCurFilter));
} else {
- baseUri = Contacts.CONTENT_URI;
+ baseUri = People.CONTENT_URI;
}
// Now create and return a CursorLoader that will take care of
// creating a Cursor for the data being displayed.
- String select = "((" + Contacts.DISPLAY_NAME + " NOTNULL) AND ("
- + Contacts.HAS_PHONE_NUMBER + "=1) AND ("
- + Contacts.DISPLAY_NAME + " != '' ))";
+ String select = "((" + People.DISPLAY_NAME + " NOTNULL) AND ("
+ + People.DISPLAY_NAME + " != '' ))";
return new CursorLoader(getActivity(), baseUri,
CONTACTS_SUMMARY_PROJECTION, select, null,
- Contacts.DISPLAY_NAME + " COLLATE LOCALIZED ASC");
+ People.DISPLAY_NAME + " COLLATE LOCALIZED ASC");
}
public void onLoadFinished(Loader<Cursor> loader, Cursor data) {
diff --git a/samples/Support4Demos/src/com/example/android/supportv4/app/LoaderCustomSupport.java b/samples/Support4Demos/src/com/example/android/supportv4/app/LoaderCustomSupport.java
index b222a20..ec59738 100644
--- a/samples/Support4Demos/src/com/example/android/supportv4/app/LoaderCustomSupport.java
+++ b/samples/Support4Demos/src/com/example/android/supportv4/app/LoaderCustomSupport.java
@@ -16,15 +16,6 @@
package com.example.android.supportv4.app;
-import com.example.android.supportv4.R;
-
-import java.io.File;
-import java.text.Collator;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
@@ -41,7 +32,12 @@
import android.support.v4.app.ListFragment;
import android.support.v4.app.LoaderManager;
import android.support.v4.content.AsyncTaskLoader;
+import android.support.v4.content.IntentCompat;
import android.support.v4.content.Loader;
+import android.support.v4.content.pm.ActivityInfoCompat;
+import android.support.v4.view.MenuItemCompat;
+import android.support.v4.widget.SearchViewCompat;
+import android.support.v4.widget.SearchViewCompat.OnQueryTextListenerCompat;
import android.text.TextUtils;
import android.util.Log;
import android.view.LayoutInflater;
@@ -53,9 +49,16 @@
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.ListView;
-import android.widget.SearchView;
import android.widget.TextView;
-import android.widget.SearchView.OnQueryTextListener;
+
+import com.example.android.supportv4.R;
+
+import java.io.File;
+import java.text.Collator;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
/**
* Demonstration of the implementation of a custom Loader.
@@ -166,7 +169,7 @@
int configChanges = mLastConfiguration.updateFrom(res.getConfiguration());
boolean densityChanged = mLastDensity != res.getDisplayMetrics().densityDpi;
if (densityChanged || (configChanges&(ActivityInfo.CONFIG_LOCALE
- |ActivityInfo.CONFIG_UI_MODE|ActivityInfo.CONFIG_SCREEN_LAYOUT)) != 0) {
+ |ActivityInfoCompat.CONFIG_UI_MODE|ActivityInfo.CONFIG_SCREEN_LAYOUT)) != 0) {
mLastDensity = res.getDisplayMetrics().densityDpi;
return true;
}
@@ -190,8 +193,8 @@
mLoader.getContext().registerReceiver(this, filter);
// Register for events related to sdcard installation.
IntentFilter sdFilter = new IntentFilter();
- sdFilter.addAction(Intent.ACTION_EXTERNAL_APPLICATIONS_AVAILABLE);
- sdFilter.addAction(Intent.ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE);
+ sdFilter.addAction(IntentCompat.ACTION_EXTERNAL_APPLICATIONS_AVAILABLE);
+ sdFilter.addAction(IntentCompat.ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE);
mLoader.getContext().registerReceiver(this, sdFilter);
}
@@ -372,7 +375,9 @@
public void setData(List<AppEntry> data) {
clear();
if (data != null) {
- addAll(data);
+ for (AppEntry appEntry : data) {
+ add(appEntry);
+ }
}
}
@@ -397,7 +402,7 @@
}
public static class AppListFragment extends ListFragment
- implements OnQueryTextListener, LoaderManager.LoaderCallbacks<List<AppEntry>> {
+ implements LoaderManager.LoaderCallbacks<List<AppEntry>> {
// This is the Adapter being used to display the list's data.
AppListAdapter mAdapter;
@@ -405,6 +410,8 @@
// If non-null, this is the current filter the user has provided.
String mCurFilter;
+ OnQueryTextListenerCompat mOnQueryTextListenerCompat;
+
@Override public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
@@ -431,23 +438,22 @@
// Place an action bar item for searching.
MenuItem item = menu.add("Search");
item.setIcon(android.R.drawable.ic_menu_search);
- item.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
- SearchView sv = new SearchView(getActivity());
- sv.setOnQueryTextListener(this);
- item.setActionView(sv);
- }
-
- @Override public boolean onQueryTextChange(String newText) {
- // Called when the action bar search text has changed. Since this
- // is a simple array adapter, we can just have it do the filtering.
- mCurFilter = !TextUtils.isEmpty(newText) ? newText : null;
- mAdapter.getFilter().filter(mCurFilter);
- return true;
- }
-
- @Override public boolean onQueryTextSubmit(String query) {
- // Don't care about this.
- return true;
+ MenuItemCompat.setShowAsAction(item, MenuItemCompat.SHOW_AS_ACTION_IF_ROOM);
+ View searchView = SearchViewCompat.newSearchView(getActivity());
+ if (searchView != null) {
+ SearchViewCompat.setOnQueryTextListener(searchView,
+ new OnQueryTextListenerCompat() {
+ @Override
+ public boolean onQueryTextChange(String newText) {
+ // Called when the action bar search text has changed. Since this
+ // is a simple array adapter, we can just have it do the filtering.
+ mCurFilter = !TextUtils.isEmpty(newText) ? newText : null;
+ mAdapter.getFilter().filter(mCurFilter);
+ return true;
+ }
+ });
+ MenuItemCompat.setActionView(item, searchView);
+ }
}
@Override public void onListItemClick(ListView l, View v, int position, long id) {
diff --git a/samples/Support4Demos/src/com/example/android/supportv4/app/LoaderThrottleSupport.java b/samples/Support4Demos/src/com/example/android/supportv4/app/LoaderThrottleSupport.java
index de3f937..a1fb2c7 100644
--- a/samples/Support4Demos/src/com/example/android/supportv4/app/LoaderThrottleSupport.java
+++ b/samples/Support4Demos/src/com/example/android/supportv4/app/LoaderThrottleSupport.java
@@ -17,14 +17,6 @@
package com.example.android.supportv4.app;
//BEGIN_INCLUDE(complete)
-import android.support.v4.app.FragmentActivity;
-import android.support.v4.app.FragmentManager;
-import android.support.v4.app.ListFragment;
-import android.support.v4.app.LoaderManager;
-import android.support.v4.content.CursorLoader;
-import android.support.v4.content.Loader;
-import android.support.v4.widget.SimpleCursorAdapter;
-
import android.content.ContentProvider;
import android.content.ContentResolver;
import android.content.ContentUris;
@@ -32,7 +24,6 @@
import android.content.Context;
import android.content.UriMatcher;
import android.database.Cursor;
-import android.database.DatabaseUtils;
import android.database.SQLException;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
@@ -41,6 +32,15 @@
import android.os.AsyncTask;
import android.os.Bundle;
import android.provider.BaseColumns;
+import android.support.v4.app.FragmentActivity;
+import android.support.v4.app.FragmentManager;
+import android.support.v4.app.ListFragment;
+import android.support.v4.app.LoaderManager;
+import android.support.v4.content.CursorLoader;
+import android.support.v4.content.Loader;
+import android.support.v4.database.DatabaseUtilsCompat;
+import android.support.v4.view.MenuItemCompat;
+import android.support.v4.widget.SimpleCursorAdapter;
import android.text.TextUtils;
import android.util.Log;
import android.view.Menu;
@@ -226,7 +226,7 @@
// The incoming URI is for a single row.
qb.setProjectionMap(mNotesProjectionMap);
qb.appendWhere(MainTable._ID + "=?");
- selectionArgs = DatabaseUtils.appendSelectionArgs(selectionArgs,
+ selectionArgs = DatabaseUtilsCompat.appendSelectionArgs(selectionArgs,
new String[] { uri.getLastPathSegment() });
break;
@@ -321,7 +321,7 @@
case MAIN_ID:
// If URI is for a particular row ID, delete is based on incoming
// data but modified to restrict to the given ID.
- finalWhere = DatabaseUtils.concatenateWhere(
+ finalWhere = DatabaseUtilsCompat.concatenateWhere(
MainTable._ID + " = " + ContentUris.parseId(uri), where);
count = db.delete(MainTable.TABLE_NAME, finalWhere, whereArgs);
break;
@@ -353,7 +353,7 @@
case MAIN_ID:
// If URI is for a particular row ID, update is based on incoming
// data but modified to restrict to the given ID.
- finalWhere = DatabaseUtils.concatenateWhere(
+ finalWhere = DatabaseUtilsCompat.concatenateWhere(
MainTable._ID + " = " + ContentUris.parseId(uri), where);
count = db.update(MainTable.TABLE_NAME, values, finalWhere, whereArgs);
break;
@@ -419,10 +419,10 @@
}
@Override public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
- menu.add(Menu.NONE, POPULATE_ID, 0, "Populate")
- .setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
- menu.add(Menu.NONE, CLEAR_ID, 0, "Clear")
- .setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
+ MenuItem populateItem = menu.add(Menu.NONE, POPULATE_ID, 0, "Populate");
+ MenuItemCompat.setShowAsAction(populateItem, MenuItemCompat.SHOW_AS_ACTION_IF_ROOM);
+ MenuItem clearItem = menu.add(Menu.NONE, CLEAR_ID, 0, "Clear");
+ MenuItemCompat.setShowAsAction(clearItem, MenuItemCompat.SHOW_AS_ACTION_IF_ROOM);
}
@Override public boolean onOptionsItemSelected(MenuItem item) {
@@ -453,8 +453,7 @@
return null;
}
};
- mPopulatingTask.executeOnExecutor(
- AsyncTask.THREAD_POOL_EXECUTOR, (Void[])null);
+ mPopulatingTask.execute((Void[]) null);
return true;
case CLEAR_ID:
diff --git a/samples/Support4Demos/src/com/example/android/supportv4/content/LocalServiceBroadcaster.java b/samples/Support4Demos/src/com/example/android/supportv4/content/LocalServiceBroadcaster.java
index d4dc8e1..62a320c 100644
--- a/samples/Support4Demos/src/com/example/android/supportv4/content/LocalServiceBroadcaster.java
+++ b/samples/Support4Demos/src/com/example/android/supportv4/content/LocalServiceBroadcaster.java
@@ -28,6 +28,7 @@
import android.os.Handler;
import android.os.IBinder;
import android.os.Message;
+import android.support.v4.app.ServiceCompat;
import android.support.v4.content.LocalBroadcastManager;
import android.view.View;
import android.view.View.OnClickListener;
@@ -135,7 +136,6 @@
mLocalBroadcastManager = LocalBroadcastManager.getInstance(this);
}
- @Override
public int onStartCommand(Intent intent, int flags, int startId) {
// Tell any local interested parties about the start.
mLocalBroadcastManager.sendBroadcast(new Intent(ACTION_STARTED));
@@ -144,7 +144,7 @@
mHandler.removeMessages(MSG_UPDATE);
Message msg = mHandler.obtainMessage(MSG_UPDATE);
mHandler.sendMessageDelayed(msg, 1000);
- return Service.START_STICKY;
+ return ServiceCompat.START_STICKY;
}
@Override
diff --git a/samples/source.properties b/samples/source.properties
index c21a041..d0b390b 100644
--- a/samples/source.properties
+++ b/samples/source.properties
@@ -1,4 +1,4 @@
Pkg.UserSrc=false
-Pkg.Revision=2
-AndroidVersion.ApiLevel=14
+Pkg.Revision=1
+AndroidVersion.ApiLevel=15
#AndroidVersion.CodeName=
diff --git a/sdk/doc_source.properties b/sdk/doc_source.properties
index acf5d3b..5b3dce6 100644
--- a/sdk/doc_source.properties
+++ b/sdk/doc_source.properties
@@ -1,5 +1,5 @@
Pkg.UserSrc=false
Pkg.Revision=1
-AndroidVersion.ApiLevel=14
+AndroidVersion.ApiLevel=15
#AndroidVersion.CodeName=
diff --git a/sdk/images_armeabi-v7a_source.properties b/sdk/images_armeabi-v7a_source.properties
index 9499576..2392a00 100644
--- a/sdk/images_armeabi-v7a_source.properties
+++ b/sdk/images_armeabi-v7a_source.properties
@@ -1,6 +1,6 @@
-Pkg.Desc=Android SDK Platform 4.0
+Pkg.Desc=Android SDK Platform 4.0.3
Pkg.UserSrc=false
-Pkg.Revision=2
-AndroidVersion.ApiLevel=14
+Pkg.Revision=1
+AndroidVersion.ApiLevel=15
#AndroidVersion.CodeName=
SystemImage.Abi=armeabi-v7a
diff --git a/sdk/images_armeabi_source.properties b/sdk/images_armeabi_source.properties
index 192ecde..4af4b5d 100644
--- a/sdk/images_armeabi_source.properties
+++ b/sdk/images_armeabi_source.properties
@@ -1,6 +1,6 @@
-Pkg.Desc=Android SDK Platform 4.0
+Pkg.Desc=Android SDK Platform 4.0.3
Pkg.UserSrc=false
Pkg.Revision=1
-AndroidVersion.ApiLevel=14
+AndroidVersion.ApiLevel=15
#AndroidVersion.CodeName=
SystemImage.Abi=armeabi
diff --git a/sdk/images_x86_source.properties b/sdk/images_x86_source.properties
index caccb2d..7a17964 100644
--- a/sdk/images_x86_source.properties
+++ b/sdk/images_x86_source.properties
@@ -1,6 +1,6 @@
-Pkg.Desc=Android SDK Platform 4.0
+Pkg.Desc=Android SDK Platform 4.0.3
Pkg.UserSrc=false
Pkg.Revision=1
-AndroidVersion.ApiLevel=14
+AndroidVersion.ApiLevel=15
#AndroidVersion.CodeName=
SystemImage.Abi=x86
diff --git a/sdk/platform_source.properties b/sdk/platform_source.properties
index 5a6c4df..a0a26b8 100644
--- a/sdk/platform_source.properties
+++ b/sdk/platform_source.properties
@@ -1,8 +1,9 @@
-Pkg.Desc=Android SDK Platform 4.0
+Pkg.Desc=Android SDK Platform 4.0.3
Pkg.UserSrc=false
-Platform.Version=4.0
-Pkg.Revision=2
-AndroidVersion.ApiLevel=14
+Platform.Version=4.0.3
+Pkg.Revision=1
+AndroidVersion.ApiLevel=15
#AndroidVersion.CodeName=
Layoutlib.Api=7
Layoutlib.Revision=1
+Platform.MinToolsRev=15
diff --git a/sdk/source_source.properties b/sdk/source_source.properties
index 7cb1d33..d0b390b 100644
--- a/sdk/source_source.properties
+++ b/sdk/source_source.properties
@@ -1,4 +1,4 @@
Pkg.UserSrc=false
Pkg.Revision=1
-AndroidVersion.ApiLevel=14
+AndroidVersion.ApiLevel=15
#AndroidVersion.CodeName=
diff --git a/sdk/support_source.properties b/sdk/support_source.properties
index 1aeb2c1..32bdbe3 100644
--- a/sdk/support_source.properties
+++ b/sdk/support_source.properties
@@ -1,5 +1,5 @@
Pkg.UserSrc=false
-Pkg.Revision=5
+Pkg.Revision=6
Extra.Vendor=android
Extra.Path=support
Extra.OldPaths=compatibility
diff --git a/sdk/usbdriver_source.properties b/sdk/usbdriver_source.properties
index 3f9484b..c55310e 100755
--- a/sdk/usbdriver_source.properties
+++ b/sdk/usbdriver_source.properties
@@ -1,4 +1,4 @@
-Pkg.Revision=4
+Pkg.Revision=5
Archive.Os=WINDOWS
Archive.Arch=ANY
Extra.Path=usb_driver
diff --git a/testrunner/test_defs.xml b/testrunner/test_defs.xml
index cbe75b7..4321796 100644
--- a/testrunner/test_defs.xml
+++ b/testrunner/test_defs.xml
@@ -466,6 +466,12 @@
runner="com.android.contacts.ContactsLaunchPerformance"
description="Launch performance for Contacts." />
+<test name="downloadprovider"
+ build_path="packages/providers/DownloadProvider/tests"
+ package="com.android.providers.downloads.tests"
+ coverage_target="DownloadProvider"
+ continuous="true" />
+
<test name="downloadprovider-permission"
build_path="packages/providers/DownloadProvider/tests/permission"
package="com.android.providers.downloads.permission.tests"
diff --git a/tools/a3dconvert/Android.mk b/tools/a3dconvert/Android.mk
index 2b09fbf..f85c70b 100644
--- a/tools/a3dconvert/Android.mk
+++ b/tools/a3dconvert/Android.mk
@@ -41,7 +41,7 @@
LOCAL_C_INCLUDES += frameworks/base/libs/rs
LOCAL_C_INCLUDES += $(intermediates)
-LOCAL_LDLIBS := -lpthread
+LOCAL_LDLIBS := -ldl -lpthread
LOCAL_STATIC_LIBRARIES += libRS libutils libcutils
LOCAL_STATIC_LIBRARIES += colladadom libtinyxml libpcrecpp libpcre
include $(BUILD_HOST_EXECUTABLE)
diff --git a/tools/emulator/opengl/DESIGN b/tools/emulator/opengl/DESIGN
new file mode 100644
index 0000000..1da44b7
--- /dev/null
+++ b/tools/emulator/opengl/DESIGN
@@ -0,0 +1,593 @@
+Android Hardware OpenGLES emulation design overview
+===================================================
+
+Introduction:
+-------------
+
+Hardware GLES emulation in the Android platform is implemented with a mix
+of components, which are:
+
+ - Several host "translator" libraries. They implement the EGL, GLES 1.1 and
+ GLES 2.0 ABIs defined by Khronos, and translate the corresponding function
+ calls into calls to the appropriate desktop APIs, i.e.:
+
+ - Xgl (Linux), AGL (OS X) or WGL (Windows) for EGL
+ - desktop GL 2.0 for GLES 1.1 and GLES 2.0
+
+ _________ __________ __________
+ | | | | | | HOST
+ |TRANSLATOR |TRANSLATOR| |TRANSLATOR| HOST
+ | EGL | | GLES 1.1 | | GLES 2.0 | TRANSLATOR
+ |_________| |__________| |__________| LIBRARIES
+ | | |
+ - - - | - - - - - - - - - | - - - - - - - - - | - - - - -
+ | | |
+ ____v____ ____v_____ _____v____ HOST
+ | | | | | | SYSTEM
+ | Xgl | | GL 2.0 | | GL 2.0 | LIBRARIES
+ |_________| |__________| |__________|
+
+
+
+ - Several system libraries inside the emulated guest system that implement
+ the same EGL / GLES 1.1 and GLES 2.0 ABIs.
+
+ They collect the sequence of EGL/GLES function calls and translate then
+ into a custom wire protocol stream that is sent to the emulator program
+ through a high-speed communication channel called a "QEMU Pipe".
+
+ For now, all you need to know is that the pipe is implemented with a
+ custom kernel driver, and provides for _very_ fast bandwidth. All read()
+ and writes() from/to the pipes are essentially instantaneous from the
+ guest's point of view.
+
+
+ _________ __________ __________
+ | | | | | |
+ |EMULATION| |EMULATION | |EMULATION | GUEST
+ | EGL | | GLES 1.1 | | GLES 2.0 | SYSTEM
+ |_________| |__________| |__________| LIBRARIES
+ | | |
+ - - - | - - - - - - - - - | - - - - - - - - - | - - - - -
+ | | |
+ ____v____________________v____________________v____ GUEST
+ | | KERNEL
+ | QEMU PIPE |
+ |___________________________________________________|
+ |
+ - - - - - - - - - - - - - -|- - - - - - - - - - - - - - - -
+ |
+ v
+ EMULATOR
+
+ - Specific code inside the emulator program that is capable of transmitting
+ the wire protocol stream to a special rendering library or process (called
+ the "renderer" here), which understands the format.
+
+ |
+ | PROTOCOL BYTE STREAM
+ _____v_____
+ | |
+ | EMULATOR |
+ |___________|
+ |
+ | UNMODIFIED PROTOCOL BYTE STREAM
+ _____v_____
+ | |
+ | RENDERER |
+ |___________|
+
+
+ - The renderer decodes the EGL/GLES commands from the wire
+ protocol stream, and dispatches them to the translator libraries
+ appropriately.
+
+ |
+ | PROTOCOL BYTE STREAM
+ _____v_____
+ | |
+ | RENDERER |
+ |___________|
+ | | |
+ +-----------------+ | +-----------------+
+ | | |
+ ____v____ ___v______ ____v_____
+ | | | | | | HOST
+ |TRANSLATOR |TRANSLATOR| |TRANSLATOR| HOST
+ | EGL | | GLES 1.1 | | GLES 2.0 | TRANSLATOR
+ |_________| |__________| |__________| LIBRARIES
+
+
+
+ - In reality, the protocol stream flows in both directions, even though most
+ of the commands result in data going from the guest to the host. A complete
+ picture of the emulation would thus be:
+
+
+
+
+
+ _________ __________ __________
+ | | | | | |
+ |EMULATION| |EMULATION | |EMULATION | GUEST
+ | EGL | | GLES 1.1 | | GLES 2.0 | SYSTEM
+ |_________| |__________| |__________| LIBRARIES
+ ^ ^ ^
+ | | |
+ - - - | - - - - - - - - - | - - - - - - - - - | - - - - -
+ | | |
+ ____v____________________v____________________v____ GUEST
+ | | KERNEL
+ | QEMU PIPE |
+ |___________________________________________________|
+ ^
+ |
+ - - - - - - - - - - - - - -|- - - - - - - - - - - - - - - -
+ |
+ | PROTOCOL BYTE STREAM
+ _____v_____
+ | |
+ | EMULATOR |
+ |___________|
+ ^
+ | UNMODIFIED PROTOCOL BYTE STREAM
+ _____v_____
+ | |
+ | RENDERER |
+ |___________|
+ ^ ^ ^
+ | | |
+ +-----------------+ | +-----------------+
+ | | |
+ ____v____ ___v______ ____v_____
+ | | | | | |
+ |TRANSLATOR |TRANSLATOR| |TRANSLATOR| HOST
+ | EGL | | GLES 1.1 | | GLES 2.0 | TRANSLATOR
+ |_________| |__________| |__________| LIBRARIES
+ ^ ^ ^
+ | | |
+ - - - | - - - - - - - - - | - - - - - - - - - | - - - - -
+ | | |
+ ____v____ ____v_____ _____v____ HOST
+ | | | | | | SYSTEM
+ | Xgl | | GL 2.0 | | GL 2.0 | LIBRARIES
+ |_________| |__________| |__________|
+
+ (NOTE: 'Xgl' is for Linux only, replace 'AGL' on OS X, and 'WGL' on Windows).
+
+
+Note that, in the above graphics, only the host system libraries at the bottom
+are _not_ provided by Android.
+
+
+Design Requirements:
+--------------------
+
+The above design comes from several important requirements that were decided
+early in the project:
+
+1 - The ability to run the renderer in a separate process from the emulator
+ itself is important.
+
+ For various practical reasons, we plan to completely separate the core QEMU
+ emulation from the UI window by using two distinct processes. As such, the
+ renderer will be implemented as a library inside the UI program, but will
+ need to receive protocol bytes from the QEMU process.
+
+ The communication channel will be either a fast Unix socket or a Win32
+ named pipe between these two. A shared memory segment with appropriate
+ synchronization primitives might also be used if performance becomes
+ an issue.
+
+ This explains why the emulator doesn't alter or even try to parse the
+ protocol byte stream. It only acts as a dumb proxy between the guest
+ system and the renderer. This also avoids adding lots of GLES-specific
+ code inside the QEMU code base which is terribly complex.
+
+2 - The ability to use vendor-specific desktop EGL/GLES libraries is
+ important.
+
+ GPU vendors like NVidia, AMD or ARM all provide host versions of the
+ EGL/GLES libraries that emulate their respectivie embedded graphics
+ chipset.
+
+ The renderer library can be configured to use these instead of the
+ translator libraries provided with this project. This can be useful to
+ more accurately emulate the behaviour of specific devices.
+
+ Moreover, these vendor libraries typically expose vendor-specific
+ extensions that are not provided by the translator libraries. We cannot
+ expose them without modifying our code, but it's important to be able
+ to do so without too much pain.
+
+
+Code organization:
+------------------
+
+All source code for the components above is spread over multiple directories
+in the Android source trees:
+
+ - The emulator sources are under $ANDROID/external/qemu, which we'll
+ call $QEMU in the rest of this document.
+
+ - The guest and system libraries are under
+ $ANDROID/development/tools/emulator/opengl, which we'll call $EMUGL
+
+ - The QEMU Pipe kernel driver is under $KERNEL/drivers/misc/qemupipe
+
+Where $ANDROID is the top of the open-source Android source tree, and
+$KERNEL is the top of the qemu-specific kernel source tree (using one
+of the android-goldfish-xxxx branches here).
+
+The emulator sources related to this projects are:
+
+ $QEMU/hw/goldfish_pipe.c -> implement QEMU pipe virtual hardware
+ $QEMU/hw/opengles.c -> implement GLES initialization
+ $QEMU/hw/hw-pipe-net.c -> implements the communication channel
+ between the QEMU Pipe and the renderer library
+
+The other sources are:
+
+ $EMUGL/system -> system libraries
+ $EMUGL/host -> host libraries (translator + renderer)
+ $EMUGL/shared -> shared libraries, used both in the guest and the host
+ $EMUGL/tests -> various test programs
+
+
+Translator libraries:
+---------------------
+
+There are three translator host libraries provided by this project:
+
+ libEGL_translator -> EGL 1.2 translation
+ libGLES_CM_translator -> GLES 1.1 translation
+ libGLES_V2_translator -> GLES 2.0 translation
+
+The full name of the library will depend on the host system.
+For simplicity, only the library name suffix will change (i.e. the
+'lib' prefix is not dropped on Windows), i.e.:
+
+ libEGL_translator.so -> for Linux
+ libEGL_translator.dylib -> for OS X
+ libEGL_translator.dll -> for Windows
+
+The source code for these libraries is located under the following
+path in the Android source tree:
+
+ $EMUGL/host/libs/Translator/EGL
+ $EMUGL/host/libs/Translator/GLES_CM
+ $EMUGL/host/libs/Translator/GLES_V2
+
+The translator libraries also use a common routines defined under:
+
+ $EMUGL/host/libs/Translator/GLcommon
+
+
+Wire Protocol Overiew:
+----------------------
+
+The "wire protocol" is implemented as follows:
+
+ - EGL/GLES function calls are described through several "specification"
+ files, which describes the types, function signatures and various
+ attributes for each one of them.
+
+ - These files are read by a tool called "emugen" which generates C
+ source files and headers based on the specification. These correspond
+ to both encoding, decoding and "wrappers" (more on this later).
+
+ - System "encoder" static libraries are built using some of these generated
+ files. They contain code that can serialize EGL/GLES calls into simple
+ byte messages and send it through a generic "IOStream" object.
+
+ - Host "decoder" static libraries are also built using some of these
+ generated files. Their code retrieves byte messages from an "IOStream"
+ object, and translates them into function callbacks.
+
+IOStream abstraction:
+- - - - - - - - - - -
+
+The "IOStream" is a very simple abstract class used to send byte messages
+both in the guest and host. It is defined through a shared header under
+$EMUGL/host/include/libOpenglRender/IOStream.h
+
+Note that despite the path, this header is included by *both* host and guest
+source code. The main idea around IOStream's design is that to send a message,
+one does the following:
+
+ 1/ call stream->allocBuffer(size), which returns the address of a
+ memory buffer of at least 'size' bytes.
+
+ 2/ write the content of the serialized command (usually a header + some
+ payload) directly into the buffer
+
+ 3/ call stream->commitBuffer() to send it.
+
+Alternatively, one can also pack several commands into a single buffer with
+stream->alloc() and stream->flush(), as in:
+
+ 1/ buf1 = stream->alloc(size1)
+ 2/ write first command bytes into buf1
+ 3/ buf2 = stream->alloc(size2)
+ 4/ write second command bytes into buf2
+ 5/ stream->flush()
+
+Finally, there are also explict read/write methods like stream->readFully()
+or stream->writeFully() which can be used when you don't want an intermediate
+buffer. This is used in certain cases by the implementation, e.g. to avoid
+an intermediate memory copy when sending texture data from the guest to the
+host.
+
+The host IOStream implementations are under $EMUGL/shared/OpenglCodecCommon/,
+see in particular:
+
+ $EMUGL/shared/OpenglCodecCommon/TcpStream.cpp -> using local TCP sockets
+ $EMUGL/shared/OpenglCodecCommon/UnixStream.cpp -> using Unix sockets
+ $EMUGL/shared/OpenglCodecCommon/Win32PipeStream.cpp -> using Win32 named pipes
+
+The guest IOStream implementation uses the TcpStream.cpp above, as well as
+an alternative QEMU-specific source:
+
+ $EMUGL/system/OpenglSystemCommon/QemuPipeStream.cpp -> uses QEMU pipe from the guest
+
+The QEMU Pipe implementation is _significantly_ faster (about 20x) due to
+several reasons:
+
+ - all succesful read() and write() operations through it are instantaneous
+ from the guest's point of view.
+
+ - all buffer/memory copies are performed directly by the emulator, and thus
+ much faster than performing the same thing inside the kernel with emulated
+ ARM instructions.
+
+ - it doesn't need to go through a kernel TCP/IP stack that will wrap the
+ data into TCP/IP/MAC packets, send them to an emulated ethernet device,
+ which is itself connected to an internal firewall implementation that
+ will unwrap the packets, re-assemble them, then send them through BSD
+ sockets to the host kernel.
+
+However, would it be necessary, you could write a guest IOStream implementation
+that uses a different transport. If you do, please look at
+$EMUGL/system/OpenglCodecCommon/HostConnection.cpp which contains the code
+used to connect the guest to the host, on a per-thread basis.
+
+
+Source code auto-generation:
+- - - - - - - - - - - - - -
+
+The 'emugen' tool is located under $EMUGL/host/tools/emugen. There is a README
+file that explains how it works.
+
+You can also look at the following specifications files:
+
+For GLES 1.1:
+ $EMUGL/system/GLESv1_enc/gl.types
+ $EMUGL/system/GLESv1_enc/gl.in
+ $EMUGL/system/GLESv1_enc/gl.attrib
+ $EMUGL/system/GLESv1_enc/gl.addon
+
+For GLES 2.0:
+ $EMUGL/system/GLESv2_enc/gl2.types
+ $EMUGL/system/GLESv2_enc/gl2.in
+ $EMUGL/system/GLESv2_enc/gl2.attrib
+ $EMUGL/system/GLESv2_enc/gl2.addon
+
+For EGL:
+ $EMUGL/system/renderControl_enc/renderControl.types
+ $EMUGL/system/renderControl_enc/renderControl.in
+ $EMUGL/system/renderControl_enc/renderControl.attrib
+ $EMUGL/system/renderControl_enc/renderControl.addon
+
+Note that the EGL specification files are under a directory named
+"renderControl_enc" and have filenames that begin with "renderControl"
+
+This is mainly for historic reasons now, but is also related to the fact that
+this part of the wire protocol contains support functions/calls/specifications
+that are not part of the EGL specification itself, but add a few features
+required to make everything works. For example, they have calls related to
+the "gralloc" system library module used to manage graphics surfaces at a
+lower level than EGL.
+
+Generally speaking, guest encoder sources are located under directories
+named $EMUGL/system/<name>_enc/, while the corresponding host decoder
+sources will be under $EMUGL/host/libs/<name>_dec/
+
+However, all these sources use the same spec files located under the
+encoding directories. The decoders may even need to include a few
+non-auto-generated header files from the encoder directories.
+
+
+
+System libraries:
+-----------------
+
+Meta EGL/GLES system libraries, and egl.cfg:
+- - - - - - - - - - - - - - - - - - - - - -
+
+It is important to understand that the emulation-specific EGL/GLES libraries
+are not directly linked by applications at runtime. Instead, the system
+provides a set of "meta" EGL/GLES libraries that will load the appropriate
+hardware-specific libraries on first use.
+
+More specifically, the system libEGL.so contains a "loader" which will try
+to load:
+
+ - hardware-specific EGL/GLES libraries
+ - the software-based rendering libraries (called "libagl")
+
+The system libEGL.so is also capable of merging the EGL configs of both the
+hardware and software libraries transparently to the application. The system
+libGLESv1_CM.so and libGLESv2.so, work with it to ensure that the thread's
+current context will be linked to either the hardware or software libraries
+depending on the config selected.
+
+For the record, the loader's source code in under
+frameworks/base/opengl/libs/EGL/Loader.cpp. It depends on a file named
+/system/lib/egl/egl.cfg which must contain two lines that look like:
+
+ 0 1 <name>
+ 0 0 android
+
+The first number in each line is a display number, and must be 0 since the
+system's EGL/GLES libraries don't support anything else.
+
+The second number must be 1 to indicate hardware libraries, and 0 to indicate
+a software one. The line corresponding to the hardware library, if any, must
+always appear before the one for the software library.
+
+The third field is a name corresponding to a shared library suffix. It really
+means that the corresponding libraries will be named libEGL_<name>.so,
+libGLESv1_CM_<name>.so and libGLESv2_<name>.so. Moreover these libraries must
+be placed under /system/lib/egl/
+
+The name "android" is reserved for the system software renderer.
+
+The egl.cfg that comes with this project uses the name "emulation" for the
+hardware libraries. This means that it provides an egl.cfg file that contains
+the following lines:
+
+ 0 1 emulation
+ 0 0 android
+
+See $EMUGL/system/egl/egl.cfg and more generally the following build files:
+
+ $EMUGL/system/egl/Android.mk
+ $EMUGL/system/GLESv1/Android.mk
+ $EMUGL/system/GLESv2/Android.mk
+
+to see how the libraries are named and placed under /system/lib/egl/ by the
+build system.
+
+
+Emulation libraries:
+- - - - - - - - - - -
+
+The emulator-specific libraries are under the following:
+
+ $EMUGL/system/egl/
+ $EMUGL/system/GLESv1/
+ $EMUGL/system/GLESv2/
+
+The code for GLESv1 and GLESv2 is pretty small, since it mostly link against
+the static encoding libraries.
+
+The code for EGL is a bit more complex, because it needs to deal with
+extensions dynamically. I.e. if an extension is not available on the host
+it shouldn't be exposed by the library at runtime. So the EGL code queries
+the host for the list of available extensions in order to return them to
+clients. Similarly, it must query the list of valid EGLConfigs for the
+current host system.
+
+
+"gralloc" module implementation:
+- - - - - - - - - - - - - - - - -
+
+In addition to EGL/GLES libraries, the Android system requires a
+hardware-specific library to manage graphics surfaces at a level lower than
+EGL. This library must be what is called in Android land as a "HAL module".
+
+A "HAL module" must provide interfaces defined by Android's HAL
+(Hardware Abstraction Library). These interface definitions can be found
+under $ANDROID/hardware/libhardware/include/
+
+Of all possible HAL modules, the "gralloc" one is used by the system's
+SurfaceFlinger to allocate framebuffers and other graphics memory regions,
+as well as eventually lock/unlock/swap them when needed.
+
+The code under $EMUGL/system/gralloc/ implements the module required by the
+GLES emulation project. It's not very long, but there are a few things to
+notice here:
+
+- first, it will probe the guest system to determine if the emulator that
+ is running the virtual device really supports GPU emulation. In certain
+ circumstances this may not be possible.
+
+ If this is the case, then the module will redirect all calls to the
+ "default" gralloc module that is normally used by the system when
+ software-only rendering is enabled.
+
+ The probing happens in the function "fallback_init" which gets called
+ when the module is first opened. This initializes the 'sFallback' variable
+ to a pointer to the default gralloc module when required.
+
+- second, this module is used by SurfaceFlinger to display "software surfaces",
+ i.e. those that are backed by system memory pixel buffers, and written to
+ directly through the Skia graphics library (i.e. the non-accelerated ones).
+
+ the default module simply copies the pixel data from the surface to the
+ virtual framebuffer i/o memory, but this project's gralloc module sends it
+ to the renderer through the QEMU Pipe instead.
+
+ It turns out that this results in _faster_ rendering/frame-rates overall,
+ because memory copies inside the guest are slow, while QEMU pipe transfers
+ are done directly in the emulator.
+
+
+Host Renderer:
+--------------
+
+The host renderer library is located under $EMUGL/host/libs/libOpenglRender,
+and it provides an interface described by the headers under
+$EMUGL/host/include/libOpenglRender/render_api.h (e.g. for use by the emulator).
+
+In a nutshell, the rendering library is responsible for the following:
+
+ - Providing a virtual off-screen video surface where everything will get
+ rendered at runtime. Its dimensions are fixed by the call to
+ initOpenglRender() that must happen just after the library is
+ initialized.
+
+ - Provide a way to display the virtual video surface on a host application's
+ UI. This is done by calling createOpenGLSubWindow() which takes as argument
+ the window ID or handle of a parent window, some display dimensions and
+ a rotation angle. This allows the surface to be scaled/rotated when it is
+ displayed, even if the dimensions of the video surface do not change.
+
+ - Provide a way to listen to incoming EGL/GLES commands from the guest.
+ This is done by providing a so-called "port number" to initOpenglRender().
+
+ By default, the port number corresponds to a local TCP port number that the
+ renderer will bind to and listen. Every new connection to this port will
+ correspond to the creation of a new guest host connection, each such
+ connection corresponding to a distinct thread in the guest system.
+
+ For performance reasons, it is possible to listen to either Unix sockets
+ (on Linux and OS X), or to a Win32 named pipe (on Windows). To do so, one
+ had to call setStreamType() between library initialization
+ (i.e. initLibrary()) and construction (i.e. initOpenglRender()).
+
+ Note that in these modes, the port number is still used to differentiate
+ between several emulator instances. These details are normally handled by
+ the emulator code so you shouldn't care too much.
+
+Note that an earlier version of the interface allowed a client of the renderer
+library to provide its own IOStream implementation. However, this wasn't very
+convenient for a number of reasons. This maybe something that could be done
+again if it makes sense, but for now the performance numbers are pretty good.
+
+
+Host emulator:
+--------------
+
+The code under $QEMU/android/opengles.c is in charge of dynamically loading
+the rendering library and initializing / constructing it properly.
+
+QEMU pipe connections to the 'opengles' service are piped through the code
+in $QEMU/android/hw-pipe-net.c. Look for the openglesPipe_init() function,
+which is in charge of creating a connection to the renderer library
+(either through a TCP socket, or a Unix pipe depending on configuration.
+support for Win32 named pipes hasn't been implemented yet in the emulator)
+whenever a guest process opens the "opengles" service through /dev/qemu_pipe.
+
+There is also some support code for the display of the GLES framebuffer
+(through the renderer library's subwindow) under $QEMU/skin/window.
+
+Note that at the moment, scaling and rotation are supported. However,
+brightness emulation (which used to modify the pixel values from the
+hardware framebuffer before displaying them) doesn't work.
+
+Another issue is that it is not possible to display anything on top of the
+GL subwindow at the moment. E.g. this will obscure the emulated trackball
+image (that is normally toggled with Ctrl-T during emulation, or enabled
+by pressing the Delete key).
+
diff --git a/tools/emulator/opengl/shared/OpenglCodecCommon/FixedBuffer.h b/tools/emulator/opengl/shared/OpenglCodecCommon/FixedBuffer.h
index 1a18f47..30b9a80 100644
--- a/tools/emulator/opengl/shared/OpenglCodecCommon/FixedBuffer.h
+++ b/tools/emulator/opengl/shared/OpenglCodecCommon/FixedBuffer.h
@@ -25,18 +25,21 @@
}
~FixedBuffer() {
- delete m_buffer;
+ delete [] m_buffer;
m_bufferLen = 0;
}
void * alloc(size_t size) {
- if (m_bufferLen >= size) return (void *)(m_buffer);
+ if (m_bufferLen >= size)
+ return (void *)(m_buffer);
- if (m_buffer != NULL) delete[] m_buffer;
+ if (m_buffer != NULL)
+ delete[] m_buffer;
m_bufferLen = size;
m_buffer = new unsigned char[m_bufferLen];
- if (m_buffer == NULL) m_bufferLen = 0;
+ if (m_buffer == NULL)
+ m_bufferLen = 0;
return m_buffer;
}
diff --git a/tools/emulator/opengl/system/OpenglSystemCommon/HostConnection.cpp b/tools/emulator/opengl/system/OpenglSystemCommon/HostConnection.cpp
index 2927341..3355d9f 100644
--- a/tools/emulator/opengl/system/OpenglSystemCommon/HostConnection.cpp
+++ b/tools/emulator/opengl/system/OpenglSystemCommon/HostConnection.cpp
@@ -69,6 +69,7 @@
}
if (stream->connect() < 0) {
LOGE("Failed to connect to host (QemuPipeStream)!!!\n");
+ delete stream;
delete con;
return NULL;
}
@@ -85,6 +86,7 @@
if (stream->connect("10.0.2.2", STREAM_PORT_NUM) < 0) {
LOGE("Failed to connect to host (TcpStream)!!!\n");
+ delete stream;
delete con;
return NULL;
}
diff --git a/tools/emulator/opengl/system/egl/egl.cpp b/tools/emulator/opengl/system/egl/egl.cpp
index ddc006c..93f8681 100644
--- a/tools/emulator/opengl/system/egl/egl.cpp
+++ b/tools/emulator/opengl/system/egl/egl.cpp
@@ -146,8 +146,10 @@
flags = 0;
version = 1;
clientState = new GLClientState();
- if (shareCtx) sharedGroup = shareCtx->getSharedGroup();
- else sharedGroup = GLSharedGroupPtr(new GLSharedGroup());
+ if (shareCtx)
+ sharedGroup = shareCtx->getSharedGroup();
+ else
+ sharedGroup = GLSharedGroupPtr(new GLSharedGroup());
};
EGLContext_t::~EGLContext_t()
@@ -1245,9 +1247,3 @@
//TODO later
return 0;
}
-
-EGLBoolean eglSetSwapRectangleANDROID(EGLDisplay dpy, EGLSurface draw, EGLint left, EGLint top, EGLint width, EGLint height)
-{
- //TODO later
- return 0;
-}
diff --git a/tools/emulator/opengl/system/egl/egl_ftable.h b/tools/emulator/opengl/system/egl/egl_ftable.h
index 2c9d19a..b21da72 100644
--- a/tools/emulator/opengl/system/egl/egl_ftable.h
+++ b/tools/emulator/opengl/system/egl/egl_ftable.h
@@ -59,8 +59,7 @@
{"eglDestroySyncKHR", (void *)eglDestroySyncKHR},
{"eglClientWaitSyncKHR", (void *)eglClientWaitSyncKHR},
{"eglSignalSyncKHR", (void *)eglSignalSyncKHR},
- {"eglGetSyncAttribKHR", (void *)eglGetSyncAttribKHR},
- {"eglSetSwapRectangleANDROID", (void *)eglSetSwapRectangleANDROID}
+ {"eglGetSyncAttribKHR", (void *)eglGetSyncAttribKHR}
};
static const int egl_num_funcs = sizeof(egl_funcs_by_name) / sizeof(struct _egl_funcs_by_name);
diff --git a/tools/emulator/skins/HVGA/hardware.ini b/tools/emulator/skins/HVGA/hardware.ini
index 8de5e21..2a93368 100644
--- a/tools/emulator/skins/HVGA/hardware.ini
+++ b/tools/emulator/skins/HVGA/hardware.ini
@@ -1,3 +1,4 @@
# skin-specific hardware values
hw.lcd.density=160
-hw.ramSize=256
\ No newline at end of file
+hw.ramSize=512
+vm.heapSize=48
diff --git a/tools/emulator/skins/QVGA/hardware.ini b/tools/emulator/skins/QVGA/hardware.ini
index 1421893..3e2f547 100644
--- a/tools/emulator/skins/QVGA/hardware.ini
+++ b/tools/emulator/skins/QVGA/hardware.ini
@@ -1,3 +1,4 @@
# skin-specific hardware values
hw.lcd.density=120
-hw.ramSize=256
+hw.ramSize=512
+vm.heapSize=48
diff --git a/tools/emulator/skins/WQVGA400/hardware.ini b/tools/emulator/skins/WQVGA400/hardware.ini
index 1421893..3e2f547 100644
--- a/tools/emulator/skins/WQVGA400/hardware.ini
+++ b/tools/emulator/skins/WQVGA400/hardware.ini
@@ -1,3 +1,4 @@
# skin-specific hardware values
hw.lcd.density=120
-hw.ramSize=256
+hw.ramSize=512
+vm.heapSize=48
diff --git a/tools/emulator/skins/WQVGA432/hardware.ini b/tools/emulator/skins/WQVGA432/hardware.ini
index 1421893..3e2f547 100644
--- a/tools/emulator/skins/WQVGA432/hardware.ini
+++ b/tools/emulator/skins/WQVGA432/hardware.ini
@@ -1,3 +1,4 @@
# skin-specific hardware values
hw.lcd.density=120
-hw.ramSize=256
+hw.ramSize=512
+vm.heapSize=48
diff --git a/tools/emulator/skins/WVGA800/hardware.ini b/tools/emulator/skins/WVGA800/hardware.ini
index 96dee4f..47a6558 100644
--- a/tools/emulator/skins/WVGA800/hardware.ini
+++ b/tools/emulator/skins/WVGA800/hardware.ini
@@ -1,4 +1,4 @@
# skin-specific hardware values
hw.lcd.density=240
-vm.heapSize=24
+vm.heapSize=48
hw.ramSize=512
\ No newline at end of file
diff --git a/tools/emulator/skins/WVGA854/hardware.ini b/tools/emulator/skins/WVGA854/hardware.ini
index 6ac3d82..fd2a6d5 100644
--- a/tools/emulator/skins/WVGA854/hardware.ini
+++ b/tools/emulator/skins/WVGA854/hardware.ini
@@ -1,4 +1,4 @@
# skin-specific hardware values
hw.lcd.density=240
-vm.heapSize=24
+vm.heapSize=48
hw.ramSize=512
diff --git a/tools/emulator/system/camera/EmulatedCamera.cpp b/tools/emulator/system/camera/EmulatedCamera.cpp
index 8fde263..02b4683 100755
--- a/tools/emulator/system/camera/EmulatedCamera.cpp
+++ b/tools/emulator/system/camera/EmulatedCamera.cpp
@@ -104,6 +104,7 @@
mParameters.set(CameraParameters::KEY_MAX_EXPOSURE_COMPENSATION, "6");
mParameters.set(CameraParameters::KEY_MIN_EXPOSURE_COMPENSATION, "-6");
mParameters.set(CameraParameters::KEY_EXPOSURE_COMPENSATION_STEP, "0.5");
+ mParameters.set(CameraParameters::KEY_EXPOSURE_COMPENSATION, "0");
mParameters.set(CameraParameters::KEY_JPEG_THUMBNAIL_WIDTH, "512");
mParameters.set(CameraParameters::KEY_JPEG_THUMBNAIL_HEIGHT, "384");
mParameters.set(CameraParameters::KEY_JPEG_QUALITY, "90");
@@ -406,6 +407,34 @@
CameraParameters new_param;
String8 str8_param(parms);
new_param.unflatten(str8_param);
+
+ int new_exposure_compensation = new_param.getInt(
+ CameraParameters::KEY_EXPOSURE_COMPENSATION);
+ const int min_exposure_compensation = new_param.getInt(
+ CameraParameters::KEY_MIN_EXPOSURE_COMPENSATION);
+ const int max_exposure_compensation = new_param.getInt(
+ CameraParameters::KEY_MAX_EXPOSURE_COMPENSATION);
+
+ // Checks if the exposure compensation change is supported.
+ if ((min_exposure_compensation != 0) || (max_exposure_compensation != 0)) {
+ if (new_exposure_compensation > max_exposure_compensation) {
+ new_exposure_compensation = max_exposure_compensation;
+ }
+ if (new_exposure_compensation < min_exposure_compensation) {
+ new_exposure_compensation = min_exposure_compensation;
+ }
+
+ const int current_exposure_compensation = mParameters.getInt(
+ CameraParameters::KEY_EXPOSURE_COMPENSATION);
+ if (current_exposure_compensation != new_exposure_compensation) {
+ const float exposure_value = new_exposure_compensation *
+ new_param.getFloat(
+ CameraParameters::KEY_EXPOSURE_COMPENSATION_STEP);
+
+ getCameraDevice()->setExposureCompensation(
+ exposure_value);
+ }
+ }
mParameters = new_param;
return NO_ERROR;
diff --git a/tools/emulator/system/camera/EmulatedCameraDevice.cpp b/tools/emulator/system/camera/EmulatedCameraDevice.cpp
index e09bead..71464d2 100755
--- a/tools/emulator/system/camera/EmulatedCameraDevice.cpp
+++ b/tools/emulator/system/camera/EmulatedCameraDevice.cpp
@@ -27,6 +27,7 @@
#define LOG_TAG "EmulatedCamera_Device"
#include <cutils/log.h>
#include <sys/select.h>
+#include <cmath>
#include "EmulatedCameraDevice.h"
#include "Converters.h"
@@ -37,6 +38,7 @@
mCurFrameTimestamp(0),
mCameraHAL(camera_hal),
mCurrentFrame(NULL),
+ mExposureCompensation(1.0f),
mState(ECDS_CONSTRUCTED)
{
}
@@ -101,6 +103,17 @@
return res;
}
+void EmulatedCameraDevice::setExposureCompensation(const float ev) {
+ LOGV("%s", __FUNCTION__);
+
+ if (!isStarted()) {
+ LOGW("%s: Fake camera device is not started.", __FUNCTION__);
+ }
+
+ mExposureCompensation = std::pow(2.0f, ev);
+ LOGV("New exposure compensation is %f", mExposureCompensation);
+}
+
status_t EmulatedCameraDevice::getCurrentPreviewFrame(void* buffer)
{
if (!isStarted()) {
diff --git a/tools/emulator/system/camera/EmulatedCameraDevice.h b/tools/emulator/system/camera/EmulatedCameraDevice.h
index 88e2dd2..357c9e6 100755
--- a/tools/emulator/system/camera/EmulatedCameraDevice.h
+++ b/tools/emulator/system/camera/EmulatedCameraDevice.h
@@ -143,6 +143,10 @@
*/
virtual status_t stopDeliveringFrames();
+ /* Sets the exposure compensation for the camera device.
+ */
+ virtual void setExposureCompensation(const float ev);
+
/* Gets current framebuffer, converted into preview frame format.
* This method must be called on a connected instance of this class with a
* started camera device. If it is called on a disconnected instance, or
@@ -471,6 +475,9 @@
/* Total number of pixels */
int mTotalPixels;
+ /* Exposure compensation value */
+ float mExposureCompensation;
+
/* Defines possible states of the emulated camera device object.
*/
enum EmulatedCameraDeviceState {
diff --git a/tools/emulator/system/camera/EmulatedFakeCameraDevice.cpp b/tools/emulator/system/camera/EmulatedFakeCameraDevice.cpp
index 53a5b1b..3666827 100755
--- a/tools/emulator/system/camera/EmulatedFakeCameraDevice.cpp
+++ b/tools/emulator/system/camera/EmulatedFakeCameraDevice.cpp
@@ -44,6 +44,13 @@
mCurrentColor(&mWhiteYUV)
#endif // EFCD_ROTATE_FRAME
{
+ // Makes the image with the original exposure compensation darker.
+ // So the effects of changing the exposure compensation can be seen.
+ mBlackYUV.Y = mBlackYUV.Y / 4;
+ mWhiteYUV.Y = mWhiteYUV.Y / 4;
+ mRedYUV.Y = mRedYUV.Y / 4;
+ mGreenYUV.Y = mGreenYUV.Y / 4;
+ mBlueYUV.Y = mBlueYUV.Y / 4;
}
EmulatedFakeCameraDevice::~EmulatedFakeCameraDevice()
@@ -258,6 +265,7 @@
} else {
mWhiteYUV.get(Y, U, V);
}
+ *Y = changeExposure(*Y);
Y[1] = *Y;
Y += 2; U += mUVStep; V += mUVStep;
countx += 2;
@@ -309,6 +317,7 @@
uint8_t* sqY = Y_pos;
for (int i = x; i < square_xstop; i += 2) {
color->get(sqY, sqU, sqV);
+ *sqY = changeExposure(*sqY);
sqY[1] = *sqY;
sqY += 2; sqU += mUVStep; sqV += mUVStep;
}
@@ -321,7 +330,7 @@
void EmulatedFakeCameraDevice::drawSolid(YUVPixel* color)
{
/* All Ys are the same. */
- memset(mCurrentFrame, color->Y, mTotalPixels);
+ memset(mCurrentFrame, changeExposure(color->Y), mTotalPixels);
/* Fill U, and V panes. */
uint8_t* U = mFrameU;
@@ -357,7 +366,7 @@
}
/* All Ys at the row are the same. */
- memset(pY, color->Y, mFrameWidth);
+ memset(pY, changeExposure(color->Y), mFrameWidth);
/* Offset of the current row inside U/V panes. */
const int uv_off = (y / 2) * mUVInRow;
diff --git a/tools/emulator/system/camera/EmulatedFakeCameraDevice.h b/tools/emulator/system/camera/EmulatedFakeCameraDevice.h
index 0213ae9..383118b 100755
--- a/tools/emulator/system/camera/EmulatedFakeCameraDevice.h
+++ b/tools/emulator/system/camera/EmulatedFakeCameraDevice.h
@@ -110,6 +110,10 @@
*/
void drawSquare(int x, int y, int size, const YUVPixel* color);
+ inline uint8_t changeExposure(uint8_t inputY) {
+ return static_cast<uint8_t>(static_cast<float>(inputY) *
+ mExposureCompensation);
+ }
#if EFCD_ROTATE_FRAME
void drawSolid(YUVPixel* color);
void drawStripes();
diff --git a/tools/emulator/system/camera/media_profiles.xml b/tools/emulator/system/camera/media_profiles.xml
index ae1ce88..42ceb8d 100644
--- a/tools/emulator/system/camera/media_profiles.xml
+++ b/tools/emulator/system/camera/media_profiles.xml
@@ -75,6 +75,7 @@
<!ATTLIST VideoEditorCap maxInputFrameHeight CDATA #REQUIRED>
<!ATTLIST VideoEditorCap maxOutputFrameWidth CDATA #REQUIRED>
<!ATTLIST VideoEditorCap maxOutputFrameHeight CDATA #REQUIRED>
+<!ATTLIST VideoEditorCap maxPrefetchYUVFrames CDATA #REQUIRED>
<!ELEMENT ExportVideoProfile EMPTY>
<!ATTLIST ExportVideoProfile name (h264|h263|m4v) #REQUIRED>
<!ATTLIST ExportVideoProfile profile CDATA #REQUIRED>
@@ -374,9 +375,22 @@
-->
<VideoDecoderCap name="wmv" enabled="false"/>
<AudioDecoderCap name="wma" enabled="false"/>
+
+ <!--
+ The VideoEditor Capability configuration:
+ - maxInputFrameWidth: maximum video width of imported video clip.
+ - maxInputFrameHeight: maximum video height of imported video clip.
+ - maxOutputFrameWidth: maximum video width of exported video clip.
+ - maxOutputFrameHeight: maximum video height of exported video clip.
+ - maxPrefetchYUVFrames: maximum prefetch YUV frames for encoder,
+ used to limit the amount of memory for prefetched YUV frames.
+ For this platform, it allows maximum ~1MB(~0.1MB per QVGA frame x 10
+ frames) memory.
+ -->
+
<VideoEditorCap maxInputFrameWidth="320"
maxInputFrameHeight="240" maxOutputFrameWidth="320"
- maxOutputFrameHeight="240"/>
+ maxOutputFrameHeight="240" maxPrefetchYUVFrames="10" />
<!--
The VideoEditor Export codec profile and level values
correspond to the values in OMX_Video.h.
diff --git a/tools/emulator/test-apps/GpsLocationTest/src/com/android/emulator/gps/test/GpsLocationTest.java b/tools/emulator/test-apps/GpsLocationTest/src/com/android/emulator/gps/test/GpsLocationTest.java
index c0ea0fa..6eb3834 100644
--- a/tools/emulator/test-apps/GpsLocationTest/src/com/android/emulator/gps/test/GpsLocationTest.java
+++ b/tools/emulator/test-apps/GpsLocationTest/src/com/android/emulator/gps/test/GpsLocationTest.java
@@ -17,24 +17,30 @@
import android.content.Context;
import android.location.Location;
+import android.location.LocationListener;
import android.location.LocationManager;
+import android.os.Bundle;
+import android.os.HandlerThread;
import android.test.AndroidTestCase;
+import junit.framework.Assert;
+
/**
* GPS Location Test
*
* Test the GPS API by verifying the previously set location
*/
-public class GpsLocationTest extends AndroidTestCase {
+public class GpsLocationTest extends AndroidTestCase implements LocationListener {
private LocationManager locationManager;
-
+ private Location mLocation;
/**
* Prior to running this test the GPS location must be set to the following
* longitude and latitude coordinates via the geo fix command
*/
private static final double LONGITUDE = -122.08345770835876;
private static final double LATITUDE = 37.41991859119417;
+ private static final int TIMEOUT = 5000;
@Override
protected void setUp() throws Exception {
@@ -48,9 +54,37 @@
* via geo fix command
*/
public void testCurrentLocationGivenLocation(){
- Location lastLocation = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);
- assertNotNull(lastLocation);
- assertEquals(lastLocation.getLongitude(), LONGITUDE);
- assertEquals(lastLocation.getLatitude(), LATITUDE);
+ try{
+ synchronized ( this ){
+ HandlerThread handlerThread = new HandlerThread("testLocationUpdates");
+ handlerThread.start();
+ locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, this,
+ handlerThread.getLooper());
+ this.wait(TIMEOUT);
+ }
+ }catch ( InterruptedException ie){
+ ie.printStackTrace();
+ Assert.fail();
+ }
+ assertNotNull(mLocation);
+ assertEquals(new Float(LONGITUDE), new Float(mLocation.getLongitude()));
+ assertEquals(new Float(LATITUDE), new Float(mLocation.getLatitude()));
+ locationManager.removeUpdates(this);
+ }
+
+ public void onLocationChanged(Location location) {
+ synchronized ( this ){
+ mLocation=location;
+ this.notify();
+ }
+ }
+
+ public void onProviderDisabled(String arg0) {
+ }
+
+ public void onProviderEnabled(String arg0) {
+ }
+
+ public void onStatusChanged(String arg0, int arg1, Bundle arg2) {
}
}