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

Commit 6fc72b01 authored by Marco Nelissen's avatar Marco Nelissen
Browse files

Make codecs reconfigurable

Change-Id: I3dd46cb4401493becbf6152f4dcd5a8f1e9a0b44
parent 53bc0a2f
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -594,6 +594,11 @@ void SoftAAC2::onPortFlushCompleted(OMX_U32 portIndex) {
    }
}

void SoftAAC2::onReset() {
    aacDecoder_SetParam(mAACDecoder, AAC_TPDEC_CLEAR_BUFFER, 1);
    mIsFirst = true;
}

void SoftAAC2::onPortEnableCompleted(OMX_U32 portIndex, bool enabled) {
    if (portIndex != 1) {
        return;
+1 −0
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ protected:
    virtual void onQueueFilled(OMX_U32 portIndex);
    virtual void onPortFlushCompleted(OMX_U32 portIndex);
    virtual void onPortEnableCompleted(OMX_U32 portIndex, bool enabled);
    virtual void onReset();

private:
    enum {
+5 −0
Original line number Diff line number Diff line
@@ -343,6 +343,11 @@ void SoftMP3::onPortEnableCompleted(OMX_U32 portIndex, bool enabled) {
    }
}

void SoftMP3::onReset() {
    pvmp3_InitDecoder(mConfig, mDecoderBuf);
    mIsFirst = true;
}

}  // namespace android

android::SoftOMXComponent *createSoftOMXComponent(
+1 −0
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@ protected:
    virtual void onQueueFilled(OMX_U32 portIndex);
    virtual void onPortFlushCompleted(OMX_U32 portIndex);
    virtual void onPortEnableCompleted(OMX_U32 portIndex, bool enabled);
    virtual void onReset();

private:
    enum {
+5 −0
Original line number Diff line number Diff line
@@ -410,6 +410,11 @@ void SoftVorbis::onPortFlushCompleted(OMX_U32 portIndex) {
    }
}

void SoftVorbis::onReset() {
    mNumFramesOutput = 0;
    vorbis_dsp_restart(mState);
}

void SoftVorbis::onPortEnableCompleted(OMX_U32 portIndex, bool enabled) {
    if (portIndex != 1) {
        return;
Loading