2002-06-16 12:57:31 +02:00
|
|
|
/*
|
|
|
|
* dvbplayer.h: The DVB player
|
|
|
|
*
|
|
|
|
* See the main source file 'vdr.c' for copyright information and
|
|
|
|
* how to reach the author.
|
|
|
|
*
|
2015-02-06 15:42:21 +01:00
|
|
|
* $Id: dvbplayer.h 3.2 2015/02/06 12:27:39 kls Exp $
|
2002-06-16 12:57:31 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __DVBPLAYER_H
|
|
|
|
#define __DVBPLAYER_H
|
|
|
|
|
|
|
|
#include "player.h"
|
2015-02-06 15:42:21 +01:00
|
|
|
#include "recording.h"
|
2002-06-16 12:57:31 +02:00
|
|
|
#include "thread.h"
|
|
|
|
|
|
|
|
class cDvbPlayer;
|
|
|
|
|
|
|
|
class cDvbPlayerControl : public cControl {
|
|
|
|
private:
|
|
|
|
cDvbPlayer *player;
|
|
|
|
public:
|
2012-02-19 11:50:20 +01:00
|
|
|
cDvbPlayerControl(const char *FileName, bool PauseLive = false);
|
2002-06-23 11:23:34 +02:00
|
|
|
// Sets up a player for the given file.
|
2012-02-19 11:50:20 +01:00
|
|
|
// If PauseLive is true, special care is taken to make sure the index
|
|
|
|
// file of the recording is long enough to allow the player to display
|
|
|
|
// the first frame in still picture mode.
|
2002-06-16 12:57:31 +02:00
|
|
|
virtual ~cDvbPlayerControl();
|
2015-02-06 15:42:21 +01:00
|
|
|
void SetMarks(cMarks *Marks);
|
2002-06-16 12:57:31 +02:00
|
|
|
bool Active(void);
|
|
|
|
void Stop(void);
|
|
|
|
// Stops the current replay session (if any).
|
|
|
|
void Pause(void);
|
|
|
|
// Pauses the current replay session, or resumes a paused session.
|
|
|
|
void Play(void);
|
|
|
|
// Resumes normal replay mode.
|
|
|
|
void Forward(void);
|
|
|
|
// Runs the current replay session forward at a higher speed.
|
|
|
|
void Backward(void);
|
|
|
|
// Runs the current replay session backwards at a higher speed.
|
|
|
|
int SkipFrames(int Frames);
|
|
|
|
// Returns the new index into the current replay session after skipping
|
|
|
|
// the given number of frames (no actual repositioning is done!).
|
|
|
|
// The sign of 'Frames' determines the direction in which to skip.
|
|
|
|
void SkipSeconds(int Seconds);
|
|
|
|
// Skips the given number of seconds in the current replay session.
|
|
|
|
// The sign of 'Seconds' determines the direction in which to skip.
|
|
|
|
// Use a very large negative value to go all the way back to the
|
|
|
|
// beginning of the recording.
|
|
|
|
bool GetIndex(int &Current, int &Total, bool SnapToIFrame = false);
|
|
|
|
// Returns the current and total frame index, optionally snapped to the
|
|
|
|
// nearest I-frame.
|
|
|
|
bool GetReplayMode(bool &Play, bool &Forward, int &Speed);
|
|
|
|
// Returns the current replay mode (if applicable).
|
|
|
|
// 'Play' tells whether we are playing or pausing, 'Forward' tells whether
|
|
|
|
// we are going forward or backward and 'Speed' is -1 if this is normal
|
|
|
|
// play/pause mode, 0 if it is single speed fast/slow forward/back mode
|
|
|
|
// and >0 if this is multi speed mode.
|
|
|
|
void Goto(int Index, bool Still = false);
|
|
|
|
// Positions to the given index and displays that frame as a still picture
|
2015-02-01 11:20:54 +01:00
|
|
|
// if Still is true. If Still is false, Play() will be called.
|
2002-06-16 12:57:31 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif //__DVBPLAYER_H
|