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

Commit f8ac9920 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Codec2Utils: Add support for media.c2@1.1"

parents 78291ae9 bf69de9e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -104,7 +104,7 @@ cc_library {

// public dependency for Codec 2.0 HAL service implementations
cc_defaults {
    name: "libcodec2-hidl-defaults",
    name: "libcodec2-hidl-defaults@1.0",
    defaults: ["libcodec2-impl-defaults"],

    shared_libs: [
@@ -115,7 +115,7 @@ cc_defaults {

// public dependency for Codec 2.0 HAL client
cc_defaults {
    name: "libcodec2-hidl-client-defaults",
    name: "libcodec2-hidl-client-defaults@1.0",
    defaults: ["libcodec2-impl-defaults"],

    shared_libs: [
+6 −10
Original line number Diff line number Diff line
@@ -57,6 +57,12 @@ struct InputSurface : public IInputSurface {
            const sp<IInputSink>& sink,
            connect_cb _hidl_cb) override;

    InputSurface(
            const std::shared_ptr<ParameterCache>& cache,
            const std::shared_ptr<C2ReflectorHelper>& reflector,
            const sp<HGraphicBufferProducer>& base,
            const sp<GraphicBufferSource>& source);

protected:

    class Interface;
@@ -68,19 +74,9 @@ protected:
    std::shared_ptr<Interface> mIntf;
    sp<CachedConfigurable> mConfigurable;

    InputSurface(
            const std::shared_ptr<ParameterCache>& cache,
            const std::shared_ptr<C2ReflectorHelper>& reflector,
            const sp<HGraphicBufferProducer>& base,
            const sp<GraphicBufferSource>& source);

    virtual ~InputSurface() override = default;

    friend struct ComponentStore;

};


}  // namespace utils
}  // namespace V1_0
}  // namespace c2
+2 −2
Original line number Diff line number Diff line
@@ -203,7 +203,7 @@ class Codec2AudioDecHidlTest : public ::testing::VtsHalHidlTargetTestBase {
    uint32_t mFramesReceived;
    std::list<uint64_t> mFlushedIndices;
    std::list<uint64_t> mTimestampUslist;
    ::android::List<outputMetaData> oBufferMetaData;
    std::list<outputMetaData> oBufferMetaData;

    C2BlockPool::local_id_t mBlockPoolId;
    std::shared_ptr<C2BlockPool> mLinearPool;
@@ -594,7 +594,7 @@ TEST_P(Codec2AudioDecDecodeTest, DecodeTest) {
        int nSampleRate = bitStreamInfo[0];
        int nChannels = bitStreamInfo[1];
        std::list<uint64_t>::iterator itIn = mTimestampUslist.begin();
        android::List<outputMetaData>::iterator itOut = oBufferMetaData.begin();
        auto itOut = oBufferMetaData.begin();
        EXPECT_EQ(*itIn, itOut->timestampUs);
        expTs = *itIn;
        while (itOut != oBufferMetaData.end()) {
+7 −0
Original line number Diff line number Diff line
@@ -20,6 +20,13 @@

#include "media_c2_hidl_test_common.h"

#include <android/hardware/media/c2/1.0/IComponentStore.h>

void ComponentTestEnvironment::registerTestServices() {
    registerTestService<::android::hardware::media::c2::V1_0::
                        IComponentStore>();
}

// Test the codecs for NullBuffer, Empty Input Buffer with(out) flags set
void testInputBuffer(
    const std::shared_ptr<android::Codec2Client::Component>& component,
+7 −18
Original line number Diff line number Diff line
@@ -17,32 +17,23 @@
#ifndef MEDIA_C2_HIDL_TEST_COMMON_H
#define MEDIA_C2_HIDL_TEST_COMMON_H

#include <codec2/hidl/client.h>

#include <android/hardware/media/c2/1.0/types.h>

#include <C2Component.h>
#include <C2Config.h>

#include <codec2/hidl/client.h>
#include <getopt.h>
#include <hidl/HidlSupport.h>
#include <media/stagefright/foundation/ALooper.h>
#include <media/stagefright/foundation/Mutexed.h>
#include <VtsHalHidlTargetTestEnvBase.h>

using namespace ::android::hardware::media::c2::V1_0;
using namespace ::android::hardware::media::c2::V1_0::utils;
#define MAX_RETRY 20
#define TIME_OUT 400ms
#define MAX_INPUT_BUFFERS 8

using ::android::Mutexed;
using ::android::hardware::Void;
using ::android::hardware::Return;
using ::android::hardware::hidl_vec;
using ::android::hardware::hidl_string;

#include <VtsHalHidlTargetTestEnvBase.h>

#define MAX_RETRY 20
#define TIME_OUT 400ms
#define MAX_INPUT_BUFFERS 8

/*
 * Handle Callback functions onWorkDone(), onTripped(),
 * onError(), onDeath(), onFramesRendered()
@@ -114,9 +105,7 @@ class ComponentTestEnvironment : public ::testing::VtsHalHidlTargetTestEnvBase {
    typedef ::testing::VtsHalHidlTargetTestEnvBase Super;

   public:
    virtual void registerTestServices() override {
        registerTestService<IComponentStore>();
    }
    virtual void registerTestServices() override;

    ComponentTestEnvironment() : res("/data/local/tmp/media/") {}

Loading