M4Common_types.h revision 7c9d8018755adf1857571125ba1b3598c96ea506
1/* 2 * Copyright (C) 2004-2011 NXP Software 3 * Copyright (C) 2011 The Android Open Source Project 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17/** 18 ************************************************************************ 19 * @file M4Common_Types.h 20 * @brief defines common structures 21 * @note 22 * 23 ************************************************************************ 24*/ 25#ifndef M4COMMON_TYPES_H 26#define M4COMMON_TYPES_H 27 28#include "M4OSA_Types.h" 29#include "M4OSA_Memory.h" 30 31/** 32 ************************************************************************ 33 * structure M4COMMON_MetadataType 34 ************************************************************************ 35*/ 36typedef enum 37{ 38 M4COMMON_kUnknownMetaDataType, 39 /* Local files */ 40 M4COMMON_kTagID3v1, /**< Metadata from TAG ID3 V1 */ 41 M4COMMON_kTagID3v2, /**< Metadata from TAG ID3 V2 */ 42 M4COMMON_kASFContentDesc, /**< Metadata from ASF content description */ 43 44 M4COMMON_k3GppAssetMovieBox, /**< Metadata from a 3gpp file (movie box) */ 45 M4COMMON_k3GppAssetTrackBox, /**< Metadata from a 3gpp file (track box) */ 46 47 /* Streaming */ 48 M4COMMON_kMetaDataSdpSession, /**< Metadata from an SDP file (Session level) */ 49 M4COMMON_kMetaDataSdpAudio, /**< Metadata from an SDP file (media audio level) */ 50 M4COMMON_kMetaDataSdpVideo, /**< Metadata from an SDP file (media video level) */ 51 52 M4COMMON_kJpegExif /**< EXIF in JPEG */ 53} M4COMMON_MetadataType; 54 55/** 56 ************************************************************************ 57 * enumeration M4VPS_EncodingFormat 58 * @brief Text encoding format 59 ************************************************************************ 60*/ 61typedef enum 62{ 63 M4COMMON_kEncFormatUnknown = 0, /**< Unknown format */ 64 M4COMMON_kEncFormatASCII = 1, /**< ISO-8859-1. Terminated with $00 */ 65 M4COMMON_kEncFormatUTF8 = 2, /**< UTF-8 encoded Unicode . Terminated with $00 */ 66 M4COMMON_kEncFormatUTF16 = 3 /**< UTF-16 encoded Unicode. Terminated with $00 00 */ 67} M4COMMON_EncodingFormat; 68 69/** 70 ************************************************************************ 71 * structure M4VPS_String 72 * @brief This structure defines string attribute 73 ************************************************************************ 74*/ 75typedef struct 76{ 77 M4OSA_Void* m_pString; /**< Pointer to text */ 78 M4OSA_UInt32 m_uiSize; /**< Text size in bytes */ 79 M4COMMON_EncodingFormat m_EncodingFormat; /**< Text encoding format */ 80 81} M4COMMON_String; 82 83/** 84 ************************************************************************ 85 * structure M4COMMON_Buffer 86 * @brief This structure defines generic buffer attribute 87 ************************************************************************ 88*/ 89typedef struct 90{ 91 M4OSA_MemAddr8 m_pBuffer; /**< Pointer to buffer */ 92 M4OSA_UInt32 m_size; /**< size of buffer in bytes */ 93} M4COMMON_Buffer; 94 95typedef enum 96{ 97 M4COMMON_kMimeType_NONE, 98 M4COMMON_kMimeType_JPG, 99 M4COMMON_kMimeType_PNG, 100 M4COMMON_kMimeType_BMP, /* bitmap, with header */ 101 M4COMMON_kMimeType_RGB24, /* raw RGB 24 bits */ 102 M4COMMON_kMimeType_RGB565, /* raw, RGB 16 bits */ 103 M4COMMON_kMimeType_YUV420, 104 M4COMMON_kMimeType_MPEG4_IFrame /* RC: to support PV art */ 105 106} M4COMMON_MimeType; 107 108/* picture type definition from id3v2 tag*/ 109typedef enum 110{ 111 M4COMMON_kPicType_Other = 0x00, 112 M4COMMON_kPicType_32_32_Icon = 0x01, 113 M4COMMON_kPicType_Other_Icon = 0x02, 114 M4COMMON_kPicType_FrontCover = 0x03, 115 M4COMMON_kPicType_BackCover = 0x04, 116 M4COMMON_kPicType_LeafletPage = 0x05, 117 M4COMMON_kPicType_Media = 0x06, 118 M4COMMON_kPicType_LeadArtist = 0x07, 119 M4COMMON_kPicType_Artist = 0x08, 120 M4COMMON_kPicType_Conductor = 0x09, 121 M4COMMON_kPicType_Orchestra = 0x0A, 122 M4COMMON_kPicType_Composer = 0x0B, 123 M4COMMON_kPicType_Lyricist = 0x0C, 124 M4COMMON_kPicType_RecordingLocation = 0x0D, 125 M4COMMON_kPicType_DuringRecording = 0x0E, 126 M4COMMON_kPicType_DuringPerformance = 0x0F, 127 M4COMMON_kPicType_MovieScreenCapture = 0x10, 128 M4COMMON_kPicType_BrightColouredFish = 0x11, 129 M4COMMON_kPicType_Illustration = 0x12, 130 M4COMMON_kPicType_ArtistLogo = 0x13, 131 M4COMMON_kPicType_StudioLogo = 0x14 132} M4COMMON_PictureType; 133 134/** 135 ****************************************************************************** 136 * enum M4COMMON_Orientation 137 * @brief This enum defines the possible orientation of a frame as described 138 * in the EXIF standard. 139 ****************************************************************************** 140*/ 141typedef enum 142{ 143 M4COMMON_kOrientationUnknown = 0, 144 M4COMMON_kOrientationTopLeft, 145 M4COMMON_kOrientationTopRight, 146 M4COMMON_kOrientationBottomRight, 147 M4COMMON_kOrientationBottomLeft, 148 M4COMMON_kOrientationLeftTop, 149 M4COMMON_kOrientationRightTop, 150 M4COMMON_kOrientationRightBottom, 151 M4COMMON_kOrientationLeftBottom 152}M4COMMON_Orientation ; 153 154/** 155 ****************************************************************************** 156 * structure M4EXIFC_Location 157 * @brief The Image GPS location (example : 48�52.21' ) 158 ****************************************************************************** 159*/ 160typedef struct 161{ 162 M4OSA_Float degrees; 163 M4OSA_Float minsec; 164} M4COMMON_Location; 165 166/** 167 ************************************************************************ 168 * structure M4COMMON_MetaDataAlbumArt 169 * @brief This structure defines fields of a album art 170 ************************************************************************ 171*/ 172typedef struct 173{ 174 M4COMMON_MimeType m_mimeType; 175 M4OSA_UInt32 m_uiSize; 176 M4OSA_Void* m_pData; 177 178 M4COMMON_String m_pDescription; 179 180} M4COMMON_MetaDataAlbumArt; 181 182/** 183 ************************************************************************ 184 * structure M4COMMON_MetaDataFields 185 * @brief This structure defines fields of metadata information 186 ************************************************************************ 187*/ 188typedef struct 189{ 190 M4COMMON_MetadataType m_MetadataType; 191 192 /* Meta data fields */ 193 M4COMMON_String m_pTitle; /**< Title for the media */ 194 M4COMMON_String m_pArtist; /**< Performer or artist */ 195 M4COMMON_String m_pAlbum; /**< Album title for the media */ 196 M4COMMON_String m_pAuthor; /**< Author of the media */ 197 M4COMMON_String m_pGenre; /**< Genre (category and style) of the media */ 198 M4COMMON_String m_pDescription; /**< Caption or description for the media */ 199 M4COMMON_String m_pCopyRights; /**< Notice about organization holding copyright 200 for the media file */ 201 M4COMMON_String m_pRecordingYear; /**< Recording year for the media */ 202 M4COMMON_String m_pRating; /**< Media rating */ 203 204 M4COMMON_String m_pClassification; /**< Classification of the media */ 205 M4COMMON_String m_pKeyWords; /**< Media keywords */ 206 M4COMMON_String m_pLocation; /**< Location information */ 207 M4COMMON_String m_pUrl; /**< Reference of the resource */ 208 209 M4OSA_UInt8 m_uiTrackNumber; /**< Track number for the media*/ 210 M4OSA_UInt32 m_uiDuration; /**< The track duration in milliseconds */ 211 212 M4COMMON_MetaDataAlbumArt m_albumArt; /**< AlbumArt description */ 213 M4COMMON_String m_pMood; /**< Mood of the media */ 214 215 /**< Modifs ACO 4/12/07 : add Exif specific infos */ 216 M4COMMON_String m_pCreationDateTime; /**< date and time original image was generated */ 217 M4COMMON_String m_pLastChangeDateTime; /**< file change date and time */ 218 M4COMMON_String m_pManufacturer; /**< manufacturer of image input equipment */ 219 M4COMMON_String m_pModel; /**< model of image input equipment */ 220 M4COMMON_String m_pSoftware; /**< software used */ 221 M4COMMON_Orientation m_Orientation; /**< Orientation of the picture */ 222 223 /**< Modifs FS 29/08/08 : additionnal Exif infos */ 224 M4OSA_UInt32 m_width; /**< image width in pixels */ 225 M4OSA_UInt32 m_height; /**< image height in pixels */ 226 M4OSA_UInt32 m_thumbnailSize; /**< size of the thumbnail */ 227 M4COMMON_String m_pLatitudeRef; /**< Latitude reference */ 228 M4COMMON_Location m_latitude; /**< Latitude */ 229 M4COMMON_String m_pLongitudeRef; /**< Longitude reference */ 230 M4COMMON_Location m_longitude; /**< Longitude */ 231 232} M4COMMON_MetaDataFields; 233 234 235#endif /*M4COMMON_TYPES_H*/ 236 237