2 * Copyright (C) 2012-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
11 #include "threads/CriticalSection.h"
12 #include "utils/TimeFormat.h"
21 class CPVRGUITimesInfo
25 virtual ~CPVRGUITimesInfo() = default;
31 std::string
GetTimeshiftStartTime(TIME_FORMAT format
) const;
32 std::string
GetTimeshiftEndTime(TIME_FORMAT format
) const;
33 std::string
GetTimeshiftPlayTime(TIME_FORMAT format
) const;
34 std::string
GetTimeshiftOffset(TIME_FORMAT format
) const;
35 std::string
GetTimeshiftProgressDuration(TIME_FORMAT format
) const;
36 std::string
GetTimeshiftProgressStartTime(TIME_FORMAT format
) const;
37 std::string
GetTimeshiftProgressEndTime(TIME_FORMAT format
) const;
39 std::string
GetEpgEventDuration(const std::shared_ptr
<const CPVREpgInfoTag
>& epgTag
,
40 TIME_FORMAT format
) const;
41 std::string
GetEpgEventElapsedTime(const std::shared_ptr
<const CPVREpgInfoTag
>& epgTag
,
42 TIME_FORMAT format
) const;
43 std::string
GetEpgEventRemainingTime(const std::shared_ptr
<const CPVREpgInfoTag
>& epgTag
,
44 TIME_FORMAT format
) const;
45 std::string
GetEpgEventFinishTime(const std::shared_ptr
<const CPVREpgInfoTag
>& epgTag
,
46 TIME_FORMAT format
) const;
47 std::string
GetEpgEventSeekTime(int iSeekSize
, TIME_FORMAT format
) const;
50 int GetTimeshiftProgress() const;
51 int GetTimeshiftProgressDuration() const;
52 int GetTimeshiftProgressPlayPosition() const;
53 int GetTimeshiftProgressEpgStart() const;
54 int GetTimeshiftProgressEpgEnd() const;
55 int GetTimeshiftProgressBufferStart() const;
56 int GetTimeshiftProgressBufferEnd() const;
58 int GetEpgEventDuration(const std::shared_ptr
<const CPVREpgInfoTag
>& epgTag
) const;
59 int GetEpgEventProgress(const std::shared_ptr
<const CPVREpgInfoTag
>& epgTag
) const;
62 bool IsTimeshifting() const;
65 void UpdatePlayingTag();
66 void UpdateTimeshiftData();
67 void UpdateTimeshiftProgressData();
69 static std::string
TimeToTimeString(time_t datetime
, TIME_FORMAT format
, bool withSeconds
);
71 int GetElapsedTime() const;
72 int GetRemainingTime(const std::shared_ptr
<const CPVREpgInfoTag
>& epgTag
) const;
74 mutable CCriticalSection m_critSection
;
76 std::shared_ptr
<const CPVREpgInfoTag
> m_playingEpgTag
;
77 std::shared_ptr
<const CPVRChannel
> m_playingChannel
;
80 unsigned int m_iDuration
;
81 time_t m_iTimeshiftStartTime
;
82 time_t m_iTimeshiftEndTime
;
83 time_t m_iTimeshiftPlayTime
;
84 unsigned int m_iTimeshiftOffset
;
86 time_t m_iTimeshiftProgressStartTime
;
87 time_t m_iTimeshiftProgressEndTime
;
88 unsigned int m_iTimeshiftProgressDuration
;