From 1ecdb2a5d9e05e0d30dae89e3d675218ca4c255e Mon Sep 17 00:00:00 2001 From: chriszero Date: Sat, 31 Jan 2015 17:55:07 +0100 Subject: - If watched +90%, the media will be marked as watched - current play state is syncronized with the pms - remaing time is now displayed according to the VDR setup --- hlsPlayer.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'hlsPlayer.h') diff --git a/hlsPlayer.h b/hlsPlayer.h index 4144659..c188fc2 100644 --- a/hlsPlayer.h +++ b/hlsPlayer.h @@ -48,11 +48,11 @@ private: bool LoadSegment(std::string uri); int EstimateSegmentSize(); bool LoadLists(void); + protected: void Action(void); bool DoLoad(void); - void AddHeader(Poco::Net::HTTPRequest& req); public: cHlsSegmentLoader(std::string startm3u8); @@ -63,6 +63,8 @@ public: bool Active(void); bool StopLoader(void); bool LoadM3u8(std::string uri); + void AddHeader(Poco::Net::HTTPRequest& req); + void Ping(void); }; class cHlsPlayer : public cPlayer, cThread @@ -85,6 +87,7 @@ private: unsigned long long m_tLastTime; unsigned long long m_tTimeSum; bool m_bFirstPlay; + cTimeMs m_tTimer; enum ePlayModes { pmPlay, pmPause }; ePlayModes playMode; @@ -93,6 +96,8 @@ private: int GetPlayedSeconds(void); void CountPlayedSeconds(void); void ResetPlayedSeconds(void); + void ReportProgress(bool stopped = false); + void SetWatched(void); protected: void Action(void); -- cgit v1.2.3