/*
* 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 XAInter