11 #include "IPlayerCallback.h" 12 #include "Interface/StreamInfo.h" 14 #include "VideoSettings.h" 20 #define CURRENT_STREAM -1 21 #define CAPTUREFLAG_CONTINUOUS 0x01 //after a render is done, render a new one immediately 22 #define CAPTUREFLAG_IMMEDIATELY 0x02 //read out immediately after render, this can cause a busy wait 23 #define CAPTUREFORMAT_BGRA 0x01 52 enum IPlayerAudioCapabilities
57 IPC_AUD_SELECT_STREAM,
58 IPC_AUD_OUTPUT_STEREO,
62 enum IPlayerSubtitleCapabilities
73 RENDERFEATURE_BRIGHTNESS,
74 RENDERFEATURE_CONTRAST,
76 RENDERFEATURE_SHARPNESS,
77 RENDERFEATURE_NONLINSTRETCH,
78 RENDERFEATURE_ROTATION,
79 RENDERFEATURE_STRETCH,
81 RENDERFEATURE_VERTICAL_SHIFT,
82 RENDERFEATURE_PIXEL_RATIO,
83 RENDERFEATURE_POSTPROCESS,
92 virtual bool Initialize(TiXmlElement* pConfig) {
return true; }
94 virtual bool QueueNextFile(
const CFileItem &file) {
return false; }
95 virtual void OnNothingToQueueNotify() {}
96 virtual bool CloseFile(
bool reopen =
false) = 0;
97 virtual bool IsPlaying()
const {
return false;}
98 virtual bool CanPause()
const {
return true; }
99 virtual void Pause() = 0;
100 virtual bool HasVideo()
const = 0;
101 virtual bool HasAudio()
const = 0;
102 virtual bool HasGame()
const {
return false; }
103 virtual bool HasRDS()
const {
return false; }
104 virtual bool HasID3()
const {
return false; }
105 virtual bool IsPassthrough()
const {
return false;}
106 virtual bool CanSeek()
const {
return true; }
107 virtual void Seek(
bool bPlus =
true,
bool bLargeStep =
false,
bool bChapterOverride =
false) = 0;
108 virtual bool SeekScene(
bool bPlus =
true) {
return false;}
109 virtual void SeekPercentage(
float fPercent = 0){}
110 virtual float GetCachePercentage()
const {
return 0; }
111 virtual void SetMute(
bool bOnOff){}
112 virtual void SetVolume(
float volume){}
113 virtual void SetDynamicRangeCompression(
long drc){}
115 virtual void SetAVDelay(
float fValue = 0.0f) {}
116 virtual float GetAVDelay() {
return 0.0f; }
118 virtual void SetSubTitleDelay(
float fValue = 0.0f) {}
119 virtual float GetSubTitleDelay() {
return 0.0f; }
120 virtual int GetSubtitleCount()
const {
return 0; }
121 virtual int GetSubtitle() {
return -1; }
123 virtual void SetSubtitle(
int iStream) {}
124 virtual bool GetSubtitleVisible()
const {
return false; }
125 virtual void SetSubtitleVisible(
bool bVisible) {}
141 virtual int GetAudioStreamCount()
const {
return 0; }
142 virtual int GetAudioStream() {
return -1; }
143 virtual void SetAudioStream(
int iStream) {}
144 virtual void GetAudioStreamInfo(
int index,
AudioStreamInfo& info)
const {}
146 virtual int GetVideoStream()
const {
return -1; }
147 virtual int GetVideoStreamCount()
const {
return 0; }
148 virtual void GetVideoStreamInfo(
int streamId,
VideoStreamInfo& info)
const {}
149 virtual void SetVideoStream(
int iStream) {}
151 virtual int GetPrograms(std::vector<ProgramInfo>& programs) {
return 0; }
152 virtual void SetProgram(
int progId) {}
153 virtual int GetProgramsCount()
const {
return 0; }
155 virtual bool HasTeletextCache()
const {
return false; }
156 virtual std::shared_ptr<TextCacheStruct_t> GetTeletextCache() {
return nullptr; }
157 virtual void LoadPage(
int p,
int sp,
unsigned char* buffer) {}
159 virtual int GetChapterCount()
const {
return 0; }
160 virtual int GetChapter()
const {
return -1; }
161 virtual void GetChapterName(std::string& strChapterName,
int chapterIdx = -1)
const {}
162 virtual int64_t GetChapterPos(
int chapterIdx = -1)
const {
return 0; }
163 virtual int SeekChapter(
int iChapter) {
return -1; }
166 virtual void SeekTime(int64_t iTime = 0) {}
172 virtual bool SeekTimeRelative(int64_t iTime) {
return false; }
189 virtual void SetSpeed(
float speed) = 0;
190 virtual void SetTempo(
float tempo) {}
191 virtual bool SupportsTempo()
const {
return false; }
192 virtual void FrameAdvance(
int frames) {}
195 virtual bool IsCaching()
const {
return false; }
197 virtual int GetCacheLevel()
const {
return -1; }
199 virtual bool IsInMenu()
const {
return false; }
207 virtual void DoAudioWork() {}
208 virtual bool OnAction(
const CAction& action) {
return false; }
211 virtual std::string GetPlayerState() {
return ""; }
212 virtual bool SetPlayerState(
const std::string& state) {
return false; }
214 virtual void GetAudioCapabilities(std::vector<int>& audioCaps)
const 216 audioCaps.assign(1, IPC_AUD_ALL);
223 subCaps.assign(1, IPC_SUBS_ALL);
229 virtual void Render(
bool clear, uint32_t alpha = 255,
bool gui =
true) {}
230 virtual void FlushRenderer() {}
231 virtual void SetRenderViewMode(
int mode,
float zoom,
float par,
float shift,
bool stretch) {}
232 virtual float GetRenderAspectRatio()
const {
return 1.0; }
233 virtual void TriggerUpdateResolution() {}
234 virtual bool IsRenderingVideo()
const {
return false; }
236 virtual bool Supports(EINTERLACEMETHOD method)
const {
return false; }
237 virtual EINTERLACEMETHOD GetDeinterlacingMethodDefault()
const 239 return EINTERLACEMETHOD::VS_INTERLACEMETHOD_NONE;
241 virtual bool Supports(ESCALINGMETHOD method)
const {
return false; }
242 virtual bool Supports(ERENDERFEATURE feature)
const {
return false; }
244 virtual unsigned int RenderCaptureAlloc() {
return 0; }
245 virtual void RenderCaptureRelease(
unsigned int captureId) {}
246 virtual void RenderCapture(
unsigned int captureId,
252 virtual bool RenderCaptureGetPixels(
unsigned int captureId,
virtual bool HasGameAgent() const
Check if any players are playing a game.
Definition: IPlayer.h:270
Definition: StreamInfo.h:65
virtual void AddSubtitle(const std::string &strSubPath)
Adds the subtitle(s) provided by the given file to the available player streams and actives the first...
Definition: IPlayer.h:139
virtual void SetSubtitleVerticalPosition(int value, bool save)
Set the subtitle vertical position, it depends on current screen resolution.
Definition: IPlayer.h:133
virtual void Render(bool clear, uint32_t alpha=255, bool gui=true)
hook into render loop of render thread
Definition: IPlayer.h:229
Definition: StreamInfo.h:55
Definition: StreamDetails.h:92
virtual void SetTime(int64_t time)
Sets the current time. This can be used for injecting the current time. This is not to be confused wi...
Definition: IPlayer.h:181
Definition: StreamInfo.h:62
class encapsulating information regarding a particular user action to be sent to windows and controls...
Definition: Action.h:22
Definition: IPlayerCallback.h:18
Definition: TeletextDefines.h:393
Definition: settings.py:1
virtual void SetTotalTime(int64_t time)
Set the total time in milliseconds this can be used for injecting the duration in case its not availa...
Definition: IPlayer.h:188
virtual MenuType GetSupportedMenuType() const
Get the supported menu type.
Definition: IPlayer.h:205
virtual void GetSubtitleCapabilities(std::vector< int > &subCaps) const
define the subtitle capabilities of the player
Definition: IPlayer.h:221
Definition: VideoSettings.h:194
Represents a file on a share.
Definition: FileItem.h:102