vdr 2.6.3
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 4.2 2016/12/22 10:36:50 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
17class cDvbPlayer;
18
20private:
22public:
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(const 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 GetFrameNumber(int &Current, int &Total);
54 // Returns the current and total frame number. In contrast to GetIndex(),
55 // this function respects the chronological order of frames, which is
56 // different from its index for streams containing B frames (e.g. H264)
57 bool GetReplayMode(bool &Play, bool &Forward, int &Speed);
58 // Returns the current replay mode (if applicable).
59 // 'Play' tells whether we are playing or pausing, 'Forward' tells whether
60 // we are going forward or backward and 'Speed' is -1 if this is normal
61 // play/pause mode, 0 if it is single speed fast/slow forward/back mode
62 // and >0 if this is multi speed mode.
63 void Goto(int Index, bool Still = false);
64 // Positions to the given index and displays that frame as a still picture
65 // if Still is true. If Still is false, Play() will be called.
66 };
67
68#endif //__DVBPLAYER_H
void SetMarks(const cMarks *Marks)
Definition: dvbplayer.c:995
bool GetIndex(int &Current, int &Total, bool SnapToIFrame=false)
Definition: dvbplayer.c:1050
virtual ~cDvbPlayerControl()
Definition: dvbplayer.c:990
void SkipSeconds(int Seconds)
Definition: dvbplayer.c:1037
bool GetReplayMode(bool &Play, bool &Forward, int &Speed)
Definition: dvbplayer.c:1068
void Pause(void)
Definition: dvbplayer.c:1013
int SkipFrames(int Frames)
Definition: dvbplayer.c:1043
void Goto(int Index, bool Still=false)
Definition: dvbplayer.c:1073
void Stop(void)
Definition: dvbplayer.c:1006
void Forward(void)
Definition: dvbplayer.c:1025
bool Active(void)
Definition: dvbplayer.c:1001
bool GetFrameNumber(int &Current, int &Total)
Definition: dvbplayer.c:1059
void Play(void)
Definition: dvbplayer.c:1019
void Backward(void)
Definition: dvbplayer.c:1031
cDvbPlayer * player
Definition: dvbplayer.h:21