GCC Code Coverage Report


Directory: ./
File: playlist/PlaylistEntrySequence.h
Date: 2026-12-01 12:27:28
Exec Total Coverage
Lines: 3 3 100.0%
Functions: 3 3 100.0%
Branches: 0 0 -%

Line Branch Exec Source
1 #pragma once
2 /*
3 * This file is part of the Falcon Player (FPP) and is Copyright (C)
4 * 2013-2022 by the Falcon Player Developers.
5 *
6 * The Falcon Player (FPP) is free software, and is covered under
7 * multiple Open Source licenses. Please see the included 'LICENSES'
8 * file for descriptions of what files are covered by each license.
9 *
10 * This source file is covered under the LGPL v2.1 as described in the
11 * included LICENSE.LGPL file.
12 */
13
14 #include <string>
15 #include "fpp-json-fwd.h"
16
17 #include "PlaylistEntryBase.h"
18
19 class PlaylistEntrySequence : public PlaylistEntryBase {
20 public:
21 PlaylistEntrySequence(Playlist* playlist, PlaylistEntryBase* parent = NULL);
22 virtual ~PlaylistEntrySequence();
23
24 virtual int Init(Json::Value& config) override;
25
26 int PreparePlay(int frame = 0);
27 virtual int StartPlaying(void) override;
28 virtual int Process(void) override;
29 virtual int Stop(void) override;
30 // Stop as far as the playlist is concerned, but leave the sequence
31 // playing for `ms` more, then close it -- unless something else has
32 // opened a sequence by then, which takes over from it. For the lights
33 // of a song whose sound is still on its way to the speaker when its
34 // media ends.
35 int StopAfter(int ms);
36
37 virtual void Pause() override;
38 virtual bool IsPaused() override;
39 virtual void Resume() override;
40
41 virtual void Dump(void) override;
42
43 virtual Json::Value GetConfig(void) override;
44 virtual Json::Value GetMqttStatus(void) override;
45
46 virtual uint64_t GetLengthInMS() override;
47 virtual uint64_t GetElapsedMS() override;
48
49 void disableAdjustTiming() { m_adjustTiming = false; }
50 79 void setAdjustTiming(bool adjust) { m_adjustTiming = adjust; }
51
52 11637 const std::string& GetSequenceName(void) const { return m_sequenceName; }
53
54 // int, like the member and Sequence::GetSeqStepTime(): callers subtract it
55 // from signed offsets, and an unsigned return turned "offset - frameTime"
56 // into ~4e9 whenever the offset was under one frame.
57 1832 int GetSequenceFrameTime(void) { return m_sequenceFrameTime; }
58
59 private:
60 long long m_startTme;
61 bool m_adjustTiming;
62 bool m_prepared;
63 int m_duration;
64 int m_sequenceFrameTime;
65 std::string m_sequenceName;
66
67 int m_pausedFrame;
68 };
69