Loading media/codec2/hidl/1.0/utils/Android.bp +2 −2 Original line number Diff line number Diff line Loading @@ -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: [ Loading @@ -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: [ Loading media/codec2/hidl/1.0/utils/include/codec2/hidl/1.0/InputSurface.h +6 −10 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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 Loading media/codec2/hidl/1.0/vts/functional/audio/VtsHalMediaC2V1_0TargetAudioDecTest.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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()) { Loading media/codec2/hidl/1.0/vts/functional/common/media_c2_hidl_test_common.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -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, Loading media/codec2/hidl/1.0/vts/functional/common/media_c2_hidl_test_common.h +7 −18 Original line number Diff line number Diff line Loading @@ -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() Loading Loading @@ -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 Loading
media/codec2/hidl/1.0/utils/Android.bp +2 −2 Original line number Diff line number Diff line Loading @@ -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: [ Loading @@ -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: [ Loading
media/codec2/hidl/1.0/utils/include/codec2/hidl/1.0/InputSurface.h +6 −10 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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 Loading
media/codec2/hidl/1.0/vts/functional/audio/VtsHalMediaC2V1_0TargetAudioDecTest.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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()) { Loading
media/codec2/hidl/1.0/vts/functional/common/media_c2_hidl_test_common.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -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, Loading
media/codec2/hidl/1.0/vts/functional/common/media_c2_hidl_test_common.h +7 −18 Original line number Diff line number Diff line Loading @@ -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() Loading Loading @@ -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