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

Commit dd9faf18 authored by Umang Saini's avatar Umang Saini Committed by Sungtak Lee
Browse files

codec2: Allow all component names in VTS

Test: VtsHidlC2V1_0TargetVideoDecTest -I default -C c2.qti.avc.decoder -P /sdcard/res/
Test: VtsHidlC2V1_0TargetVideoEncTest -I default -C c2.qti.avc.encoder -P /sdcard/res/

Bug: 131905215
Change-Id: I8bbdff7b53778ed4e21e7c598363591b07eb5f60
parent 4a7c6cb4
Loading
Loading
Loading
Loading
+3 −10
Original line number Diff line number Diff line
@@ -117,17 +117,10 @@ class Codec2AudioDecHidlTest : public ::testing::VtsHalHidlTargetTestBase {
        const size_t kNumStringToName =
            sizeof(kStringToName) / sizeof(kStringToName[0]);

        std::string substring;
        std::string comp;
        substring = std::string(gEnv->getComponent());
        /* TODO: better approach to find the component */
        /* "c2.android." => 11th position */
        size_t pos = 11;
        size_t len = substring.find(".decoder", pos);
        comp = substring.substr(pos, len - pos);

        // Find the component type
        std::string comp = std::string(gEnv->getComponent());
        for (size_t i = 0; i < kNumStringToName; ++i) {
            if (!strcasecmp(comp.c_str(), kStringToName[i].Name)) {
            if (strcasestr(comp.c_str(), kStringToName[i].Name)) {
                mCompName = kStringToName[i].CompName;
                break;
            }
+3 −10
Original line number Diff line number Diff line
@@ -103,17 +103,10 @@ class Codec2AudioEncHidlTest : public ::testing::VtsHalHidlTargetTestBase {
        const size_t kNumStringToName =
            sizeof(kStringToName) / sizeof(kStringToName[0]);

        std::string substring;
        std::string comp;
        substring = std::string(gEnv->getComponent());
        /* TODO: better approach to find the component */
        /* "c2.android." => 11th position */
        size_t pos = 11;
        size_t len = substring.find(".encoder", pos);
        comp = substring.substr(pos, len - pos);

        // Find the component type
        std::string comp = std::string(gEnv->getComponent());
        for (size_t i = 0; i < kNumStringToName; ++i) {
            if (!strcasecmp(comp.c_str(), kStringToName[i].Name)) {
            if (strcasestr(comp.c_str(), kStringToName[i].Name)) {
                mCompName = kStringToName[i].CompName;
                break;
            }
+17 −8
Original line number Diff line number Diff line
## Codec2 Hal @ 1.0 tests ##
## Codec2 VTS Hal @ 1.0 tests ##
---
#### master :
Functionality of master is to enumerate all the Codec2 components available in C2 media service.

usage: MtsHidlC2V1\_0TargetMasterTest -I software
usage: VtsHidlC2V1\_0TargetMasterTest -I default

#### component :
Functionality of component is to test common functionality across all the Codec2 components available in C2 media service. For a standard C2 component, these tests are expected to pass.
Functionality of component test is to validate common functionality across all the Codec2 components available in C2 media service. For a standard C2 component, these tests are expected to pass.

usage: MtsHidlC2V1\_0TargetComponentTest -I software -C <comp name>
usage: VtsHidlC2V1\_0TargetComponentTest -I software -C <comp name>
example: VtsHidlC2V1\_0TargetComponentTest -I software -C c2.android.vorbis.decoder

#### audio :
Functionality of audio test is to validate audio specific functionality Codec2 components. The resource files for this test are taken from hardware/interfaces/media/res. The path to these files on the device is required to be given for bitstream tests.
Functionality of audio test is to validate audio specific functionality Codec2 components. The resource files for this test are taken from media/codec2/hidl/1.0/vts/functional/res. The path to these files on the device is required to be given for bitstream tests.

usage: MtsHidlC2V1\_0TargetAudioDecTest -I software -C <comp name> -P /sdcard/media
usage: VtsHidlC2V1\_0TargetAudioDecTest -I default -C <comp name> -P /sdcard/res/
usage: VtsHidlC2V1\_0TargetAudioEncTest -I software -C <comp name> -P /sdcard/res/

example: VtsHidlC2V1\_0TargetAudioDecTest -I software -C c2.android.flac.decoder -P /sdcard/res/
example: VtsHidlC2V1\_0TargetAudioEncTest -I software -C c2.android.opus.encoder -P /sdcard/res/

#### video :
Functionality of video test is to validate video specific functionality Codec2 components. The resource files for this test are taken from hardware/interfaces/media/res. The path to these files on the device is required to be given for bitstream tests.
Functionality of video test is to validate video specific functionality Codec2 components. The resource files for this test are taken from media/codec2/hidl/1.0/vts/functional/res. The path to these files on the device is required to be given for bitstream tests.

usage: VtsHidlC2V1\_0TargetVideoDecTest -I default -C <comp name> -P /sdcard/res/
usage: VtsHidlC2V1\_0TargetVideoEncTest -I software -C <comp name> -P /sdcard/res/

usage: MtsHidlC2V1\_0TargetVideoDecTest -I software -C <comp name> -P /sdcard/media
example: VtsHidlC2V1\_0TargetVideoDecTest -I software -C c2.android.avc.decoder -P /sdcard/res/
example: VtsHidlC2V1\_0TargetVideoEncTest -I software -C c2.android.vp9.encoder -P /sdcard/res/
+3 −10
Original line number Diff line number Diff line
@@ -107,17 +107,10 @@ class Codec2VideoDecHidlTest : public ::testing::VtsHalHidlTargetTestBase {
        const size_t kNumStringToName =
            sizeof(kStringToName) / sizeof(kStringToName[0]);

        std::string substring;
        std::string comp;
        substring = std::string(gEnv->getComponent());
        /* TODO: better approach to find the component */
        /* "c2.android." => 11th position */
        size_t pos = 11;
        size_t len = substring.find(".decoder", pos);
        comp = substring.substr(pos, len - pos);

        // Find the component type
        std::string comp = std::string(gEnv->getComponent());
        for (size_t i = 0; i < kNumStringToName; ++i) {
            if (!strcasecmp(comp.c_str(), kStringToName[i].Name)) {
            if (strcasestr(comp.c_str(), kStringToName[i].Name)) {
                mCompName = kStringToName[i].CompName;
                break;
            }
+3 −10
Original line number Diff line number Diff line
@@ -101,17 +101,10 @@ class Codec2VideoEncHidlTest : public ::testing::VtsHalHidlTargetTestBase {
        const size_t kNumStringToName =
            sizeof(kStringToName) / sizeof(kStringToName[0]);

        std::string substring;
        std::string comp;
        substring = std::string(gEnv->getComponent());
        /* TODO: better approach to find the component */
        /* "c2.android." => 11th position */
        size_t pos = 11;
        size_t len = substring.find(".encoder", pos);
        comp = substring.substr(pos, len - pos);

        // Find the component type
        std::string comp = std::string(gEnv->getComponent());
        for (size_t i = 0; i < kNumStringToName; ++i) {
            if (!strcasecmp(comp.c_str(), kStringToName[i].Name)) {
            if (strcasestr(comp.c_str(), kStringToName[i].Name)) {
                mCompName = kStringToName[i].CompName;
                break;
            }