vdr 2.6.1
Public Member Functions | Static Public Member Functions | Protected Attributes | Private Attributes | Static Private Attributes | List of all members
cControl Class Referenceabstract

#include <player.h>

Public Member Functions

 cControl (cPlayer *Player, bool Hidden=false)
 
virtual ~cControl ()
 
virtual void Hide (void)=0
 
virtual cOsdObjectGetInfo (void)
 
virtual const cRecordingGetRecording (void)
 
virtual cString GetHeader (void)
 
virtual void ClearEditingMarks (void)
 
double FramesPerSecond (void) const
 
bool GetIndex (int &Current, int &Total, bool SnapToIFrame=false) const
 
bool GetFrameNumber (int &Current, int &Total) const
 
bool GetReplayMode (bool &Play, bool &Forward, int &Speed) const
 
 cControl (cPlayer *Player, bool Hidden=false)
 
virtual ~cControl ()
 
virtual void Hide (void)=0
 
virtual cOsdObjectGetInfo (void)
 
virtual const cRecordingGetRecording (void)
 
virtual cString GetHeader (void)
 
virtual void ClearEditingMarks (void)
 
double FramesPerSecond (void) const
 
bool GetIndex (int &Current, int &Total, bool SnapToIFrame=false) const
 
bool GetFrameNumber (int &Current, int &Total) const
 
bool GetReplayMode (bool &Play, bool &Forward, int &Speed) const
 
- Public Member Functions inherited from cOsdObject
 cOsdObject (bool FastResponse=false)
 
virtual ~cOsdObject ()
 
virtual bool NeedsFastResponse (void)
 
bool IsMenu (void) const
 
virtual void Show (void)
 
virtual eOSState ProcessKey (eKeys Key)
 
 cOsdObject (bool FastResponse=false)
 
virtual ~cOsdObject ()
 
virtual bool NeedsFastResponse (void)
 
bool IsMenu (void) const
 
virtual void Show (void)
 
virtual eOSState ProcessKey (eKeys Key)
 

Static Public Member Functions

static void Launch (cControl *Control)
 
static void Attach (void)
 
static void Shutdown (void)
 
static cControlControl (bool Hidden=false)
 
static cControlControl (cMutexLock &MutexLock, bool Hidden=false)
 
static void Launch (cControl *Control)
 
static void Attach (void)
 
static void Shutdown (void)
 
static cControlControl (bool Hidden=false)
 
static cControlControl (cMutexLock &MutexLock, bool Hidden=false)
 

Protected Attributes

cPlayerplayer
 

Private Attributes

bool attached
 
bool hidden
 

Static Private Attributes

static cControlcontrol = NULL
 
static cMutex mutex
 

Additional Inherited Members

- Protected Member Functions inherited from cOsdObject
void SetNeedsFastResponse (bool NeedsFastResponse)
 
void SetNeedsFastResponse (bool NeedsFastResponse)
 

Detailed Description

Definition at line 80 of file include/vdr/player.h.

Constructor & Destructor Documentation

◆ cControl() [1/2]

cControl::cControl ( cPlayer Player,
bool  Hidden = false 
)

Definition at line 45 of file player.c.

References attached, hidden, and player.

◆ ~cControl() [1/2]

cControl::~cControl ( )
virtual

Definition at line 52 of file player.c.

References control.

◆ cControl() [2/2]

cControl::cControl ( cPlayer Player,
bool  Hidden = false 
)

◆ ~cControl() [2/2]

virtual cControl::~cControl ( )
virtual

Member Function Documentation

◆ Attach() [1/2]

void cControl::Attach ( void  )
static

◆ Attach() [2/2]

static void cControl::Attach ( void  )
static

◆ ClearEditingMarks() [1/2]

virtual void cControl::ClearEditingMarks ( void  )
inlinevirtual

Clears any editing marks this player might be showing.

Deletion of the marks themselves is handled separately, calling this function merely tells the player to no longer display the marks, if it has any.

Reimplemented in cReplayControl, and cReplayControl.

Definition at line 105 of file include/vdr/player.h.

◆ ClearEditingMarks() [2/2]

virtual void cControl::ClearEditingMarks ( void  )
inlinevirtual

Clears any editing marks this player might be showing.

Deletion of the marks themselves is handled separately, calling this function merely tells the player to no longer display the marks, if it has any.

Reimplemented in cReplayControl, and cReplayControl.

Definition at line 105 of file player.h.

◆ Control() [1/4]

cControl * cControl::Control ( bool  Hidden = false)
static

Old version of this function, for backwards compatibility with plugins.

Plugins should be changed to use the new version below, which does proper locking. Use of this function may result in program crashes in case replay is stopped immediately after starting it.

Definition at line 74 of file player.c.

References control, hidden, and mutex.

Referenced by cMenuRecordingEdit::Delete(), cSkinLCARSDisplayMenu::Flush(), Launch(), main(), and cMenuMain::Update().

◆ Control() [2/4]

static cControl * cControl::Control ( bool  Hidden = false)
static

Old version of this function, for backwards compatibility with plugins.

Plugins should be changed to use the new version below, which does proper locking. Use of this function may result in program crashes in case replay is stopped immediately after starting it.

◆ Control() [3/4]

cControl * cControl::Control ( cMutexLock MutexLock,
bool  Hidden = false 
)
static

Returns the current replay control (if any) in case it is currently visible.

If Hidden is true, the control will be returned even if it is currently hidden. The given MutexLock must live as long as the replay control is accessed, and must go out of scope as soon as the control is no longer accessed.

Definition at line 81 of file player.c.

