Merge pull request #4955 from Memphiz/osxfixoptical2
[vuplus_xbmc] / xbmc / cores / DummyVideoPlayer.h
1 #pragma once
2
3 /*
4  *      Copyright (C) 2005-2013 Team XBMC
5  *      http://xbmc.org
6  *
7  *  This Program is free software; you can redistribute it and/or modify
8  *  it under the terms of the GNU General Public License as published by
9  *  the Free Software Foundation; either version 2, or (at your option)
10  *  any later version.
11  *
12  *  This Program is distributed in the hope that it will be useful,
13  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  *  GNU General Public License for more details.
16  *
17  *  You should have received a copy of the GNU General Public License
18  *  along with XBMC; see the file COPYING.  If not, see
19  *  <http://www.gnu.org/licenses/>.
20  *
21  */
22
23 #include "IPlayer.h"
24 #include "threads/Thread.h"
25
26 class CDummyVideoPlayer : public IPlayer, public CThread
27 {
28 public:
29   CDummyVideoPlayer(IPlayerCallback& callback);
30   virtual ~CDummyVideoPlayer();
31   virtual void RegisterAudioCallback(IAudioCallback* pCallback) {}
32   virtual void UnRegisterAudioCallback()                        {}
33   virtual bool OpenFile(const CFileItem& file, const CPlayerOptions &options);
34   virtual bool CloseFile();
35   virtual bool IsPlaying() const;
36   virtual void Pause();
37   virtual bool IsPaused() const;
38   virtual bool HasVideo() const;
39   virtual bool HasAudio() const;
40   virtual void ToggleOSD() { }; // empty
41   virtual void SwitchToNextLanguage();
42   virtual void ToggleSubtitles();
43   virtual bool CanSeek();
44   virtual void Seek(bool bPlus, bool bLargeStep, bool bChapterOverride);
45   virtual void SeekPercentage(float iPercent);
46   virtual float GetPercentage();
47   virtual void SetVolume(float volume) {}
48   virtual void SetDynamicRangeCompression(long drc) {}
49   virtual void SetContrast(bool bPlus) {}
50   virtual void SetBrightness(bool bPlus) {}
51   virtual void SetHue(bool bPlus) {}
52   virtual void SetSaturation(bool bPlus) {}
53   virtual void GetAudioInfo(CStdString& strAudioInfo);
54   virtual void GetVideoInfo(CStdString& strVideoInfo);
55   virtual void GetGeneralInfo( CStdString& strVideoInfo);
56   virtual void Update(bool bPauseDrawing)                       {}
57   virtual void SwitchToNextAudioLanguage();
58   virtual bool CanRecord() { return false; }
59   virtual bool IsRecording() { return false; }
60   virtual bool Record(bool bOnOff) { return false; }
61   virtual void SetAVDelay(float fValue = 0.0f);
62   virtual float GetAVDelay();
63   void Render();
64
65   virtual void SetSubTitleDelay(float fValue = 0.0f);
66   virtual float GetSubTitleDelay();
67
68   virtual void SeekTime(int64_t iTime);
69   virtual int64_t GetTime();
70   virtual int64_t GetTotalTime();
71   virtual void ToFFRW(int iSpeed);
72   virtual void ShowOSD(bool bOnoff);
73   virtual void DoAudioWork()                                    {}
74   
75   virtual CStdString GetPlayerState();
76   virtual bool SetPlayerState(CStdString state);
77   
78 private:
79   virtual void Process();
80
81   bool m_paused;
82   int64_t m_clock;
83   unsigned int m_lastTime;
84   int m_speed;
85 };