mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-02-01 00:35:33 +00:00
lottieplayer: remove framerate function.
One of unnecesary functionalities. Please add this when it really needs. Change-Id: I1fed313df10c15ea4aca2faa3b15c51154b07f17
This commit is contained in:
committed by
subhransu mohanty
parent
ea434398c7
commit
79aa9abfa5
@@ -14,8 +14,6 @@ public:
|
||||
bool setFilePath(std::string path);
|
||||
void setSize(const VSize &sz);
|
||||
void size(int &w, int &h) const;
|
||||
void setFrameRate(int frameRate);
|
||||
int frameRate() const;
|
||||
float playTime() const;
|
||||
bool seek(float pos);
|
||||
const std::vector<LOTNode *>& renderList()const;
|
||||
@@ -25,7 +23,6 @@ public:
|
||||
std::shared_ptr<LOTModel> mModel;
|
||||
std::unique_ptr<LOTCompItem> mCompItem;
|
||||
VSize mSize;
|
||||
int mFrameRate;
|
||||
};
|
||||
|
||||
void LOTPlayerPrivate::setSize(const VSize &sz)
|
||||
@@ -45,26 +42,11 @@ const std::vector<LOTNode *>& LOTPlayerPrivate::renderList() const
|
||||
{
|
||||
return mCompItem->renderList();
|
||||
}
|
||||
int LOTPlayerPrivate::frameRate() const
|
||||
{
|
||||
if (mFrameRate)
|
||||
return mFrameRate;
|
||||
else
|
||||
return mModel->frameRate();
|
||||
}
|
||||
|
||||
void LOTPlayerPrivate::setFrameRate(int frameRate)
|
||||
{
|
||||
mFrameRate = frameRate;
|
||||
}
|
||||
|
||||
float LOTPlayerPrivate::playTime() const
|
||||
{
|
||||
if (mModel->isStatic()) return 0;
|
||||
|
||||
float fr = frameRate();
|
||||
float fd = mModel->frameDuration();
|
||||
return fd/fr;
|
||||
return mModel->frameDuration() / mModel->frameRate();
|
||||
}
|
||||
|
||||
bool LOTPlayerPrivate::seek(float pos)
|
||||
@@ -91,7 +73,7 @@ bool LOTPlayerPrivate::render(float pos, const LOTBuffer &buffer)
|
||||
}
|
||||
|
||||
|
||||
LOTPlayerPrivate::LOTPlayerPrivate():mFrameRate(0)
|
||||
LOTPlayerPrivate::LOTPlayerPrivate()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -150,16 +132,6 @@ float LOTPlayer::playTime() const
|
||||
return d->playTime();
|
||||
}
|
||||
|
||||
int LOTPlayer::frameRate() const
|
||||
{
|
||||
return d->frameRate();
|
||||
}
|
||||
|
||||
void LOTPlayer::setFrameRate(int frameRate)
|
||||
{
|
||||
d->setFrameRate(frameRate);
|
||||
}
|
||||
|
||||
void LOTPlayer::seek(float pos)
|
||||
{
|
||||
d->seek(pos);
|
||||
|
||||
Reference in New Issue
Block a user