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

Commit 10e58274 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "media: Implement CodecBase interfaces in ACodec"

parents 0ebafd1b 85c95cb5
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -5399,6 +5399,7 @@ status_t ACodec::getPortFormat(OMX_U32 portIndex, sp<AMessage> &notify) {
                    notify->setInt32("channel-count", params.nChannels);
                    notify->setInt32("sample-rate", params.nSampleRate);
                    notify->setInt32("bitrate", params.nBitRate);
                    notify->setInt32("aac-profile", params.eAACProfile);
                    break;
                }

@@ -9158,4 +9159,19 @@ status_t ACodec::getOMXChannelMapping(size_t numChannels, OMX_AUDIO_CHANNELTYPE
    return OK;
}

status_t ACodec::querySupportedParameters(std::vector<std::string> *names) {
    if (!names) {
        return BAD_VALUE;
    }
    return OK;
}

status_t ACodec::subscribeToParameters([[maybe_unused]] const std::vector<std::string> &names) {
    return OK;
}

status_t ACodec::unsubscribeFromParameters([[maybe_unused]] const std::vector<std::string> &names) {
    return OK;
}

}  // namespace android
+3 −0
Original line number Diff line number Diff line
@@ -69,6 +69,9 @@ struct ACodec : public AHierarchicalStateMachine, public CodecBase {
    virtual void initiateSetInputSurface(const sp<PersistentSurface> &surface);
    virtual void initiateStart();
    virtual void initiateShutdown(bool keepComponentAllocated = false);
    virtual status_t querySupportedParameters(std::vector<std::string> *names) override;
    virtual status_t subscribeToParameters(const std::vector<std::string> &names) override;
    virtual status_t unsubscribeFromParameters(const std::vector<std::string> &names) override;

    status_t queryCapabilities(
            const char* owner, const char* name,