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

Commit cf210c30 authored by Christopher Lais's avatar Christopher Lais Committed by Steve Kondik
Browse files

libstagefright: add missing getBufferInfo pieces from CAF

This fixes 720p recording on 7x30.

From Change-Ids:
 I2977fbc44f3d1415d047b567999b4dc1ece8e67b
 I782c900d2eb543d1091940619861fab76d388160
 I45be669e73df3a8f558dc93f66d539384bd0c64b

Change-Id: I65679e7ab3fa6bf05ef4828b78412551d363815c
parent e6c8de9a
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -47,6 +47,10 @@ public:


    virtual void signalBufferReturned(MediaBuffer* buffer);
    virtual void signalBufferReturned(MediaBuffer* buffer);


#ifdef USE_GETBUFFERINFO
    virtual status_t getBufferInfo(sp<IMemory>& Frame, size_t *alignedSize);
#endif

private:
private:
    friend class CameraSourceListener;
    friend class CameraSourceListener;


+7 −0
Original line number Original line Diff line number Diff line
@@ -22,6 +22,9 @@


#include <media/stagefright/MediaErrors.h>
#include <media/stagefright/MediaErrors.h>
#include <utils/RefBase.h>
#include <utils/RefBase.h>
#ifdef USE_GETBUFFERINFO
#include <binder/IMemory.h>
#endif


namespace android {
namespace android {


@@ -112,6 +115,10 @@ struct MediaSource : public RefBase {
        return ERROR_UNSUPPORTED;
        return ERROR_UNSUPPORTED;
    }
    }


#ifdef USE_GETBUFFERINFO
    virtual status_t getBufferInfo(sp<IMemory>& Frame, size_t *alignedSize);
#endif

protected:
protected:
    virtual ~MediaSource();
    virtual ~MediaSource();


+5 −0
Original line number Original line Diff line number Diff line
@@ -104,6 +104,11 @@ ifneq ($(filter qsd8k msm7k msm7625 msm7x30, $(TARGET_BOARD_PLATFORM)),)
        LOCAL_CFLAGS += -DUSE_QCOM_OMX_FIX
        LOCAL_CFLAGS += -DUSE_QCOM_OMX_FIX
endif
endif


ifeq ($(BOARD_CAMERA_USE_GETBUFFERINFO),true)
        LOCAL_CFLAGS += -DUSE_GETBUFFERINFO
        LOCAL_C_INCLUDES += $(TOP)/hardware/qcom/media/mm-core/omxcore/inc
endif

ifeq ($(TARGET_OS)-$(TARGET_SIMULATOR),linux-true)
ifeq ($(TARGET_OS)-$(TARGET_SIMULATOR),linux-true)
        LOCAL_LDLIBS += -lpthread
        LOCAL_LDLIBS += -lpthread
endif
endif
+7 −0
Original line number Original line Diff line number Diff line
@@ -369,4 +369,11 @@ void CameraSource::dataCallbackTimestamp(int64_t timestampUs,
    mFrameAvailableCondition.signal();
    mFrameAvailableCondition.signal();
}
}


#ifdef USE_GETBUFFERINFO
status_t CameraSource::getBufferInfo(sp<IMemory>& Frame, size_t *alignedSize)
{
    return mCamera->getBufferInfo(Frame, alignedSize);
}
#endif

}  // namespace android
}  // namespace android
+7 −0
Original line number Original line Diff line number Diff line
@@ -77,4 +77,11 @@ int64_t MediaSource::ReadOptions::getLateBy() const {
    return mLatenessUs;
    return mLatenessUs;
}
}


#ifdef USE_GETBUFFERINFO
status_t MediaSource::getBufferInfo(sp<IMemory>& Frame, size_t *alignedSize) {
    //do nothing, since it is virtual, need dummy implementation
    return OK;
}
#endif

}  // namespace android
}  // namespace android
Loading