12 #include "threads/CriticalSection.h"    26   bool HasAVInfoChanges();
    27   void SignalVideoInfoChange();
    28   void SignalAudioInfoChange();
    29   void SignalSubtitleInfoChange();
    32   void SetVideoDecoderName(std::string name, 
bool isHw);
    33   std::string GetVideoDecoderName();
    34   bool IsVideoHwDecoder();
    35   void SetVideoDeintMethod(std::string method);
    36   std::string GetVideoDeintMethod();
    37   void SetVideoPixelFormat(std::string pixFormat);
    38   std::string GetVideoPixelFormat();
    39   void SetVideoStereoMode(std::string mode);
    40   std::string GetVideoStereoMode();
    41   void SetVideoDimensions(
int width, 
int height);
    44   void SetVideoFps(
float fps);
    46   void SetVideoDAR(
float dar);
    62   void SetAudioDecoderName(std::string name);
    63   std::string GetAudioDecoderName();
    64   void SetAudioChannels(std::string channels);
    65   std::string GetAudioChannels();
    66   void SetAudioSampleRate(
int sampleRate);
    67   int GetAudioSampleRate();
    68   void SetAudioBitsPerSample(
int bitsPerSample);
    69   int GetAudioBitsPerSample();
    77   void SetEditList(
const std::vector<EDL::Edit>& editList);
    89   void SetCuts(
const std::vector<int64_t>& cuts);
    95   const std::vector<int64_t>& 
GetCuts() 
const;
   109   void SetChapters(
const std::vector<std::pair<std::string, int64_t>>& chapters);
   115   const std::vector<std::pair<std::string, int64_t>>& 
GetChapters() 
const;
   118   void SetRenderClockSync(
bool enabled);
   119   bool IsRenderClockSync();
   128   void SetStateSeeking(
bool active);
   144   void SetSpeed(
float tempo, 
float speed);
   147   void SetFrameAdvance(
bool fa);
   148   bool IsFrameAdvance();
   149   bool IsPlayerStateChanged();
   150   void SetGuiRender(
bool gui);
   152   void SetVideoRender(
bool video);
   153   bool GetVideoRender();
   154   void SetPlayTimes(time_t start, int64_t current, int64_t min, int64_t max);
   155   void GetPlayTimes(time_t &start, int64_t ¤t, int64_t &min, int64_t &max);
   199   std::atomic_bool m_hasAVInfoChanges = 
false;
   201   CCriticalSection m_videoPlayerSection;
   204     std::string decoderName;
   206     std::string deintMethod;
   207     std::string pixFormat;
   208     std::string stereoMode;
   216   CCriticalSection m_audioPlayerSection;
   219     std::string decoderName;
   220     std::string channels;
   225   mutable CCriticalSection m_contentSection;
   233     void SetEditList(
const std::vector<EDL::Edit>& editList) { m_editList = editList; }
   239     const std::vector<EDL::Edit>& 
GetEditList()
 const { 
return m_editList; }
   245     void SetCuts(
const std::vector<int64_t>& cuts) { m_cuts = cuts; }
   251     const std::vector<int64_t>& 
GetCuts()
 const { 
return m_cuts; }
   259       m_sceneMarkers = sceneMarkers;
   272     void SetChapters(
const std::vector<std::pair<std::string, int64_t>>& chapters)
   274       m_chapters = chapters;
   281     const std::vector<std::pair<std::string, int64_t>>& 
GetChapters()
 const { 
return m_chapters; }
   291       m_sceneMarkers.clear();
   296     std::vector<EDL::Edit> m_editList;
   298     std::vector<std::pair<std::string, int64_t>> m_chapters;
   300     std::vector<int64_t> m_cuts;
   302     std::vector<int64_t> m_sceneMarkers;
   305   CCriticalSection m_renderSection;
   311   mutable CCriticalSection m_stateSection;
   312   bool m_playerStateChanged = 
