• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2022 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_ULTRAHDR_JPEGRERRORCODE_H
18 #define ANDROID_ULTRAHDR_JPEGRERRORCODE_H
19 
20 #include <utils/Errors.h>
21 
22 namespace android::ultrahdr {
23 
24 enum {
25     // status_t map for errors in the media framework
26     // OK or NO_ERROR or 0 represents no error.
27 
28     // See system/core/include/utils/Errors.h
29     // System standard errors from -1 through (possibly) -133
30     //
31     // Errors with special meanings and side effects.
32     // INVALID_OPERATION:  Operation attempted in an illegal state (will try to signal to app).
33     // DEAD_OBJECT:        Signal from CodecBase to MediaCodec that MediaServer has died.
34     // NAME_NOT_FOUND:     Signal from CodecBase to MediaCodec that the component was not found.
35 
36     // JPEGR errors
37     JPEGR_IO_ERROR_BASE                 = -10000,
38     ERROR_JPEGR_INVALID_INPUT_TYPE      = JPEGR_IO_ERROR_BASE,
39     ERROR_JPEGR_INVALID_OUTPUT_TYPE     = JPEGR_IO_ERROR_BASE - 1,
40     ERROR_JPEGR_INVALID_NULL_PTR        = JPEGR_IO_ERROR_BASE - 2,
41     ERROR_JPEGR_RESOLUTION_MISMATCH     = JPEGR_IO_ERROR_BASE - 3,
42     ERROR_JPEGR_BUFFER_TOO_SMALL        = JPEGR_IO_ERROR_BASE - 4,
43     ERROR_JPEGR_INVALID_COLORGAMUT      = JPEGR_IO_ERROR_BASE - 5,
44     ERROR_JPEGR_INVALID_TRANS_FUNC      = JPEGR_IO_ERROR_BASE - 6,
45     ERROR_JPEGR_INVALID_METADATA        = JPEGR_IO_ERROR_BASE - 7,
46     ERROR_JPEGR_UNSUPPORTED_METADATA    = JPEGR_IO_ERROR_BASE - 8,
47     ERROR_JPEGR_GAIN_MAP_IMAGE_NOT_FOUND = JPEGR_IO_ERROR_BASE - 9,
48 
49     JPEGR_RUNTIME_ERROR_BASE            = -20000,
50     ERROR_JPEGR_ENCODE_ERROR            = JPEGR_RUNTIME_ERROR_BASE - 1,
51     ERROR_JPEGR_DECODE_ERROR            = JPEGR_RUNTIME_ERROR_BASE - 2,
52     ERROR_JPEGR_CALCULATION_ERROR       = JPEGR_RUNTIME_ERROR_BASE - 3,
53     ERROR_JPEGR_METADATA_ERROR          = JPEGR_RUNTIME_ERROR_BASE - 4,
54     ERROR_JPEGR_TONEMAP_ERROR           = JPEGR_RUNTIME_ERROR_BASE - 5,
55 
56     ERROR_JPEGR_UNSUPPORTED_FEATURE     = -20000,
57 };
58 
59 }  // namespace android::ultrahdr
60 
61 #endif // ANDROID_ULTRAHDR_JPEGRERRORCODE_H
62