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

Commit 8ca89d24 authored by Ray Essick's avatar Ray Essick Committed by Harish Mahendrakar
Browse files

force g711 test to match 1-channel sample data

special case the g711 test to know that it is a 1-channel input.
Test case itself can't infer the channel count from the g711 stream
since there is no header/control info within the g711 stream.

This is updated from the following commit in android10-tests-dev
https://android-review.googlesource.com/c/platform/frameworks/av/+/1138077
Instead of using component name, mime is used now to identify g711
decoder.

Bug: 140773833
Bug: 202600369

Test: atest VtsHalMediaC2V1_0TargetAudioDecTest
Change-Id: I88d60e0ea198c6f2c48899753f501e44961a090a
parent 92da43cc
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -465,6 +465,11 @@ TEST_P(Codec2AudioDecDecodeTest, DecodeTest) {
    if (mMime.find("raw") != std::string::npos) {
        bitStreamInfo[0] = 8000;
        bitStreamInfo[1] = 1;
    } else if ((mMime.find("g711-alaw") != std::string::npos) ||
               (mMime.find("g711-mlaw") != std::string::npos)) {
        // g711 test data is all 1-channel and has no embedded config info.
        bitStreamInfo[0] = 8000;
        bitStreamInfo[1] = 1;
    } else {
        ASSERT_NO_FATAL_FAILURE(getInputChannelInfo(mComponent, mMime, bitStreamInfo));
    }