mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-02-01 00:35:33 +00:00
lottie/example: add APIs in lottieview to get frame rate and total frame number
Change-Id: I25d14d37776cd6bf07bcba1f0fc6a1c88e66dd71
This commit is contained in:
committed by
Subhransu Mohanty
parent
318151a35d
commit
02e660cff7
@@ -194,6 +194,8 @@ void LottieView::render()
|
||||
void LottieView::setFilePath(const char *filePath)
|
||||
{
|
||||
mPlayer->setFilePath(filePath);
|
||||
mFrameRate = mPlayer->getFrameRate();
|
||||
mTotalFrame = mPlayer->getTotalFrame();
|
||||
}
|
||||
|
||||
void LottieView::setSize(int w, int h)
|
||||
|
||||
@@ -35,6 +35,8 @@ public:
|
||||
void setSpeed(float speed) { mSpeed = speed;}
|
||||
void setRepeatCount(int count);
|
||||
void setRepeatMode(LottieView::RepeatMode mode);
|
||||
float getFrameRate() const { return mFrameRate; }
|
||||
long getTotalFrame() const { return mTotalFrame; }
|
||||
public:
|
||||
void seek(float pos);
|
||||
void finished();
|
||||
@@ -66,6 +68,8 @@ public:
|
||||
bool mAsyncRender;
|
||||
bool mDirty;
|
||||
float mPendingPos;
|
||||
float mFrameRate;
|
||||
long mTotalFrame;
|
||||
std::future<bool> mRenderTask;
|
||||
LOTBuffer mBuffer;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user