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

Commit bc0500fd authored by Praveen Chavan's avatar Praveen Chavan Committed by Steve Kondik
Browse files

libstagefright: enable smoothstreaming in OMXCodec

Set smooth-streaming mode from OMXCodec by default
if TARGET_ENABLE_DEFAULT_SMOOTHSTREAMING is enabled

Change-Id: I4e1c2a18c0398859325cef66996b48e4579e254f
parent 9e0e629f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -379,6 +379,7 @@ private:
    void setAC3Format(int32_t numChannels, int32_t sampleRate);

    bool mNumBFrames;
    bool mInSmoothStreamingMode;
};

struct CodecCapabilities {
+10 −2
Original line number Diff line number Diff line
@@ -710,6 +710,8 @@ status_t OMXCodec::configureCodec(const sp<MetaData> &meta) {

            ExtendedCodec::configureVideoCodec(
                    meta, mOMX, mFlags, mNode, mComponentName);
            ExtendedCodec::enableSmoothStreaming(
                    mOMX, mNode, &mInSmoothStreamingMode, mComponentName);
        }
    }

@@ -1581,7 +1583,8 @@ OMXCodec::OMXCodec(
              (!strncmp(componentName, "OMX.google.", 11)
              || !strcmp(componentName, "OMX.Nvidia.mpeg2v.decode"))
                        ? NULL : nativeWindow),
      mNumBFrames(0) {
      mNumBFrames(0),
      mInSmoothStreamingMode(false) {
    mPortStatus[kPortIndexInput] = ENABLED;
    mPortStatus[kPortIndexOutput] = ENABLED;

@@ -4966,6 +4969,11 @@ void OMXCodec::initOutputFormat(const sp<MetaData> &inputFormat) {
                }

                if (mNativeWindow != NULL) {
                    if (mInSmoothStreamingMode) {
                        QCUtils::updateNativeWindowBufferGeometry(
                                mNativeWindow.get(), video_def->nFrameWidth,
                                video_def->nFrameHeight, video_def->eColorFormat);
                    }
                    initNativeWindowCrop();
                }
            } else {