[SCM] kodi-pvr-hts/master: move timeshift status method implementations to .cpp file and protect m_timeshiftStatus with the mutex (writes to the struct were already protected)
tiber-guest at users.alioth.debian.org
tiber-guest at users.alioth.debian.org
Fri Nov 4 23:23:35 UTC 2016
The following commit has been merged in the master branch:
commit 57b974411d4c945cb1949dfcc22344ec7c6ec891
Author: Sam Stenvall <sam.stenvall at nordsoftware.com>
Date: Thu Jan 28 11:55:21 2016 +0200
move timeshift status method implementations to .cpp file and
protect m_timeshiftStatus with the mutex (writes to the struct
were already protected)
diff --git a/src/HTSPDemuxer.cpp b/src/HTSPDemuxer.cpp
index 677011b..449a509 100644
--- a/src/HTSPDemuxer.cpp
+++ b/src/HTSPDemuxer.cpp
@@ -240,6 +240,47 @@ PVR_ERROR CHTSPDemuxer::CurrentSignal ( PVR_SIGNAL_STATUS &sig )
return PVR_ERROR_NO_ERROR;
}
+int64_t CHTSPDemuxer::GetTimeshiftTime() const
+{
+ CLockObject lock(m_mutex);
+ return m_timeshiftStatus.shift;
+}
+
+int64_t CHTSPDemuxer::GetTimeshiftBufferStart() const
+{
+ CLockObject lock(m_mutex);
+
+ // Note: start/end mismatch is not a bug. tvh uses inversed naming logic here!
+ return m_timeshiftStatus.end;
+}
+
+int64_t CHTSPDemuxer::GetTimeshiftBufferEnd() const
+{
+ CLockObject lock(m_mutex);
+
+ // Note: start/end mismatch is not a bug. tvh uses inversed naming logic here!
+ return m_timeshiftStatus.start;
+}
+
+uint32_t CHTSPDemuxer::GetSubscriptionId() const
+{
+ return m_subscription.GetId();
+}
+
+uint32_t CHTSPDemuxer::GetChannelId() const
+{
+ if (m_subscription.IsActive())
+ return m_subscription.GetChannelId();
+ return 0;
+}
+
+time_t CHTSPDemuxer::GetLastUse() const
+{
+ if (m_subscription.IsActive())
+ return m_lastUse.load();
+ return 0;
+}
+
void CHTSPDemuxer::SetStreamingProfile(const std::string &profile)
{
m_subscription.SetProfile(profile);
diff --git a/src/Tvheadend.h b/src/Tvheadend.h
index c679eb7..b2c6dff 100644
--- a/src/Tvheadend.h
+++ b/src/Tvheadend.h
@@ -235,38 +235,14 @@ public:
bool ProcessMessage ( const char *method, htsmsg_t *m );
void Connected ( void );
-
- inline int64_t GetTimeshiftTime() const
- {
- return m_timeshiftStatus.shift;
- }
- inline int64_t GetTimeshiftBufferStart() const
- {
- // Note: start/end mismatch is not a bug. tvh uses inversed naming logic here!
- return m_timeshiftStatus.end;
- }
- inline int64_t GetTimeshiftBufferEnd() const
- {
- // Note: start/end mismatch is not a bug. tvh uses inversed naming logic here!
- return m_timeshiftStatus.start;
- }
- inline uint32_t GetSubscriptionId() const
- {
- return m_subscription.GetId();
- }
- inline uint32_t GetChannelId() const
- {
- if (m_subscription.IsActive())
- return m_subscription.GetChannelId();
- return 0;
- }
- inline time_t GetLastUse() const
- {
- if (m_subscription.IsActive())
- return m_lastUse.load();
- return 0;
- }
+
bool IsRealTimeStream() const;
+ int64_t GetTimeshiftTime() const;
+ int64_t GetTimeshiftBufferStart() const;
+ int64_t GetTimeshiftBufferEnd() const;
+ uint32_t GetSubscriptionId() const;
+ uint32_t GetChannelId() const;
+ time_t GetLastUse() const;
/**
* Tells each demuxer to use the specified profile for new subscriptions
--
kodi-pvr-hts packaging
More information about the pkg-multimedia-commits
mailing list