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

Commit 8c53750e authored by Harish Mahendrakar's avatar Harish Mahendrakar
Browse files

CCodec: Updates to RevertOutputFormatIfNeeded

- Ignore signalling the changes in the following as output
  format change.
  KEY_FRAME_RATE, KEY_MAX_WIDTH, KEY_MAX_HEIGHT

- Call RevertOutputFormatIfNeeded in signalResume()

Bug: 180508570
Test: atest CtsMediaTestCases:android.media.cts.AdaptivePlaybackTest

Change-Id: Ic3ebd23b825953454779afc6f8a05f4a67c6dca3
parent d90aeec7
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -492,7 +492,10 @@ void RevertOutputFormatIfNeeded(
    // We used to not report changes to these keys to the client.
    // We used to not report changes to these keys to the client.
    const static std::set<std::string> sIgnoredKeys({
    const static std::set<std::string> sIgnoredKeys({
            KEY_BIT_RATE,
            KEY_BIT_RATE,
            KEY_FRAME_RATE,
            KEY_MAX_BIT_RATE,
            KEY_MAX_BIT_RATE,
            KEY_MAX_WIDTH,
            KEY_MAX_HEIGHT,
            "csd-0",
            "csd-0",
            "csd-1",
            "csd-1",
            "csd-2",
            "csd-2",
@@ -1706,7 +1709,9 @@ void CCodec::signalResume() {
    {
    {
        Mutexed<std::unique_ptr<Config>>::Locked configLocked(mConfig);
        Mutexed<std::unique_ptr<Config>>::Locked configLocked(mConfig);
        const std::unique_ptr<Config> &config = *configLocked;
        const std::unique_ptr<Config> &config = *configLocked;
        sp<AMessage> outputFormat = config->mOutputFormat;
        config->queryConfiguration(comp);
        config->queryConfiguration(comp);
        RevertOutputFormatIfNeeded(outputFormat, config->mOutputFormat);
    }
    }


    (void)mChannel->start(nullptr, nullptr, [&]{
    (void)mChannel->start(nullptr, nullptr, [&]{