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

Commit e8e98159 authored by Wonsik Kim's avatar Wonsik Kim
Browse files

codec2 hal: Codec2Client AIDL implementation

- Implement Codec2Client API on top of AIDL implementation
- TODO: input surface implementation is missing
- Fix libmediaplayerservice Codec2Client dependency

Bug: 251850069
Test: presubmit
Change-Id: I30c3cf24b408d20e4cae1c7e3d98bad8a7301e74
parent b96354fc
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -157,14 +157,13 @@ namespace media {
namespace c2 {
namespace utils {

// TODO: read it from aconfig flags
bool IsEnabled() { return false; }

const char* asString(Status status, const char* def) {
    return asString(static_cast<c2_status_t>(status.status), def);
}

namespace /* unnamed */ {

} // unnamed namespace

// C2FieldSupportedValuesQuery -> FieldSupportedValuesQuery
bool ToAidl(
        FieldSupportedValuesQuery* d,
+4 −1
Original line number Diff line number Diff line
@@ -37,11 +37,14 @@ namespace media {
namespace c2 {
namespace utils {

// Returns true iff AIDL c2 HAL is enabled
bool IsEnabled();

// Make asString() and operator<< work with Status as well as c2_status_t.
C2_DECLARE_AS_STRING_AND_DEFINE_STREAM_OUT(Status);

/**
 * All objcpy() functions will return a boolean value indicating whether the
 * All To/FromAidl() functions will return a boolean value indicating whether the
 * conversion succeeds or not.
 */

+6 −0
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@ cc_library {
        "android.hardware.media.c2@1.0",
        "android.hardware.media.c2@1.1",
        "android.hardware.media.c2@1.2",
        "android.hardware.media.bufferpool2-V1-ndk",
        "android.hardware.media.c2-V1-ndk",
        "libbase",
        "libbinder",
@@ -56,11 +57,16 @@ cc_library {
        "libhidlbase",
        "liblog",
        "libnativewindow",
        "libstagefright_aidl_bufferpool2",
        "libstagefright_bufferpool@2.0.1",
        "libui",
        "libutils",
    ],

    static_libs: [
        "libaidlcommonsupport",
    ],

    export_include_dirs: [
        "include",
    ],
Loading