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

Commit fbd3dc99 authored by Songyue Han's avatar Songyue Han Committed by Automerger Merge Worker
Browse files

Merge "Add libmedia_codeclist_capabilities lib and CodecCapabilitiesTest."...

Merge "Add libmedia_codeclist_capabilities lib and CodecCapabilitiesTest." into main am: 71ba5a64 am: d50082af

Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/3063603



Change-Id: I9cfb303d70aefdae053ad94314b798c92f6ae611
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 0397f3ee d50082af
Loading
Loading
Loading
Loading
+39 −0
Original line number Diff line number Diff line
@@ -254,6 +254,44 @@ cc_library_static {
    },
}

cc_library_shared {
    name: "libmedia_codeclist_capabilities",

    srcs: [
        "CodecCapabilities.cpp",
        "CodecCapabilitiesUtils.cpp",
    ],

    local_include_dirs: [
        "include",
    ],

    shared_libs: [
        "libbinder",
        "liblog",
        "libstagefright_foundation",
        "libutils",
    ],

    export_include_dirs: [
        "include",
    ],

    cflags: [
        "-Werror",
        "-Wno-error=deprecated-declarations",
        "-Wall",
    ],

    sanitize: {
        misc_undefined: [
            "unsigned-integer-overflow",
            "signed-integer-overflow",
        ],
        cfi: true,
    },
}

cc_library_shared {
    name: "libmedia_codeclist",

@@ -270,6 +308,7 @@ cc_library_shared {
        "android.hardware.media.omx@1.0",
        "libbinder",
        "liblog",
        "libmedia_codeclist_capabilities",
        "libstagefright_foundation",
        "libutils",
    ],
+28 −0
Original line number Diff line number Diff line
/*
 * Copyright 2024, The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

//#define LOG_NDEBUG 0
#define LOG_TAG "CodecCapabilities"

#include <utils/Log.h>
#include <media/CodecCapabilities.h>
#include <media/CodecCapabilitiesUtils.h>
#include <media/stagefright/foundation/ADebug.h>
#include <media/stagefright/foundation/AMessage.h>

namespace android {

}  // namespace android
 No newline at end of file
+32 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2024 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

//#define LOG_NDEBUG 0
#define LOG_TAG "CodecCapabilitiesUtils"
#include <utils/Log.h>

#include <algorithm>
#include <cmath>
#include <string>
#include <vector>

#include <media/CodecCapabilitiesUtils.h>

#include <media/stagefright/foundation/AUtils.h>

namespace android {

}  // namespace android
 No newline at end of file
+39 −0
Original line number Diff line number Diff line
/*
 * Copyright 2024, The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef CODEC_CAPABILITIES_H_

#define CODEC_CAPABILITIES_H_

#include <media/CodecCapabilitiesUtils.h>
#include <media/stagefright/foundation/ABase.h>
#include <media/stagefright/foundation/AMessage.h>
#include <media/stagefright/foundation/AString.h>
#include <media/stagefright/MediaCodecConstants.h>

#include <utils/Errors.h>
#include <utils/RefBase.h>
#include <utils/Vector.h>
#include <utils/StrongPointer.h>

namespace android {

struct CodecCapabilities {
};

}  // namespace android

#endif // CODEC_CAPABILITIES_H_
 No newline at end of file
+43 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2024 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef CODEC_CAPABILITIES__UTILS_H_

#define CODEC_CAPABILITIES__UTILS_H_

#include <algorithm>
#include <cmath>
#include <optional>
#include <string>
#include <vector>

#include <utils/Log.h>

#include <media/stagefright/foundation/AUtils.h>

namespace android {

struct ProfileLevel {
    uint32_t mProfile;
    uint32_t mLevel;
    bool operator <(const ProfileLevel &o) const {
        return mProfile < o.mProfile || (mProfile == o.mProfile && mLevel < o.mLevel);
    }
};

}  // namespace android

#endif  // CODEC_CAPABILITIES__UTILS_H_
 No newline at end of file
Loading