Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] PATCH vdr: Device::getSTC
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
hi folks, hi klaus:
- - introducing getSTC in device:
vdr-1.2.6-device-getSTC.diff
to achieve the stream time counter (stc) timestamp,
to support a/v sync
using DMX_GET_STC on pcr ..
@klaus: would be great to support this kinda stc .. thx.
- --
health & wealth
mailto:sgoethel@jausoft.com
www : http://www.jausoft.com ; pgp: http://www.jausoft.com/gpg/
voice : +49-5121-999600 ; fax : +49-5121-999602
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
iD8DBQE/nbznHdOA30NoFAARAqRMAJwLo5yEtY3EY9BZG+2Xg9IzZe5YyACbBMUb
OT0avmtz8PWglAJqeICgGRQ=
=aiqg
-----END PGP SIGNATURE-----
--- ../vdr-1.2.6pre2/device.h 2003-08-15 15:05:50.000000000 +0200
+++ device.h 2003-10-27 21:52:31.000000000 +0100
@@ -232,6 +233,7 @@
// Image Grab facilities
public:
+ virtual bool GetSTC(uint64_t & stcval);
virtual bool GrabImage(const char *FileName, bool Jpeg = true, int Quality = -1, int SizeX = -1, int SizeY = -1);
///< Capture a single frame as an image.
///< Grabs the currently visible screen image into the given file, with the
--- ../vdr-1.2.6pre2/device.c 2003-08-15 14:34:36.000000000 +0200
+++ device.c 2003-10-27 21:52:12.000000000 +0100
@@ -207,6 +209,11 @@
primaryDevice = NULL;
}
+bool cDevice::GetSTC(uint64_t & stcval)
+{
+ return false;
+}
+
bool cDevice::GrabImage(const char *FileName, bool Jpeg, int Quality, int SizeX, int SizeY)
{
return false;
--- ../vdr-1.2.6pre2/dvbdevice.c 2003-10-19 13:41:07.000000000 +0200
+++ dvbdevice.c 2003-10-27 21:55:37.000000000 +0100
@@ -577,6 +729,29 @@
// ptAudio ptVideo ptPcr ptTeletext ptDolby ptOther
dmx_pes_type_t PesTypes[] = { DMX_PES_AUDIO, DMX_PES_VIDEO, DMX_PES_PCR, DMX_PES_TELETEXT, DMX_PES_OTHER, DMX_PES_OTHER };
+bool cDvbDevice::GetSTC(uint64_t & stcval)
+{
+ stcval=0;
+ cPidHandle &Handle = pidHandles[ptPcr];
+
+ if ( !Handle.used || Handle.handle < 0 ) {
+ if ( ! AddPid(ptPcr, ptPcr) ) {
+ return false;
+ }
+ }
+
+ struct dmx_stc stc = { 0, 0, 0 };
+
+ if (ioctl(Handle.handle, DMX_GET_STC, &stc) < 0) {
+ LOG_ERROR;
+ return false;
+ }
+
+ stcval = (uint64_t)stc.stc/stc.base ;
+ return true;
+}
+
+
bool cDvbDevice::SetPid(cPidHandle *Handle, int Type, bool On)
{
if (Handle->pid) {
--- ../vdr-1.2.6pre2/dvbdevice.h 2003-10-04 13:54:50.000000000 +0200
+++ dvbdevice.h 2003-10-27 21:52:38.000000000 +0100
@@ -77,6 +111,7 @@
static int devVideoOffset;
int devVideoIndex;
public:
+ virtual bool GetSTC(uint64_t & stcval);
virtual bool GrabImage(const char *FileName, bool Jpeg = true, int Quality = -1, int SizeX = -1, int SizeY = -1);
// Video format facilities
Home |
Main Index |
Thread Index