vdr
1.7.27
|
00001 /* 00002 * dvbplayer.h: The DVB player 00003 * 00004 * See the main source file 'vdr.c' for copyright information and 00005 * how to reach the author. 00006 * 00007 * $Id: dvbplayer.h 2.1 2012/02/19 11:40:36 kls Exp $ 00008 */ 00009 00010 #ifndef __DVBPLAYER_H 00011 #define __DVBPLAYER_H 00012 00013 #include "player.h" 00014 #include "thread.h" 00015 00016 class cDvbPlayer; 00017 00018 class cDvbPlayerControl : public cControl { 00019 private: 00020 cDvbPlayer *player; 00021 public: 00022 cDvbPlayerControl(const char *FileName, bool PauseLive = false); 00023 // Sets up a player for the given file. 00024 // If PauseLive is true, special care is taken to make sure the index 00025 // file of the recording is long enough to allow the player to display 00026 // the first frame in still picture mode. 00027 virtual ~cDvbPlayerControl(); 00028 bool Active(void); 00029 void Stop(void); 00030 // Stops the current replay session (if any). 00031 void Pause(void); 00032 // Pauses the current replay session, or resumes a paused session. 00033 void Play(void); 00034 // Resumes normal replay mode. 00035 void Forward(void); 00036 // Runs the current replay session forward at a higher speed. 00037 void Backward(void); 00038 // Runs the current replay session backwards at a higher speed. 00039 int SkipFrames(int Frames); 00040 // Returns the new index into the current replay session after skipping 00041 // the given number of frames (no actual repositioning is done!). 00042 // The sign of 'Frames' determines the direction in which to skip. 00043 void SkipSeconds(int Seconds); 00044 // Skips the given number of seconds in the current replay session. 00045 // The sign of 'Seconds' determines the direction in which to skip. 00046 // Use a very large negative value to go all the way back to the 00047 // beginning of the recording. 00048 bool GetIndex(int &Current, int &Total, bool SnapToIFrame = false); 00049 // Returns the current and total frame index, optionally snapped to the 00050 // nearest I-frame. 00051 bool GetReplayMode(bool &Play, bool &Forward, int &Speed); 00052 // Returns the current replay mode (if applicable). 00053 // 'Play' tells whether we are playing or pausing, 'Forward' tells whether 00054 // we are going forward or backward and 'Speed' is -1 if this is normal 00055 // play/pause mode, 0 if it is single speed fast/slow forward/back mode 00056 // and >0 if this is multi speed mode. 00057 void Goto(int Index, bool Still = false); 00058 // Positions to the given index and displays that frame as a still picture 00059 // if Still is true. 00060 }; 00061 00062 #endif //__DVBPLAYER_H