diff options
author | chriszero <zerov83@gmail.com> | 2015-01-21 21:45:45 +0100 |
---|---|---|
committer | chriszero <zerov83@gmail.com> | 2015-01-21 21:45:45 +0100 |
commit | 1da4dbe662e75be47e046472137c6bd72daa7b4d (patch) | |
tree | 540f50cbb3b9110bcee1a38ae979df5c8a0a1e9e /hlsPlayer.h | |
parent | 4592c5e98c96f46157ce46206ba4005a95f7f774 (diff) | |
download | vdr-plugin-plex-1da4dbe662e75be47e046472137c6bd72daa7b4d.tar.gz vdr-plugin-plex-1da4dbe662e75be47e046472137c6bd72daa7b4d.tar.bz2 |
Fixed crash while rapidly press skip forward/backward
Diffstat (limited to 'hlsPlayer.h')
-rw-r--r-- | hlsPlayer.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/hlsPlayer.h b/hlsPlayer.h index 353f0b9..a7663f5 100644 --- a/hlsPlayer.h +++ b/hlsPlayer.h @@ -23,10 +23,10 @@ class cHlsSegmentLoader : public cThread { private: int m_ringBufferSize; - int m_segmentsToBuffer; + unsigned int m_segmentsToBuffer; unsigned int m_lastLoadedSegment; - unsigned int m_loadedSegments; bool m_bufferFilled; + bool m_newList; uchar* m_pBuffer; @@ -47,6 +47,7 @@ private: int GetSegmentSize(int segmentIndex); bool LoadSegment(std::string uri); int EstimateSegmentSize(); + bool LoadLists(void); protected: void Action(void); @@ -61,6 +62,7 @@ public: bool BufferFilled(void); bool Active(void); bool StopLoader(void); + bool LoadM3u8(std::string uri); }; class cHlsPlayer : public cPlayer, cThread @@ -68,15 +70,16 @@ class cHlsPlayer : public cPlayer, cThread private: cHlsSegmentLoader* m_pSegmentLoader; plexclient::Video* m_pVideo; - cMutex s_mutex; - + int m_jumpOffset; int m_timeOffset; bool m_doJump; + bool m_isBuffering; int m_videoLenght; int m_actualSegment; int m_actualTime; + long m_lastValidSTC; enum ePlayModes { pmPlay, pmPause }; ePlayModes playMode; @@ -90,12 +93,13 @@ protected: public: + //static cMutex s_mutex; cHlsPlayer(std::string startm3u8, plexclient::Video* Video); ~cHlsPlayer(); virtual bool GetIndex(int &Current, int &Total, bool SnapToIFrame = false); virtual bool GetReplayMode(bool &Play, bool &Forward, int &Speed); - virtual double FramesPerSecond(void); + virtual double FramesPerSecond(void); void Pause(void); void Play(void); void Stop(void); |