Andreas Huber | e46b7be | 2009-07-14 16:56:47 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2009 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 MEDIA_ERRORS_H_ |
| 18 | |
| 19 | #define MEDIA_ERRORS_H_ |
| 20 | |
| 21 | #include <utils/Errors.h> |
| 22 | |
| 23 | namespace android { |
| 24 | |
| 25 | enum { |
| 26 | MEDIA_ERROR_BASE = -1000, |
| 27 | |
| 28 | ERROR_ALREADY_CONNECTED = MEDIA_ERROR_BASE, |
| 29 | ERROR_NOT_CONNECTED = MEDIA_ERROR_BASE - 1, |
| 30 | ERROR_UNKNOWN_HOST = MEDIA_ERROR_BASE - 2, |
| 31 | ERROR_CANNOT_CONNECT = MEDIA_ERROR_BASE - 3, |
| 32 | ERROR_IO = MEDIA_ERROR_BASE - 4, |
| 33 | ERROR_CONNECTION_LOST = MEDIA_ERROR_BASE - 5, |
| 34 | ERROR_MALFORMED = MEDIA_ERROR_BASE - 7, |
| 35 | ERROR_OUT_OF_RANGE = MEDIA_ERROR_BASE - 8, |
| 36 | ERROR_BUFFER_TOO_SMALL = MEDIA_ERROR_BASE - 9, |
| 37 | ERROR_UNSUPPORTED = MEDIA_ERROR_BASE - 10, |
| 38 | ERROR_END_OF_STREAM = MEDIA_ERROR_BASE - 11, |
Andreas Huber | cfd5557 | 2009-10-09 14:11:28 -0700 | [diff] [blame] | 39 | |
| 40 | // Not technically an error. |
| 41 | INFO_FORMAT_CHANGED = MEDIA_ERROR_BASE - 12, |
Andreas Huber | 4c19bf9 | 2010-09-08 14:32:20 -0700 | [diff] [blame] | 42 | INFO_DISCONTINUITY = MEDIA_ERROR_BASE - 13, |
Andreas Huber | 88572f7 | 2012-02-21 11:47:18 -0800 | [diff] [blame] | 43 | INFO_OUTPUT_BUFFERS_CHANGED = MEDIA_ERROR_BASE - 14, |
Gloria Wang | d577091 | 2010-06-22 13:55:38 -0700 | [diff] [blame] | 44 | |
Gloria Wang | f16e1ab | 2011-04-29 10:44:46 -0700 | [diff] [blame] | 45 | // The following constant values should be in sync with |
| 46 | // drm/drm_framework_common.h |
| 47 | DRM_ERROR_BASE = -2000, |
| 48 | |
| 49 | ERROR_DRM_UNKNOWN = DRM_ERROR_BASE, |
| 50 | ERROR_DRM_NO_LICENSE = DRM_ERROR_BASE - 1, |
| 51 | ERROR_DRM_LICENSE_EXPIRED = DRM_ERROR_BASE - 2, |
| 52 | ERROR_DRM_SESSION_NOT_OPENED = DRM_ERROR_BASE - 3, |
| 53 | ERROR_DRM_DECRYPT_UNIT_NOT_INITIALIZED = DRM_ERROR_BASE - 4, |
| 54 | ERROR_DRM_DECRYPT = DRM_ERROR_BASE - 5, |
| 55 | ERROR_DRM_CANNOT_HANDLE = DRM_ERROR_BASE - 6, |
Gloria Wang | eea8c02 | 2011-05-13 11:43:11 -0700 | [diff] [blame] | 56 | ERROR_DRM_TAMPER_DETECTED = DRM_ERROR_BASE - 7, |
Gloria Wang | 83ddcdf | 2011-04-26 17:09:28 -0700 | [diff] [blame] | 57 | |
| 58 | // Heartbeat Error Codes |
| 59 | HEARTBEAT_ERROR_BASE = -3000, |
| 60 | |
| 61 | ERROR_HEARTBEAT_AUTHENTICATION_FAILURE = HEARTBEAT_ERROR_BASE, |
| 62 | ERROR_HEARTBEAT_NO_ACTIVE_PURCHASE_AGREEMENT = HEARTBEAT_ERROR_BASE - 1, |
| 63 | ERROR_HEARTBEAT_CONCURRENT_PLAYBACK = HEARTBEAT_ERROR_BASE - 2, |
| 64 | ERROR_HEARTBEAT_UNUSUAL_ACTIVITY = HEARTBEAT_ERROR_BASE - 3, |
| 65 | ERROR_HEARTBEAT_STREAMING_UNAVAILABLE = HEARTBEAT_ERROR_BASE - 4, |
| 66 | ERROR_HEARTBEAT_CANNOT_ACTIVATE_RENTAL = HEARTBEAT_ERROR_BASE - 5, |
| 67 | ERROR_HEARTBEAT_TERMINATE_REQUESTED = HEARTBEAT_ERROR_BASE - 6, |
Andreas Huber | e46b7be | 2009-07-14 16:56:47 -0700 | [diff] [blame] | 68 | }; |
| 69 | |
| 70 | } // namespace android |
| 71 | |
| 72 | #endif // MEDIA_ERRORS_H_ |