false;
   315     bool m_stateSeeking{
false};
   316     bool m_renderGuiLayer{
false};
   317     bool m_renderVideoLayer{
false};
   320     bool m_frameAdvance{
false};
   322     std::chrono::time_point<std::chrono::system_clock> m_lastSeekTime{
   323         std::chrono::time_point<std::chrono::system_clock>{}};
   325     int64_t m_lastSeekOffset{0};
 void SetVideoInterlaced(bool isInterlaced)
Set if the video is interlaced in cache. 
Definition: DataCacheCore.cpp:197
void SetSceneMarkers(const std::vector< int64_t > &sceneMarkers)
Set the list of scene markers in cache. 
Definition: DataCacheCore.cpp:290
void Reset()
Reset the content cache to the original values (all empty) 
Definition: DataCacheCore.h:286
void SetChapters(const std::vector< std::pair< std::string, int64_t >> &chapters)
Save the chapter list in cache. 
Definition: DataCacheCore.h:272
void SetEditList(const std::vector< EDL::Edit > &editList)
Set the EDL edit list to cache. 
Definition: DataCacheCore.cpp:266
const std::vector< EDL::Edit > & GetEditList() const
Get the EDL edit list in cache. 
Definition: DataCacheCore.h:239
Definition: DataCacheCore.h:217
float GetPlayPercentage()
Get the current percentage of playback if a playback buffer is available. 
Definition: DataCacheCore.cpp:487
const std::vector< int64_t > & GetCuts() const
Get the list of cut markers from cache. 
Definition: DataCacheCore.cpp:284
time_t GetStartTime()
Get the start time. 
Definition: DataCacheCore.cpp:463
Definition: DataCacheCore.h:19
const std::vector< int64_t > & GetSceneMarkers() const
Get the list of scene markers markers from cache. 
Definition: DataCacheCore.cpp:296
void SetEditList(const std::vector< EDL::Edit > &editList)
Set the EDL edit list in cache. 
Definition: DataCacheCore.h:233
void SetSceneMarkers(const std::vector< int64_t > &sceneMarkers)
Save the list of scene markers in cache. 
Definition: DataCacheCore.h:257
const std::vector< std::pair< std::string, int64_t > > & GetChapters() const
Get the list of chapters in cache. 
Definition: DataCacheCore.h:281
void SeekFinished(int64_t offset)
Notifies the cache core that a seek operation has finished. 
Definition: DataCacheCore.cpp:329
const std::vector< int64_t > & GetSceneMarkers() const
Get the list of scene markers in cache. 
Definition: DataCacheCore.h:266
Definition: DataCacheCore.h:202
bool HasPerformedSeek(int64_t lastSecondInterval) const
Checks if a seek has been performed in the last provided seconds interval. 
Definition: DataCacheCore.cpp:342
Definition: DataCacheCore.h:313
void SetCuts(const std::vector< int64_t > &cuts)
Set the list of cut markers in cache. 
Definition: DataCacheCore.cpp:278
const std::vector< std::pair< std::string, int64_t > > & GetChapters() const
Get the chapter list in cache. 
Definition: DataCacheCore.cpp:308
bool IsVideoInterlaced()
Check if the video is interlaced from cache. 
Definition: DataCacheCore.cpp:203
int64_t GetSeekOffSet() const
Gets the last seek offset. 
Definition: DataCacheCore.cpp:336
Definition: DataCacheCore.h:306
Definition: DataCacheCore.h:328
void SetCuts(const std::vector< int64_t > &cuts)
Save the list of cut markers in cache. 
Definition: DataCacheCore.h:245
int64_t GetMaxTime()
Get the maximum time. 
Definition: DataCacheCore.cpp:481
int64_t GetMinTime()
Get the minimum time. 
Definition: DataCacheCore.cpp:475
const std::vector< int64_t > & GetCuts() const
Get the list of cut markers in cache. 
Definition: DataCacheCore.h:251
Definition: DataCacheCore.h:226
int64_t GetPlayTime()
Get the current time of playback. 
Definition: DataCacheCore.cpp:469
const std::vector< EDL::Edit > & GetEditList() const
Get the EDL edit list in cache. 
Definition: DataCacheCore.cpp:272