-
Notifications
You must be signed in to change notification settings - Fork 233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
example: lottieviewer - fixed frame no #528
Conversation
There is a problem (issue Samsung#527) with totalFrame() in rlottie. As lottieviewer didn't showed the actual frame number, but calculated it from progress, it camouflaged the problem. Now the actual frame number and the total number of frames are displayed.
628f325
to
0a01099
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last frame number is not displayed even when progress bar is 1.00
For example in a_cup_of_coffee.json
ip is 0, op is 72. Expected totalFrame is 73.
But when I play it with lottieviewer
Even if I reach the end, it shows up as 71 (total:73).
Could you please check again?
{ | ||
int frameNo = pos * info->view->getTotalFrame(); | ||
char buf[64]; | ||
long currFrameNo = info->view->mCurFrame; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about curFrameNo
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* lottiemodel: Improve opacity calculation for gradient stop Basically, Graeidnt stop's color and opacity are provided as separate arrays. Stop position and opacity position do not match each other. Existing code is a sequential approach. It caused problems in various cases of positions. The improved logic repeats the loop, but no exceptions are raised. It's not complicated, it's simple. This code referenced the lottie-android library. https://github.com/airbnb/lottie-android/blob/master/lottie/src/main/java/com/airbnb/lottie/parser/GradientColorParser.java * replace uint ushort and uchar typedefs with uint32 uint16 and uint8 -- added format script to run clang format on latest commit. * replace unsigned int with uint32_t in Int() Signed-off-by: wangxuedong <[email protected]> Change-Id: I4390c12fcf3aefccfe20290436b0dad96877008c * Add lottie_init() and lottie_shutdown() c api. To support dynamic loading and unloading of rlottie library safely we need to deallocate the resource cache as well as safely shutdown all the worker threads. current patch only stops the Render and Rle task schedulers when lottie_shutdown is called. Things yet to be implemented during shutdown phase - Unload image loader if loaded dynamically. - Check if we can release some cache resources. - Currently multiple load and unload of rlottie library will not work as we are not starting the scheduler again when lottie_init() called multiple time in the same process. * add formal parameter void to lottie_init() and lottie_shutdown() Signed-off-by: wangxuedong <[email protected]> Change-Id: I40dbe4b07f9581e5042e468d3860e135622580c8 * Ignore animations with objects of unspecified type * Check border of color table while generating gradient * Delete accidentally committed Vim swap file * Fix one frame missing (Samsung#529) As mStartFrame and mEndFrame was counted from 0 and totalFrame() was calculated as a difference, there were always one frame missing and the animation rescaled. This patch adds one to the total frames count. issue: Samsung#527 * example: lottieviewer - fixed frame no (Samsung#528) There is a problem (issue Samsung#527) with totalFrame() in rlottie. As lottieviewer didn't showed the actual frame number, but calculated it from progress, it camouflaged the problem. Now the actual frame number and the total number of frames are displayed. Signed-off-by: wangxuedong <[email protected]> Co-authored-by: JunsuChoi <[email protected]> Co-authored-by: Subhransu Mohanty <[email protected]> Co-authored-by: wangxuedong <[email protected]> Co-authored-by: Nicholas Guriev <[email protected]> Co-authored-by: Michal Maciola <[email protected]>
There is a problem (issue Samsung#527) with totalFrame() in rlottie. As lottieviewer didn't showed the actual frame number, but calculated it from progress, it camouflaged the problem. Now the actual frame number and the total number of frames are displayed.
There is a problem (issue #527) with totalFrame() in rlottie.
As lottieviewer didn't showed the actual frame number, but calculated it from
progress, it camouflaged the problem. Now the actual frame number and the
total number of frames are displayed.