1 /* 2 * Copyright (C) 2020 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 #ifndef ANDROID_MEDIA_MEDIAMETRICSCONSTANTS_H 18 #define ANDROID_MEDIA_MEDIAMETRICSCONSTANTS_H 19 20 /* 21 * MediaMetrics Keys and Properties. 22 * 23 * C/C++ friendly constants that ensure 24 * 1) Compilation error on misspelling 25 * 2) Consistent behavior and documentation. 26 */ 27 28 #define AMEDIAMETRICS_INITIAL_MAX_VOLUME (0.f) 29 #define AMEDIAMETRICS_INITIAL_MIN_VOLUME (1.f) 30 31 /* 32 * Taxonomy of audio keys 33 * 34 * To build longer keys, we use compiler string concatenation of 35 * adjacent string literals. This is done in the translation phase 36 * of compilation to make a single string token. 37 */ 38 39 // Key Prefixes are used for MediaMetrics Item Keys and ends with a ".". 40 // They must be appended with another value to make a key. 41 #define AMEDIAMETRICS_KEY_PREFIX_AUDIO "audio." 42 43 // Device related key prefix. 44 #define AMEDIAMETRICS_KEY_PREFIX_AUDIO_DEVICE AMEDIAMETRICS_KEY_PREFIX_AUDIO "device." 45 46 // The AudioMmap key appends the "trackId" to the prefix. 47 // This is the AudioFlinger equivalent of the AAudio Stream. 48 // TODO: unify with AMEDIAMETRICS_KEY_PREFIX_AUDIO_STREAM 49 #define AMEDIAMETRICS_KEY_PREFIX_AUDIO_MMAP AMEDIAMETRICS_KEY_PREFIX_AUDIO "mmap." 50 51 // The AudioRecord key appends the "trackId" to the prefix. 52 #define AMEDIAMETRICS_KEY_PREFIX_AUDIO_RECORD AMEDIAMETRICS_KEY_PREFIX_AUDIO "record." 53 54 // The Audio Sensor key appends the sensor handle integer. 55 #define AMEDIAMETRICS_KEY_PREFIX_AUDIO_SENSOR AMEDIAMETRICS_KEY_PREFIX_AUDIO "sensor." 56 57 // The Audio Spatializer key appends the spatializerId (currently 0) 58 #define AMEDIAMETRICS_KEY_PREFIX_AUDIO_SPATIALIZER AMEDIAMETRICS_KEY_PREFIX_AUDIO "spatializer." 59 60 // The Audio Spatializer device key appends the device type. 61 #define AMEDIAMETRICS_KEY_PREFIX_AUDIO_SPATIALIZER_DEVICE \ 62 AMEDIAMETRICS_KEY_PREFIX_AUDIO_SPATIALIZER "device." 63 64 // The AudioStream key appends the "streamId" to the prefix. 65 #define AMEDIAMETRICS_KEY_PREFIX_AUDIO_STREAM AMEDIAMETRICS_KEY_PREFIX_AUDIO "stream." 66 67 // The AudioThread key appends the "threadId" to the prefix. 68 #define AMEDIAMETRICS_KEY_PREFIX_AUDIO_THREAD AMEDIAMETRICS_KEY_PREFIX_AUDIO "thread." 69 70 // The AudioTrack key appends the "trackId" to the prefix. 71 #define AMEDIAMETRICS_KEY_PREFIX_AUDIO_TRACK AMEDIAMETRICS_KEY_PREFIX_AUDIO "track." 72 73 // Keys are strings used for MediaMetrics Item Keys 74 #define AMEDIAMETRICS_KEY_AUDIO_FLINGER AMEDIAMETRICS_KEY_PREFIX_AUDIO "flinger" 75 #define AMEDIAMETRICS_KEY_AUDIO_MIDI AMEDIAMETRICS_KEY_PREFIX_AUDIO "midi" 76 #define AMEDIAMETRICS_KEY_AUDIO_POLICY AMEDIAMETRICS_KEY_PREFIX_AUDIO "policy" 77 78 // Error keys 79 #define AMEDIAMETRICS_KEY_AUDIO_TRACK_ERROR AMEDIAMETRICS_KEY_PREFIX_AUDIO_TRACK "error" 80 #define AMEDIAMETRICS_KEY_AUDIO_RECORD_ERROR AMEDIAMETRICS_KEY_PREFIX_AUDIO_RECORD "error" 81 82 /* 83 * MediaMetrics Properties are unified space for consistency and readability. 84 */ 85 86 // Property prefixes may be applied before a property name to indicate a specific 87 // category to which it is associated. 88 #define AMEDIAMETRICS_PROP_PREFIX_EFFECTIVE "effective." 89 #define AMEDIAMETRICS_PROP_PREFIX_HAL "hal." 90 #define AMEDIAMETRICS_PROP_PREFIX_HAPTIC "haptic." 91 #define AMEDIAMETRICS_PROP_PREFIX_LAST "last." 92 #define AMEDIAMETRICS_PROP_PREFIX_SERVER "server." 93 94 // Properties within mediametrics are string constants denoted by 95 // a macro name beginning with AMEDIAMETRICS_PROP_* 96 // 97 // For a property name like "auxEffectId" we write this as a single upper case word 98 // at the end of the macro name, such as AMEDIAMETRICS_PROP_AUXEFFECTID. 99 // 100 // Underscores after the AMEDIAMETRICS_PROP_* prefix indicate 101 // a "dot" in the property name. For example AMEDIAMETRICS_PROP_VOLUME_LEFT 102 // corresponds to "volume.left". 103 // 104 // The property names are camel case, typically a lowercase letter [a-z] 105 // followed by one or more characters in the range [a-zA-Z0-9_.]. 106 // Special symbols such as !@#$%^&*()[]{}<>,:;'"\/?|+-=~ are reserved. 107 // 108 // Properties within this header should include special suffixes like '#' 109 // directly in the string for brevity. Code outside of this header should 110 // use the macro constant for the special symbols for searchability. 111 112 // Any property that ends with a # will have duplicate values listed instead 113 // of suppressed in the Time Machine. 114 #define AMEDIAMETRICS_PROP_SUFFIX_CHAR_DUPLICATES_ALLOWED '#' 115 116 #define AMEDIAMETRICS_PROP_ADDRESS "address" // string, for example MAC address 117 #define AMEDIAMETRICS_PROP_ALLOWUID "_allowUid" // int32_t, allow client uid to post 118 #define AMEDIAMETRICS_PROP_AUDIOMODE "audioMode" // string (audio.flinger) 119 #define AMEDIAMETRICS_PROP_AUXEFFECTID "auxEffectId" // int32 (AudioTrack) 120 #define AMEDIAMETRICS_PROP_BUFFERSIZEFRAMES "bufferSizeFrames" // int32 121 #define AMEDIAMETRICS_PROP_BUFFERCAPACITYFRAMES "bufferCapacityFrames" // int32 122 #define AMEDIAMETRICS_PROP_BURSTFRAMES "burstFrames" // int32 123 #define AMEDIAMETRICS_PROP_CALLERNAME "callerName" // string, eg. "aaudio" 124 #define AMEDIAMETRICS_PROP_CHANNELCOUNT "channelCount" // int32 125 #define AMEDIAMETRICS_PROP_CHANNELCOUNTHARDWARE "channelCountHardware" // int32 126 #define AMEDIAMETRICS_PROP_CHANNELMASK "channelMask" // int32 127 #define AMEDIAMETRICS_PROP_CHANNELMASKS "channelMasks" // string with channelMask values 128 // separated by |. 129 #define AMEDIAMETRICS_PROP_CLOSEDCOUNT "closedCount" // int32 (MIDI) 130 #define AMEDIAMETRICS_PROP_CONTENTTYPE "contentType" // string attributes (AudioTrack) 131 #define AMEDIAMETRICS_PROP_CUMULATIVETIMENS "cumulativeTimeNs" // int64_t playback/record time 132 // since start 133 #define AMEDIAMETRICS_PROP_DEVICEDISCONNECTED "deviceDisconnected" // string true/false (MIDI) 134 #define AMEDIAMETRICS_PROP_DEVICEID "deviceId" // int32 device id (MIDI) 135 136 // DEVICE values are averaged since starting on device 137 #define AMEDIAMETRICS_PROP_DEVICELATENCYMS "deviceLatencyMs" // double - avg latency time 138 #define AMEDIAMETRICS_PROP_DEVICESTARTUPMS "deviceStartupMs" // double - avg startup time 139 #define AMEDIAMETRICS_PROP_DEVICETIMENS "deviceTimeNs" // int64_t playback/record time 140 #define AMEDIAMETRICS_PROP_DEVICEVOLUME "deviceVolume" // double - average device volume 141 142 #define AMEDIAMETRICS_PROP_DEVICEMAXVOLUMEDURATIONNS "deviceMaxVolumeDurationNs" // int64_t 143 #define AMEDIAMETRICS_PROP_DEVICEMAXVOLUME "deviceMaxVolume" // double - maximum device volume 144 #define AMEDIAMETRICS_PROP_DEVICEMINVOLUMEDURATIONNS "deviceMinVolumeDurationNs" // int64_t 145 #define AMEDIAMETRICS_PROP_DEVICEMINVOLUME "deviceMinVolume" // double - minimum device volume 146 147 #define AMEDIAMETRICS_PROP_DIRECTION "direction" // string AAudio input or output 148 #define AMEDIAMETRICS_PROP_DURATIONNS "durationNs" // int64 duration time span 149 #define AMEDIAMETRICS_PROP_ENABLED "enabled" // string true/false. 150 #define AMEDIAMETRICS_PROP_ENCODING "encoding" // string value of format 151 #define AMEDIAMETRICS_PROP_ENCODINGHARDWARE "encodingHardware" // string value of hardware format 152 153 #define AMEDIAMETRICS_PROP_EVENT "event#" // string value (often func name) 154 #define AMEDIAMETRICS_PROP_EXECUTIONTIMENS "executionTimeNs" // time to execute the event 155 156 // TODO: fix inconsistency in flags: AudioRecord / AudioTrack int32, AudioThread string 157 #define AMEDIAMETRICS_PROP_FLAGS "flags" 158 159 #define AMEDIAMETRICS_PROP_FRAMECOUNT "frameCount" // int32 160 #define AMEDIAMETRICS_PROP_HARDWARETYPE "hardwareType" // int32 (MIDI) 161 #define AMEDIAMETRICS_PROP_HASHEADTRACKER "hasHeadTracker" // string true/false 162 #define AMEDIAMETRICS_PROP_HEADTRACKERENABLED "headTrackerEnabled" // string true/false 163 #define AMEDIAMETRICS_PROP_HEADTRACKINGMODES "headTrackingModes" // string |, like modes. 164 #define AMEDIAMETRICS_PROP_INPUTDEVICES "inputDevices" // string value 165 #define AMEDIAMETRICS_PROP_INPUTPORTCOUNT "inputPortCount" // int32 (MIDI) 166 #define AMEDIAMETRICS_PROP_INTERNALTRACKID "internalTrackId" // int32 167 #define AMEDIAMETRICS_PROP_INTERVALCOUNT "intervalCount" // int32 168 #define AMEDIAMETRICS_PROP_ISSHARED "isShared" // string true/false (MIDI) 169 #define AMEDIAMETRICS_PROP_LATENCYMS "latencyMs" // double value 170 #define AMEDIAMETRICS_PROP_LEVELS "levels" // string | with levels 171 #define AMEDIAMETRICS_PROP_LOGSESSIONID "logSessionId" // hex string, "" none 172 #define AMEDIAMETRICS_PROP_METHODCODE "methodCode" // int64_t an int indicating method 173 #define AMEDIAMETRICS_PROP_METHODNAME "methodName" // string method name 174 #define AMEDIAMETRICS_PROP_MODE "mode" // string 175 #define AMEDIAMETRICS_PROP_MODES "modes" // string | with modes 176 #define AMEDIAMETRICS_PROP_NAME "name" // string value 177 #define AMEDIAMETRICS_PROP_ORIGINALFLAGS "originalFlags" // int32 178 #define AMEDIAMETRICS_PROP_OPENEDCOUNT "openedCount" // int32 (MIDI) 179 #define AMEDIAMETRICS_PROP_OUTPUTDEVICES "outputDevices" // string value 180 #define AMEDIAMETRICS_PROP_OUTPUTPORTCOUNT "outputPortCount" // int32 (MIDI) 181 #define AMEDIAMETRICS_PROP_PERFORMANCEMODE "performanceMode" // string value, "none", lowLatency" 182 #define AMEDIAMETRICS_PROP_PLAYBACK_PITCH "playback.pitch" // double value (AudioTrack) 183 #define AMEDIAMETRICS_PROP_PLAYBACK_SPEED "playback.speed" // double value (AudioTrack) 184 #define AMEDIAMETRICS_PROP_PLAYERIID "playerIId" // int32 (-1 invalid/unset IID) 185 #define AMEDIAMETRICS_PROP_ROUTEDDEVICEID "routedDeviceId" // int32 186 #define AMEDIAMETRICS_PROP_SAMPLERATE "sampleRate" // int32 187 #define AMEDIAMETRICS_PROP_SAMPLERATECLIENT "sampleRateClient" // int32 188 #define AMEDIAMETRICS_PROP_SAMPLERATEHARDWARE "sampleRateHardware" // int32 189 #define AMEDIAMETRICS_PROP_SELECTEDDEVICEID "selectedDeviceId" // int32 190 #define AMEDIAMETRICS_PROP_SELECTEDMICDIRECTION "selectedMicDirection" // int32 191 #define AMEDIAMETRICS_PROP_SELECTEDMICFIELDDIRECTION "selectedMicFieldDimension" // double 192 #define AMEDIAMETRICS_PROP_SESSIONID "sessionId" // int32 193 #define AMEDIAMETRICS_PROP_SHARINGMODE "sharingMode" // string value, "exclusive", shared" 194 #define AMEDIAMETRICS_PROP_SOURCE "source" // string (AudioAttributes) 195 #define AMEDIAMETRICS_PROP_STARTTHRESHOLDFRAMES "startThresholdFrames" // int32 (AudioTrack) 196 #define AMEDIAMETRICS_PROP_STARTUPMS "startupMs" // double value 197 // State is "ACTIVE" or "STOPPED" for AudioRecord 198 #define AMEDIAMETRICS_PROP_STATE "state" // string 199 #define AMEDIAMETRICS_PROP_STATUS "status#" // int32 status_t 200 // AAudio uses their own status codes 201 // Supplemental information to the status code. 202 #define AMEDIAMETRICS_PROP_STATUSSUBCODE "statusSubCode" // int32, specific code 203 // used in conjunction with status. 204 #define AMEDIAMETRICS_PROP_STATUSMESSAGE "statusMessage" // string, supplemental info. 205 // Arbitrary information treated as 206 // informational, may be logcat msg, 207 // or an exception with stack trace. 208 // Treated as "debug" information. 209 210 #define AMEDIAMETRICS_PROP_STREAMTYPE "streamType" // string (AudioTrack) 211 #define AMEDIAMETRICS_PROP_SUPPORTSMIDIUMP "supportsMidiUmp" // string true/false (MIDI). 212 // Universal MIDI Packets is a new 213 // format to transport packets. 214 // Raw byte streams are used if this 215 // is false. 216 #define AMEDIAMETRICS_PROP_TOSTRING "toString" // string 217 #define AMEDIAMETRICS_PROP_TOTALINPUTBYTES "totalInputBytes" // int32 (MIDI) 218 #define AMEDIAMETRICS_PROP_TOTALOUTPUTBYTES "totalOutputBytes" // int32 (MIDI) 219 #define AMEDIAMETRICS_PROP_THREADID "threadId" // int32 value io handle 220 #define AMEDIAMETRICS_PROP_THROTTLEMS "throttleMs" // double 221 #define AMEDIAMETRICS_PROP_TRACKID "trackId" // int32 port id of track/record 222 #define AMEDIAMETRICS_PROP_TRAITS "traits" // string 223 #define AMEDIAMETRICS_PROP_TYPE "type" // string (thread type) 224 #define AMEDIAMETRICS_PROP_UNDERRUN "underrun" // int32 225 #define AMEDIAMETRICS_PROP_UNDERRUNFRAMES "underrunFrames" // int64_t from Thread 226 #define AMEDIAMETRICS_PROP_USAGE "usage" // string attributes (ATrack) 227 #define AMEDIAMETRICS_PROP_USINGALSA "usingAlsa" // string true/false (MIDI) 228 #define AMEDIAMETRICS_PROP_VOICEVOLUME "voiceVolume" // double (audio.flinger) 229 #define AMEDIAMETRICS_PROP_VOLUME_LEFT "volume.left" // double (AudioTrack) 230 #define AMEDIAMETRICS_PROP_VOLUME_RIGHT "volume.right" // double (AudioTrack) 231 #define AMEDIAMETRICS_PROP_WHERE "where" // string value 232 // EncodingClient is the encoding format requested by the client 233 #define AMEDIAMETRICS_PROP_ENCODINGCLIENT "encodingClient" // string 234 // PerformanceModeActual is the actual selected performance mode, could be "none', "lowLatency" or 235 // "powerSaving" 236 #define AMEDIAMETRICS_PROP_PERFORMANCEMODEACTUAL "performanceModeActual" // string 237 #define AMEDIAMETRICS_PROP_FRAMESTRANSFERRED "framesTransferred" // int64_t, transferred frames 238 // string value, "exclusive", "shared". the actual selected sharing mode by the server 239 #define AMEDIAMETRICS_PROP_SHARINGMODEACTUAL "sharingModeActual" 240 241 // Timing values: millisecond values are suffixed with MS and the type is double 242 // nanosecond values are suffixed with NS and the type is int64. 243 244 // Values are strings accepted for a given property. 245 246 // An event is a general description, which often is a function name. 247 #define AMEDIAMETRICS_PROP_EVENT_VALUE_APPLYVOLUMESHAPER "applyVolumeShaper" 248 #define AMEDIAMETRICS_PROP_EVENT_VALUE_BEGINAUDIOINTERVALGROUP "beginAudioIntervalGroup" 249 #define AMEDIAMETRICS_PROP_EVENT_VALUE_CLOSE "close" 250 #define AMEDIAMETRICS_PROP_EVENT_VALUE_CREATE "create" 251 #define AMEDIAMETRICS_PROP_EVENT_VALUE_CREATEAUDIOPATCH "createAudioPatch" 252 #define AMEDIAMETRICS_PROP_EVENT_VALUE_CTOR "ctor" 253 #define AMEDIAMETRICS_PROP_EVENT_VALUE_DEVICECLOSED "deviceClosed" // MIDI 254 #define AMEDIAMETRICS_PROP_EVENT_VALUE_DISCONNECT "disconnect" 255 #define AMEDIAMETRICS_PROP_EVENT_VALUE_DTOR "dtor" 256 #define AMEDIAMETRICS_PROP_EVENT_VALUE_ENDAAUDIOSTREAM "endAAudioStream" // AAudioStream 257 #define AMEDIAMETRICS_PROP_EVENT_VALUE_ENDAUDIOINTERVALGROUP "endAudioIntervalGroup" 258 #define AMEDIAMETRICS_PROP_EVENT_VALUE_FLUSH "flush" // AudioTrack 259 #define AMEDIAMETRICS_PROP_EVENT_VALUE_INVALIDATE "invalidate" // server track, record 260 #define AMEDIAMETRICS_PROP_EVENT_VALUE_OPEN "open" 261 #define AMEDIAMETRICS_PROP_EVENT_VALUE_PAUSE "pause" // AudioTrack 262 #define AMEDIAMETRICS_PROP_EVENT_VALUE_READPARAMETERS "readParameters" // Thread 263 #define AMEDIAMETRICS_PROP_EVENT_VALUE_RELEASE "release" 264 #define AMEDIAMETRICS_PROP_EVENT_VALUE_RESTORE "restore" 265 #define AMEDIAMETRICS_PROP_EVENT_VALUE_SETMODE "setMode" // AudioFlinger 266 #define AMEDIAMETRICS_PROP_EVENT_VALUE_SETBUFFERSIZE "setBufferSize" // AudioTrack 267 #define AMEDIAMETRICS_PROP_EVENT_VALUE_SETLOGSESSIONID "setLogSessionId" // AudioTrack, Record 268 #define AMEDIAMETRICS_PROP_EVENT_VALUE_SETPLAYBACKPARAM "setPlaybackParam" // AudioTrack 269 #define AMEDIAMETRICS_PROP_EVENT_VALUE_SETPLAYERIID "setPlayerIId" // AudioTrack 270 #define AMEDIAMETRICS_PROP_EVENT_VALUE_SETSAMPLERATE "setSampleRate" // AudioTrack 271 #define AMEDIAMETRICS_PROP_EVENT_VALUE_SETSTARTTHRESHOLD "setStartThreshold" // AudioTrack 272 #define AMEDIAMETRICS_PROP_EVENT_VALUE_SETVOICEVOLUME "setVoiceVolume" // AudioFlinger 273 #define AMEDIAMETRICS_PROP_EVENT_VALUE_SETVOLUME "setVolume" // AudioTrack 274 #define AMEDIAMETRICS_PROP_EVENT_VALUE_START "start" // AudioTrack, AudioRecord 275 #define AMEDIAMETRICS_PROP_EVENT_VALUE_STOP "stop" // AudioTrack, AudioRecord 276 #define AMEDIAMETRICS_PROP_EVENT_VALUE_TIMEOUT "timeout" // AudioFlinger, AudioPolicy 277 #define AMEDIAMETRICS_PROP_EVENT_VALUE_UNDERRUN "underrun" // from Thread 278 279 // Possible values for AMEDIAMETRICS_PROP_CALLERNAME 280 // Check within the framework for these strings as this header file may not be explicitly 281 // included to avoid unnecessary cross-project dependencies. 282 #define AMEDIAMETRICS_PROP_CALLERNAME_VALUE_AAUDIO "aaudio" // Native AAudio 283 #define AMEDIAMETRICS_PROP_CALLERNAME_VALUE_JAVA "java" // Java API layer 284 #define AMEDIAMETRICS_PROP_CALLERNAME_VALUE_MEDIA "media" // libmedia 285 #define AMEDIAMETRICS_PROP_CALLERNAME_VALUE_OPENSLES "opensles" // Open SLES 286 #define AMEDIAMETRICS_PROP_CALLERNAME_VALUE_RTP "rtp" // RTP communication 287 #define AMEDIAMETRICS_PROP_CALLERNAME_VALUE_SOUNDPOOL "soundpool" // SoundPool 288 #define AMEDIAMETRICS_PROP_CALLERNAME_VALUE_TONEGENERATOR "tonegenerator" // dial tones 289 #define AMEDIAMETRICS_PROP_CALLERNAME_VALUE_UNKNOWN "unknown" // callerName not set 290 291 // Many properties are available for the sensor. 292 // The mode is how the sensor is being currently used. 293 #define AMEDIAMETRICS_PROP_MODE_VALUE_HEAD "head" // used for head tracking 294 #define AMEDIAMETRICS_PROP_MODE_VALUE_SCREEN "screen" // used for screen 295 296 // MediaMetrics errors are expected to cover the following sources: 297 // https://docs.oracle.com/javase/7/docs/api/java/lang/RuntimeException.html 298 // https://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html 299 // https://cs.android.com/android/platform/superproject/+/master:frameworks/native/libs/binder/include/binder/Status.h;drc=88e25c0861499ee3ab885814dddc097ab234cb7b;l=57 300 // https://cs.android.com/android/platform/superproject/+/master:frameworks/base/media/java/android/media/AudioSystem.java;drc=3ac246c43294d7f7012bdcb0ccb7bae1aa695bd4;l=785 301 // https://cs.android.com/android/platform/superproject/+/master:frameworks/av/media/libaaudio/include/aaudio/AAudio.h;drc=cfd3a6fa3aaaf712a890dc02452b38ef401083b8;l=120 302 // https://abseil.io/docs/cpp/guides/status-codes 303 304 // Status errors: 305 // An empty status string or "ok" is interpreted as no error. 306 #define AMEDIAMETRICS_PROP_STATUS_VALUE_OK "ok" 307 308 // Error category: argument 309 // IllegalArgumentException 310 // NullPointerException 311 // BAD_VALUE 312 // absl::INVALID_ARGUMENT 313 // absl::OUT_OF_RANGE 314 // Out of range, out of bounds. 315 #define AMEDIAMETRICS_PROP_STATUS_VALUE_ARGUMENT "argument" 316 317 // Error category: io 318 // IOException 319 // android.os.DeadObjectException, android.os.RemoteException 320 // DEAD_OBJECT 321 // FAILED_TRANSACTION 322 // IO_ERROR 323 // file or ioctl failure 324 // Service, rpc, binder, or socket failure. 325 // Hardware or device failure. 326 #define AMEDIAMETRICS_PROP_STATUS_VALUE_IO "io" 327 328 // Error category: outOfMemory 329 // OutOfMemoryException 330 // NO_MEMORY 331 // absl::RESOURCE_EXHAUSTED 332 #define AMEDIAMETRICS_PROP_STATUS_VALUE_MEMORY "memory" 333 334 // Error category: security 335 // SecurityException 336 // PERMISSION_DENIED 337 // absl::PERMISSION_DENIED 338 // absl::UNAUTHENTICATED 339 #define AMEDIAMETRICS_PROP_STATUS_VALUE_SECURITY "security" 340 341 // Error category: state 342 // IllegalStateException 343 // UnsupportedOperationException 344 // INVALID_OPERATION 345 // NO_INIT 346 // absl::NOT_FOUND 347 // absl::ALREADY_EXISTS 348 // absl::FAILED_PRECONDITION 349 // absl::UNAVAILABLE 350 // absl::UNIMPLEMENTED 351 // Functionality not implemented (argument may or may not be correct). 352 // Call unexpected or out of order. 353 #define AMEDIAMETRICS_PROP_STATUS_VALUE_STATE "state" 354 355 // Error category: timeout 356 // TimeoutException 357 // WOULD_BLOCK 358 // absl::DEADLINE_EXCEEDED 359 // absl::ABORTED 360 #define AMEDIAMETRICS_PROP_STATUS_VALUE_TIMEOUT "timeout" 361 362 // Error category: unknown 363 // Exception (Java specified not listed above, or custom app/service) 364 // UNKNOWN_ERROR 365 // absl::INTERNAL 366 // absl::DATA_LOSS 367 // Catch-all bucket for errors not listed above. 368 #define AMEDIAMETRICS_PROP_STATUS_VALUE_UNKNOWN "unknown" 369 370 #endif // ANDROID_MEDIA_MEDIAMETRICSCONSTANTS_H 371