1 /* 2 * Copyright (C) 2011 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 /** 17 ************************************************************************* 18 * @file M4_Utils.h 19 * @brief Utilities 20 * @note This file defines utility macros 21 ************************************************************************* 22 */ 23 #ifndef __M4_UTILS_H__ 24 #define __M4_UTILS_H__ 25 26 #ifdef __cplusplus 27 extern "C" { 28 #endif 29 30 /* M4_MediaTime definition 31 This type is used internally by some shell components */ 32 #include "M4OSA_Types.h" 33 typedef M4OSA_Double M4_MediaTime; 34 35 /* GET_MEMORY32 macro definition 36 This macro is used by the 3GP reader*/ 37 #ifdef __BIG_ENDIAN 38 #define GET_MEMORY32(x) (x) 39 #else 40 #define GET_MEMORY32(x) ( (((x)&0xff)<<24) | (((x)&0xff00)<<8) |\ 41 (((x)&0xff0000)>>8) | (((x)&0xff000000)>>24) ) 42 #endif /*__BIG_ENDIAN*/ 43 44 #ifdef __cplusplus 45 } 46 #endif 47 48 #endif /* __M4_UTILS_H__*/ 49 50