| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
#pragma once |
| 10 |
|
| 11 |
#include "guilib/guiinfo/GUIInfoProvider.h" |
| 12 |
|
| 13 |
#include <memory> |
| 14 |
|
| 15 |
class CApplicationPlayer; |
| 16 |
class CVideoInfoTag; |
| 17 |
|
| 18 |
namespace KODI |
| 19 |
{ |
| 20 |
namespace GUILIB |
| 21 |
{ |
| 22 |
namespace GUIINFO |
| 23 |
{ |
| 24 |
|
| 25 |
class CGUIInfo; |
| 26 |
|
| 27 |
class CVideoGUIInfo : public CGUIInfoProvider |
| 28 |
{ |
| 29 |
public: |
| 30 |
CVideoGUIInfo(); |
| 31 |
~CVideoGUIInfo() override = default; |
| 32 |
|
| 33 |
|
| 34 |
bool InitCurrentItem(CFileItem *item) override; |
| 35 |
bool GetLabel(std::string& value, const CFileItem *item, int contextWindow, const CGUIInfo &info, std::string *fallback) const override; |
| 36 |
bool GetFallbackLabel(std::string& value, |
| 37 |
const CFileItem* item, |
| 38 |
int contextWindow, |
| 39 |
const CGUIInfo& info, |
| 40 |
std::string* fallback) override; |
| 41 |
bool GetInt(int& value, const CGUIListItem *item, int contextWindow, const CGUIInfo &info) const override; |
| 42 |
bool GetBool(bool& value, const CGUIListItem *item, int contextWindow, const CGUIInfo &info) const override; |
| 43 |
|
| 44 |
private: |
| 45 |
int GetPercentPlayed(const CVideoInfoTag* tag) const; |
| 46 |
bool GetPlaylistInfo(std::string& value, const CGUIInfo& info) const; |
| 47 |
|
| 48 |
const std::shared_ptr<CApplicationPlayer> m_appPlayer; |
| 49 |
}; |
| 50 |
|
| 51 |
} |
| 52 |
} |
| 53 |
} |