Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 44f5c800 authored by Pawin Vongmasa's avatar Pawin Vongmasa Committed by Android (Google) Code Review
Browse files

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

parents a9a58c15 26497205
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -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;

/**
+17 −0
Original line number Diff line number Diff line
@@ -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
 *