vdr  2.2.0
dvbplayer.h
Go to the documentation of this file.
1 /*
2  * dvbplayer.h: The DVB player
3  *
4  * See the main source file 'vdr.c' for copyright information and
5  * how to reach the author.
6  *
7  * $Id: dvbplayer.h 3.2 2015/02/06 12:27:39 kls Exp $
8  */
9 
10 #ifndef __DVBPLAYER_H
11 #define __DVBPLAYER_H
12 
13 #include "player.h"
14 #include "recording.h"
15 #include "thread.h"
16 
17 class cDvbPlayer;
18 
19 class cDvbPlayerControl : public cControl {
20 private:
22 public:
23  cDvbPlayerControl(const char *FileName, bool PauseLive = false);
24  // Sets up a player for the given file.
25  // If PauseLive is true, special care is taken to make sure the index
26  // file of the recording is long enough to allow the player to display
27  // the first frame in still picture mode.
28  virtual ~cDvbPlayerControl();
29  void SetMarks(cMarks *Marks);
30  bool Active(void);
31  void Stop(void);
32  // Stops the current replay session (if any).
33  void Pause(void);
34  // Pauses the current replay session, or resumes a paused session.
35  void Play(void);
36  // Resumes normal replay mode.
37  void Forward(void);
38  // Runs the current replay session forward at a higher speed.
39  void Backward(void);
40  // Runs the current replay session backwards at a higher speed.
41  int SkipFrames(int Frames);
42  // Returns the new index into the current replay session after skipping
43  // the given number of frames (no actual repositioning is done!).
44  // The sign of 'Frames' determines the direction in which to skip.
45  void SkipSeconds(int Seconds);
46  // Skips the given number of seconds in the current replay session.
47  // The sign of 'Seconds' determines the direction in which to skip.
48  // Use a very large negative value to go all the way back to the
49  // beginning of the recording.
50  bool GetIndex(int &Current, int &Total, bool SnapToIFrame = false);
51  // Returns the current and total frame index, optionally snapped to the
52  // nearest I-frame.
53  bool GetReplayMode(bool &Play, bool &Forward, int &Speed);
54  // Returns the current replay mode (if applicable).
55  // 'Play' tells whether we are playing or pausing, 'Forward' tells whether
56  // we are going forward or backward and 'Speed' is -1 if this is normal
57  // play/pause mode, 0 if it is single speed fast/slow forward/back mode
58  // and >0 if this is multi speed mode.
59  void Goto(int Index, bool Still = false);
60  // Positions to the given index and displays that frame as a still picture
61  // if Still is true. If Still is false, Play() will be called.
62  };
63 
64 #endif //__DVBPLAYER_H
void Play(void)
Definition: dvbplayer.c:969
virtual ~cDvbPlayerControl()
Definition: dvbplayer.c:941
cDvbPlayerControl(const char *FileName, bool PauseLive=false)
Definition: dvbplayer.c:936
void Pause(void)
Definition: dvbplayer.c:963
void Backward(void)
Definition: dvbplayer.c:981
void SetMarks(cMarks *Marks)
Definition: dvbplayer.c:946
bool GetIndex(int &Current, int &Total, bool SnapToIFrame=false)
Definition: dvbplayer.c:1000
bool Active(void)
Definition: dvbplayer.c:952
bool GetReplayMode(bool &Play, bool &Forward, int &Speed)
Definition: dvbplayer.c:1009
cDvbPlayer * player
Definition: dvbplayer.h:21
void Stop(void)
Definition: dvbplayer.c:957
void Forward(void)
Definition: dvbplayer.c:975
void Goto(int Index, bool Still=false)
Definition: dvbplayer.c:1014
int SkipFrames(int Frames)
Definition: dvbplayer.c:993
void SkipSeconds(int Seconds)
Definition: dvbplayer.c:987