References control, hidden, cMutexLock::Lock(), and mutex.

◆ Control() [4/4]

static cControl * cControl::Control ( cMutexLock MutexLock,
bool  Hidden = false 
)
static

Returns the current replay control (if any) in case it is currently visible.

If Hidden is true, the control will be returned even if it is currently hidden. The given MutexLock must live as long as the replay control is accessed, and must go out of scope as soon as the control is no longer accessed.

◆ FramesPerSecond() [1/2]

double cControl::FramesPerSecond ( void  ) const
inline

◆ FramesPerSecond() [2/2]

double cControl::FramesPerSecond ( void  ) const
inline

Definition at line 110 of file player.h.

References DEFAULTFRAMESPERSECOND, cPlayer::FramesPerSecond(), and player.

◆ GetFrameNumber() [1/2]

bool cControl::GetFrameNumber ( int &  Current,
int &  Total 
) const
inline

Definition at line 112 of file include/vdr/player.h.

References cPlayer::GetFrameNumber(), and player.

◆ GetFrameNumber() [2/2]

bool cControl::GetFrameNumber ( int &  Current,
int &  Total 
) const
inline

Definition at line 112 of file player.h.

References cPlayer::GetFrameNumber(), and player.

◆ GetHeader() [1/2]

cString cControl::GetHeader ( void  )
virtual

This can be used by players that don't play a cRecording, but rather do something completely different.

The resulting string may be used by skins as a last resort, in case they want to display the state of the current player. The return value is expected to be a short, single line string. The default implementation returns an empty string.

Reimplemented in cPictureControl.

Definition at line 68 of file player.c.

Referenced by cSkinLCARSDisplayMenu::DrawPlay().

◆ GetHeader() [2/2]

virtual cString cControl::GetHeader ( void  )
virtual

This can be used by players that don't play a cRecording, but rather do something completely different.

The resulting string may be used by skins as a last resort, in case they want to display the state of the current player. The return value is expected to be a short, single line string. The default implementation returns an empty string.

Reimplemented in cPictureControl.

◆ GetIndex() [1/2]

bool cControl::GetIndex ( int &  Current,
int &  Total,
bool  SnapToIFrame = false 
) const
inline

Definition at line 111 of file include/vdr/player.h.

References cPlayer::GetIndex(), and player.

Referenced by cSkinLCARSDisplayMenu::DrawPlay().

◆ GetIndex() [2/2]

bool cControl::GetIndex ( int &  Current,
int &  Total,
bool  SnapToIFrame = false 
) const
inline

Definition at line 111 of file player.h.

References cPlayer::GetIndex(), and player.

◆ GetInfo() [1/2]

cOsdObject * cControl::GetInfo ( void  )
virtual

Returns an OSD object that displays information about the currently played programme.

If no such information is available, NULL will be returned.

Reimplemented in cReplayControl, and cReplayControl.

Definition at line 58 of file player.c.

Referenced by main().

◆ GetInfo() [2/2]

virtual cOsdObject * cControl::GetInfo ( void  )
virtual

Returns an OSD object that displays information about the currently played programme.

If no such information is available, NULL will be returned.

Reimplemented in cReplayControl, and cReplayControl.

◆ GetRecording() [1/2]

const cRecording * cControl::GetRecording ( void  )
virtual

Returns the cRecording that is currently being replayed, or NULL if this player is not playing a cRecording.

Reimplemented in cReplayControl, and cReplayControl.

Definition at line 63 of file player.c.

Referenced by cSkinLCARSDisplayMenu::DrawPlay().

◆ GetRecording() [2/2]

virtual const cRecording * cControl::GetRecording ( void  )
virtual

Returns the cRecording that is currently being replayed, or NULL if this player is not playing a cRecording.

Reimplemented in cReplayControl, and cReplayControl.

◆ GetReplayMode() [1/2]

bool cControl::GetReplayMode ( bool &  Play,
bool &  Forward,
int &  Speed 
) const
inline

Definition at line 113 of file include/vdr/player.h.

References cPlayer::GetReplayMode(), and player.

◆ GetReplayMode() [2/2]

bool cControl::GetReplayMode ( bool &  Play,
bool &  Forward,
int &  Speed 
) const
inline

Definition at line 113 of file player.h.

References cPlayer::GetReplayMode(), and player.

◆ Hide() [1/2]

virtual void cControl::Hide ( void  )
pure virtual

◆ Hide() [2/2]

virtual void cControl::Hide ( void  )
pure virtual

◆ Launch() [1/2]

void cControl::Launch ( cControl Control)
static

◆ Launch() [2/2]

static void cControl::Launch ( cControl Control)
static

◆ Shutdown() [1/2]

void cControl::Shutdown ( void  )
static

◆ Shutdown() [2/2]

static void cControl::Shutdown ( void  )
static

Member Data Documentation

◆ attached

bool cControl::attached
private

Definition at line 84 of file include/vdr/player.h.

Referenced by Attach(), and cControl().

◆ control

static cControl * cControl::control = NULL
staticprivate

Definition at line 82 of file include/vdr/player.h.

Referenced by Attach(), Control(), Launch(), Shutdown(), and ~cControl().

◆ hidden

bool cControl::hidden
private

Definition at line 85 of file include/vdr/player.h.

Referenced by cControl(), and Control().

◆ mutex

static cMutex cControl::mutex
staticprivate

Definition at line 83 of file include/vdr/player.h.

Referenced by Attach(), Control(), Launch(), and Shutdown().

◆ player

cPlayer * cControl::player
protected

The documentation for this class was generated from the following files: