diff options
Diffstat (limited to 'libvideoeditor/osal/inc')
22 files changed, 0 insertions, 2164 deletions
diff --git a/libvideoeditor/osal/inc/LVOSA_FileReader_optim.h b/libvideoeditor/osal/inc/LVOSA_FileReader_optim.h deleted file mode 100755 index 237376d..0000000 --- a/libvideoeditor/osal/inc/LVOSA_FileReader_optim.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * 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. - */ - -/** - ****************************************************************************** - * @file M4OSA_FileReader_optim.h - * @brief File reader for Symbian - * @note This file declares functions and types to read a file. - ****************************************************************************** -*/ - - - -#ifndef M4OSA_FILEREADER_OPTIM_H -#define M4OSA_FILEREADER_OPTIM_H - -#define M4OSA_READER_OPTIM_USE_OSAL_IF - -/**/ -#ifndef M4OSA_READER_OPTIM_USE_OSAL_IF - typedef struct - { - M4OSA_Void* (*pFctPtr_Open)( M4OSA_Void* fd, - M4OSA_UInt32 FileModeAccess, - M4OSA_UInt16* errno ); - M4OSA_FilePosition (*pFctPtr_Read)( M4OSA_Void* fd, - M4OSA_UInt8* data, - M4OSA_FilePosition size, - M4OSA_UInt16* errno ); - M4OSA_FilePosition (*pFctPtr_Seek)( M4OSA_Void* fd, - M4OSA_FilePosition pos, - M4OSA_FileSeekAccessMode mode, - M4OSA_UInt16* errno ); - M4OSA_FilePosition (*pFctPtr_Tell)( M4OSA_Void* fd, - M4OSA_UInt16* errno ); - M4OSA_Int32 (*pFctPtr_Close)( M4OSA_Void* fd, - M4OSA_UInt16* errno ); - M4OSA_Void (*pFctPtr_AccessType)( M4OSA_UInt32 FileModeAccess_In, - M4OSA_Void* FileModeAccess_Out ); - - } M4OSA_FileSystem_FctPtr; -#endif -/**/ - - -/* Reader API : bufferized functions */ -#ifdef M4OSA_READER_OPTIM_USE_OSAL_IF - M4OSA_ERR M4OSA_fileReadOpen_optim( M4OSA_Context* context, - M4OSA_Void* fileDescriptor, - M4OSA_UInt32 fileModeAccess); -#else - M4OSA_ERR M4OSA_fileReadOpen_optim( M4OSA_Context* context, - M4OSA_Void* fileDescriptor, - M4OSA_UInt32 fileModeAccess, - M4OSA_FileSystem_FctPtr *FS); -#endif - -M4OSA_ERR M4OSA_fileReadData_optim( M4OSA_Context context, - M4OSA_MemAddr8 buffer, - M4OSA_UInt32* size ); -M4OSA_ERR M4OSA_fileReadSeek_optim( M4OSA_Context context, - M4OSA_FileSeekAccessMode seekMode, - M4OSA_FilePosition* position ); -M4OSA_ERR M4OSA_fileReadClose_optim( M4OSA_Context context ); -M4OSA_ERR M4OSA_fileReadGetOption_optim( M4OSA_Context context, - M4OSA_FileReadOptionID optionID, - M4OSA_DataOption *optionValue ); -M4OSA_ERR M4OSA_fileReadSetOption_optim( M4OSA_Context context, - M4OSA_FileReadOptionID optionID, - M4OSA_DataOption optionValue ); - -#endif /* M4OSA_FILEREADER_OPTIM_H */ diff --git a/libvideoeditor/osal/inc/LV_Macros.h b/libvideoeditor/osal/inc/LV_Macros.h deleted file mode 100755 index b8d7e85..0000000 --- a/libvideoeditor/osal/inc/LV_Macros.h +++ /dev/null @@ -1,107 +0,0 @@ -/* - * 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. - */ - -/******************************************************************************* -* @file LV_Macros.h -* @par NXP Software -* @brief Macros definition for Smartphone team -*******************************************************************************/ - -#ifndef LV_MACROS_H -#define LV_MACROS_H - -/*------------*/ -/* INCLUDES */ -/*------------*/ -#include "M4OSA_Memory.h" -#include "M4OSA_Debug.h" - -/****************************************************************************** -* -* CHECK_PTR(fct, p, err, errValue) -* @note This macro checks the value p. If it is NULL, it sets the variable err -* to errValue and jumps to the label <fct>_cleanUp. A trace is displayed -* signalling the error, the function name and the line number. -* -******************************************************************************/ -#define CHECK_PTR(fct, p, err, errValue) \ -{ \ - if(M4OSA_NULL == (p)) \ - { \ - (err) = (errValue) ; \ - M4OSA_TRACE1_1((M4OSA_Char*)"" #fct "(L%d): " #p " is NULL, returning " #errValue "",__LINE__) ; \ - goto fct##_cleanUp; \ - } \ -} - -/****************************************************************************** -* -* CHECK_ERR(fct, err) -* @note This macro checks the value err. If it is not NULL, a trace is displayed -* signalling the error, the function name and the line number. The macro -* jumps to the label <fct>_cleanUp. -* -******************************************************************************/ -#define CHECK_ERR(fct, err) \ -{ \ - if(M4NO_ERROR != (err)) \ - { \ - M4OSA_TRACE1_2((M4OSA_Char*)"!!! " #fct "(L%d): ERROR 0x%.8x returned",\ - __LINE__,err) ; \ - goto fct##_cleanUp; \ - } \ -} - - -/****************************************************************************** -* -* CHECK_ERR(fct, err) -* @note This macro compares a current state with a state value. If they are different, -* err is set to M4ERR_STATE. -* A trace is displayed signalling the error, the function name and the line number. -* The macro jumps to the label <fct>_cleanUp. -* -******************************************************************************/ -#define CHECK_STATE(fct, stateValue, state) \ -{ \ - if((stateValue) != (state)) \ - { \ - M4OSA_TRACE1_1("" #fct " called in bad state %d", state) ; \ - (err) = M4ERR_STATE ; \ - goto fct##_cleanUp; \ - } \ -} - -/****************************************************************************** -* -* SAFE_FREE(p) -* @note This macro checks the value of p is not NULL. If it is NULL, it does -* nothing. Else, p is de allocated and set to NULL. -* -******************************************************************************/ -#define SAFE_FREE(p) \ -{ \ - if(M4OSA_NULL != (p)) \ - { \ - free((p)) ; \ - (p) = M4OSA_NULL ; \ - } \ -} - - - -#endif /*--- LV_MACROS_H ---*/ - diff --git a/libvideoeditor/osal/inc/M4OSA_CharStar.h b/libvideoeditor/osal/inc/M4OSA_CharStar.h deleted file mode 100755 index 06316f0..0000000 --- a/libvideoeditor/osal/inc/M4OSA_CharStar.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * 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. - */ -/** - ************************************************************************ - * @file M4OSA_CharStar.h - * @ingroup - * @brief external API of the Char Star set of functions. - ************************************************************************ -*/ - -#ifndef M4OSA_CHARSTAR_H -#define M4OSA_CHARSTAR_H - -/* general OSAL types and prototypes inclusion */ -#include "M4OSA_Types.h" -#include "M4OSA_Error.h" -#include "M4OSA_Time.h" -#include "M4OSA_FileCommon.h" - -/* types definition */ -typedef enum -{ - M4OSA_kchrDec = 0x01, - M4OSA_kchrHexa = 0x02, - M4OSA_kchrOct = 0x03 -} M4OSA_chrNumBase; - -/* error and warning codes */ -#define M4ERR_CHR_STR_OVERFLOW M4OSA_ERR_CREATE(M4_ERR,M4OSA_CHARSTAR,0x000001) -#define M4ERR_CHR_CONV_FAILED M4OSA_ERR_CREATE(M4_ERR,M4OSA_CHARSTAR,0x000002) -#define M4WAR_CHR_NOT_FOUND M4OSA_ERR_CREATE(M4_WAR,M4OSA_CHARSTAR,0x000001) -#define M4WAR_CHR_NUM_RANGE M4OSA_ERR_CREATE(M4_WAR,M4OSA_CHARSTAR,0x000002) -#define M4WAR_CHR_NEGATIVE M4OSA_ERR_CREATE(M4_WAR,M4OSA_CHARSTAR,0x000003) - -/* prototypes of the Char Star functions */ -#ifdef __cplusplus -extern "C" -{ -#endif - -M4OSAL_CHARSTAR_EXPORT_TYPE M4OSA_ERR M4OSA_chrNCopy (M4OSA_Char *strOut, - M4OSA_Char *strIn, - M4OSA_UInt32 len2Copy); -M4OSAL_CHARSTAR_EXPORT_TYPE M4OSA_ERR M4OSA_chrAreIdentical (M4OSA_Char *strIn1, - M4OSA_Char *strIn2, - M4OSA_Bool *result); -M4OSAL_CHARSTAR_EXPORT_TYPE M4OSA_ERR M4OSA_chrGetUInt32 (M4OSA_Char *strIn, - M4OSA_UInt32 *val, - M4OSA_Char **strOut, - M4OSA_chrNumBase base); -M4OSAL_CHARSTAR_EXPORT_TYPE M4OSA_ERR M4OSA_chrGetUInt16 (M4OSA_Char *strIn, - M4OSA_UInt16 *val, - M4OSA_Char **strOut, - M4OSA_chrNumBase base); -M4OSAL_CHARSTAR_EXPORT_TYPE M4OSA_ERR M4OSA_chrSPrintf (M4OSA_Char *strOut, - M4OSA_UInt32 strOutMaxLen, - M4OSA_Char *format, - ...); - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/libvideoeditor/osal/inc/M4OSA_Clock.h b/libvideoeditor/osal/inc/M4OSA_Clock.h deleted file mode 100755 index 52ea696..0000000 --- a/libvideoeditor/osal/inc/M4OSA_Clock.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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. - */ -/** - ************************************************************************ - * @file M4OSA_Clock.h - * @ingroup OSAL - * @brief clock API - ************************************************************************ -*/ - -#ifndef M4OSA_CLOCK_H -#define M4OSA_CLOCK_H - -#include "M4OSA_Types.h" -#include "M4OSA_Error.h" -#include "M4OSA_Time.h" - - -#define M4WAR_TIMESCALE_TOO_BIG M4OSA_ERR_CREATE(M4_WAR,M4OSA_CLOCK,0x000001) /**< Time precision too high for the system*/ -#define M4ERR_CLOCK_BAD_REF_YEAR M4OSA_ERR_CREATE(M4_ERR,M4OSA_CLOCK,0x000001) /**< Input year of reference is neither 1900, nor 1970 nor 2000*/ - -#ifdef __cplusplus -extern "C" -{ -#endif - -M4OSAL_CLOCK_EXPORT_TYPE M4OSA_ERR M4OSA_clockGetTime(M4OSA_Time* pTime, - M4OSA_UInt32 timescale); - -#ifdef __cplusplus -} -#endif - -#endif /*M4OSA_CLOCK_H*/ - diff --git a/libvideoeditor/osal/inc/M4OSA_CoreID.h b/libvideoeditor/osal/inc/M4OSA_CoreID.h deleted file mode 100755 index 9172800..0000000 --- a/libvideoeditor/osal/inc/M4OSA_CoreID.h +++ /dev/null @@ -1,199 +0,0 @@ -/* - * 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. - */ -/** - ************************************************************************ - * @file M4OSA_CoreID.h - * @brief defines the uniques component identifiers used for memory management - * and optionID mechanism - * @note - ************************************************************************ -*/ -#ifndef __M4OSA_COREID_H__ -#define __M4OSA_COREID_H__ - -/* CoreId are defined on 14 bits */ -/* we start from 0x0100, lower values are reserved for osal core components */ - -/* reader shells*/ -#define M4READER_COMMON 0x0100 -#define M4READER_AVI 0x0101 -#define M4READER_AMR 0x0102 -#define M4READER_3GP 0x0103 -#define M4READER_NET 0x0104 -#define M4READER_3GP_HTTP 0x0105 -#define M4READER_MP3 0x0106 -#define M4READER_WAV 0x0107 -#define M4READER_MIDI 0x0108 -#define M4READER_ASF 0x0109 -#define M4READER_REAL 0x010A -#define M4READER_AAC 0x010B -#define M4READER_FLEX 0x010C -#define M4READER_BBA 0x010D -#define M4READER_SYNTHESIS_AUDIO 0x010E -#define M4READER_JPEG 0x010F - - -/* writer shells*/ -#define M4WRITER_COMMON 0x0110 -#define M4WRITER_AVI 0x0111 -#define M4WRITER_AMR 0x0112 -#define M4WRITER_3GP 0x0113 -#define M4WRITER_JPEG 0x0116 -#define M4WRITER_MP3 0x0117 - -/* decoder shells */ -#define M4DECODER_COMMON 0x0120 -#define M4DECODER_JPEG 0x0121 -#define M4DECODER_MPEG4 0x0122 -#define M4DECODER_AUDIO 0x0123 -#define M4DECODER_AVC 0x0124 -#define M4DECODER_MIDI 0x0125 -#define M4DECODER_WMA 0x0126 -#define M4DECODER_WMV 0x0127 -#define M4DECODER_RMV 0x0128 -#define M4DECODER_RMA 0x0129 -#define M4DECODER_AAC 0x012A -#define M4DECODER_BEATBREW 0x012B -#define M4DECODER_EXTERNAL 0x012C - -/* encoder shells */ -#define M4ENCODER_COMMON 0x0130 -#define M4ENCODER_JPEG 0x0131 -#define M4ENCODER_MPEG4 0x0132 -#define M4ENCODER_AUDIO 0x0133 -#define M4ENCODER_VID_NULL 0x0134 -#define M4ENCODER_MJPEG 0x0135 -#define M4ENCODER_MP3 0x0136 -#define M4ENCODER_H264 0x0137 -#define M4ENCODER_AAC 0x0138 -#define M4ENCODER_AMRNB 0x0139 -#define M4ENCODER_AUD_NULL 0x013A -#define M4ENCODER_EXTERNAL 0x013B - -/* cores */ -#define M4JPG_DECODER 0x0140 -#define M4JPG_ENCODER 0x0141 - -#define M4MP4_DECODER 0x0142 -#define M4MP4_ENCODER 0x0143 - -#define M4AVI_COMMON 0x0144 -#define M4AVI_READER 0x0145 -#define M4AVI_WRITER 0x0146 - -#define M4HTTP_ENGINE 0x0147 - -#define M4OSA_TMPFILE 0x0148 -#define M4TOOL_TIMER 0x0149 - -#define M4AMR_READER 0x014A - -#define M4MP3_READER 0x014B - -#define M4WAV_READER 0x014C -#define M4WAV_WRITER 0x014D -#define M4WAV_COMMON 0x014E - -#define M4ADTS_READER 0x014F -#define M4ADIF_READER 0x016A - -#define M4SPS 0x0150 -#define M4EXIF_DECODER 0x0151 -#define M4EXIF_ENCODER 0x0152 -#define M4GIF_DECODER 0x0153 -#define M4GIF_ENCODER 0x0154 -#define M4PNG_DECODER 0x0155 -#define M4PNG_ENCODER 0x0156 -#define M4WBMP_DECODER 0x0157 -#define M4WBMP_ENCODER 0x0158 - -#define M4AMR_WRITER 0x0159 /**< no room to put it along M4AMR_READER */ - - -#define M4AVC_DECODER 0x015A -#define M4AVC_ENCODER 0x015B - -#define M4ASF_READER 0x015C -#define M4WMDRM_AGENT 0x015D -#define M4MIDI_READER 0x0162 /**< no room before the presenters */ -#define M4RM_READER 0x163 -#define M4RMV_DECODER 0x164 -#define M4RMA_DECODER 0x165 - -#define M4TOOL_XML 0x0166 -#define M4TOOL_EFR 0x0167 /**< Decryption module for Video Artist */ -#define M4IAL_FTN 0x0168 /* FTN implementation of the IAL */ -#define M4FTN 0x0169 /* FTN library */ - -/* presenter */ -#define M4PRESENTER_AUDIO 0x0160 -#define M4PRESENTER_VIDEO 0x0161 - -/* high level interfaces (vps, etc..)*/ -#define M4VPS 0x0170 -#define M4VTS 0x0171 -#define M4VXS 0x0172 -#define M4CALLBACK 0x0173 -#define M4VES 0x0174 -#define M4PREPROCESS_VIDEO 0x0175 -#define M4GRAB_AUDIO 0x0176 -#define M4GRAB_VIDEO 0x0177 -#define M4VSSAVI 0x0178 -#define M4VSS3GPP 0x0179 -#define M4PTO3GPP 0x017A -#define M4PVX_PARSER 0x017B -#define M4VCS 0x017C -#define M4MCS 0x017D -#define M4MNMC 0x0180 /**< mnm controller */ -#define M4TTEXT_PARSER 0x0181 /**< timed text */ -#define M4MM 0x0182 /**< Music manager */ -#define M4MDP 0x0183 /**< Metadata parser */ -#define M4MMSQLCORE 0x0184 -#define M4VPSIL 0x0185 -#define M4FILEIL 0x0186 /* IL file Interface */ -#define M4MU 0x0187 -#define M4VEE 0x0188 /**< Video effect engine */ -#define M4VA 0x0189 /* VideoArtist */ -#define M4JTS 0x018A -#define M4JTSIL 0x018B -#define M4AIR 0x018C /**< AIR */ -#define M4SPE 0x018D /**< Still picture editor */ -#define M4VS 0x018E /**< Video Studio (xVSS) */ -#define M4VESIL 0x018F /**< VES il */ -#define M4ID3 0x0190 /**< ID3 Tag Module */ -#define M4SC 0x0191 /**< Media Scanner */ -#define M4TG 0x0192 /**< Thumbnail Generator*/ -#define M4TS 0x0193 /**< Thumbnail storage */ -#define M4MB 0x0194 /**< Media browser */ - -/* high level application (test or client app) */ -#define M4APPLI 0x0200 -#define M4VA_APPLI 0x0201 /**< Video Artist test application */ - -/* external components (HW video codecs, etc.) */ -#define M4VD_EXTERNAL 0x0300 -#define M4VE_EXTERNAL 0x0301 - - -/* priority to combine with module ids */ -#define M4HIGH_PRIORITY 0xC000 -#define M4MEDIUM_PRIORITY 0x8000 -#define M4LOW_PRIORITY 0x4000 -#define M4DEFAULT_PRIORITY 0x0000 - - -#endif /*__M4OSA_COREID_H__*/ - diff --git a/libvideoeditor/osal/inc/M4OSA_Debug.h b/libvideoeditor/osal/inc/M4OSA_Debug.h deleted file mode 100755 index 826ab51..0000000 --- a/libvideoeditor/osal/inc/M4OSA_Debug.h +++ /dev/null @@ -1,266 +0,0 @@ -/* - * 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. - */ -/** - ************************************************************************ - * @file M4OSA_Debug.h - * @brief Debug and Trace Macro - ************************************************************************ -*/ - - -#ifndef _M4OSA_DEBUG_H_ -#define _M4OSA_DEBUG_H_ - -#include "M4OSA_Error.h" -#include "M4OSA_Types.h" - - -/* defaut value, defined only if not defined already. */ -#ifndef M4TRACE_ID -#define M4TRACE_ID M4UNKNOWN_COREID -#endif /* M4TRACE_ID undefined */ - - -#define M4OSA_SUPER_DEBUG_LEVEL 0 - -#ifndef M4OSA_DEBUG_LEVEL -#define M4OSA_DEBUG_LEVEL 0 -#endif - - -#define M4OSA_SUPER_TRACE_LEVEL 0 - -#ifndef M4OSA_TRACE_LEVEL -#define M4OSA_TRACE_LEVEL 0 -#endif - -#ifdef __cplusplus -extern "C" -{ -#endif - - -#if (M4OSA_DEBUG_LEVEL >= 1) || (M4OSA_SUPER_DEBUG_LEVEL >= 1) - -/* Debug macros */ -extern M4OSA_Void M4OSA_DEBUG_traceFunction(M4OSA_UInt32 line, - M4OSA_Char* fileName, - M4OSA_UInt32 level, - M4OSA_Char* stringCondition, - M4OSA_Char* message, - M4OSA_ERR returnedError); - - -#define M4OSA_DEBUG_IFx(cond, errorCode, msg, level)\ - if(cond)\ - {\ - M4OSA_DEBUG_traceFunction(__LINE__, (M4OSA_Char*)__FILE__, level,\ - (M4OSA_Char*)#cond, (M4OSA_Char*)msg,\ - (errorCode));\ - return(errorCode);\ - } - -#define M4OSA_DEBUG(errorCode, msg)\ - M4OSA_DEBUG_traceFunction(__LINE__, (M4OSA_Char*)__FILE__, 1,\ - (M4OSA_Char*)#errorCode, (M4OSA_Char*)msg,\ - (errorCode)); - -#else /*(M4OSA_DEBUG_LEVEL >= 1) || (M4OSA_SUPER_DEBUG_LEVEL >= 1)*/ - - -#define M4OSA_DEBUG(errorCode, msg) - -#endif /*(M4OSA_DEBUG_LEVEL >= 1) || (M4OSA_SUPER_DEBUG_LEVEL >= 1)*/ - - - -#if (M4OSA_DEBUG_LEVEL >= 1) || (M4OSA_SUPER_DEBUG_LEVEL >= 1) - #define M4OSA_DEBUG_IF1(cond, errorCode, msg)\ - M4OSA_DEBUG_IFx(cond, errorCode, msg, 1) -#else - #define M4OSA_DEBUG_IF1(cond, errorCode, msg) -#endif /*(M4OSA_DEBUG_LEVEL >= 1) || (M4OSA_SUPER_DEBUG_LEVEL >= 1)*/ - - -#if (M4OSA_DEBUG_LEVEL >= 2) || (M4OSA_SUPER_DEBUG_LEVEL >= 2) - #define M4OSA_DEBUG_IF2(cond, errorCode, msg)\ - M4OSA_DEBUG_IFx(cond, errorCode, msg, 2) -#else - #define M4OSA_DEBUG_IF2(cond, errorCode, msg) -#endif /*(M4OSA_DEBUG_LEVEL >= 2) || (M4OSA_SUPER_DEBUG_LEVEL >= 2)*/ - - -#if (M4OSA_DEBUG_LEVEL >= 3) || (M4OSA_SUPER_DEBUG_LEVEL >= 3) - #define M4OSA_DEBUG_IF3(cond, errorCode, msg)\ - M4OSA_DEBUG_IFx(cond, errorCode, msg, 3) -#else - #define M4OSA_DEBUG_IF3(cond, errorCode, msg) -#endif /*(M4OSA_DEBUG_LEVEL >= 3) || (M4OSA_SUPER_DEBUG_LEVEL >= 3)*/ - - - -/* Trace macros */ - -#if (M4OSA_TRACE_LEVEL >= 1) || (M4OSA_SUPER_TRACE_LEVEL >= 1) - -extern M4OSA_Void M4OSA_TRACE_traceFunction(M4OSA_UInt32 line, - M4OSA_Char* fileName, - M4OSA_CoreID coreID, - M4OSA_UInt32 level, - M4OSA_Char* stringMsg, - ... ); - - - -#define M4OSA_TRACEx_0(msg, level)\ - M4OSA_TRACE_traceFunction(__LINE__, (M4OSA_Char*)__FILE__,\ - (M4OSA_CoreID)M4TRACE_ID, level, (M4OSA_Char*)msg); - - -#define M4OSA_TRACEx_1(msg, param1, level)\ - M4OSA_TRACE_traceFunction(__LINE__, (M4OSA_Char*)__FILE__,\ - (M4OSA_CoreID)M4TRACE_ID, level, (M4OSA_Char*)msg, param1); - - -#define M4OSA_TRACEx_2(msg, param1, param2, level)\ - M4OSA_TRACE_traceFunction(__LINE__, (M4OSA_Char*)__FILE__,\ - (M4OSA_CoreID)M4TRACE_ID, level,\ - (M4OSA_Char*)msg, param1,\ - param2); - - -#define M4OSA_TRACEx_3(msg, param1, param2, param3, level)\ - M4OSA_TRACE_traceFunction(__LINE__, (M4OSA_Char*)__FILE__,\ - (M4OSA_CoreID)M4TRACE_ID, level, (M4OSA_Char*)msg,\ - param1,param2, param3); - - -#define M4OSA_TRACEx_4(msg, param1, param2, param3, param4, level)\ - M4OSA_TRACE_traceFunction(__LINE__, (M4OSA_Char*)__FILE__,\ - (M4OSA_CoreID)M4TRACE_ID, level,\ - (M4OSA_Char*)msg, param1,\ - param2, param3, param4); - - -#define M4OSA_TRACEx_5(msg, param1, param2, param3, param4, param5, level)\ - M4OSA_TRACE_traceFunction(__LINE__, (M4OSA_Char*)__FILE__,\ - (M4OSA_CoreID)M4TRACE_ID, level,\ - (M4OSA_Char*)msg, param1,\ - param2, param3, param4, param5); - -#endif /*(M4OSA_TRACE_LEVEL >= 1) || (M4OSA_SUPER_TRACE_LEVEL >= 1)*/ - - - -#if (M4OSA_TRACE_LEVEL >= 1) || (M4OSA_SUPER_TRACE_LEVEL >= 1) -#define M4OSA_TRACE1_0(msg)\ - M4OSA_TRACEx_0(msg, 1) - -#define M4OSA_TRACE1_1(msg, param1)\ - M4OSA_TRACEx_1(msg, param1, 1) - -#define M4OSA_TRACE1_2(msg, param1, param2)\ - M4OSA_TRACEx_2(msg, param1, param2, 1) - -#define M4OSA_TRACE1_3(msg, param1, param2, param3)\ - M4OSA_TRACEx_3(msg, param1, param2, param3, 1) - -#define M4OSA_TRACE1_4(msg, param1, param2, param3, param4)\ - M4OSA_TRACEx_4(msg, param1, param2, param3, param4, 1) - -#define M4OSA_TRACE1_5(msg, param1, param2, param3, param4, param5)\ - M4OSA_TRACEx_5(msg, param1, param2, param3, param4, param5, 1) - -#else /*(M4OSA_TRACE_LEVEL >= 1) || (M4OSA_SUPER_TRACE_LEVEL >= 1)*/ - -#define M4OSA_TRACE1_0(msg) -#define M4OSA_TRACE1_1(msg, param1) -#define M4OSA_TRACE1_2(msg, param1, param2) -#define M4OSA_TRACE1_3(msg, param1, param2, param3) -#define M4OSA_TRACE1_4(msg, param1, param2, param3, param4) -#define M4OSA_TRACE1_5(msg, param1, param2, param3, param4, param5) - -#endif /*(M4OSA_TRACE_LEVEL >= 1) || (M4OSA_SUPER_TRACE_LEVEL >= 1)*/ - - -#if (M4OSA_TRACE_LEVEL >= 2) || (M4OSA_SUPER_TRACE_LEVEL >= 2) -#define M4OSA_TRACE2_0(msg)\ - M4OSA_TRACEx_0(msg, 2) - -#define M4OSA_TRACE2_1(msg, param1)\ - M4OSA_TRACEx_1(msg, param1, 2) - -#define M4OSA_TRACE2_2(msg, param1, param2)\ - M4OSA_TRACEx_2(msg, param1, param2, 2) - -#define M4OSA_TRACE2_3(msg, param1, param2, param3)\ - M4OSA_TRACEx_3(msg, param1, param2, param3, 2) - -#define M4OSA_TRACE2_4(msg, param1, param2, param3, param4)\ - M4OSA_TRACEx_4(msg, param1, param2, param3, param4, 2) - -#define M4OSA_TRACE2_5(msg, param1, param2, param3, param4, param5)\ - M4OSA_TRACEx_5(msg, param1, param2, param3, param4, param5, 2) - -#else /*(M4OSA_TRACE_LEVEL >= 2) || (M4OSA_SUPER_TRACE_LEVEL >= 2)*/ - -#define M4OSA_TRACE2_0(msg) -#define M4OSA_TRACE2_1(msg, param1) -#define M4OSA_TRACE2_2(msg, param1, param2) -#define M4OSA_TRACE2_3(msg, param1, param2, param3) -#define M4OSA_TRACE2_4(msg, param1, param2, param3, param4) -#define M4OSA_TRACE2_5(msg, param1, param2, param3, param4, param5) -#endif /*(M4OSA_TRACE_LEVEL >= 2) || (M4OSA_SUPER_TRACE_LEVEL >= 2)*/ - - -#if (M4OSA_TRACE_LEVEL >= 3) || (M4OSA_SUPER_TRACE_LEVEL >= 3) -#define M4OSA_TRACE3_0(msg)\ - M4OSA_TRACEx_0(msg, 3) - -#define M4OSA_TRACE3_1(msg, param1)\ - M4OSA_TRACEx_1(msg, param1, 3) - -#define M4OSA_TRACE3_2(msg, param1, param2)\ - M4OSA_TRACEx_2(msg, param1, param2, 3) - -#define M4OSA_TRACE3_3(msg, param1, param2, param3)\ - M4OSA_TRACEx_3(msg, param1, param2, param3, 3) - -#define M4OSA_TRACE3_4(msg, param1, param2, param3, param4)\ - M4OSA_TRACEx_4(msg, param1, param2, param3, param4, 3) - -#define M4OSA_TRACE3_5(msg, param1, param2, param3, param4, param5)\ - M4OSA_TRACEx_5(msg, param1, param2, param3, param4, param5, 3) - -#else /*(M4OSA_TRACE_LEVEL >= 3) || (M4OSA_SUPER_TRACE_LEVEL >= 3)*/ - -#define M4OSA_TRACE3_0(msg) -#define M4OSA_TRACE3_1(msg, param1) -#define M4OSA_TRACE3_2(msg, param1, param2) -#define M4OSA_TRACE3_3(msg, param1, param2, param3) -#define M4OSA_TRACE3_4(msg, param1, param2, param3, param4) -#define M4OSA_TRACE3_5(msg, param1, param2, param3, param4, param5) - -#endif /*(M4OSA_TRACE_LEVEL >= 3) || (M4OSA_SUPER_TRACE_LEVEL >= 3)*/ - - - -#ifdef __cplusplus -} -#endif - -#endif /* _M4OSA_DEBUG_H_ */ - diff --git a/libvideoeditor/osal/inc/M4OSA_Error.h b/libvideoeditor/osal/inc/M4OSA_Error.h deleted file mode 100755 index 75c3177..0000000 --- a/libvideoeditor/osal/inc/M4OSA_Error.h +++ /dev/null @@ -1,174 +0,0 @@ -/* - * 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. - */ -/** - ************************************************************************ - * @file M4OSA_Error.h - * @ingroup OSAL - * @brief Definition of common error types - * @note This file contains macros to generate and analyze error codes. - ************************************************************************ -*/ - - -#ifndef M4OSA_ERROR_H -#define M4OSA_ERROR_H - -#include "M4OSA_Types.h" - -/** M4OSA_ERR is a 32 bits unsigned integer. - * To sort returned code, a specific naming convention must be followed: - * - Severity (2 bits): It may br either 0b00 (no error), 0b01 (warning) or - * 0b01 (fatal error) - * - Core ID (14 bits): It is a unique ID for each core component - * - ErrorID (16 bits): It is the specific error code - - * EACH CORE COMPONENT FUNCTION SHOULD RETURN AN M4OSA_ERR -*/ -typedef M4OSA_UInt32 M4OSA_ERR; - -#define M4_OK 0 -#define M4_WAR 1 -#define M4_ERR 2 - - -/* Macro to process M4OSA_ERR */ - -/** This macro tests if the provided M4OSA_ERR is a warning or not*/ -#define M4OSA_ERR_IS_WARNING(error) ((((error)>>30) == M4_WAR) ? 1:0) - -/** This macro tests if the provided M4OSA_ERR is a fatal error or not*/ -#define M4OSA_ERR_IS_ERROR(error) ((((error)>>30) == M4_ERR) ? 1:0) - -/** This macro returns an error code accroding to the 3 provided fields: - * @arg severity: (IN) [M4OSA_UInt32] Severity to put in the error code - * @arg coreID: (IN) [M4OSA_UInt32] CoreID to put in the error code - * @arg errorID: (IN) [M4OSA_UInt32] ErrorID to put in the error code*/ -#define M4OSA_ERR_CREATE(severity, coreID, errorID)\ - (M4OSA_UInt32)((((M4OSA_UInt32)severity)<<30)+((((M4OSA_UInt32)coreID)&0x003FFF)<<16)+(((M4OSA_UInt32)errorID)&0x00FFFF)) - -/** This macro extracts the 3 fields from the error: - * @arg error: (IN) [M4OSA_ERR] Error code - * @arg severity: (OUT) [M4OSA_UInt32] Severity to put in the error code - * @arg coreID: (OUT) [M4OSA_UInt32] CoreID to put in the error code - * @arg errorID: (OUT) [M4OSA_UInt32] ErrorID to put in the error code*/ -#define M4OSA_ERR_SPLIT(error, severity, coreID, errorID)\ - { severity=(M4OSA_UInt32)((error)>>30);\ - coreID=(M4OSA_UInt32)(((error)>>16)&0x003FFF);\ - (M4OSA_UInt32)(errorID=(error)&0x00FFFF); } - - -/* "fake" CoreID, is used to report an unknown CoreID. Used by the trace system -when the core ID macro isn't defined. Defined here instead of CoreID.h to avoid -introducing dependencies to common/inc. */ - -#define M4UNKNOWN_COREID 0x3FFF /* max possible CoreID */ - -#define M4_COMMON 0x00 /**<Common*/ -#define M4MP4_COMMON 0x01 /**<Core MP4 (common)*/ -#define M4MP4_WRITER 0x02 /**<Core MP4 writer*/ -#define M4MP4_READER 0x03 /**<Core MP4 reader*/ -#define M4RTSP_COMMON 0x11 /**<Core RTSP common*/ -#define M4RTSP_WRITER 0x12 /**<Core RTSP transmitter*/ -#define M4RTSP_READER 0x13 /**<Core RTSP receiver*/ -#define M4RTP_WRITER 0x14 /**<Core RTP/RTCP receiver*/ -#define M4RTP_READER 0x15 /**<Core RTP/RTCP transmitter*/ -#define M4SAP_WRITER 0x16 /**<Core SAP transmitter*/ -#define M4SAP_READER 0x17 /**<Core SAP receiver*/ -#define M4DVBH_READER 0x18 /**<Core DVBH receiver*/ -#define M4SDP_WRITER 0x22 /**<Core SDP writer*/ -#define M4SDP_READER 0x31 /**<Core SDP reader*/ -#define M4PAK_AMR 0x32 /**<Core packetizer AMR (RFC3267)*/ -#define M4DEPAK_AMR 0x33 /**<Core de-packetizer AMR (RFC3267)*/ -#define M4PAK_H263 0x34 /**<Core packetizer H263 (RFC2429)*/ -#define M4DEPAK_H263 0x35 /**<Core de-packetizer H263(RFC2429)*/ -#define M4PAK_SIMPLE 0x36 /**<Core packetizer SimpleDraft (RFC xxxx)*/ -#define M4DEPAK_SIMPLE 0x37 /**<Core de-packetizer SimpleDraft (RFC xxxx)*/ -#define M4PAK_3016_VIDEO 0x38 /**<Core packetizer RFC3016 video*/ -#define M4DEPAK_3016_VIDEO 0x39 /**<Core de-packetizer RFC3016 video*/ -#define M4PAK_3016_AUDIO 0x3A /**<Core packetizer RFC3016 audio (LATM)*/ -#define M4DEPAK_3016_AUDIO 0x3B /**<Core de-packetizer RFC3016 audio (LATM)*/ -#define M4DEPAK_H264 0x3C /**<Core de-packetizer H264*/ -#define M4DEPAK_REALV 0x3D /**<Core de-packetizer Real Video */ -#define M4DEPAK_REALA 0x3E /**<Core de-packetizer Real Audio */ -#define M4RDT_READER 0x3F /**<Core RDT receiver*/ -#define M4TCP_DMUX 0x50 /**<Core TCP demux*/ -#define M4IOD_PARSER 0x51 /**<Core IOD parser*/ -#define M4OSA_FILE_COMMON 0x61 /**<OSAL file common*/ -#define M4OSA_FILE_WRITER 0x62 /**<OSAL file writer*/ -#define M4OSA_FILE_READER 0x63 /**<OSAL file reader*/ -#define M4OSA_FILE_EXTRA 0x64 /**<OSAL file extra*/ -#define M4OSA_DIRECTORY 0x65 /**<OSAL directory*/ -#define M4OSA_SOCKET 0x71 /**<OSAL socket (both reader and writer)*/ -#define M4OSA_THREAD 0x81 /**<OSAL thread*/ -#define M4OSA_MUTEX 0x82 /**<OSAL mutex*/ -#define M4OSA_SEMAPHORE 0x83 /**<OSAL semaphore*/ -#define M4OSA_CLOCK 0x84 /**<OSAL clock*/ -#define M4OSA_MEMORY 0x91 /**<OSAL memory*/ -#define M4CALL_BACK 0xA1 /**<Call Back error*/ -#define M4OSA_URI 0xB1 /**<OSAL URI handler*/ -#define M4OSA_STRING 0xB2 /**<OSAL string*/ -#define M4SYS_CMAPI 0xB3 /**<SYSTEM Common Medi API*/ -#define M4OSA_CHARSTAR 0xB4 /**<OSAL CharStar*/ -#define M4REACTOR 0xC1 /**<Core reactor*/ -#define M4TEST 0xD1 /**<Test component*/ -#define M4STACK 0xE1 /**< Core ID of the integrated stack*/ -#define M4STACK_REAL 0xE2 /**<Core ID of the Real integrated stack */ -#define M4TOOL_LBVT_PARAM 0xF1 /**<LB_VT config file manager*/ -#define M4TOOL_LINK_LIST 0xF2 /**<Tool linked list*/ -#define M4TOOL_BASE64 0xF3 /**<Core base64 encoder/decoder*/ - - - -/* Definition of common error codes */ -/** there is no error*/ -#define M4NO_ERROR 0x00000000 - -/** At least one parameter is NULL*/ -#define M4ERR_PARAMETER M4OSA_ERR_CREATE(M4_ERR,M4_COMMON,0x000001) -/** This function cannot be called now*/ -#define M4ERR_STATE M4OSA_ERR_CREATE(M4_ERR,M4_COMMON,0x000002) -/** There is no more memory available*/ -#define M4ERR_ALLOC M4OSA_ERR_CREATE(M4_ERR,M4_COMMON,0x000003) -/** Provided context is not a valid one*/ -#define M4ERR_BAD_CONTEXT M4OSA_ERR_CREATE(M4_ERR,M4_COMMON,0x000004) -#define M4ERR_CONTEXT_FAILED M4OSA_ERR_CREATE(M4_ERR,M4_COMMON,0x000005) -#define M4ERR_BAD_STREAM_ID M4OSA_ERR_CREATE(M4_ERR,M4_COMMON,0x000006) -/** The optionID is not a valid one*/ -#define M4ERR_BAD_OPTION_ID M4OSA_ERR_CREATE(M4_ERR,M4_COMMON,0x000007) -/** This option is a write only one*/ -#define M4ERR_WRITE_ONLY M4OSA_ERR_CREATE(M4_ERR,M4_COMMON,0x000008) -/** This option is a read only one*/ -#define M4ERR_READ_ONLY M4OSA_ERR_CREATE(M4_ERR,M4_COMMON,0x000009) -/** This function is not supported yet*/ -#define M4ERR_NOT_IMPLEMENTED M4OSA_ERR_CREATE(M4_ERR,M4_COMMON,0x00000A) - -#define M4ERR_UNSUPPORTED_MEDIA_TYPE M4OSA_ERR_CREATE(M4_ERR, M4_COMMON, 0x00000B) - -#define M4WAR_NO_DATA_YET M4OSA_ERR_CREATE(M4_WAR,M4_COMMON,0x000001) -#define M4WAR_NO_MORE_STREAM M4OSA_ERR_CREATE(M4_WAR,M4_COMMON,0x000002) -#define M4WAR_INVALID_TIME M4OSA_ERR_CREATE(M4_WAR,M4_COMMON,0x000003) -#define M4WAR_NO_MORE_AU M4OSA_ERR_CREATE(M4_WAR,M4_COMMON,0x000004) -#define M4WAR_TIME_OUT M4OSA_ERR_CREATE(M4_WAR,M4_COMMON,0x000005) -/** The buffer is full*/ -#define M4WAR_BUFFER_FULL M4OSA_ERR_CREATE(M4_WAR,M4_COMMON,0x000006) -/* The server asks for a redirection */ -#define M4WAR_REDIRECT M4OSA_ERR_CREATE(M4_WAR,M4_COMMON,0x000007) -#define M4WAR_TOO_MUCH_STREAMS M4OSA_ERR_CREATE(M4_WAR,M4_COMMON,0x000008) -/* SF Codec detected INFO_FORMAT_CHANGE during decode */ -#define M4WAR_INFO_FORMAT_CHANGE M4OSA_ERR_CREATE(M4_WAR, M4_COMMON, 0x000009) - -#endif /*M4OSA_ERROR_H*/ - diff --git a/libvideoeditor/osal/inc/M4OSA_Export.h b/libvideoeditor/osal/inc/M4OSA_Export.h deleted file mode 100755 index b7a6e81..0000000 --- a/libvideoeditor/osal/inc/M4OSA_Export.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * 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. - */ -/** - ************************************************************************ - * @file M4OSA_Export.h - * @brief Data access export types for Android - * @note This file defines types which must be - * used to import or export any function. - ************************************************************************ -*/ - -#ifndef M4OSA_EXPORT_H -#define M4OSA_EXPORT_H - -#ifdef __cplusplus -extern "C" { -#endif /*__cplusplus*/ - -/************************************/ -/* OSAL EXPORTS */ -/************************************/ - -#define M4OSAL_CHARSTAR_EXPORT_TYPE /**< OSAL CHAR_STAR */ -#define M4OSAL_CLOCK_EXPORT_TYPE /**< OSAL CLOCK */ -#define M4OSAL_DATE_EXPORT_TYPE /**< OSAL DATE */ -#define M4OSAL_FILE_EXPORT_TYPE /**< OSAL FILE */ -#define M4OSAL_REALTIME_EXPORT_TYPE /**< OSAL REAL TIME */ -#define M4OSAL_SOCKET_EXPORT_TYPE /**< SOCKET */ -#define M4OSAL_STRING_EXPORT_TYPE /**< OSAL STRING */ -#define M4OSAL_URI_EXPORT_TYPE /**< OSAL URI */ -#define M4OSAL_MEMORY_EXPORT_TYPE /**< OSAL MEMORY */ -#define M4OSAL_TRACE_EXPORT_TYPE /**< OSAL TRACE */ -#define M4OSAL_TOOL_TIMER_EXPORT_TYPE /**< OSAL TOOL TIMER */ -#define M4OSAL_SYSTEM_CM_EXPORT_TYPE /**< SYSTEM COMMON API */ -#define M4OSAL_LINKED_LIST_EXPORT_TYPE /**< TOOL LINKED LIST */ -#define M4OSAL_MEMORY_MANAGER_EXPORT_TYPE /**< MEMORY MANAGER */ -#define M4OSAL_TRACE_MANAGER_EXPORT_TYPE /**< TOOL TRACE MANAGER */ -#define M4VPS_EXPORT_TYPE /**< VPS API */ -#define M4AP_EXPORT_TYPE /**< AUDIO PRESENTERS */ -#define M4VP_EXPORT_TYPE /**< VIDEO PRESENTERS */ -#define M4CB_EXPORT_TYPE /**< Call back */ - -#ifdef __cplusplus -} -#endif /*__cplusplus*/ - -#endif /*M4OSA_EXPORT_H*/ - diff --git a/libvideoeditor/osal/inc/M4OSA_FileCommon.h b/libvideoeditor/osal/inc/M4OSA_FileCommon.h deleted file mode 100755 index f2afb8c..0000000 --- a/libvideoeditor/osal/inc/M4OSA_FileCommon.h +++ /dev/null @@ -1,118 +0,0 @@ -/* - * 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. - */ -/** - ************************************************************************ - * @file M4OSA_FileCommon.h - * @ingroup OSAL - * @brief File common - * @note This file declares functions and types used by both the file - * writer and file reader. - ************************************************************************ -*/ - - -#ifndef M4OSA_FILECOMMON_H -#define M4OSA_FILECOMMON_H - -#include "M4OSA_Types.h" -#include "M4OSA_Time.h" -#include "M4OSA_Error.h" -#include "M4OSA_OptionID.h" - - -typedef M4OSA_Int32 M4OSA_FilePosition; - -/** This enum defines the application mode access. - * ie, the application uses a file descriptor to read or to write or - * both to read and write at the same time. - * This structure is used for MM project only. It enables to read and write to a file - * with one descriptor. - */ -typedef enum -{ - M4OSA_kDescNoneAccess = 0x00, - M4OSA_kDescReadAccess = 0x01, /** The Descriptor reads only from the file */ - M4OSA_kDescWriteAccess = 0x02, /** The Descriptor writes only from the file*/ - M4OSA_kDescRWAccess = 0x03 /** The Descriptor reads and writes from/in the file*/ -} M4OSA_DescrModeAccess; - - -/** This enum defines the file mode access. Both text mode as binary mode - cannot be set together.*/ -typedef enum -{ - /** The file must be accessed in read only mode*/ - M4OSA_kFileRead = 0x01, - /** The file must be accessed in write only mode*/ - M4OSA_kFileWrite = 0x02, - /** The file must be accessed in append mode (An existing file must - be available to append data)*/ - M4OSA_kFileAppend = 0x04, - /** If the file does not exist, it will be created*/ - M4OSA_kFileCreate = 0x08, - /** Data are processed as binary one, there is no data management*/ - M4OSA_kFileIsTextMode = 0x10 -} M4OSA_FileModeAccess; - - -/** This type is used to store a date.*/ -typedef struct -{ - /** Time scale (tick number per second)*/ - M4OSA_UInt32 timeScale; - /** Date expressed in the time scale*/ - M4OSA_Time time; - /** Year of the absolute time (1900, 1970 or 2000)*/ - M4OSA_UInt32 referenceYear; -} M4OSA_Date; - - -/** This strucure defines the file attributes*/ -typedef struct -{ - /** The file mode access*/ - M4OSA_FileModeAccess modeAccess; - /** The creation date*/ - M4OSA_Date creationDate; - /** The last modification date*/ - M4OSA_Date modifiedDate; - /** The last access date (read)*/ - M4OSA_Date lastAccessDate; -} M4OSA_FileAttribute; - - - -/** This enum defines the seek behavior*/ -typedef enum M4OSA_FileSeekAccessMode -{ - /** Relative to the beginning of the file*/ - M4OSA_kFileSeekBeginning = 0x01, - /** Relative to the end of the file*/ - M4OSA_kFileSeekEnd = 0x02, - /** Relative to the current file position*/ - M4OSA_kFileSeekCurrent = 0x03 -} M4OSA_FileSeekAccessMode; - - -/* Error codes */ -#define M4ERR_FILE_NOT_FOUND M4OSA_ERR_CREATE(M4_ERR, M4OSA_FILE_COMMON, 0x000001) -#define M4ERR_FILE_LOCKED M4OSA_ERR_CREATE(M4_ERR, M4OSA_FILE_COMMON, 0x000002) -#define M4ERR_FILE_BAD_MODE_ACCESS M4OSA_ERR_CREATE(M4_ERR, M4OSA_FILE_COMMON, 0x000003) -#define M4ERR_FILE_INVALID_POSITION M4OSA_ERR_CREATE(M4_ERR, M4OSA_FILE_COMMON, 0x000004) - - -#endif /*M4OSA_FILECOMMON_H*/ - diff --git a/libvideoeditor/osal/inc/M4OSA_FileCommon_priv.h b/libvideoeditor/osal/inc/M4OSA_FileCommon_priv.h deleted file mode 100755 index 1eba456..0000000 --- a/libvideoeditor/osal/inc/M4OSA_FileCommon_priv.h +++ /dev/null @@ -1,106 +0,0 @@ -/* - * 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. - */ -/** - ************************************************************************ - * @file M4OSA_FileCommon_priv.h - * @ingroup OSAL - * @brief File common private for Android - * @note This file declares functions and types used by both the file - * writer and file reader. - ************************************************************************ -*/ - -#ifndef M4OSA_FILECOMMON_PRIV_H -#define M4OSA_FILECOMMON_PRIV_H - - -#include "M4OSA_FileCommon.h" -#include <stdio.h> - -#define M4OSA_isAccessModeActived(compound_mode_access,elementary_mode_access)\ - (((compound_mode_access)&(elementary_mode_access))? 1:0) - - -typedef enum M4OSA_LastSeek -{ - SeekNone, - SeekRead, - SeekWrite -} M4OSA_LastSeek; - -/** This structure defines the file context*/ -typedef struct { - M4OSA_UInt32 coreID_read; - M4OSA_UInt32 coreID_write; - FILE* file_desc; - /** The name of the URL */ - M4OSA_Char* url_name; - /** The name of the file */ - M4OSA_Char* file_name; - /** The size in bytes of the file */ - M4OSA_FilePosition file_size; - /** The file mode access used to open the file */ - M4OSA_FileModeAccess access_mode; - M4OSA_LastSeek current_seek; - M4OSA_FilePosition read_position; - M4OSA_FilePosition write_position; - M4OSA_Bool b_is_end_of_file; - -#ifdef M4OSA_FILE_BLOCK_WITH_SEMAPHORE - M4OSA_Context semaphore_context; -#endif /* M4OSA_FILE_BLOCK_WITH_SEMAPHORE */ - - - /* These two variables were added to manage case where a file - * is opened in read and write mode with one descriptor */ - M4OSA_DescrModeAccess m_DescrModeAccess; - M4OSA_UInt32 m_uiLockMode; - - -} M4OSA_FileContext; - - - -M4OSA_ERR M4OSA_fileCommonOpen(M4OSA_UInt16 core_id, - M4OSA_Context* context, - M4OSA_Char* URL, - M4OSA_FileModeAccess fileModeAccess); - -M4OSA_ERR M4OSA_fileCommonClose(M4OSA_UInt16 core_id, - M4OSA_Context context); - -M4OSA_ERR M4OSA_fileCommonGetAttribute(M4OSA_Context context, - M4OSA_FileAttribute* attribute); - -M4OSA_ERR M4OSA_fileCommonGetURL(M4OSA_Context context, - M4OSA_Char** url); - -M4OSA_ERR M4OSA_fileCommonGetFilename(M4OSA_Char* url, - M4OSA_Char** filename); - -M4OSA_ERR M4OSA_fileCommonSeek(M4OSA_Context context, - M4OSA_FileSeekAccessMode seekMode, - M4OSA_FilePosition* position); - -#ifdef UTF_CONVERSION -M4OSA_ERR M4OSA_ToUTF8_OSAL (M4OSA_Void *pBufferIn, - M4OSA_UInt8 *pBufferOut, - M4OSA_UInt32 *bufferOutSize); -#endif /*UTF_CONVERSION*/ - - -#endif /*M4OSA_FILECOMMON_PRIV_H*/ - diff --git a/libvideoeditor/osal/inc/M4OSA_FileReader.h b/libvideoeditor/osal/inc/M4OSA_FileReader.h deleted file mode 100755 index c22756d..0000000 --- a/libvideoeditor/osal/inc/M4OSA_FileReader.h +++ /dev/null @@ -1,131 +0,0 @@ -/* - * 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. - */ -/** - ************************************************************************ - * @file M4OSA_FileReader.h - * @ingroup OSAL - * @brief File reader - * @note This file declares functions and types to read a file. - ************************************************************************ -*/ - - -#ifndef M4OSA_FILEREADER_H -#define M4OSA_FILEREADER_H - - -#include "M4OSA_Types.h" -#include "M4OSA_Error.h" -#include "M4OSA_FileCommon.h" -#include "M4OSA_Memory.h" - - - -/** This enum defines the option ID to be used in M4OSA_FileReadGetOption() - and M4OSA_FileReadSetOption()*/ -typedef enum M4OSA_FileReadOptionID -{ - /** Get the file size (M4OSA_fpos*)*/ - M4OSA_kFileReadGetFileSize - = M4OSA_OPTION_ID_CREATE(M4_READ, M4OSA_FILE_READER, 0x01), - - /** Get the file attributes (M4OSA_FileAttribute*)*/ - M4OSA_kFileReadGetFileAttribute - = M4OSA_OPTION_ID_CREATE(M4_READ, M4OSA_FILE_READER, 0x02), - - /** Get the file URL, provided by the M4OSA_FileReadOpen (M4OSA_Char*)*/ - M4OSA_kFileReadGetURL - = M4OSA_OPTION_ID_CREATE(M4_READ, M4OSA_FILE_READER, 0x03), - - /** Get the file position (M4OSA_fpos*)*/ - M4OSA_kFileReadGetFilePosition - = M4OSA_OPTION_ID_CREATE(M4_READ, M4OSA_FILE_READER, 0x04), - - /** Check end of file: TRUE if the EOF has been reached, FALSE else - (M4OSA_Bool*)*/ - M4OSA_kFileReadIsEOF - = M4OSA_OPTION_ID_CREATE(M4_READ, M4OSA_FILE_READER, 0x05), - - /** Check lock of file */ - M4OSA_kFileReadLockMode - = M4OSA_OPTION_ID_CREATE(M4_READWRITE, M4OSA_FILE_READER, 0x06) - -} M4OSA_FileReadOptionID; - - - - - -/** This structure stores the set of the function pointer to access to a - file in read mode*/ -typedef struct -{ - M4OSA_ERR (*openRead) (M4OSA_Context* context, - M4OSA_Void* fileDescriptor, - M4OSA_UInt32 fileModeAccess); - - M4OSA_ERR (*readData) (M4OSA_Context context, - M4OSA_MemAddr8 buffer, - M4OSA_UInt32* size); - - M4OSA_ERR (*seek) (M4OSA_Context context, - M4OSA_FileSeekAccessMode seekMode, - M4OSA_FilePosition* position); - - M4OSA_ERR (*closeRead) (M4OSA_Context context); - - M4OSA_ERR (*setOption) (M4OSA_Context context, - M4OSA_FileReadOptionID optionID, - M4OSA_DataOption optionValue); - - M4OSA_ERR (*getOption) (M4OSA_Context context, - M4OSA_FileReadOptionID optionID, - M4OSA_DataOption *optionValue); -} M4OSA_FileReadPointer; - -#ifdef __cplusplus -extern "C" -{ -#endif - -M4OSAL_FILE_EXPORT_TYPE M4OSA_ERR M4OSA_fileReadOpen (M4OSA_Context* context, - M4OSA_Void* fileDescriptor, - M4OSA_UInt32 fileModeAccess); - -M4OSAL_FILE_EXPORT_TYPE M4OSA_ERR M4OSA_fileReadData (M4OSA_Context context, - M4OSA_MemAddr8 buffer, - M4OSA_UInt32* size); - -M4OSAL_FILE_EXPORT_TYPE M4OSA_ERR M4OSA_fileReadSeek (M4OSA_Context context, - M4OSA_FileSeekAccessMode seekMode, - M4OSA_FilePosition* position); - -M4OSAL_FILE_EXPORT_TYPE M4OSA_ERR M4OSA_fileReadClose (M4OSA_Context context); - -M4OSAL_FILE_EXPORT_TYPE M4OSA_ERR M4OSA_fileReadGetOption (M4OSA_Context context, - M4OSA_FileReadOptionID optionID, - M4OSA_DataOption *optionValue); - -M4OSAL_FILE_EXPORT_TYPE M4OSA_ERR M4OSA_fileReadSetOption (M4OSA_Context context, - M4OSA_FileReadOptionID optionID, - M4OSA_DataOption optionValue); - -#ifdef __cplusplus -} -#endif - -#endif /*M4OSA_FILEREADER_H*/ - diff --git a/libvideoeditor/osal/inc/M4OSA_FileReader_priv.h b/libvideoeditor/osal/inc/M4OSA_FileReader_priv.h deleted file mode 100755 index 327b086..0000000 --- a/libvideoeditor/osal/inc/M4OSA_FileReader_priv.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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. - */ -/** - ************************************************************************ - * @file M4OSA_FileReader_priv.h - * @ingroup OSAL - * @brief File reader private for Android - * @note - ************************************************************************ -*/ - -#ifndef M4OSA_FILEREADER_PRIV_H -#define M4OSA_FILEREADER_PRIV_H - - -/** Those define enable/disable option ID*/ - -#define M4OSA_OPTIONID_FILE_READ_GET_FILE_SIZE M4OSA_TRUE -#define M4OSA_OPTIONID_FILE_READ_GET_FILE_ATTRIBUTE M4OSA_TRUE -#define M4OSA_OPTIONID_FILE_READ_GET_URL M4OSA_TRUE -#define M4OSA_OPTIONID_FILE_READ_GET_FILE_POSITION M4OSA_TRUE -#define M4OSA_OPTIONID_FILE_READ_IS_EOF M4OSA_TRUE - -#endif /*M4OSA_FILEREADER_PRIV_H*/ - diff --git a/libvideoeditor/osal/inc/M4OSA_FileWriter.h b/libvideoeditor/osal/inc/M4OSA_FileWriter.h deleted file mode 100755 index 9a11331..0000000 --- a/libvideoeditor/osal/inc/M4OSA_FileWriter.h +++ /dev/null @@ -1,135 +0,0 @@ -/* - * 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. - */ -/** - ************************************************************************ - * @file M4OSA_FileWriter.h - * @ingroup OSAL - * @brief File writer - * @note This file declares functions and types to write in a file. - ************************************************************************ -*/ - - -#ifndef M4OSA_FILEWRITER_H -#define M4OSA_FILEWRITER_H - -#include "M4OSA_Types.h" -#include "M4OSA_Error.h" -#include "M4OSA_FileCommon.h" -#include "M4OSA_Memory.h" - - -/** This enum defines the option ID to be used in M4OSA_FileWriteGetOption() -and M4OSA_FileWriteSetOption()*/ -typedef enum -{ - /** Get the file URL, provided by the M4OSA_FileWriteOpen (M4OSA_Char*)*/ - M4OSA_kFileWriteGetURL - = M4OSA_OPTION_ID_CREATE(M4_READ, M4OSA_FILE_WRITER, 0x01), - - /** Get the file attributes (M4OSA_FileAttribute*)*/ - M4OSA_kFileWriteGetAttribute - = M4OSA_OPTION_ID_CREATE(M4_READ, M4OSA_FILE_WRITER, 0x02), - - /** Get the reader context for read & write file. (M4OSA_Context*)*/ - M4OSA_kFileWriteGetReaderContext - = M4OSA_OPTION_ID_CREATE(M4_READ, M4OSA_FILE_WRITER, 0x03), - - M4OSA_kFileWriteGetFilePosition - = M4OSA_OPTION_ID_CREATE(M4_READ, M4OSA_FILE_WRITER, 0x04), - - M4OSA_kFileWriteGetFileSize - = M4OSA_OPTION_ID_CREATE(M4_READ, M4OSA_FILE_WRITER, 0x05), - - - M4OSA_kFileWriteLockMode - = M4OSA_OPTION_ID_CREATE(M4_READWRITE, M4OSA_FILE_WRITER, 0x06), - - - /** Check lock of file */ - M4OSA_kFileWriteDescMode - = M4OSA_OPTION_ID_CREATE(M4_READWRITE, M4OSA_FILE_WRITER, 0x07) -} M4OSA_FileWriteOptionID; - - -/** This structure stores the set of the function pointer to access to a file - in read mode*/ -typedef struct -{ - M4OSA_ERR (*openWrite) (M4OSA_Context* context, - M4OSA_Void* fileDescriptor, - M4OSA_UInt32 fileModeAccess); - - M4OSA_ERR (*writeData) (M4OSA_Context context, - M4OSA_MemAddr8 data, - M4OSA_UInt32 size); - - M4OSA_ERR (*seek) (M4OSA_Context context, - M4OSA_FileSeekAccessMode seekMode, - M4OSA_FilePosition* position); - - M4OSA_ERR (*Flush) (M4OSA_Context context); - M4OSA_ERR (*closeWrite) (M4OSA_Context context); - M4OSA_ERR (*setOption) (M4OSA_Context context, - M4OSA_OptionID optionID, - M4OSA_DataOption optionValue); - - M4OSA_ERR (*getOption) (M4OSA_Context context, - M4OSA_OptionID optionID, - M4OSA_DataOption* optionValue); -} M4OSA_FileWriterPointer; - -#ifdef __cplusplus -extern "C" -{ -#endif - -M4OSAL_FILE_EXPORT_TYPE M4OSA_ERR M4OSA_fileWriteOpen (M4OSA_Context* context, - M4OSA_Void* fileDescriptor, - M4OSA_UInt32 fileModeAccess); - -M4OSAL_FILE_EXPORT_TYPE M4OSA_ERR M4OSA_fileWriteData (M4OSA_Context context, - M4OSA_MemAddr8 data, - M4OSA_UInt32 size); - -/* Pierre Lebeaupin 2008/04/29: WARNING! the feature of file*Seek which returns -the position in the file (from the beginning) after the seek in the "position" -pointer has been found to be unreliably (or sometimes not at all) implemented -in some OSALs, so relying on it is strongly discouraged, unless you really want -to have a pizza evening. */ -M4OSAL_FILE_EXPORT_TYPE M4OSA_ERR M4OSA_fileWriteSeek (M4OSA_Context context, - M4OSA_FileSeekAccessMode seekMode, - M4OSA_FilePosition* position); - -M4OSAL_FILE_EXPORT_TYPE M4OSA_ERR M4OSA_fileWriteClose (M4OSA_Context context); - -M4OSAL_FILE_EXPORT_TYPE M4OSA_ERR M4OSA_fileWriteFlush (M4OSA_Context context); - -M4OSAL_FILE_EXPORT_TYPE M4OSA_ERR M4OSA_fileWriteGetOption (M4OSA_Context context, - M4OSA_OptionID optionID, - M4OSA_DataOption* optionValue); - -M4OSAL_FILE_EXPORT_TYPE M4OSA_ERR M4OSA_fileWriteSetOption (M4OSA_Context context, - M4OSA_OptionID optionID, - M4OSA_DataOption optionValue); - -#ifdef __cplusplus -} -#endif - - -#endif /*M4OSA_FILEWRITER_H*/ - diff --git a/libvideoeditor/osal/inc/M4OSA_FileWriter_priv.h b/libvideoeditor/osal/inc/M4OSA_FileWriter_priv.h deleted file mode 100755 index 9d972f4..0000000 --- a/libvideoeditor/osal/inc/M4OSA_FileWriter_priv.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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. - */ -/** - ************************************************************************ - * @file M4OSA_FileWriter_priv.h - * @ingroup OSAL - * @brief File writer private for Android -************************************************************************ -*/ - -#ifndef M4OSA_FILEWRITER_PRIV_H -#define M4OSA_FILEWRITER_PRIV_H - - -/** Those define enable/disable option ID*/ - -#define M4OSA_OPTIONID_FILE_WRITE_GET_FILE_SIZE M4OSA_TRUE -#define M4OSA_OPTIONID_FILE_WRITE_GET_FILE_ATTRIBUTE M4OSA_TRUE -#define M4OSA_OPTIONID_FILE_WRITE_GET_READER_CONTEXT M4OSA_TRUE -#define M4OSA_OPTIONID_FILE_WRITE_GET_FILE_POSITION M4OSA_TRUE -#define M4OSA_OPTIONID_FILE_WRITE_GET_URL M4OSA_TRUE - -#endif /*M4OSA_FILEWRITER_PRIV_H*/ - diff --git a/libvideoeditor/osal/inc/M4OSA_Memory.h b/libvideoeditor/osal/inc/M4OSA_Memory.h deleted file mode 100755 index a4d15cc..0000000 --- a/libvideoeditor/osal/inc/M4OSA_Memory.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * 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. - */ -/** - ************************************************************************ - * @file M4OSA_Memory.h - * @ingroup OSAL - * @brief Memory allocation - * @note This file defines function prototypes to allocate - * and free memory. - ************************************************************************ -*/ - -#ifndef M4OSA_MEMORY_H -#define M4OSA_MEMORY_H - - -#include "M4OSA_Types.h" -#include "M4OSA_Error.h" /*for M4OSA_CoreID definition*/ - -typedef M4OSA_Int32* M4OSA_MemAddr32; -typedef M4OSA_Int8* M4OSA_MemAddr8; - -#ifdef __cplusplus -extern "C" -{ -#endif - -M4OSAL_MEMORY_EXPORT_TYPE extern M4OSA_MemAddr32 M4OSA_32bitAlignedMalloc (M4OSA_UInt32 size, - M4OSA_CoreID coreID, - M4OSA_Char* string); - -M4OSAL_MEMORY_EXPORT_TYPE extern M4OSA_ERR M4OSA_randInit(void); - - -M4OSAL_MEMORY_EXPORT_TYPE extern M4OSA_ERR M4OSA_rand(M4OSA_Int32* out_value, - M4OSA_UInt32 max_value); - - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/libvideoeditor/osal/inc/M4OSA_Mutex.h b/libvideoeditor/osal/inc/M4OSA_Mutex.h deleted file mode 100755 index d496bdd..0000000 --- a/libvideoeditor/osal/inc/M4OSA_Mutex.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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. - */ -/** - ************************************************************************ - * @file M4OSA_Mutex.h - * @ingroup OSAL - * @brief mutex API - ************************************************************************ -*/ - - -#ifndef M4OSA_MUTEX_H -#define M4OSA_MUTEX_H - -#include "M4OSA_Types.h" -#include "M4OSA_Error.h" - - -#ifdef __cplusplus -extern "C" -{ - -#endif - -M4OSAL_REALTIME_EXPORT_TYPE M4OSA_ERR M4OSA_mutexOpen( M4OSA_Context* context ); - - -M4OSAL_REALTIME_EXPORT_TYPE M4OSA_ERR M4OSA_mutexLock( M4OSA_Context context, - M4OSA_UInt32 timeout ); - - -M4OSAL_REALTIME_EXPORT_TYPE M4OSA_ERR M4OSA_mutexUnlock( M4OSA_Context context ); - - -M4OSAL_REALTIME_EXPORT_TYPE M4OSA_ERR M4OSA_mutexClose( M4OSA_Context context ); - -#ifdef __cplusplus -} -#endif - - -#endif /*M4OSA_MUTEX_H*/ - diff --git a/libvideoeditor/osal/inc/M4OSA_OptionID.h b/libvideoeditor/osal/inc/M4OSA_OptionID.h deleted file mode 100755 index 61b9044..0000000 --- a/libvideoeditor/osal/inc/M4OSA_OptionID.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * 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. - */ -/** - ************************************************************************ - * @file M4OSA_OptionID.h - * @ingroup OSAL - * @brief Option ID macros - * @note This file defines macros to generate and analyze option ID. - * Option ID is used by M4YYY_ZZsetOption() and - * M4YYY_ZZgetOption() functions. - ************************************************************************ -*/ - -#ifndef M4OSA_OPTIONID_H -#define M4OSA_OPTIONID_H - - -#include "M4OSA_Types.h" - -/** M4OSA_OptionID is a 32 bits unsigned integer. -- Right access (2 bits): Some options may have read only, write only or read - and write access -- Core ID (14 bits): It is a unique ID for each core component -- SubOption ID (16 bits): To select which option in a specific core component -*/ -typedef M4OSA_UInt32 M4OSA_OptionID; -typedef void* M4OSA_DataOption; - -#define M4_READ 0x01 -#define M4_WRITE 0x02 -#define M4_READWRITE 0x03 - -/* Macro to process M4OSA_OptionID */ - -/** This macro creates an optionID given read/write access, - coreID and SubOptionID*/ -#define M4OSA_OPTION_ID_CREATE(right, coreID, errorID)\ - (M4OSA_Int32)((((((M4OSA_UInt32)right)&0x03)<<30))+((((M4OSA_UInt32)coreID)&0x003FFF)<<16)+(((M4OSA_UInt32)errorID)&0x00FFFF)) - -/** This macro splits an optionID into read/write access, - coreID and SubOptionID*/ -#define M4OSA_OPTION_ID_SPLIT(optionID, right, coreID, errorID)\ - { right=(M4OSA_UInt8)((optionID)>>30);\ - coreID=(M4OSA_UInt16)(((optionID)>>16)&0x00003FFF);\ - errorID=(M4OSA_UInt32)((optionID)&0x0000FFFF); } - -/** This macro returns 1 if the optionID is writable, 0 otherwise*/ -#define M4OSA_OPTION_ID_IS_WRITABLE(optionID) ((((optionID)>>30)&M4_WRITE)!=0) - -/** This macro returns 1 if the optionID is readable, 0 otherwise*/ -#define M4OSA_OPTION_ID_IS_READABLE(optionID) ((((optionID)>>30)&M4_READ)!=0) - -/** This macro returns 1 if the optionID has its core ID equal to 'coreID', 0 otherwise*/ -#define M4OSA_OPTION_ID_IS_COREID(optionID, coreID)\ - (((((optionID)>>16)&0x003FFF) == (coreID)) ? M4OSA_TRUE:M4OSA_FALSE) - - -#endif /*M4OSA_OPTIONID_H*/ - diff --git a/libvideoeditor/osal/inc/M4OSA_Semaphore.h b/libvideoeditor/osal/inc/M4OSA_Semaphore.h deleted file mode 100755 index 2630454..0000000 --- a/libvideoeditor/osal/inc/M4OSA_Semaphore.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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. - */ -/** - ************************************************************************ - * @file M4OSA_Semaphore.h - * @ingroup OSAL - * @brief semaphore API - ************************************************************************ -*/ - -#ifndef M4OSA_SEMAPHORE_H -#define M4OSA_SEMAPHORE_H - -#include "M4OSA_Types.h" -#include "M4OSA_Error.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -M4OSAL_REALTIME_EXPORT_TYPE M4OSA_ERR M4OSA_semaphoreOpen( M4OSA_Context* context, - M4OSA_UInt32 initialNumber ); - - -M4OSAL_REALTIME_EXPORT_TYPE M4OSA_ERR M4OSA_semaphorePost( M4OSA_Context context ); - - -M4OSAL_REALTIME_EXPORT_TYPE M4OSA_ERR M4OSA_semaphoreWait( M4OSA_Context context, - M4OSA_Int32 timeout ); - - -M4OSAL_REALTIME_EXPORT_TYPE M4OSA_ERR M4OSA_semaphoreClose( M4OSA_Context context ); - -#ifdef __cplusplus -} -#endif - - -#endif /*M4OSA_SEMAPHORE_H*/ - diff --git a/libvideoeditor/osal/inc/M4OSA_Thread.h b/libvideoeditor/osal/inc/M4OSA_Thread.h deleted file mode 100755 index ca96afb..0000000 --- a/libvideoeditor/osal/inc/M4OSA_Thread.h +++ /dev/null @@ -1,127 +0,0 @@ -/* - * 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. - */ -/** - ************************************************************************ - * @file M4OSA_Thread.h - * @ingroup OSAL - * @brief thread API - ************************************************************************ -*/ - - -#ifndef M4OSA_THREAD_H -#define M4OSA_THREAD_H - -#include "M4OSA_Types.h" -#include "M4OSA_Error.h" -#include "M4OSA_OptionID.h" - - -/* Definition of common error codes */ -#define M4ERR_THREAD_NOT_STARTED M4OSA_ERR_CREATE(M4_ERR,M4OSA_THREAD,0x000001) - - -typedef enum -{ - M4OSA_kThreadOpened = 0x100, - M4OSA_kThreadStarting = 0x200, - M4OSA_kThreadRunning = 0x300, - M4OSA_kThreadStopping = 0x400, - M4OSA_kThreadClosed = 0x500 -} M4OSA_ThreadState; - - - -typedef enum -{ - M4OSA_kThreadHighestPriority = 0x000, - M4OSA_kThreadHighPriority = 0x100, - M4OSA_kThreadNormalPriority = 0x200, - M4OSA_kThreadLowPriority = 0x300, - M4OSA_kThreadLowestPriority = 0x400 -} M4OSA_ThreadPriorityLevel; - - - -typedef enum -{ - M4OSA_ThreadStarted - = M4OSA_OPTION_ID_CREATE(M4_READ|M4_WRITE, M4OSA_THREAD, 0x01), - - M4OSA_ThreadStopped - = M4OSA_OPTION_ID_CREATE(M4_READ|M4_WRITE, M4OSA_THREAD, 0x02), - - M4OSA_ThreadPriority - = M4OSA_OPTION_ID_CREATE(M4_READ|M4_WRITE, M4OSA_THREAD, 0x03), - - M4OSA_ThreadName - = M4OSA_OPTION_ID_CREATE(M4_READ|M4_WRITE, M4OSA_THREAD, 0x04), - - M4OSA_ThreadStackSize - = M4OSA_OPTION_ID_CREATE(M4_READ|M4_WRITE, M4OSA_THREAD, 0x05), - - M4OSA_ThreadUserData - = M4OSA_OPTION_ID_CREATE(M4_READ|M4_WRITE, M4OSA_THREAD, 0x06) - -} M4OSA_ThreadOptionID; - - - -typedef M4OSA_ERR (*M4OSA_ThreadDoIt)(M4OSA_Void*); -typedef M4OSA_Void (*M4OSA_ThreadCallBack)(M4OSA_Context, M4OSA_Void*); - -#ifdef __cplusplus -extern "C" -{ -#endif - -M4OSAL_REALTIME_EXPORT_TYPE M4OSA_ERR M4OSA_threadSyncOpen( M4OSA_Context* context, - M4OSA_ThreadDoIt func ); - - -M4OSAL_REALTIME_EXPORT_TYPE M4OSA_ERR M4OSA_threadSyncStart( M4OSA_Context context, - M4OSA_Void* param ); - - -M4OSAL_REALTIME_EXPORT_TYPE M4OSA_ERR M4OSA_threadSyncStop( M4OSA_Context context ); - - -M4OSAL_REALTIME_EXPORT_TYPE M4OSA_ERR M4OSA_threadSyncClose( M4OSA_Context context ); - - -M4OSAL_REALTIME_EXPORT_TYPE M4OSA_ERR M4OSA_threadSyncGetState( M4OSA_Context context, - M4OSA_ThreadState* state ); - - -M4OSAL_REALTIME_EXPORT_TYPE M4OSA_ERR M4OSA_threadSleep( M4OSA_UInt32 time ); - - -M4OSAL_REALTIME_EXPORT_TYPE M4OSA_ERR M4OSA_threadSyncSetOption(M4OSA_Context context, - M4OSA_ThreadOptionID option, - M4OSA_DataOption value ); - - -M4OSAL_REALTIME_EXPORT_TYPE M4OSA_ERR M4OSA_threadSyncGetOption(M4OSA_Context context, - M4OSA_ThreadOptionID option, - M4OSA_DataOption* value ); - -#ifdef __cplusplus -} -#endif - - -#endif /*M4OSA_THREAD_H*/ - diff --git a/libvideoeditor/osal/inc/M4OSA_Thread_priv.h b/libvideoeditor/osal/inc/M4OSA_Thread_priv.h deleted file mode 100755 index b424b05..0000000 --- a/libvideoeditor/osal/inc/M4OSA_Thread_priv.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * 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. - */ -/** - ************************************************************************ - * @file M4OSA_Thread_priv.h - * @ingroup OSAL - * @brief Thread private for Android - * @note - ************************************************************************ -*/ - -#ifndef M4OSA_THREAD_PRIV_H -#define M4OSA_THREAD_PRIV_H - - -#include "M4OSA_Types.h" - - -/* Context for the thread */ -typedef struct M4OSA_ThreadContext { - M4OSA_UInt32 coreID; /* thread context identifiant */ - pthread_t threadID; /* thread identifier. */ - M4OSA_Char* name; /* thread name */ - M4OSA_UInt32 stackSize; /* thread stackSize in bytes */ - M4OSA_ThreadDoIt func; /* thread function */ - M4OSA_Void* param; /* thread parameter */ -/* - M4OSA_Void* userData; / * thread user data * / -*/ - M4OSA_ThreadState state; /* thread automaton state */ - M4OSA_Context stateMutex; /* mutex for thread state management */ -/* - M4OSA_ThreadCallBack startCallBack; / * starting thread call back * / - M4OSA_ThreadCallBack stopCallBack; / * stopping thread call back * / -*/ - M4OSA_Context semStartStop; /* semaphore for start and stop do_it */ - M4OSA_ThreadPriorityLevel priority; /* thread priority level */ -} M4OSA_ThreadContext ; - - -/** Those define enable/disable option ID*/ -#define M4OSA_OPTIONID_THREAD_STARTED M4OSA_TRUE -#define M4OSA_OPTIONID_THREAD_STOPPED M4OSA_TRUE -#define M4OSA_OPTIONID_THREAD_PRIORITY M4OSA_TRUE -#define M4OSA_OPTIONID_THREAD_STACK_SIZE M4OSA_TRUE -#define M4OSA_OPTIONID_THREAD_NAME M4OSA_TRUE -#define M4OSA_OPTIONID_THREAD_USER_DATA M4OSA_TRUE - -#endif /*M4OSA_THREAD_PRIV_H*/ - diff --git a/libvideoeditor/osal/inc/M4OSA_Time.h b/libvideoeditor/osal/inc/M4OSA_Time.h deleted file mode 100755 index 21f25ed..0000000 --- a/libvideoeditor/osal/inc/M4OSA_Time.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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. - */ -/** - ************************************************************************ - * @file M4OSA_Time.h - * @ingroup OSAL - * @brief Time macros - * @note This file defines time type and associated macros which must - * be used to manipulate time. - ************************************************************************ -*/ - -/* $Id: M4OSA_Time.h,v 1.2 2007/01/05 13:12:22 thenault Exp $ */ - -#ifndef M4OSA_TIME_H -#define M4OSA_TIME_H - - -#include "M4OSA_Types.h" - - -typedef signed long long M4OSA_Time; - - -/** This macro sets the unknown time value */ - -#define M4OSA_TIME_UNKNOWN 0x80000000 - -/** This macro converts a time with a time scale to millisecond. - The result is a M4OSA_Double*/ -#define M4OSA_TIME_TO_MS(result, time, timescale)\ - { result = (1000*(M4OSA_Double)time)/((M4OSA_Double)timescale); } - -#endif /*M4OSA_TIME_H*/ - diff --git a/libvideoeditor/osal/inc/M4OSA_Types.h b/libvideoeditor/osal/inc/M4OSA_Types.h deleted file mode 100755 index ee258a0..0000000 --- a/libvideoeditor/osal/inc/M4OSA_Types.h +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 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. - */ -/** - ************************************************************************ - * @file M4OSA_Types.h - * @ingroup OSAL - * @brief Abstraction types for Android - * @note This file redefines basic types which must be - * used to declare any variable. -************************************************************************ -*/ - - -#ifndef M4OSA_TYPES_H -#define M4OSA_TYPES_H - -#include <ctype.h> -#include <stdio.h> -#include <string.h> -#include "M4OSA_Export.h" -#ifdef __cplusplus -extern "C" { -#endif - - -typedef int8_t M4OSA_Bool; -typedef uint8_t M4OSA_UInt8; -typedef int8_t M4OSA_Int8; -typedef uint16_t M4OSA_UInt16; -typedef int16_t M4OSA_Int16; -typedef uint32_t M4OSA_UInt32; -typedef int32_t M4OSA_Int32; - -typedef signed char M4OSA_Char; -typedef unsigned char M4OSA_UChar; - -typedef double M4OSA_Double; -typedef float M4OSA_Float; - -typedef unsigned char M4OSA_WChar; - -typedef void M4OSA_Void; - -/* Min & max definitions*/ -#define M4OSA_UINT8_MIN 0 -#define M4OSA_UINT8_MAX 255 - -#define M4OSA_UINT16_MIN 0 -#define M4OSA_UINT16_MAX 65535 - -#define M4OSA_UINT32_MIN 0 -#define M4OSA_UINT32_MAX 0xFFFFFFFF - -#define M4OSA_INT8_MIN -128 -#define M4OSA_INT8_MAX 127 - -#define M4OSA_INT16_MIN -32768 -#define M4OSA_INT16_MAX 32767 - -#define M4OSA_INT32_MIN (-0x7FFFFFFF-1) -#define M4OSA_INT32_MAX 0x7FFFFFFF - -#define M4OSA_CHAR_MIN -128 -#define M4OSA_CHAR_MAX 127 - -#define M4OSA_UCHAR_MIN 0 -#define M4OSA_UCHAR_MAX 255 - -#define M4OSA_NULL 0x00 -#define M4OSA_TRUE 0x01 -#define M4OSA_FALSE 0x00 -#define M4OSA_WAIT_FOREVER 0xffffffff - -#define M4OSA_CONST const -#define M4OSA_INLINE inline - -/* Rollover offset of the clock */ -/* This value must be the one of M4OSA_clockGetTime */ -#define M4OSA_CLOCK_ROLLOVER M4OSA_INT32_MAX - -typedef void* M4OSA_Context; - -/** It is a unique ID for each core component*/ -typedef M4OSA_UInt16 M4OSA_CoreID; - -#ifdef __cplusplus -} -#endif - -#endif /*M4OSA_TYPES_H*/ - |