Make Status an enum and move it from media to media.omx.

Bug: 31399200

Test: None.
Change-Id: I28a891030f24b3d9aa2938ae61bf02b060feee05
This commit is contained in:
Pawin Vongmasa 2016-11-30 18:44:34 -08:00
parent 9e321eb5b6
commit 2649720548
2 changed files with 17 additions and 1 deletions

View file

@ -23,7 +23,6 @@ import android.hardware.graphics.common@1.0::PixelFormat;
*/
typedef handle FileDescriptor; // This must have no more than one fd.
typedef FileDescriptor Fence;
typedef int32_t Status; // TODO: convert to an enum
typedef vec<uint8_t> Bytes;
/**

View file

@ -21,6 +21,23 @@ import android.hardware.media@1.0::types;
// Aliases
typedef uint32_t BufferId;
/**
* Ref: system/core/include/utils/Errors.h
* Ref: bionic/libc/kernel/uapi/asm-generic/errno-base.h
* Ref: bionic/libc/kernel/uapi/asm-generic/errno.h
* Ref: frameworks/av/include/media/stagefright/MediaError.h
* Ref: frameworks/av/media/libstagefright/omx/OMXUtils.cpp: StatusFromOMXError
*/
enum Status : int32_t {
OK = 0,
NO_ERROR = 0,
NAME_NOT_FOUND = -2,
NO_MEMORY = -12,
ERROR_UNSUPPORTED = -1010,
UNKNOWN_ERROR = -2147483648,
};
/**
* Ref: frameworks/av/include/media/IOMX.h: omx_message
*