From: Jaeun Choi Date: Wed, 22 Aug 2018 07:24:26 +0000 (+0900) Subject: lottie/example: add APIs in lottieview to get frame rate and total frame number X-Git-Tag: submit/tizen/20180917.042405~75 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F55%2F187355%2F2;p=platform%2Fcore%2Fuifw%2Flottie-player.git lottie/example: add APIs in lottieview to get frame rate and total frame number Change-Id: I25d14d37776cd6bf07bcba1f0fc6a1c88e66dd71 --- diff --git a/example/lottieview.cpp b/example/lottieview.cpp index f52b7f8..79ce8fb 100644 --- a/example/lottieview.cpp +++ b/example/lottieview.cpp @@ -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) diff --git a/example/lottieview.h b/example/lottieview.h index 032cbd0..e3e02d5 100644 --- a/example/lottieview.h +++ b/example/lottieview.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 mRenderTask; LOTBuffer mBuffer; };