mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Added cDevice::GetSTC()
This commit is contained in:
parent
2a7467aed5
commit
85767a5405
@ -612,6 +612,7 @@ Thomas Sailer <sailer@scs.ch>
|
|||||||
Sven Goethel <sgoethel@jausoft.com>
|
Sven Goethel <sgoethel@jausoft.com>
|
||||||
for making switching audio channels work without stopping/restarting the DMX
|
for making switching audio channels work without stopping/restarting the DMX
|
||||||
for fixing initializing the highlight area in cDvbSpuDecoder
|
for fixing initializing the highlight area in cDvbSpuDecoder
|
||||||
|
for suggesting to add cDevice::GetSTC()
|
||||||
|
|
||||||
Jan Rieger <jan@ricomp.de>
|
Jan Rieger <jan@ricomp.de>
|
||||||
for suggestions and testing raw keyboard input
|
for suggestions and testing raw keyboard input
|
||||||
|
4
HISTORY
4
HISTORY
@ -2452,6 +2452,10 @@ Video Disk Recorder Revision History
|
|||||||
- Added missing 'const' to some cChannel member functions (thanks to Torsten
|
- Added missing 'const' to some cChannel member functions (thanks to Torsten
|
||||||
Herz).
|
Herz).
|
||||||
|
|
||||||
|
2003-11-07: Version 1.2.6pre5
|
||||||
|
|
||||||
|
- Added cDevice::GetSTC() (suggested by Sven Goethel).
|
||||||
|
|
||||||
2003-10-24: Version 1.3.0
|
2003-10-24: Version 1.3.0
|
||||||
|
|
||||||
- Changed thread handling to make it work with NPTL ("Native Posix Thread Library").
|
- Changed thread handling to make it work with NPTL ("Native Posix Thread Library").
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<center><h1>The VDR Plugin System</h1></center>
|
<center><h1>The VDR Plugin System</h1></center>
|
||||||
|
|
||||||
<center><b>Version 1.2</b></center>
|
<center><b>Version 1.2.6</b></center>
|
||||||
<p>
|
<p>
|
||||||
<center>
|
<center>
|
||||||
Copyright © 2003 Klaus Schmidinger<br>
|
Copyright © 2003 Klaus Schmidinger<br>
|
||||||
@ -14,6 +14,10 @@ Copyright © 2003 Klaus Schmidinger<br>
|
|||||||
<a href="http://www.cadsoft.de/vdr">www.cadsoft.de/vdr</a>
|
<a href="http://www.cadsoft.de/vdr">www.cadsoft.de/vdr</a>
|
||||||
</center>
|
</center>
|
||||||
<p>
|
<p>
|
||||||
|
<!--X1.1.32--><table width=100%><tr><td bgcolor=#FF0000> </td><td width=100%>
|
||||||
|
Important modifications introduced in version 1.2.6 are marked like this.
|
||||||
|
<!--X1.1.32--></td></tr></table>
|
||||||
|
<p>
|
||||||
VDR provides an easy to use plugin interface that allows additional functionality
|
VDR provides an easy to use plugin interface that allows additional functionality
|
||||||
to be added to the program by implementing a dynamically loadable library file.
|
to be added to the program by implementing a dynamically loadable library file.
|
||||||
This interface allows programmers to develop additional functionality for VDR completely
|
This interface allows programmers to develop additional functionality for VDR completely
|
||||||
@ -1318,6 +1322,9 @@ The functions to implement replaying capabilites are
|
|||||||
virtual bool HasDecoder(void) const;
|
virtual bool HasDecoder(void) const;
|
||||||
virtual bool CanReplay(void) const;
|
virtual bool CanReplay(void) const;
|
||||||
virtual bool SetPlayMode(ePlayMode PlayMode);
|
virtual bool SetPlayMode(ePlayMode PlayMode);
|
||||||
|
<!--X1.1.32--><table width=100%><tr><td bgcolor=#FF0000> </td><td width=100%>
|
||||||
|
virtual int64_t GetSTC(void);
|
||||||
|
<!--X1.1.32--></td></tr></table>
|
||||||
virtual void TrickSpeed(int Speed);
|
virtual void TrickSpeed(int Speed);
|
||||||
virtual void Clear(void);
|
virtual void Clear(void);
|
||||||
virtual void Play(void);
|
virtual void Play(void);
|
||||||
|
7
device.c
7
device.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: device.c 1.48 2003/10/18 12:19:39 kls Exp $
|
* $Id: device.c 1.49 2003/11/07 14:15:10 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "device.h"
|
#include "device.h"
|
||||||
@ -500,6 +500,11 @@ bool cDevice::SetPlayMode(ePlayMode PlayMode)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int64_t cDevice::GetSTC(void)
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
void cDevice::TrickSpeed(int Speed)
|
void cDevice::TrickSpeed(int Speed)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
6
device.h
6
device.h
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: device.h 1.34 2003/08/15 13:05:50 kls Exp $
|
* $Id: device.h 1.35 2003/11/07 13:15:45 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __DEVICE_H
|
#ifndef __DEVICE_H
|
||||||
@ -320,6 +320,10 @@ protected:
|
|||||||
///< Sets the device into the given play mode.
|
///< Sets the device into the given play mode.
|
||||||
///< \return true if the operation was successful.
|
///< \return true if the operation was successful.
|
||||||
public:
|
public:
|
||||||
|
virtual int64_t GetSTC(void);
|
||||||
|
///< Gets the current System Time Counter, which can be used to
|
||||||
|
///< synchronize audio and video. If this device is unable to
|
||||||
|
///< provide the STC, -1 will be returned.
|
||||||
virtual void TrickSpeed(int Speed);
|
virtual void TrickSpeed(int Speed);
|
||||||
///< Sets the device into a mode where replay is done slower.
|
///< Sets the device into a mode where replay is done slower.
|
||||||
///< Every single frame shall then be displayed the given number of
|
///< Every single frame shall then be displayed the given number of
|
||||||
|
17
dvbdevice.c
17
dvbdevice.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: dvbdevice.c 1.70 2003/10/24 15:45:15 kls Exp $
|
* $Id: dvbdevice.c 1.71 2003/11/07 14:16:25 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "dvbdevice.h"
|
#include "dvbdevice.h"
|
||||||
@ -325,6 +325,7 @@ cDvbDevice::cDvbDevice(int n)
|
|||||||
fd_osd = DvbOpen(DEV_DVB_OSD, n, O_RDWR);
|
fd_osd = DvbOpen(DEV_DVB_OSD, n, O_RDWR);
|
||||||
fd_video = DvbOpen(DEV_DVB_VIDEO, n, O_RDWR | O_NONBLOCK);
|
fd_video = DvbOpen(DEV_DVB_VIDEO, n, O_RDWR | O_NONBLOCK);
|
||||||
fd_audio = DvbOpen(DEV_DVB_AUDIO, n, O_RDWR | O_NONBLOCK);
|
fd_audio = DvbOpen(DEV_DVB_AUDIO, n, O_RDWR | O_NONBLOCK);
|
||||||
|
fd_stc = DvbOpen(DEV_DVB_DEMUX, n, O_RDWR);
|
||||||
|
|
||||||
// The DVR device (will be opened and closed as needed):
|
// The DVR device (will be opened and closed as needed):
|
||||||
|
|
||||||
@ -868,6 +869,20 @@ bool cDvbDevice::SetPlayMode(ePlayMode PlayMode)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int64_t cDvbDevice::GetSTC(void)
|
||||||
|
{
|
||||||
|
if (fd_stc >= 0) {
|
||||||
|
struct dmx_stc stc;
|
||||||
|
stc.num = 0;
|
||||||
|
if (ioctl(fd_stc, DMX_GET_STC, &stc) == -1) {
|
||||||
|
esyslog("ERROR: stc %d: %m", CardIndex() + 1);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
return stc.stc / stc.base;
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
void cDvbDevice::TrickSpeed(int Speed)
|
void cDvbDevice::TrickSpeed(int Speed)
|
||||||
{
|
{
|
||||||
if (fd_video >= 0)
|
if (fd_video >= 0)
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: dvbdevice.h 1.23 2003/10/04 11:54:50 kls Exp $
|
* $Id: dvbdevice.h 1.24 2003/11/07 13:17:13 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __DVBDEVICE_H
|
#ifndef __DVBDEVICE_H
|
||||||
@ -38,7 +38,7 @@ public:
|
|||||||
///< \return True if any devices are available.
|
///< \return True if any devices are available.
|
||||||
private:
|
private:
|
||||||
fe_type_t frontendType;
|
fe_type_t frontendType;
|
||||||
int fd_osd, fd_audio, fd_video, fd_dvr;
|
int fd_osd, fd_audio, fd_video, fd_dvr, fd_stc;
|
||||||
int OsdDeviceHandle(void) const { return fd_osd; }
|
int OsdDeviceHandle(void) const { return fd_osd; }
|
||||||
protected:
|
protected:
|
||||||
virtual void MakePrimaryDevice(bool On);
|
virtual void MakePrimaryDevice(bool On);
|
||||||
@ -107,6 +107,7 @@ protected:
|
|||||||
virtual bool CanReplay(void) const;
|
virtual bool CanReplay(void) const;
|
||||||
virtual bool SetPlayMode(ePlayMode PlayMode);
|
virtual bool SetPlayMode(ePlayMode PlayMode);
|
||||||
public:
|
public:
|
||||||
|
virtual int64_t GetSTC(void);
|
||||||
virtual void TrickSpeed(int Speed);
|
virtual void TrickSpeed(int Speed);
|
||||||
virtual void Clear(void);
|
virtual void Clear(void);
|
||||||
virtual void Play(void);
|
virtual void Play(void);
|
||||||
|
Loading…
Reference in New Issue
Block a user