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

Commit ff84a3b0 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 7336869 from 9a8a479a to sc-release

Change-Id: I126616a333f2bd94ad0bb3410e003770a782c77b
parents 2c0e8e1d 9a8a479a
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -7,7 +7,6 @@ service media.transcoding /apex/com.android.media/bin/mediatranscoding
    group media
    ioprio rt 4
    # Restrict to little cores only with system-background cpuset.
    # Lower IO priority to background.
    writepid /dev/cpuset/system-background/tasks /dev/blkio/background/tasks
    writepid /dev/cpuset/system-background/tasks
    interface aidl media.transcoding
    disabled
+18 −0
Original line number Diff line number Diff line
@@ -392,6 +392,7 @@ constexpr char C2_PARAMKEY_TIME_STRETCH[] = "algo.time-stretch";

namespace {

// Codec bases are ordered by their date of introduction to the code base.
enum : uint32_t {
    _C2_PL_MP2V_BASE = 0x1000,
    _C2_PL_AAC_BASE  = 0x2000,
@@ -403,12 +404,15 @@ enum : uint32_t {
    _C2_PL_DV_BASE   = 0x8000,
    _C2_PL_AV1_BASE  = 0x9000,
    _C2_PL_VP8_BASE  = 0xA000,
    _C2_PL_MPEGH_BASE = 0xB000,     // MPEG-H 3D Audio

    C2_PROFILE_LEVEL_VENDOR_START = 0x70000000,
};

}

// Profiles and levels for each codec are ordered based on how they are ordered in the
// corresponding standard documents at introduction, and chronologically afterwards.
enum C2Config::profile_t : uint32_t {
    PROFILE_UNUSED = 0,                         ///< profile is not used by this media type

@@ -562,6 +566,13 @@ enum C2Config::profile_t : uint32_t {
    PROFILE_VP8_1,                              ///< VP8 Profile 1
    PROFILE_VP8_2,                              ///< VP8 Profile 2
    PROFILE_VP8_3,                              ///< VP8 Profile 3

    // MPEG-H 3D Audio profiles
    PROFILE_MPEGH_MAIN = _C2_PL_MPEGH_BASE,     ///< MPEG-H Main
    PROFILE_MPEGH_HIGH,                         ///< MPEG-H High
    PROFILE_MPEGH_LC,                           ///< MPEG-H Low-complexity
    PROFILE_MPEGH_BASELINE,                     ///< MPEG-H Baseline

};

enum C2Config::level_t : uint32_t {
@@ -704,6 +715,13 @@ enum C2Config::level_t : uint32_t {
    LEVEL_AV1_7_1,                              ///< AV1 Level 7.1
    LEVEL_AV1_7_2,                              ///< AV1 Level 7.2
    LEVEL_AV1_7_3,                              ///< AV1 Level 7.3

    // MPEG-H 3D Audio levels
    LEVEL_MPEGH_1 = _C2_PL_MPEGH_BASE,          ///< MPEG-H L1
    LEVEL_MPEGH_2,                              ///< MPEG-H L2
    LEVEL_MPEGH_3,                              ///< MPEG-H L3
    LEVEL_MPEGH_4,                              ///< MPEG-H L4
    LEVEL_MPEGH_5,                              ///< MPEG-H L5
};

struct C2ProfileLevelStruct {
+13 −0
Original line number Diff line number Diff line
@@ -142,6 +142,14 @@ DEFINE_C2_ENUM_VALUE_CUSTOM_HELPER(C2Config::profile_t, ({
        { "av1-0", C2Config::PROFILE_AV1_0 },
        { "av1-1", C2Config::PROFILE_AV1_1 },
        { "av1-2", C2Config::PROFILE_AV1_2 },
        { "vp8-0", C2Config::PROFILE_VP8_0 },
        { "vp8-1", C2Config::PROFILE_VP8_1 },
        { "vp8-2", C2Config::PROFILE_VP8_2 },
        { "vp8-3", C2Config::PROFILE_VP8_3 },
        { "mpegh-main", C2Config::PROFILE_MPEGH_MAIN },
        { "mpegh-high", C2Config::PROFILE_MPEGH_HIGH },
        { "mpegh-lc", C2Config::PROFILE_MPEGH_LC },
        { "mpegh-baseline", C2Config::PROFILE_MPEGH_BASELINE },
}))

DEFINE_C2_ENUM_VALUE_CUSTOM_HELPER(C2Config::level_t, ({
@@ -248,6 +256,11 @@ DEFINE_C2_ENUM_VALUE_CUSTOM_HELPER(C2Config::level_t, ({
        { "av1-7.1", C2Config::LEVEL_AV1_7_1 },
        { "av1-7.2", C2Config::LEVEL_AV1_7_2 },
        { "av1-7.3", C2Config::LEVEL_AV1_7_3 },
        { "mpegh-1", C2Config::LEVEL_MPEGH_1 },
        { "mpegh-2", C2Config::LEVEL_MPEGH_2 },
        { "mpegh-3", C2Config::LEVEL_MPEGH_3 },
        { "mpegh-4", C2Config::LEVEL_MPEGH_4 },
        { "mpegh-5", C2Config::LEVEL_MPEGH_5 },
}))

DEFINE_C2_ENUM_VALUE_CUSTOM_HELPER(C2BufferData::type_t, ({
+1 −1
Original line number Diff line number Diff line
@@ -98,7 +98,7 @@ private:
    bool mIsDynamicChannels = false;
    bool mIsDynamicRate = false;

    audio_encapsulation_type_t mEncapsulationType;
    audio_encapsulation_type_t mEncapsulationType = AUDIO_ENCAPSULATION_TYPE_NONE;

    AudioProfile() = default;
    AudioProfile& operator=(const AudioProfile& other);
+6 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
#define LOG_TAG "StreamHalLocal"
//#define LOG_NDEBUG 0

#include <audio_utils/Metadata.h>
#include <hardware/audio.h>
#include <media/AudioParameter.h>
#include <utils/Log.h>
@@ -353,7 +354,11 @@ int StreamOutHalLocal::asyncEventCallback(
    if (callback.get() == nullptr) return 0;
    switch (event) {
        case STREAM_EVENT_CBK_TYPE_CODEC_FORMAT_CHANGED:
            callback->onCodecFormatChanged(std::basic_string<uint8_t>((uint8_t*)param));
            // void* param is the byte string buffer from byte_string_from_audio_metadata().
            // As the byte string buffer may have embedded zeroes, we cannot use strlen()
            callback->onCodecFormatChanged(std::basic_string<uint8_t>(
                    (const uint8_t*)param,
                    audio_utils::metadata::dataByteStringLen((const uint8_t*)param)));
            break;
        default:
            ALOGW("%s unknown event %d", __func__, event);
Loading