Skip to content

Commit

Permalink
Allow using SinglePlayer-s lifetime.
Browse files Browse the repository at this point in the history
  • Loading branch information
john-preston committed Sep 15, 2021
1 parent 25294ef commit a8ffe6c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lottie/lottie_single_player.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ class SinglePlayer final : public Player {
Quality quality = Quality::Default,
const ColorReplacements *replacements = nullptr,
std::shared_ptr<FrameRenderer> renderer = nullptr);

~SinglePlayer();

void start(
Expand All @@ -54,7 +53,7 @@ class SinglePlayer final : public Player {
bool markFrameShown() override;
void checkStep() override;

rpl::producer<Update, Error> updates() const;
[[nodiscard]] rpl::producer<Update, Error> updates() const;

[[nodiscard]] bool ready() const;
[[nodiscard]] QImage frame() const;
Expand All @@ -63,6 +62,10 @@ class SinglePlayer final : public Player {
const FrameRequest &request) const;
[[nodiscard]] Information information() const;

[[nodiscard]] rpl::lifetime &lifetime() {
return _lifetime;
}

private:
void checkNextFrameAvailability();
void checkNextFrameRender();
Expand Down

0 comments on commit a8ffe6c

Please sign in to comment.