2 * MP3/MPlayer plugin to VDR (C++)
4 * (C) 2001-2006 Stefan Huelswitt <s.huelswitt@gmx.de>
6 * This code is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
11 * This code is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 * Or, point your browser to http://www.gnu.org/copyleft/gpl.html
22 #ifndef ___DVB_MPLAYER_H
23 #define ___DVB_MPLAYER_H
25 #include <vdr/player.h>
26 #include <vdr/thread.h>
27 #include <vdr/status.h>
29 // ----------------------------------------------------------------
34 // ----------------------------------------------------------------
36 class cMPlayerStatus : public cStatus, cMutex {
41 virtual void SetVolume(int Volume, bool Absolute);
44 bool GetVolume(int &Volume, bool &Mute);
47 extern cMPlayerStatus *status;
49 // ----------------------------------------------------------------
51 class cMPlayerPlayer : public cPlayer, cThread {
55 cMPlayerResume *resume;
56 bool started, slave, run;
57 int pid, inpipe[2], outpipe[2], pipefl;
59 enum ePlayMode { pmPlay, pmPaused };
61 int index, total, saveIndex;
62 int nextTime, nextPos;
69 void MPlayerControl(const char *format, ...);
70 void SetMPlayerVolume(bool force);
72 virtual void Activate(bool On);
73 virtual void Action(void);
75 cMPlayerPlayer(const cFileObj *File, bool Rewind);
76 virtual ~cMPlayerPlayer();
78 bool SlaveMode(void) const { return slave; }
81 void Goto(int Index, bool percent, bool still);
82 void SkipSeconds(int secs);
83 void KeyCmd(const char *cmd);
84 char *GetCurrentName(void);
85 virtual bool GetIndex(int &Current, int &Total, bool SnapToIFrame);
86 virtual bool GetReplayMode(bool &Play, bool &Forward, int &Speed);
89 extern int MPlayerAid;
90 extern const char *globalResumeDir;
92 #endif //___DVB_MPLAYER_H