[vdr] 01/09: Imported Upstream version 2.0.6
Tobias Grimm
tiber-guest at moszumanska.debian.org
Sun Oct 26 09:06:10 UTC 2014
This is an automated email from the git hooks/post-receive script.
tiber-guest pushed a commit to annotated tag debian/2.0.6-1_etobi1
in repository vdr.
commit ed6f1dd81dd2082e110823f056e92e45f70b1d33
Author: etobi <git at e-tobi.net>
Date: Sun Oct 19 12:53:19 2014 +0200
Imported Upstream version 2.0.6
---
CONTRIBUTORS | 53 +++++++++++-
HISTORY | 84 ++++++++++++++++++++
PLUGINS/src/dvbhddevice/dvbhdffdevice.c | 4 +-
PLUGINS/src/dvbsddevice/dvbsdffdevice.c | 6 +-
PLUGINS/src/osddemo/HISTORY | 5 ++
PLUGINS/src/osddemo/osddemo.c | 10 ++-
channels.c | 16 ++--
ci.c | 4 +-
config.h | 10 +--
device.c | 5 +-
dvbdevice.c | 2 +-
eit.c | 4 +-
font.c | 23 +++---
font.h | 4 +-
lirc.c | 19 +++--
menu.c | 32 +++++---
menu.h | 4 +-
nit.c | 8 +-
nit.h | 6 +-
pat.c | 133 ++++++++++++++++++-------------
pat.h | 20 +++--
recorder.c | 12 +--
recording.c | 83 +++++++++++++------
recording.h | 8 +-
remote.c | 4 +-
remux.c | 98 ++++++++++++++++++-----
remux.h | 13 ++-
sdt.c | 27 +++++--
sdt.h | 5 +-
skinlcars.c | 14 +++-
skins.h | 4 +-
sourceparams.c | 6 +-
sources.c | 11 ++-
sources.conf | 137 ++++++++++++++++----------------
sources.h | 3 +-
vdr.1 | 4 +-
vdr.c | 12 +--
37 files changed, 615 insertions(+), 278 deletions(-)
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index b749d08..ee4e81c 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -618,6 +618,10 @@ Helmut Auer <vdr at helmutauer.de>
for suggesting to read the epg.data file in a separate thread
for some improvements to allowing the parameters PATH and NAME to the --dirnames
command line option to be left empty to use the default values if only ENC shall be set
+ for reporting an inconsistent behavior between opening the Recordings menu manually
+ via the main menu and by pressing the Recordings key
+ for helping to debug a problem with frame detection in MPEG-2 streams that have "bottom fields"
+ or varying GOP structures
Jeremy Hall <jhall at UU.NET>
for fixing an incomplete initialization of the filter parameters in eit.c
@@ -702,6 +706,8 @@ Oliver Endriss <o.endriss at gmx.de>
for reporting a problem with resuming replay of PES recordings
for suggesting to make all bonded devices (except for the master) turn off their LNB
power completely to avoid problems when receiving vertically polarized transponders
+ for reporting that there are channels that need even more than 10 TS packets in order
+ to detect the frame type
Reinhard Walter Buchner <rw.buchner at freenet.de>
for adding some satellites to 'sources.conf'
@@ -1169,6 +1175,9 @@ Rolf Ahrenberg <Rolf.Ahrenberg at sci.fi>
for fixing the call to ChannelString() in cSkinLCARSDisplayChannel::SetChannel()
for a patch that was used to rename the "plp id" to a more general "stream id"
and add support for DVB-S2 "Input Stream Identifier" (ISI)
+ for fixing clearing non-editable members in the channel editor
+ for reporting a problem with adding new source types in case they are already
+ registered
Ralf Klueber <ralf.klueber at vodafone.com>
for reporting a bug in cutting a recording if there is only a single editing mark
@@ -2134,6 +2143,9 @@ Marko M
pressed in string input fields
for fixing missing ',' in the Italian and Polish OSD texts
for pointing out that "Menu button closes" should actually be "Menu key closes"
+ for fixing a missing initialization in the c'tor of cSkinLCARSDisplayChannel
+ for reporting some uninitialized item area coordinates in cSkinLCARSDisplayMenu
+ for reporting a problem with the video directory not being set correctly with --edit
Patrick Rother <krd-vdr at gulu.net>
for reporting a bug in defining timers that only differ in the day of week
@@ -2482,6 +2494,7 @@ Anssi Hannula <anssi.hannula at gmail.com>
Antti Hartikainen <ami+vdr at ah.fi>
for updating 'S13E' in 'sources.conf'
for adding maximum SNR value for PCTV Systems nanoStick T2 290e
+ for updating 'sources.conf'
Bernd Melcher <bernd at bernd-melcher.de>
for reporting a problem with the 'servicedemo' plugin having no PLUGIN macro
@@ -2544,6 +2557,8 @@ Ulf Kiener <webmaster at ulf-kiener.de>
for suggesting to add user defined key kUser0
for suggesting to perform absolute jumps when replaying a recording (via the Red key)
only if an actual value has been entered
+ for suggesting to make the Yellow button in the main menu not act as "Pause" if
+ "Pause key handling" is set to "do not pause live video"
J�rg Wendel <vdr-ml at jwendel.de>
for reporting that cPlugin::Active() was called too often
@@ -2843,6 +2858,12 @@ Lars Hanisch <dvb at flensrocker.de>
for reporting an invalid line in channels.conf.terr
for fixing handling '/' and '~' in recording file names in case DirectoryEncoding is
used
+ for making the LIRC remote control connect to the socket even if it doesn't yet exist
+ when VDR is started
+ for reporting a possible crash if the recordings list is updated externally while the
+ Recordings menu is open
+ for reporting a missing closing ')' in the help entry of the --vfat option
+ for fixing learning keyboard remote control codes
Alex Lasnier <alex at fepg.org>
for adding tuning support for ATSC devices
@@ -2870,7 +2891,7 @@ Luis Fernandes <telping at gmail.com>
for suggesting to add handling MPEG audio type "ISO/IEC 14496-3 Audio with LATM
transport syntax"
-Christopher Reimer <reimer.christopher at freenet.de>
+Christopher Reimer <vdr at creimer.net>
for reporting a problem with external Dolby Digital processing via the '-a' option
in live mode and with TS recordings
for contributing to a patch that implements FHS support
@@ -2880,6 +2901,7 @@ Christopher Reimer <reimer.christopher at freenet.de>
for making plugin Makefiles use DESTDIR and the 'install' program
for suggesting to make sure that plugins include the VDR header files from the actual
VDR source directory when doing "make plugins"
+ for reporting a possible crash in the OSD demo
Stefan Huskamp <coca_cola1 at gmx.de>
for suggesting to make entering characters via the number keys
@@ -3006,6 +3028,11 @@ Torsten Lang <info at torstenlang.de>
for suggesting to increase the size of the TS buffer to 5MB and that of the Recorder
buffer to 20MB to better handle HD recordings
for fixing setting the video format in the dvbhdffdevice
+ for reporting a problem with setting the system time from the TDT in case devices
+ are tuned to the same transponder on different sources, and these broadcast different
+ time data
+ for reporting a problem with unjustified "video data stream broken" errors in case
+ the system time is changed while a recording is active
Christian Ruppert <idl0r at gentoo.org>
for some improvements to the Makefiles
@@ -3163,3 +3190,27 @@ Dominique Dumont <domi.dumont at free.fr>
Manfred V�lkel <mvoelkel at digitaldevices.de>
for suggesting to make all bonded devices (except for the master) turn off their LNB
power completely to avoid problems when receiving vertically polarized transponders
+
+Thomas Maass <mase at setho.org>
+ for reporting a difference in the internal sequence of actions when pressing the Blue
+ and the Back key, respectively, during replay
+
+Eike Edener <eike at edener.de>
+ for reporting a bug in writing group separators to channels.conf that contain a comma
+
+Eike Sauer <EikeSauer at t-online.de>
+ for reporting a problem with channels that need more than 5 TS packets for detecting
+ frame borders
+ for reporting a problem in handling the frame detection buffer length
+
+Christian Paulick <cpaulick at xeatre.tv>
+ for reporting a problem with frame detection in MPEG-2 streams that have "bottom fields"
+ or varying GOP structures
+
+Mariusz Bialonczyk <manio at skyboo.net>
+ for reporting that acquiring the CA descriptors takes way too long on transponders
+ with many PAT entries, and his help in debugging this
+
+Christian Winkler <winkler_chr at yahoo.de>
+ for reporting a problem with transfer mode on full featured DVB cards for encrypted
+ channels that have no audio pid
diff --git a/HISTORY b/HISTORY
index 0510953..fa6a362 100644
--- a/HISTORY
+++ b/HISTORY
@@ -7831,3 +7831,87 @@ Video Disk Recorder Revision History
Manfred V�lkel and Oliver Endriss).
- Fixed cleaning up old EPG events in case no epg data file is given (reported by
Dave Pickles).
+
+2013-10-23: Version 2.0.4
+
+- Unified the internal sequence of actions when pressing the Blue and the Back key,
+ respectively, during replay (reported by Thomas Maass).
+- The Yellow button in the main menu no longer acts as "Pause" if "Pause key handling"
+ is set to "do not pause live video" (suggested by Ulf Kiener).
+- Fixed writing group separators to channels.conf that contain a comma (reported by
+ Eike Edener).
+- Now also checking the source (in addition to the transponder) when setting the
+ system time from the TDT, which avoids problems in case devices are tuned to the
+ same transponder on different sources, and these broadcast different time data
+ (reported by Torsten Lang).
+- Changed cRecorder::Action() to use cTimeMs instead of time() to avoid problems with
+ unjustified "video data stream broken" errors in case the system time is changed
+ while a recording is active (reported by Torsten Lang).
+- Fixed an inconsistent behavior between opening the Recordings menu manually via the
+ main menu and by pressing the Recordings key. In the latter case it automatically
+ opened all sub folders to position the cursor to the last replayed recording, which
+ is unexpected at this point (reported by Helmut Auer). You can still navigate to
+ the last replayed recording (if any) by pressing Ok repeatedly in the Recordings
+ menu.
+
+2014-01-07: Version 2.0.5
+
+- The LIRC remote control now connects to the socket even if it doesn't yet exist when
+ VDR is started (thanks to Lars Hanisch).
+- Fixed a missing initialization in the c'tor of cSkinLCARSDisplayChannel (thanks to
+ Marko M�kel�).
+- Fixed uninitialized item area coordinates in cSkinLCARSDisplayMenu (reported by
+ Marko M�kel�).
+- Fixed a possible crash if the recordings list is updated externally while the
+ Recordings menu is open (reported by Lars Hanisch).
+- Added a missing closing ')' in the help and man page entry of the --vfat option
+ (reported by Lars Hanisch).
+- Fixed setting the name of the video directory to avoid a crash when using --genindex,
+ and also to use the correct directory with --edit (the latter reported by Marko
+ M�kel�).
+
+2014-03-16: Version 2.0.6
+
+- Updated 'sources.conf' (thanks to Antti Hartikainen).
+- cFont::CreateFont() now returns a dummy font in case there are no fonts installed.
+ This prevents a crash with the LCARS skin on a system that has no fonts.
+- Fixed detecting frame borders in MPEG-2 streams that have "bottom fields" or varying
+ GOP structures (reported by Christian Paulick, with help from Helmut Auer).
+- Fixed a wrong alignment in cCiDateTime::SendDateTime().
+- Now checking whether the primary device actually has a decoder before retuning the
+ current channel after a change in its parameters. This fixes broken recordings on
+ the primary device on "headless" systems.
+- Increased MIN_TS_PACKETS_FOR_FRAME_DETECTOR to 100 and introduced counting the number
+ of actual video TS packets in cTsPayload in order to be able to record channels that
+ sometimes need even more than 10 TS packets for detecting frame borders (reported by
+ Eike Sauer and Oliver Endriss).
+- Fixed sorting recordings by time in the Recordings menu if "Setup/OSD/Recording
+ directories" is set to "no".
+- Fixed clearing non-editable members in the channel editor (thanks to Rolf Ahrenberg).
+- Fixed flickering if subtitles are active while the OSD demo is running.
+- Fixed a possible crash in the OSD demo (reported by Christopher Reimer).
+- Fixed learning keyboard remote control codes (thanks to Lars Hanisch).
+- Fixed the replay progress display for very long recordings.
+- Improved PAT/PMT scanning to speed up initial tuning to encrypted channels on
+ transponders with many PAT entries (reported by Mariusz Bialonczyk).
+- Fixed detecting broken video data streams when recording.
+- Fixed handling frame detection buffer length (reported by Eike Sauer).
+- Fixed keeping the current position in the Recordings menu if a recording was
+ deleted in a sub folder.
+- Fixed handling transfer mode on full featured DVB cards for encrypted channels
+ that have no audio pid (reported by Christian Winkler).
+- Fixed a possible endless loop in cH264Parser::GetGolombUe(), which caused recordings
+ on some HD channels to get stuck and resulted in buffer overflows.
+- Fixed handling PAT packets when detecting frames, so that they can be properly
+ taken into account when regenerating the index of a recording.
+- Fixed adding new source types in case they are already registered (reported by Rolf
+ Ahrenberg).
+- Fixed drawing the live indicator in the LCARS skin in case there are no devices.
+- The SDT is now only parsed *after* the NIT has been read, and it explicitly uses
+ the source value derived from the NIT. This should prevent new channels from being
+ created with the wrong source.
+- Now initializing the isOnVideoDirectoryFileSystem member of cRecording when
+ scanning the video directory, so that it won't cause a delay when opening the menu
+ on a system with a large number of recordings.
+- The APIVERSION has been increased to 2.0.6 due to the changes to pat.h, sdt.h and
+ the functional modification to cFont::CreateFont().
diff --git a/PLUGINS/src/dvbhddevice/dvbhdffdevice.c b/PLUGINS/src/dvbhddevice/dvbhdffdevice.c
index 857861e..e8dabd9 100644
--- a/PLUGINS/src/dvbhddevice/dvbhdffdevice.c
+++ b/PLUGINS/src/dvbhddevice/dvbhdffdevice.c
@@ -377,8 +377,8 @@ bool cDvbHdFfDevice::SetChannelDevice(const cChannel *Channel, bool LiveView)
bool DoTune = !IsTunedToTransponder(Channel);
- bool pidHandlesVideo = pidHandles[ptVideo].pid == vpid;
- bool pidHandlesAudio = pidHandles[ptAudio].pid == apid;
+ bool pidHandlesVideo = vpid && pidHandles[ptVideo].pid == vpid;
+ bool pidHandlesAudio = apid && pidHandles[ptAudio].pid == apid;
bool TurnOffLivePIDs = DoTune
|| !IsPrimaryDevice()
diff --git a/PLUGINS/src/dvbsddevice/dvbsdffdevice.c b/PLUGINS/src/dvbsddevice/dvbsdffdevice.c
index 4e98cdd..8dd69c2 100644
--- a/PLUGINS/src/dvbsddevice/dvbsdffdevice.c
+++ b/PLUGINS/src/dvbsddevice/dvbsdffdevice.c
@@ -3,7 +3,7 @@
*
* See the README file for copyright information and how to reach the author.
*
- * $Id: dvbsdffdevice.c 2.35 2013/02/17 13:16:18 kls Exp $
+ * $Id: dvbsdffdevice.c 2.35.1.1 2014/02/27 17:10:51 kls Exp $
*/
#include "dvbsdffdevice.h"
@@ -400,8 +400,8 @@ bool cDvbSdFfDevice::SetChannelDevice(const cChannel *Channel, bool LiveView)
bool DoTune = !IsTunedToTransponder(Channel);
- bool pidHandlesVideo = pidHandles[ptVideo].pid == vpid;
- bool pidHandlesAudio = pidHandles[ptAudio].pid == apid;
+ bool pidHandlesVideo = vpid && pidHandles[ptVideo].pid == vpid;
+ bool pidHandlesAudio = apid && pidHandles[ptAudio].pid == apid;
bool TurnOffLivePIDs = DoTune
|| !IsPrimaryDevice()
diff --git a/PLUGINS/src/osddemo/HISTORY b/PLUGINS/src/osddemo/HISTORY
index b1411de..99674af 100644
--- a/PLUGINS/src/osddemo/HISTORY
+++ b/PLUGINS/src/osddemo/HISTORY
@@ -59,3 +59,8 @@ VDR Plugin 'osddemo' Revision History
2013-03-31: Version 2.0.0
- Official release.
+
+2014-02-06: Version 2.0.1
+
+- Fixed flickering if subtitles are active while the OSD demo is running.
+- Fixed a possible crash in the OSD demo (reported by Christopher Reimer).
diff --git a/PLUGINS/src/osddemo/osddemo.c b/PLUGINS/src/osddemo/osddemo.c
index f88f776..296fc78 100644
--- a/PLUGINS/src/osddemo/osddemo.c
+++ b/PLUGINS/src/osddemo/osddemo.c
@@ -3,13 +3,13 @@
*
* See the README file for copyright information and how to reach the author.
*
- * $Id: osddemo.c 2.12 2013/03/31 09:30:18 kls Exp $
+ * $Id: osddemo.c 2.12.1.2 2014/02/06 11:59:40 kls Exp $
*/
#include <vdr/osd.h>
#include <vdr/plugin.h>
-static const char *VERSION = "2.0.0";
+static const char *VERSION = "2.0.1";
static const char *DESCRIPTION = "Demo of arbitrary OSD setup";
static const char *MAINMENUENTRY = "Osd Demo";
@@ -119,7 +119,7 @@ cLineGame::~cLineGame()
void cLineGame::Show(void)
{
- osd = cOsdProvider::NewOsd(cOsd::OsdLeft(), cOsd::OsdTop(), 50);
+ osd = cOsdProvider::NewOsd(cOsd::OsdLeft(), cOsd::OsdTop());
if (osd) {
int x1 = cOsd::OsdWidth() - 1;
int y1 = cOsd::OsdHeight() - 1;
@@ -480,6 +480,8 @@ void cTrueColorDemo::Action(void)
if (Delta < FrameTime)
cCondWait::SleepMs(FrameTime - Delta);
}
+ destroyablePixmap = NULL;
+ toggleablePixmap = NULL;
delete OsdFont;
delete SmlFont;
delete LrgFont;
@@ -496,7 +498,7 @@ bool cTrueColorDemo::SetArea(void)
void cTrueColorDemo::Show(void)
{
- osd = cOsdProvider::NewOsd(cOsd::OsdLeft(), cOsd::OsdTop(), 50);
+ osd = cOsdProvider::NewOsd(cOsd::OsdLeft(), cOsd::OsdTop());
if (osd) {
if (SetArea()) {
osd->DrawRectangle(0, 0, osd->Width() - 1, osd->Height() - 1, clrGray50);
diff --git a/channels.c b/channels.c
index 4c04608..67245ac 100644
--- a/channels.c
+++ b/channels.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: channels.c 2.24 2012/07/14 12:34:47 kls Exp $
+ * $Id: channels.c 2.24.1.1 2013/10/11 11:40:02 kls Exp $
*/
#include "channels.h"
@@ -503,12 +503,14 @@ cString cChannel::ToText(const cChannel *Channel)
char FullName[strlen(Channel->name) + 1 + strlen(Channel->shortName) + 1 + strlen(Channel->provider) + 1 + 10]; // +10: paranoia
char *q = FullName;
q += sprintf(q, "%s", Channel->name);
- if (!isempty(Channel->shortName))
- q += sprintf(q, ",%s", Channel->shortName);
- else if (strchr(Channel->name, ','))
- q += sprintf(q, ",");
- if (!isempty(Channel->provider))
- q += sprintf(q, ";%s", Channel->provider);
+ if (!Channel->groupSep) {
+ if (!isempty(Channel->shortName))
+ q += sprintf(q, ",%s", Channel->shortName);
+ else if (strchr(Channel->name, ','))
+ q += sprintf(q, ",");
+ if (!isempty(Channel->provider))
+ q += sprintf(q, ";%s", Channel->provider);
+ }
*q = 0;
strreplace(FullName, ':', '|');
cString buffer;
diff --git a/ci.c b/ci.c
index 9a4a829..fe38bc6 100644
--- a/ci.c
+++ b/ci.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: ci.c 2.12 2013/02/17 13:17:28 kls Exp $
+ * $Id: ci.c 2.12.1.1 2014/01/22 09:43:48 kls Exp $
*/
#include "ci.h"
@@ -846,7 +846,9 @@ void cCiDateTime::SendDateTime(void)
int L = (M == 1 || M == 2) ? 1 : 0;
int MJD = 14956 + D + int((Y - L) * 365.25) + int((M + 1 + L * 12) * 30.6001);
#define DEC2BCD(d) uint8_t(((d / 10) << 4) + (d % 10))
+#pragma pack(1)
struct tTime { uint16_t mjd; uint8_t h, m, s; short offset; };
+#pragma pack()
tTime T = { mjd : htons(MJD), h : DEC2BCD(tm_gmt.tm_hour), m : DEC2BCD(tm_gmt.tm_min), s : DEC2BCD(tm_gmt.tm_sec), offset : short(htons(tm_loc.tm_gmtoff / 60)) };
bool OldDumpTPDUDataTransfer = DumpTPDUDataTransfer;
DumpTPDUDataTransfer &= DumpDateTime;
diff --git a/config.h b/config.h
index f646f79..b4d3756 100644
--- a/config.h
+++ b/config.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: config.h 2.76.1.3 2013/08/21 13:44:59 kls Exp $
+ * $Id: config.h 2.76.1.7 2014/03/22 11:00:00 kls Exp $
*/
#ifndef __CONFIG_H
@@ -22,13 +22,13 @@
// VDR's own version number:
-#define VDRVERSION "2.0.3"
-#define VDRVERSNUM 20003 // Version * 10000 + Major * 100 + Minor
+#define VDRVERSION "2.0.6"
+#define VDRVERSNUM 20006 // Version * 10000 + Major * 100 + Minor
// The plugin API's version number:
-#define APIVERSION "2.0.0"
-#define APIVERSNUM 20000 // Version * 10000 + Major * 100 + Minor
+#define APIVERSION "2.0.6"
+#define APIVERSNUM 20006 // Version * 10000 + Major * 100 + Minor
// When loading plugins, VDR searches them by their APIVERSION, which
// may be smaller than VDRVERSION in case there have been no changes to
diff --git a/device.c b/device.c
index d07a552..6154b6d 100644
--- a/device.c
+++ b/device.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: device.c 2.74.1.2 2013/08/22 10:35:30 kls Exp $
+ * $Id: device.c 2.74.1.4 2014/03/11 09:29:52 kls Exp $
*/
#include "device.h"
@@ -574,7 +574,7 @@ void cDevice::StartSectionHandler(void)
AttachFilter(eitFilter = new cEitFilter);
AttachFilter(patFilter = new cPatFilter);
AttachFilter(sdtFilter = new cSdtFilter(patFilter));
- AttachFilter(nitFilter = new cNitFilter);
+ AttachFilter(nitFilter = new cNitFilter(sdtFilter));
}
}
@@ -785,6 +785,7 @@ eSetChannelResult cDevice::SetChannel(const cChannel *Channel, bool LiveView)
if (SetChannelDevice(Channel, LiveView)) {
// Start section handling:
if (sectionHandler) {
+ patFilter->Trigger(Channel->Sid());
sectionHandler->SetChannel(Channel);
sectionHandler->SetStatus(true);
}
diff --git a/dvbdevice.c b/dvbdevice.c
index 0c9f8eb..0ccd162 100644
--- a/dvbdevice.c
+++ b/dvbdevice.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: dvbdevice.c 2.88.1.2 2013/08/23 09:52:14 kls Exp $
+ * $Id: dvbdevice.c 2.88.1.4 2013/10/21 09:01:21 kls Exp $
*/
#include "dvbdevice.h"
diff --git a/eit.c b/eit.c
index 73c4fa9..5ebbfc4 100644
--- a/eit.c
+++ b/eit.c
@@ -8,7 +8,7 @@
* Robert Schneider <Robert.Schneider at web.de> and Rolf Hakenes <hakenes at hippomi.de>.
* Adapted to 'libsi' for VDR 1.3.0 by Marcel Wiesweg <marcel.wiesweg at gmx.de>.
*
- * $Id: eit.c 2.23 2012/12/04 11:10:10 kls Exp $
+ * $Id: eit.c 2.23.1.1 2013/10/12 11:24:51 kls Exp $
*/
#include "eit.h"
@@ -404,7 +404,7 @@ void cEitFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
}
break;
case 0x14: {
- if (Setup.SetSystemTime && Setup.TimeTransponder && ISTRANSPONDER(Transponder(), Setup.TimeTransponder))
+ if (Setup.SetSystemTime && Setup.TimeSource == Source() && Setup.TimeTransponder && ISTRANSPONDER(Transponder(), Setup.TimeTransponder))
cTDT TDT(Data);
}
break;
diff --git a/font.c b/font.c
index c6400d4..9129938 100644
--- a/font.c
+++ b/font.c
@@ -6,7 +6,7 @@
*
* BiDi support by Osama Alrawab <alrawab at hotmail.com> @2008 Tripoli-Libya.
*
- * $Id: font.c 2.13.1.1 2013/04/07 14:54:15 kls Exp $
+ * $Id: font.c 2.13.1.2 2014/01/25 14:25:29 kls Exp $
*/
#include "font.h"
@@ -382,10 +382,13 @@ void cFreetypeFont::DrawText(cPixmap *Pixmap, int x, int y, const char *s, tColo
// A dummy font, in case there are no fonts installed:
class cDummyFont : public cFont {
+private:
+ int height;
public:
- virtual int Width(uint c) const { return 10; }
- virtual int Width(const char *s) const { return 50; }
- virtual int Height(void) const { return 20; }
+ cDummyFont(int CharHeight) { height = CharHeight; }
+ virtual int Width(uint c) const { return height; }
+ virtual int Width(const char *s) const { return height; }
+ virtual int Height(void) const { return height; }
virtual void DrawText(cBitmap *Bitmap, int x, int y, const char *s, tColor ColorFg, tColor ColorBg, int Width) const {}
virtual void DrawText(cPixmap *Pixmap, int x, int y, const char *s, tColor ColorFg, tColor ColorBg, int Width) const {};
};
@@ -396,11 +399,8 @@ cFont *cFont::fonts[eDvbFontSize] = { NULL };
void cFont::SetFont(eDvbFont Font, const char *Name, int CharHeight)
{
- cFont *f = CreateFont(Name, constrain(CharHeight, MINFONTSIZE, MAXFONTSIZE));
- if (!f || !f->Height())
- f = new cDummyFont;
delete fonts[Font];
- fonts[Font] = f;
+ fonts[Font] = CreateFont(Name, constrain(CharHeight, MINFONTSIZE, MAXFONTSIZE));
}
const cFont *cFont::GetFont(eDvbFont Font)
@@ -423,9 +423,10 @@ const cFont *cFont::GetFont(eDvbFont Font)
cFont *cFont::CreateFont(const char *Name, int CharHeight, int CharWidth)
{
cString fn = GetFontFileName(Name);
- if (*fn)
- return new cFreetypeFont(fn, CharHeight, CharWidth);
- return NULL;
+ cFont *f = *fn ? new cFreetypeFont(fn, CharHeight, CharWidth) : NULL;
+ if (!f || !f->Height())
+ f = new cDummyFont(CharHeight);
+ return f;
}
bool cFont::GetAvailableFontNames(cStringList *FontNames, bool Monospaced)
diff --git a/font.h b/font.h
index 86bd8b3..0200874 100644
--- a/font.h
+++ b/font.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: font.h 2.7 2013/02/17 13:17:42 kls Exp $
+ * $Id: font.h 2.7.1.1 2014/01/25 14:24:51 kls Exp $
*/
#ifndef __FONT_H
@@ -75,7 +75,7 @@ public:
///< default width. Name is of the form "Family:Style", for instance
///< "Verdana:Bold Italic" or "Times New Roman". See GetAvailableFontNames()
///< for how to get a list of all available font names.
- ///< If the requested font can't be created, NULL is returned.
+ ///< If the requested font can't be created, a dummy font is returned.
///< The caller must delete the font when it is no longer needed.
static bool GetAvailableFontNames(cStringList *FontNames, bool Monospaced = false);
///< Queries the font configuration for a list of available font names,
diff --git a/lirc.c b/lirc.c
index b88bd73..f7fc452 100644
--- a/lirc.c
+++ b/lirc.c
@@ -6,7 +6,7 @@
*
* LIRC support added by Carsten Koch <Carsten.Koch at icem.de> 2000-06-16.
*
- * $Id: lirc.c 2.5.1.1 2013/08/22 09:36:49 kls Exp $
+ * $Id: lirc.c 2.5.1.2 2013/10/29 16:06:20 kls Exp $
*/
#include "lirc.h"
@@ -21,11 +21,9 @@ cLircRemote::cLircRemote(const char *DeviceName)
{
addr.sun_family = AF_UNIX;
strcpy(addr.sun_path, DeviceName);
- if (Connect()) {
- Start();
- return;
- }
- f = -1;
+ if (!Connect())
+ f = -1;
+ Start();
}
cLircRemote::~cLircRemote()
@@ -67,14 +65,15 @@ void cLircRemote::Action(void)
bool repeat = false;
int timeout = -1;
- while (Running() && f >= 0) {
+ while (Running()) {
- bool ready = cFile::FileReady(f, timeout);
+ bool ready = f >= 0 && cFile::FileReady(f, timeout);
int ret = ready ? safe_read(f, buf, sizeof(buf)) : -1;
- if (ready && ret <= 0 ) {
+ if (f < 0 || ready && ret <= 0) {
esyslog("ERROR: lircd connection broken, trying to reconnect every %.1f seconds", float(RECONNECTDELAY) / 1000);
- close(f);
+ if (f >= 0)
+ close(f);
f = -1;
while (Running() && f < 0) {
cCondWait::SleepMs(RECONNECTDELAY);
diff --git a/menu.c b/menu.c
index f43dec5..c158f02 100644
--- a/menu.c
+++ b/menu.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: menu.c 2.82.1.2 2013/04/27 10:32:28 kls Exp $
+ * $Id: menu.c 2.82.1.8 2014/02/26 11:42:28 kls Exp $
*/
#include "menu.h"
@@ -181,9 +181,13 @@ cMenuEditChannel::cMenuEditChannel(cChannel *Channel, bool New)
strn0cpy(name, data.name, sizeof(name));
if (New) {
channel = NULL;
+ // clear non-editable members:
data.nid = 0;
data.tid = 0;
data.rid = 0;
+ *data.shortName = 0;
+ *data.provider = 0;
+ *data.portalName = 0;
}
}
Setup();
@@ -2185,6 +2189,7 @@ public:
const char *Name(void) { return name; }
cRecording *Recording(void) { return recording; }
bool IsDirectory(void) { return name != NULL; }
+ void SetRecording(cRecording *Recording) { recording = Recording; }
virtual void SetMenuItem(cSkinDisplayMenu *DisplayMenu, int Index, bool Current, bool Selectable);
};
@@ -2416,6 +2421,7 @@ eOSState cMenuRecordings::Delete(void)
Display();
if (!Count())
return osBack;
+ return osUser2;
}
else
Skins.Message(mtError, tr("Error while deleting recording!"));
@@ -2481,6 +2487,14 @@ eOSState cMenuRecordings::ProcessKey(eKeys Key)
default: break;
}
}
+ else if (state == osUser2) {
+ // a recording in a sub folder was deleted, so update the current item
+ cOsdMenu *m = HasSubMenu() ? SubMenu() : this;
+ if (cMenuRecordingItem *ri = (cMenuRecordingItem *)Get(Current())) {
+ if (cMenuRecordingItem *riSub = (cMenuRecordingItem *)m->Get(m->Current()))
+ ri->SetRecording(riSub->Recording());
+ }
+ }
if (Key == kYellow && HadSubMenu && !HasSubMenu()) {
// the last recording in a subdirectory was deleted, so let's go back up
cOsdMenu::Del(Current());
@@ -2648,7 +2662,7 @@ eOSState cMenuSetupOSD::ProcessKey(eKeys Key)
ModifiedAppearance = true;
if (strcmp(data.FontFix, Setup.FontFix) || !DoubleEqual(data.FontFixSizeP, Setup.FontFixSizeP))
ModifiedAppearance = true;
- if (data.AlwaysSortFoldersFirst != Setup.AlwaysSortFoldersFirst)
+ if (data.AlwaysSortFoldersFirst != Setup.AlwaysSortFoldersFirst || data.RecordingDirs != Setup.RecordingDirs)
Recordings.ClearSortNames();
}
@@ -3364,7 +3378,7 @@ cMenuPluginItem::cMenuPluginItem(const char *Name, int Index)
cOsdObject *cMenuMain::pluginOsdObject = NULL;
-cMenuMain::cMenuMain(eOSState State)
+cMenuMain::cMenuMain(eOSState State, bool OpenSubMenus)
:cOsdMenu("")
{
SetMenuCategory(mcMain);
@@ -3381,7 +3395,7 @@ cMenuMain::cMenuMain(eOSState State)
case osSchedule: AddSubMenu(new cMenuSchedule); break;
case osChannels: AddSubMenu(new cMenuChannels); break;
case osTimers: AddSubMenu(new cMenuTimers); break;
- case osRecordings: AddSubMenu(new cMenuRecordings(NULL, 0, true)); break;
+ case osRecordings: AddSubMenu(new cMenuRecordings(NULL, 0, OpenSubMenus)); break;
case osSetup: AddSubMenu(new cMenuSetup); break;
case osCommands: AddSubMenu(new cMenuCommands(tr("Commands"), &Commands)); break;
default: break;
@@ -3448,7 +3462,7 @@ bool cMenuMain::Update(bool Force)
stopReplayItem = NULL;
}
// Color buttons:
- SetHelp(!replaying ? tr("Button$Record") : NULL, tr("Button$Audio"), replaying ? NULL : tr("Button$Pause"), replaying ? tr("Button$Stop") : cReplayControl::LastReplayed() ? tr("Button$Resume") : tr("Button$Play"));
+ SetHelp(!replaying ? tr("Button$Record") : NULL, tr("Button$Audio"), replaying || !Setup.PauseKeyHandling ? NULL : tr("Button$Pause"), replaying ? tr("Button$Stop") : cReplayControl::LastReplayed() ? tr("Button$Resume") : tr("Button$Play"));
result = true;
}
@@ -3543,7 +3557,7 @@ eOSState cMenuMain::ProcessKey(eKeys Key)
}
break;
case kYellow: if (!HadSubMenu)
- state = replaying ? osContinue : osPause;
+ state = replaying || !Setup.PauseKeyHandling ? osContinue : osPause;
break;
case kBlue: if (!HadSubMenu)
state = replaying ? osStopReplay : cReplayControl::LastReplayed() ? osReplay : osRecordings;
@@ -4968,10 +4982,8 @@ eOSState cReplayControl::ProcessKey(eKeys Key)
else
Show();
break;
- case kBack: if (Setup.DelTimeshiftRec) {
- cRecordControl* rc = cRecordControls::GetRecordControl(fileName);
- return rc && rc->InstantId() ? osEnd : osRecordings;
- }
+ case kBack: Hide();
+ Stop();
return osRecordings;
default: return osUnknown;
}
diff --git a/menu.h b/menu.h
index 196c038..1a76b41 100644
--- a/menu.h
+++ b/menu.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: menu.h 2.13 2012/12/07 13:44:13 kls Exp $
+ * $Id: menu.h 2.13.1.1 2013/10/16 09:46:15 kls Exp $
*/
#ifndef __MENU_H
@@ -107,7 +107,7 @@ private:
void Set(void);
bool Update(bool Force = false);
public:
- cMenuMain(eOSState State = osUnknown);
+ cMenuMain(eOSState State = osUnknown, bool OpenSubMenus = false);
virtual eOSState ProcessKey(eKeys Key);
static cOsdObject *PluginOsdObject(void);
};
diff --git a/nit.c b/nit.c
index 8998861..8265f50 100644
--- a/nit.c
+++ b/nit.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: nit.c 2.10 2013/03/07 09:42:29 kls Exp $
+ * $Id: nit.c 2.10.1.1 2014/03/11 09:29:59 kls Exp $
*/
#include "nit.h"
@@ -19,8 +19,9 @@
#define DVB_SYSTEM_1 0 // see also dvbdevice.c
#define DVB_SYSTEM_2 1
-cNitFilter::cNitFilter(void)
+cNitFilter::cNitFilter(cSdtFilter *SdtFilter)
{
+ sdtFilter = SdtFilter;
numNits = 0;
networkId = 0;
Set(0x10, 0x40); // NIT
@@ -183,6 +184,7 @@ void cNitFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
}
}
}
+ sdtFilter->Trigger(Source);
}
break;
case SI::S2SatelliteDeliverySystemDescriptorTag: {
@@ -253,6 +255,7 @@ void cNitFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
}
}
}
+ sdtFilter->Trigger(Source);
}
break;
case SI::TerrestrialDeliverySystemDescriptorTag: {
@@ -316,6 +319,7 @@ void cNitFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
}
}
}
+ sdtFilter->Trigger(Source);
}
break;
case SI::ExtensionDescriptorTag: {
diff --git a/nit.h b/nit.h
index e93f5bf..2411e0f 100644
--- a/nit.h
+++ b/nit.h
@@ -4,13 +4,14 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: nit.h 2.0 2007/06/10 08:50:21 kls Exp $
+ * $Id: nit.h 2.0.1.1 2014/03/11 09:30:05 kls Exp $
*/
#ifndef __NIT_H
#define __NIT_H
#include "filter.h"
+#include "sdt.h"
#define MAXNITS 16
#define MAXNETWORKNAME Utf8BufSize(256)
@@ -26,13 +27,14 @@ private:
};
cSectionSyncer sectionSyncer;
+ cSdtFilter *sdtFilter;
cNit nits[MAXNITS];
u_short networkId;
int numNits;
protected:
virtual void Process(u_short Pid, u_char Tid, const u_char *Data, int Length);
public:
- cNitFilter(void);
+ cNitFilter(cSdtFilter *SdtFilter);
virtual void SetStatus(bool On);
};
diff --git a/pat.c b/pat.c
index a7791e2..7b3f91f 100644
--- a/pat.c
+++ b/pat.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: pat.c 2.19 2012/11/25 14:12:21 kls Exp $
+ * $Id: pat.c 2.19.1.2 2014/02/19 09:31:29 kls Exp $
*/
#include "pat.h"
@@ -12,9 +12,8 @@
#include "channels.h"
#include "libsi/section.h"
#include "libsi/descriptor.h"
-#include "thread.h"
-#define PMT_SCAN_TIMEOUT 10 // seconds
+#define PMT_SCAN_TIMEOUT 1000 // ms
// --- cCaDescriptor ---------------------------------------------------------
@@ -229,94 +228,115 @@ int GetCaDescriptors(int Source, int Transponder, int ServiceId, const int *CaSy
// --- cPatFilter ------------------------------------------------------------
+//#define DEBUG_PAT_PMT
+#ifdef DEBUG_PAT_PMT
+#define DBGLOG(a...) { cString s = cString::sprintf(a); fprintf(stderr, "%s\n", *s); dsyslog("%s", *s); }
+#else
+#define DBGLOG(a...)
+#endif
+
cPatFilter::cPatFilter(void)
{
- pmtIndex = 0;
- pmtPid = 0;
- pmtSid = 0;
- lastPmtScan = 0;
- numPmtEntries = 0;
+ Trigger(0);
Set(0x00, 0x00); // PAT
}
void cPatFilter::SetStatus(bool On)
{
+ cMutexLock MutexLock(&mutex);
+ DBGLOG("PAT filter set status %d", On);
cFilter::SetStatus(On);
- pmtIndex = 0;
- pmtPid = 0;
- pmtSid = 0;
- lastPmtScan = 0;
- numPmtEntries = 0;
+ Trigger();
}
-void cPatFilter::Trigger(void)
+void cPatFilter::Trigger(int Sid)
{
+ cMutexLock MutexLock(&mutex);
+ patVersion = -1;
+ pmtIndex = -1;
numPmtEntries = 0;
+ if (Sid >= 0) {
+ sid = Sid;
+ DBGLOG("PAT filter trigger SID %d", Sid);
+ }
}
-bool cPatFilter::PmtVersionChanged(int PmtPid, int Sid, int Version)
+bool cPatFilter::PmtVersionChanged(int PmtPid, int Sid, int Version, bool SetNewVersion)
{
- uint64_t v = Version;
- v <<= 32;
- uint64_t id = (PmtPid | (Sid << 16)) & 0x00000000FFFFFFFFLL;
+ int Id = MakePmtId(PmtPid, Sid);
for (int i = 0; i < numPmtEntries; i++) {
- if ((pmtVersion[i] & 0x00000000FFFFFFFFLL) == id) {
- bool Changed = (pmtVersion[i] & 0x000000FF00000000LL) != v;
- if (Changed)
- pmtVersion[i] = id | v;
- return Changed;
+ if (pmtId[i] == Id) {
+ if (pmtVersion[i] != Version) {
+ if (SetNewVersion)
+ pmtVersion[i] = Version;
+ else
+ DBGLOG("PMT %d %2d %5d %2d -> %2d", Transponder(), i, PmtPid, pmtVersion[i], Version);
+ return true;
+ }
+ break;
}
}
- if (numPmtEntries < MAXPMTENTRIES)
- pmtVersion[numPmtEntries++] = id | v;
- return true;
+ return false;
+}
+
+void cPatFilter::SwitchToNextPmtPid(void)
+{
+ if (pmtIndex >= 0) {
+ Del(GetPmtPid(pmtIndex), SI::TableIdPMT);
+ pmtIndex = (pmtIndex + 1) % numPmtEntries;
+ Add(GetPmtPid(pmtIndex), SI::TableIdPMT);
+ }
}
void cPatFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length)
{
+ cMutexLock MutexLock(&mutex);
if (Pid == 0x00) {
- if (Tid == 0x00) {
- if (pmtPid && time(NULL) - lastPmtScan > PMT_SCAN_TIMEOUT) {
- Del(pmtPid, 0x02);
- pmtPid = 0;
- pmtIndex++;
- lastPmtScan = time(NULL);
- }
- if (!pmtPid) {
- SI::PAT pat(Data, false);
- if (!pat.CheckCRCAndParse())
- return;
+ if (Tid == SI::TableIdPAT) {
+ SI::PAT pat(Data, false);
+ if (!pat.CheckCRCAndParse())
+ return;
+ if (pat.getVersionNumber() != patVersion) {
+ DBGLOG("PAT %d %d -> %d", Transponder(), patVersion, pat.getVersionNumber());
+ if (pmtIndex >= 0) {
+ Del(GetPmtPid(pmtIndex), SI::TableIdPMT);
+ pmtIndex = -1;
+ }
+ numPmtEntries = 0;
SI::PAT::Association assoc;
- int Index = 0;
for (SI::Loop::Iterator it; pat.associationLoop.getNext(assoc, it); ) {
- if (!assoc.isNITPid()) {
- if (Index++ >= pmtIndex && Channels.GetByServiceID(Source(), Transponder(), assoc.getServiceId())) {
- pmtPid = assoc.getPid();
- pmtSid = assoc.getServiceId();
- Add(pmtPid, 0x02);
- break;
+ if (!assoc.isNITPid() && numPmtEntries < MAXPMTENTRIES) {
+ DBGLOG(" PMT pid %2d %5d SID %5d", numPmtEntries, assoc.getPid(), assoc.getServiceId());
+ pmtId[numPmtEntries] = MakePmtId(assoc.getPid(), assoc.getServiceId());
+ pmtVersion[numPmtEntries] = -1;
+ if (sid == assoc.getServiceId()) {
+ pmtIndex = numPmtEntries;
+ DBGLOG("sid = %d pmtIndex = %d", sid, pmtIndex);
}
+ numPmtEntries++;
}
}
- if (!pmtPid)
+ if (numPmtEntries > 0 && pmtIndex < 0)
pmtIndex = 0;
+ Add(GetPmtPid(pmtIndex), SI::TableIdPMT);
+ patVersion = pat.getVersionNumber();
+ timer.Set(PMT_SCAN_TIMEOUT);
}
}
}
- else if (Pid == pmtPid && Tid == SI::TableIdPMT && Source() && Transponder()) {
+ else if (Tid == SI::TableIdPMT && Source() && Transponder()) {
+ timer.Set(PMT_SCAN_TIMEOUT);
SI::PMT pmt(Data, false);
if (!pmt.CheckCRCAndParse())
return;
- if (pmt.getServiceId() != pmtSid)
- return; // skip broken PMT records
- if (!PmtVersionChanged(pmtPid, pmt.getTableIdExtension(), pmt.getVersionNumber())) {
- lastPmtScan = 0; // this triggers the next scan
+ if (!PmtVersionChanged(Pid, pmt.getTableIdExtension(), pmt.getVersionNumber())) {
+ SwitchToNextPmtPid();
return;
}
- if (!Channels.Lock(true, 10)) {
- numPmtEntries = 0; // to make sure we try again
+ if (!Channels.Lock(true, 10))
return;
- }
+ PmtVersionChanged(Pid, pmt.getTableIdExtension(), pmt.getVersionNumber(), true);
+ SwitchToNextPmtPid();
cChannel *Channel = Channels.GetByServiceID(Source(), Transponder(), pmt.getServiceId());
if (Channel) {
SI::CaDescriptor *d;
@@ -552,7 +572,12 @@ void cPatFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
}
Channel->SetCaDescriptors(CaDescriptorHandler.AddCaDescriptors(CaDescriptors));
}
- lastPmtScan = 0; // this triggers the next scan
Channels.Unlock();
}
+ if (timer.TimedOut()) {
+ if (pmtIndex >= 0)
+ DBGLOG("PMT timeout %d", pmtIndex);
+ SwitchToNextPmtPid();
+ timer.Set(PMT_SCAN_TIMEOUT);
+ }
}
diff --git a/pat.h b/pat.h
index 08da051..dd8f08c 100644
--- a/pat.h
+++ b/pat.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: pat.h 2.3 2013/02/16 15:20:24 kls Exp $
+ * $Id: pat.h 2.3.1.1 2014/02/18 14:12:24 kls Exp $
*/
#ifndef __PAT_H
@@ -12,24 +12,30 @@
#include <stdint.h>
#include "filter.h"
+#include "thread.h"
#define MAXPMTENTRIES 64
class cPatFilter : public cFilter {
private:
- time_t lastPmtScan;
+ cMutex mutex;
+ cTimeMs timer;
+ int patVersion;
int pmtIndex;
- int pmtPid;
- int pmtSid;
- uint64_t pmtVersion[MAXPMTENTRIES];
+ int pmtId[MAXPMTENTRIES];
+ int pmtVersion[MAXPMTENTRIES];
int numPmtEntries;
- bool PmtVersionChanged(int PmtPid, int Sid, int Version);
+ int sid;
+ int GetPmtPid(int Index) { return pmtId[Index] & 0x0000FFFF; }
+ int MakePmtId(int PmtPid, int Sid) { return PmtPid | (Sid << 16); }
+ bool PmtVersionChanged(int PmtPid, int Sid, int Version, bool SetNewVersion = false);
+ void SwitchToNextPmtPid(void);
protected:
virtual void Process(u_short Pid, u_char Tid, const u_char *Data, int Length);
public:
cPatFilter(void);
virtual void SetStatus(bool On);
- void Trigger(void);
+ void Trigger(int Sid = -1);
};
int GetCaDescriptors(int Source, int Transponder, int ServiceId, const int *CaSystemIds, int BufSize, uchar *Data, int EsPid);
diff --git a/recorder.c b/recorder.c
index a9cc8c9..7eee925 100644
--- a/recorder.c
+++ b/recorder.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: recorder.c 2.17 2012/09/22 11:53:57 kls Exp $
+ * $Id: recorder.c 2.17.1.2 2014/02/21 09:21:30 kls Exp $
*/
#include "recorder.h"
@@ -14,7 +14,7 @@
// The maximum time we wait before assuming that a recorded video data stream
// is broken:
-#define MAXBROKENTIMEOUT 30 // seconds
+#define MAXBROKENTIMEOUT 30000 // milliseconds
#define MINFREEDISKSPACE (512) // MB
#define DISKCHECKINTERVAL 100 // seconds
@@ -117,7 +117,7 @@ void cRecorder::Receive(uchar *Data, int Length)
void cRecorder::Action(void)
{
- time_t t = time(NULL);
+ cTimeMs t(MAXBROKENTIMEOUT);
bool InfoWritten = false;
bool FirstIframeSeen = false;
while (Running()) {
@@ -154,22 +154,22 @@ void cRecorder::Action(void)
recordFile->Write(pmt, TS_SIZE);
fileSize += TS_SIZE;
}
+ t.Set(MAXBROKENTIMEOUT);
}
if (recordFile->Write(b, Count) < 0) {
LOG_ERROR_STR(fileName->Name());
break;
}
fileSize += Count;
- t = time(NULL);
}
}
ringBuffer->Del(Count);
}
}
- if (time(NULL) - t > MAXBROKENTIMEOUT) {
+ if (t.TimedOut()) {
esyslog("ERROR: video data stream broken");
ShutdownHandler.RequestEmergencyExit();
- t = time(NULL);
+ t.Set(MAXBROKENTIMEOUT);
}
}
}
diff --git a/recording.c b/recording.c
index 8ea5b9e..d62dd9c 100644
--- a/recording.c
+++ b/recording.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: recording.c 2.91.1.2 2013/08/21 13:58:35 kls Exp $
+ * $Id: recording.c 2.91.1.7 2014/03/16 11:03:18 kls Exp $
*/
#include "recording.h"
@@ -72,6 +72,7 @@ bool DirectoryEncoding = false;
int InstanceId = 0;
cRecordings DeletedRecordings(true);
+static cRecordings VanishedRecordings;
// --- cRemoveDeletedRecordingsThread ----------------------------------------
@@ -216,6 +217,14 @@ void AssertFreeDiskSpace(int Priority, bool Force)
}
}
+// --- Clear vanished recordings ---------------------------------------------
+
+void ClearVanishedRecordings(void)
+{
+ cThreadLock RecordingsLock(&Recordings); // yes, it *is* Recordings!
+ VanishedRecordings.Clear();
+}
+
// --- cResumeFile -----------------------------------------------------------
cResumeFile::cResumeFile(const char *FileName, bool IsPesRecording)
@@ -949,14 +958,22 @@ char *cRecording::SortName(void) const
{
char **sb = (RecordingsSortMode == rsmName) ? &sortBufferName : &sortBufferTime;
if (!*sb) {
- char *s = strdup(FileName() + strlen(VideoDirectory));
- if (RecordingsSortMode != rsmName || Setup.AlwaysSortFoldersFirst)
- s = StripEpisodeName(s, RecordingsSortMode != rsmName);
- strreplace(s, '/', '0'); // some locales ignore '/' when sorting
- int l = strxfrm(NULL, s, 0) + 1;
- *sb = MALLOC(char, l);
- strxfrm(*sb, s, l);
- free(s);
+ if (RecordingsSortMode == rsmTime && !Setup.RecordingDirs) {
+ char buf[32];
+ struct tm tm_r;
+ strftime(buf, sizeof(buf), "%Y%m%d%H%I", localtime_r(&start, &tm_r));
+ *sb = strdup(buf);
+ }
+ else {
+ char *s = strdup(FileName() + strlen(VideoDirectory));
+ if (RecordingsSortMode != rsmName || Setup.AlwaysSortFoldersFirst)
+ s = StripEpisodeName(s, RecordingsSortMode != rsmName);
+ strreplace(s, '/', '0'); // some locales ignore '/' when sorting
+ int l = strxfrm(NULL, s, 0) + 1;
+ *sb = MALLOC(char, l);
+ strxfrm(*sb, s, l);
+ free(s);
+ }
}
return *sb;
}
@@ -1233,6 +1250,7 @@ cRecordings::cRecordings(bool Deleted)
:cThread("video directory scanner")
{
deleted = Deleted;
+ initial = true;
lastUpdate = 0;
state = 0;
}
@@ -1264,8 +1282,9 @@ void cRecordings::Refresh(bool Foreground)
ScanVideoDir(VideoDirectory, Foreground);
}
-void cRecordings::ScanVideoDir(const char *DirName, bool Foreground, int LinkLevel)
+void cRecordings::ScanVideoDir(const char *DirName, bool Foreground, int LinkLevel, int DirLevel)
{
+ // Find any new recordings:
cReadDir d(DirName);
struct dirent *e;
while ((Foreground || Running()) && (e = d.Next()) != NULL) {
@@ -1284,25 +1303,42 @@ void cRecordings::ScanVideoDir(const char *DirName, bool Foreground, int LinkLev
}
if (S_ISDIR(st.st_mode)) {
if (endswith(buffer, deleted ? DELEXT : RECEXT)) {
- cRecording *r = new cRecording(buffer);
- if (r->Name()) {
- r->NumFrames(); // initializes the numFrames member
- r->FileSizeMB(); // initializes the fileSizeMB member
- if (deleted)
- r->deleted = time(NULL);
- Lock();
- Add(r);
- ChangeState();
- Unlock();
+ if (deleted || initial || !GetByName(buffer)) {
+ cRecording *r = new cRecording(buffer);
+ if (r->Name()) {
+ r->NumFrames(); // initializes the numFrames member
+ r->FileSizeMB(); // initializes the fileSizeMB member
+ r->IsOnVideoDirectoryFileSystem(); // initializes the isOnVideoDirectoryFileSystem member
+ if (deleted)
+ r->deleted = time(NULL);
+ Lock();
+ Add(r);
+ ChangeState();
+ Unlock();
+ }
+ else
+ delete r;
}
- else
- delete r;
}
else
- ScanVideoDir(buffer, Foreground, LinkLevel + Link);
+ ScanVideoDir(buffer, Foreground, LinkLevel + Link, DirLevel + 1);
}
}
}
+ // Handle any vanished recordings:
+ if (!deleted && !initial && DirLevel == 0) {
+ for (cRecording *recording = First(); recording; ) {
+ cRecording *r = recording;
+ recording = Next(recording);
+ if (access(r->FileName(), F_OK) != 0) {
+ Lock();
+ Del(r, false);
+ VanishedRecordings.Add(r);
+ ChangeState();
+ Unlock();
+ }
+ }
+ }
}
bool cRecordings::StateChanged(int &State)
@@ -1343,6 +1379,7 @@ bool cRecordings::Update(bool Wait)
cRecording *cRecordings::GetByName(const char *FileName)
{
if (FileName) {
+ LOCK_THREAD;
for (cRecording *recording = First(); recording; recording = Next(recording)) {
if (strcmp(recording->FileName(), FileName) == 0)
return recording;
diff --git a/recording.h b/recording.h
index ff3119d..66239ea 100644
--- a/recording.h
+++ b/recording.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: recording.h 2.46 2013/03/04 14:01:23 kls Exp $
+ * $Id: recording.h 2.46.1.1 2013/12/25 10:54:05 kls Exp $
*/
#ifndef __RECORDING_H
@@ -26,6 +26,7 @@ extern bool DirectoryEncoding;
extern int InstanceId;
void RemoveDeletedRecordings(void);
+void ClearVanishedRecordings(void);
void AssertFreeDiskSpace(int Priority = 0, bool Force = false);
///< The special Priority value -1 means that we shall get rid of any
///< deleted recordings faster than normal (because we're cutting).
@@ -160,11 +161,12 @@ class cRecordings : public cList<cRecording>, public cThread {
private:
static char *updateFileName;
bool deleted;
+ bool initial;
time_t lastUpdate;
int state;
const char *UpdateFileName(void);
void Refresh(bool Foreground = false);
- void ScanVideoDir(const char *DirName, bool Foreground = false, int LinkLevel = 0);
+ void ScanVideoDir(const char *DirName, bool Foreground = false, int LinkLevel = 0, int DirLevel = 0);
protected:
void Action(void);
public:
@@ -199,6 +201,8 @@ public:
///< this value is unknown.
};
+/// Any access to Recordings that loops through the list of recordings
+/// needs to hold a thread lock on this object!
extern cRecordings Recordings;
extern cRecordings DeletedRecordings;
diff --git a/remote.c b/remote.c
index f3d90c9..a6e9a65 100644
--- a/remote.c
+++ b/remote.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: remote.c 2.8 2013/02/03 15:44:55 kls Exp $
+ * $Id: remote.c 2.8.1.1 2014/02/15 12:44:48 kls Exp $
*/
#include "remote.h"
@@ -297,7 +297,7 @@ int cKbdRemote::MapCodeToFunc(uint64_t Code)
void cKbdRemote::PutKey(uint64_t Code, bool Repeat, bool Release)
{
- if (rawMode || !Put(Code, Repeat, Release)) {
+ if (rawMode || (!Put(Code, Repeat, Release) && !IsLearning())) {
if (int func = MapCodeToFunc(Code))
Put(KBDKEY(func), Repeat, Release);
}
diff --git a/remux.c b/remux.c
index 587d7e5..c42bf93 100644
--- a/remux.c
+++ b/remux.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: remux.c 2.75 2013/03/03 10:37:58 kls Exp $
+ * $Id: remux.c 2.75.1.5 2014/03/08 15:10:24 kls Exp $
*/
#include "remux.h"
@@ -23,6 +23,10 @@ static bool DebugFrames = false;
#define dbgpatpmt(a...) if (DebugPatPmt) fprintf(stderr, a)
#define dbgframes(a...) if (DebugFrames) fprintf(stderr, a)
+#define MAX_TS_PACKETS_FOR_VIDEO_FRAME_DETECTION 6
+#define WRN_TS_PACKETS_FOR_VIDEO_FRAME_DETECTION (MAX_TS_PACKETS_FOR_VIDEO_FRAME_DETECTION / 2)
+#define WRN_TS_PACKETS_FOR_FRAME_DETECTOR (MIN_TS_PACKETS_FOR_FRAME_DETECTOR / 2)
+
#define EMPTY_SCANNER (0xFFFFFFFF)
ePesHeader AnalyzePesHeader(const uchar *Data, int Count, int &PesPayloadOffset, bool *ContinuationHeader)
@@ -231,7 +235,7 @@ cTsPayload::cTsPayload(void)
data = NULL;
length = 0;
pid = -1;
- index = 0;
+ Reset();
}
cTsPayload::cTsPayload(uchar *Data, int Length, int Pid)
@@ -239,12 +243,25 @@ cTsPayload::cTsPayload(uchar *Data, int Length, int Pid)
Setup(Data, Length, Pid);
}
+uchar cTsPayload::SetEof(void)
+{
+ length = index; // triggers EOF
+ return 0x00;
+}
+
+void cTsPayload::Reset(void)
+{
+ index = 0;
+ numPacketsPid = 0;
+ numPacketsOther = 0;
+}
+
void cTsPayload::Setup(uchar *Data, int Length, int Pid)
{
data = Data;
length = Length;
pid = Pid >= 0 ? Pid : TsPid(Data);
- index = 0;
+ Reset();
}
uchar cTsPayload::GetByte(void)
@@ -255,20 +272,22 @@ uchar cTsPayload::GetByte(void)
if (data[index] == TS_SYNC_BYTE && index + TS_SIZE <= length) { // to make sure we are at a TS header start and drop incomplete TS packets at the end
uchar *p = data + index;
if (TsPid(p) == pid) { // only handle TS packets for the initial PID
+ if (++numPacketsPid > MAX_TS_PACKETS_FOR_VIDEO_FRAME_DETECTION)
+ return SetEof();
if (TsHasPayload(p)) {
- if (index > 0 && TsPayloadStart(p)) { // checking index to not skip the very first TS packet
- length = index; // triggers EOF
- return 0x00;
- }
+ if (index > 0 && TsPayloadStart(p)) // checking index to not skip the very first TS packet
+ return SetEof();
index += TsPayloadOffset(p);
break;
}
}
+ else if (TsPid(p) == PATPID)
+ return SetEof(); // caller must see PAT packets in case of index regeneration
+ else
+ numPacketsOther++;
}
- else {
- length = index; // triggers EOF
- return 0x00;
- }
+ else
+ return SetEof();
}
}
return data[index++];
@@ -302,6 +321,8 @@ void cTsPayload::SetByte(uchar Byte, int Index)
bool cTsPayload::Find(uint32_t Code)
{
int OldIndex = index;
+ int OldNumPacketsPid = numPacketsPid;
+ int OldNumPacketsOther = numPacketsOther;
uint32_t Scanner = EMPTY_SCANNER;
while (!Eof()) {
Scanner = (Scanner << 8) | GetByte();
@@ -309,9 +330,19 @@ bool cTsPayload::Find(uint32_t Code)
return true;
}
index = OldIndex;
+ numPacketsPid = OldNumPacketsPid;
+ numPacketsOther = OldNumPacketsOther;
return false;
}
+void cTsPayload::Statistics(void) const
+{
+ if (numPacketsPid + numPacketsOther > WRN_TS_PACKETS_FOR_FRAME_DETECTOR)
+ dsyslog("WARNING: required (%d+%d) TS packets to determine frame type", numPacketsOther, numPacketsPid);
+ if (numPacketsPid > WRN_TS_PACKETS_FOR_VIDEO_FRAME_DETECTION)
+ dsyslog("WARNING: required %d video TS packets to determine frame type", numPacketsPid);
+}
+
// --- cPatPmtGenerator ------------------------------------------------------
cPatPmtGenerator::cPatPmtGenerator(const cChannel *Channel)
@@ -1004,6 +1035,7 @@ protected:
bool debug;
bool newFrame;
bool independentFrame;
+ int iFrameTemporalReferenceOffset;
public:
cFrameParser(void);
virtual ~cFrameParser() {};
@@ -1017,6 +1049,7 @@ public:
void SetDebug(bool Debug) { debug = Debug; }
bool NewFrame(void) { return newFrame; }
bool IndependentFrame(void) { return independentFrame; }
+ int IFrameTemporalReferenceOffset(void) { return iFrameTemporalReferenceOffset; }
};
cFrameParser::cFrameParser(void)
@@ -1024,6 +1057,7 @@ cFrameParser::cFrameParser(void)
debug = true;
newFrame = false;
independentFrame = false;
+ iFrameTemporalReferenceOffset = 0;
}
// --- cAudioParser ----------------------------------------------------------
@@ -1056,6 +1090,7 @@ class cMpeg2Parser : public cFrameParser {
private:
uint32_t scanner;
bool seenIndependentFrame;
+ int lastIFrameTemporalReference;
public:
cMpeg2Parser(void);
virtual int Parse(const uchar *Data, int Length, int Pid);
@@ -1065,6 +1100,7 @@ cMpeg2Parser::cMpeg2Parser(void)
{
scanner = EMPTY_SCANNER;
seenIndependentFrame = false;
+ lastIFrameTemporalReference = -1; // invalid
}
int cMpeg2Parser::Parse(const uchar *Data, int Length, int Pid)
@@ -1089,10 +1125,25 @@ int cMpeg2Parser::Parse(const uchar *Data, int Length, int Pid)
scanner = OldScanner;
return tsPayload.Used() - TS_SIZE;
}
+ uchar b1 = tsPayload.GetByte();
+ uchar b2 = tsPayload.GetByte();
+ int TemporalReference = (b1 << 2 ) + ((b2 & 0xC0) >> 6);
+ uchar FrameType = (b2 >> 3) & 0x07;
+ if (tsPayload.Find(0x000001B5)) { // Extension start code
+ if (((tsPayload.GetByte() & 0xF0) >> 4) == 0x08) { // Picture coding extension
+ tsPayload.GetByte();
+ uchar PictureStructure = tsPayload.GetByte() & 0x03;
+ if (PictureStructure == 0x02) // bottom field
+ break;
+ }
+ }
newFrame = true;
- tsPayload.GetByte();
- uchar FrameType = (tsPayload.GetByte() >> 3) & 0x07;
independentFrame = FrameType == 1; // I-Frame
+ if (independentFrame) {
+ if (lastIFrameTemporalReference >= 0)
+ iFrameTemporalReferenceOffset = TemporalReference - lastIFrameTemporalReference;
+ lastIFrameTemporalReference = TemporalReference;
+ }
if (debug) {
seenIndependentFrame |= independentFrame;
if (seenIndependentFrame) {
@@ -1100,11 +1151,11 @@ int cMpeg2Parser::Parse(const uchar *Data, int Length, int Pid)
dbgframes("%c", FrameTypes[FrameType]);
}
}
+ tsPayload.Statistics();
break;
}
if (tsPayload.AtPayloadStart() // stop at any new payload start to have the buffer refilled if necessary
- || (tsPayload.Available() < MIN_TS_PACKETS_FOR_FRAME_DETECTOR * TS_SIZE // stop if the available data is below the limit...
- && (tsPayload.Available() <= 0 || tsPayload.AtTsStart()))) // ...but only if there is no more data at all, or if we are at a TS boundary
+ || tsPayload.Eof()) // or if we're out of data
break;
}
return tsPayload.Used();
@@ -1203,7 +1254,7 @@ uint32_t cH264Parser::GetBits(int Bits)
uint32_t cH264Parser::GetGolombUe(void)
{
int z = -1;
- for (int b = 0; !b; z++)
+ for (int b = 0; !b && z < 32; z++) // limiting z to no get stuck if GetBit() always returns 0
b = GetBit();
return (1 << z) - 1 + GetBits(z);
}
@@ -1239,13 +1290,17 @@ int cH264Parser::Parse(const uchar *Data, int Length, int Pid)
case nutAccessUnitDelimiter: ParseAccessUnitDelimiter();
gotAccessUnitDelimiter = true;
break;
- case nutSequenceParameterSet: ParseSequenceParameterSet();
- gotSequenceParameterSet = true;
+ case nutSequenceParameterSet: if (gotAccessUnitDelimiter) {
+ ParseSequenceParameterSet();
+ gotSequenceParameterSet = true;
+ }
break;
case nutCodedSliceNonIdr:
case nutCodedSliceIdr: if (gotAccessUnitDelimiter && gotSequenceParameterSet) {
ParseSliceHeader();
gotAccessUnitDelimiter = false;
+ if (newFrame)
+ tsPayload.Statistics();
return tsPayload.Used();
}
break;
@@ -1253,8 +1308,7 @@ int cH264Parser::Parse(const uchar *Data, int Length, int Pid)
}
}
if (tsPayload.AtPayloadStart() // stop at any new payload start to have the buffer refilled if necessary
- || (tsPayload.Available() < MIN_TS_PACKETS_FOR_FRAME_DETECTOR * TS_SIZE // stop if the available data is below the limit...
- && (tsPayload.Available() <= 0 || tsPayload.AtTsStart()))) // ...but only if there is no more data at all, or if we are at a TS boundary
+ || tsPayload.Eof()) // or if we're out of data
break;
}
return tsPayload.Used();
@@ -1457,7 +1511,7 @@ int cFrameDetector::Analyze(const uchar *Data, int Length)
for (int i = 0; i < numPtsValues; i++)
ptsValues[i] = ptsValues[i + 1] - ptsValues[i];
qsort(ptsValues, numPtsValues, sizeof(uint32_t), CmpUint32);
- uint32_t Delta = ptsValues[0] / framesPerPayloadUnit;
+ uint32_t Delta = ptsValues[0] / (framesPerPayloadUnit + parser->IFrameTemporalReferenceOffset());
// determine frame info:
if (isVideo) {
if (abs(Delta - 3600) <= 1)
@@ -1475,7 +1529,7 @@ int cFrameDetector::Analyze(const uchar *Data, int Length)
}
else // audio
framesPerSecond = double(PTSTICKS) / Delta; // PTS of audio frames is always increasing
- dbgframes("\nDelta = %d FPS = %5.2f FPPU = %d NF = %d\n", Delta, framesPerSecond, framesPerPayloadUnit, numPtsValues + 1);
+ dbgframes("\nDelta = %d FPS = %5.2f FPPU = %d NF = %d TRO = %d\n", Delta, framesPerSecond, framesPerPayloadUnit, numPtsValues + 1, parser->IFrameTemporalReferenceOffset());
synced = true;
parser->SetDebug(false);
}
diff --git a/remux.h b/remux.h
index 67eda4c..12ee970 100644
--- a/remux.h
+++ b/remux.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: remux.h 2.37 2013/01/20 11:43:59 kls Exp $
+ * $Id: remux.h 2.37.1.2 2014/01/28 12:36:26 kls Exp $
*/
#ifndef __REMUX_H
@@ -217,8 +217,11 @@ private:
int length;
int pid;
int index; // points to the next byte to process
+ int numPacketsPid; // the number of TS packets with the given PID (for statistical purposes)
+ int numPacketsOther; // the number of TS packets with other PIDs (for statistical purposes)
+ uchar SetEof(void);
protected:
- void Reset(void) { index = 0; }
+ void Reset(void);
public:
cTsPayload(void);
cTsPayload(uchar *Data, int Length, int Pid = -1);
@@ -246,6 +249,10 @@ public:
///< is counted with its full size.
bool Eof(void) const { return index >= length; }
///< Returns true if all available bytes of the TS payload have been processed.
+ void Statistics(void) const;
+ ///< May be called after a new frame has been detected, and will log a warning
+ ///< if the number of TS packets required to determine the frame type exceeded
+ ///< some safety limits.
uchar GetByte(void);
///< Gets the next byte of the TS payload, skipping any intermediate TS header data.
bool SkipBytes(int Bytes);
@@ -462,7 +469,7 @@ void PesDump(const char *Name, const u_char *Data, int Length);
// Frame detector:
-#define MIN_TS_PACKETS_FOR_FRAME_DETECTOR 5
+#define MIN_TS_PACKETS_FOR_FRAME_DETECTOR 100
class cFrameParser;
diff --git a/sdt.c b/sdt.c
index 5f2502b..18efcbc 100644
--- a/sdt.c
+++ b/sdt.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: sdt.c 2.5 2010/05/16 14:23:21 kls Exp $
+ * $Id: sdt.c 2.5.1.2 2014/03/11 09:30:59 kls Exp $
*/
#include "sdt.h"
@@ -17,19 +17,30 @@
cSdtFilter::cSdtFilter(cPatFilter *PatFilter)
{
+ source = cSource::stNone;
patFilter = PatFilter;
Set(0x11, 0x42); // SDT
}
void cSdtFilter::SetStatus(bool On)
{
+ cMutexLock MutexLock(&mutex);
cFilter::SetStatus(On);
sectionSyncer.Reset();
+ if (!On)
+ source = cSource::stNone;
+}
+
+void cSdtFilter::Trigger(int Source)
+{
+ cMutexLock MutexLock(&mutex);
+ source = Source;
}
void cSdtFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length)
{
- if (!(Source() && Transponder()))
+ cMutexLock MutexLock(&mutex);
+ if (!(source && Transponder()))
return;
SI::SDT sdt(Data, false);
if (!sdt.CheckCRCAndParse())
@@ -40,9 +51,9 @@ void cSdtFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
return;
SI::SDT::Service SiSdtService;
for (SI::Loop::Iterator it; sdt.serviceLoop.getNext(SiSdtService, it); ) {
- cChannel *channel = Channels.GetByChannelID(tChannelID(Source(), sdt.getOriginalNetworkId(), sdt.getTransportStreamId(), SiSdtService.getServiceId()));
+ cChannel *channel = Channels.GetByChannelID(tChannelID(source, sdt.getOriginalNetworkId(), sdt.getTransportStreamId(), SiSdtService.getServiceId()));
if (!channel)
- channel = Channels.GetByChannelID(tChannelID(Source(), 0, Transponder(), SiSdtService.getServiceId()));
+ channel = Channels.GetByChannelID(tChannelID(source, 0, Transponder(), SiSdtService.getServiceId()));
cLinkChannels *LinkChannels = NULL;
SI::Descriptor *d;
@@ -64,7 +75,7 @@ void cSdtFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
sd->serviceName.getText(NameBuf, ShortNameBuf, sizeof(NameBuf), sizeof(ShortNameBuf));
char *pn = compactspace(NameBuf);
char *ps = compactspace(ShortNameBuf);
- if (!*ps && cSource::IsCable(Source())) {
+ if (!*ps && cSource::IsCable(source)) {
// Some cable providers don't mark short channel names according to the
// standard, but rather go their own way and use "name>short name":
char *p = strchr(pn, '>'); // fix for UPC Wien
@@ -92,7 +103,7 @@ void cSdtFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
}
else if (*pn && Setup.UpdateChannels >= 4) {
channel = Channels.NewChannel(Channel(), pn, ps, pp, sdt.getOriginalNetworkId(), sdt.getTransportStreamId(), SiSdtService.getServiceId());
- patFilter->Trigger();
+ patFilter->Trigger(SiSdtService.getServiceId());
}
}
default: ;
@@ -115,10 +126,10 @@ void cSdtFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
SI::NVODReferenceDescriptor *nrd = (SI::NVODReferenceDescriptor *)d;
SI::NVODReferenceDescriptor::Service Service;
for (SI::Loop::Iterator it; nrd->serviceLoop.getNext(Service, it); ) {
- cChannel *link = Channels.GetByChannelID(tChannelID(Source(), Service.getOriginalNetworkId(), Service.getTransportStream(), Service.getServiceId()));
+ cChannel *link = Channels.GetByChannelID(tChannelID(source, Service.getOriginalNetworkId(), Service.getTransportStream(), Service.getServiceId()));
if (!link && Setup.UpdateChannels >= 4) {
link = Channels.NewChannel(Channel(), "NVOD", "", "", Service.getOriginalNetworkId(), Service.getTransportStream(), Service.getServiceId());
- patFilter->Trigger();
+ patFilter->Trigger(Service.getServiceId());
}
if (link) {
if (!LinkChannels)
diff --git a/sdt.h b/sdt.h
index 2566672..3b6d003 100644
--- a/sdt.h
+++ b/sdt.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: sdt.h 2.0 2004/01/05 14:30:14 kls Exp $
+ * $Id: sdt.h 2.0.1.1 2014/03/11 09:31:08 kls Exp $
*/
#ifndef __SDT_H
@@ -15,13 +15,16 @@
class cSdtFilter : public cFilter {
private:
+ cMutex mutex;
cSectionSyncer sectionSyncer;
+ int source;
cPatFilter *patFilter;
protected:
virtual void Process(u_short Pid, u_char Tid, const u_char *Data, int Length);
public:
cSdtFilter(cPatFilter *PatFilter);
virtual void SetStatus(bool On);
+ void Trigger(int Source);
};
#endif //__SDT_H
diff --git a/skinlcars.c b/skinlcars.c
index 3ed8225..8c949b3 100644
--- a/skinlcars.c
+++ b/skinlcars.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: skinlcars.c 2.21.1.1 2013/05/19 12:08:52 kls Exp $
+ * $Id: skinlcars.c 2.21.1.4 2014/03/10 12:12:19 kls Exp $
*/
// "Star Trek: The Next Generation"(R) is a registered trademark of Paramount Pictures,
@@ -837,6 +837,15 @@ cSkinLCARSDisplayMenu::cSkinLCARSDisplayMenu(void)
ys03 = ys04 - Gap;
ys05 = yb15;
+ // The item area (just to have them initialized, actual setting will be done in SetMenuCategory():
+
+ xi00 = 0;
+ xi01 = 0;
+ xi02 = 0;
+ xi03 = 1;
+ yi00 = 0;
+ yi01 = 1;
+
// The color buttons in submenus:
xb00 = xa06;
xb15 = xa07;
@@ -1289,7 +1298,7 @@ void cSkinLCARSDisplayMenu::DrawLiveIndicator(void)
if (initial || y != lastLiveIndicatorY || Transferring != lastLiveIndicatorTransferring) {
if (lastLiveIndicatorY >= 0)
osd->DrawRectangle(xs12, lastLiveIndicatorY, xs13 - 1, lastLiveIndicatorY + lineHeight - 1, Theme.Color(clrBackground));
- if (y >= 0) {
+ if (y > 0) {
tColor ColorBg = Theme.Color(clrChannelFrameBg);
osd->DrawRectangle(xs12, y, xs12 + lineHeight / 2 - 1, y + lineHeight - 1, ColorBg);
osd->DrawEllipse (xs12 + lineHeight / 2, y, xs13 - 1, y + lineHeight - 1, ColorBg, 5);
@@ -1710,6 +1719,7 @@ cSkinLCARSDisplayReplay::cSkinLCARSDisplayReplay(bool ModeOnly)
frameColor = Theme.Color(clrReplayFrameBg);
lastCurrentWidth = 0;
lastTotalWidth = 0;
+ memset(&lastTrackId, 0, sizeof(lastTrackId));
int d = 5 * lineHeight;
xp00 = 0;
xp01 = xp00 + d / 2;
diff --git a/skins.h b/skins.h
index c9750b8..c08d757 100644
--- a/skins.h
+++ b/skins.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: skins.h 2.9 2012/12/21 11:09:13 kls Exp $
+ * $Id: skins.h 2.9.1.1 2014/02/18 14:06:50 kls Exp $
*/
#ifndef __SKINS_H
@@ -264,7 +264,7 @@ protected:
class cProgressBar : public cBitmap {
protected:
int total;
- int Pos(int p) { return p * Width() / total; }
+ int Pos(int p) { return int(int64_t(p) * Width() / total); }
void Mark(int x, bool Start, bool Current, tColor ColorMark, tColor ColorCurrent);
public:
cProgressBar(int Width, int Height, int Current, int Total, const cMarks *Marks, tColor ColorSeen, tColor ColorRest, tColor ColorSelected, tColor ColorMark, tColor ColorCurrent);
diff --git a/sourceparams.c b/sourceparams.c
index 0431789..6d85f86 100644
--- a/sourceparams.c
+++ b/sourceparams.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: sourceparams.c 1.2 2010/03/06 11:13:39 kls Exp $
+ * $Id: sourceparams.c 1.2.1.1 2014/03/09 12:13:18 kls Exp $
*/
#include "sourceparams.h"
@@ -21,8 +21,8 @@ cSourceParam::cSourceParam(char Source, const char *Description)
return;
}
SourceParams.Add(this);
- if (!strchr("ACST", Source)) // no, it's not "ATSC" ;-)
- Sources.Add(new cSource(Source, Description));
+ if (!Sources.ContainsSourceType(source))
+ Sources.Add(new cSource(source, Description));
dsyslog("registered source parameters for '%c - %s'", source, Description);
}
else
diff --git a/sources.c b/sources.c
index 44bf7d0..20c4304 100644
--- a/sources.c
+++ b/sources.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: sources.c 2.2 2010/02/28 15:15:39 kls Exp $
+ * $Id: sources.c 2.2.1.1 2014/03/09 12:13:25 kls Exp $
*/
#include "sources.h"
@@ -112,3 +112,12 @@ cSource *cSources::Get(int Code)
}
return NULL;
}
+
+bool cSources::ContainsSourceType(char SourceType)
+{
+ for (cSource *p = First(); p; p = Next(p)) {
+ if (cSource::ToChar(p->Code()) == SourceType)
+ return true;
+ }
+ return false;
+}
diff --git a/sources.conf b/sources.conf
index c7f76d1..134db32 100644
--- a/sources.conf
+++ b/sources.conf
@@ -19,57 +19,59 @@
# Europe
-S3E Eutelsat 3A & Rascom 1R
-S4E Eurobird 4A
-S4.8E Astra 4A
-S7E Eutelsat W3A
-S9E Eurobird 9A
-S10E Eutelsat W2A
-S13E Hotbird 6/8/9
-S16E Eutelsat W2M & Eurobird 16A
-S19.2E Astra 1H/1KR/1L/1M/2C
-S21.6E Eutelsat W6
-S23.5E Astra 3A/3B
-S25.5E Eurobird 2
+S3E Eutelsat 3A/3D & Rascom 1R
+S4E Eutelsat 4B
+S4.8E Astra 4A & SES 5
+S7E Eutelsat 7A
+S9E Eutelsat 9A/Ka-Sat 9A
+S10E Eutelsat 10A
+S13E Eutelsat Hot Bird 13B/13C/13D
+S16E Eutelsat 16A/16B
+S17E Amos 5
+S19.2E Astra 1KR/1L/1M/2C
+S21.6E Eutelsat 21B
+S23.5E Astra 3B
+S25.5E Eutelsat 25B
S26E Badr 4/5/6
-S28.2E Astra 2A/2B/2D
-S28.5E Eurobird 1
+S28.2E Astra 1N/2A/2F
+S28.5E Eutelsat 28A
S30.5E Arabsat 5A
S31.5E Astra 1G
-S33E Eurobird 3 & Intelsat New Dawn
-S36E Eutelsat W4/W7
-S38E Paksat 1
+S33E Eutelsat 33A & Intelsat 28
+S36E Eutelsat 36A/36B
+S38E Paksat 1R
S39E Hellas Sat 2
-S40E Express AM1
S42E Turksat 2A/3A
S45E Intelsat 12
+S46E Azerspace-1
+S47.5E Intelsat 10
S49E Yamal 202
+S52.5E Yahsat 1A
S53E Express AM22
-S55E Insat 3E
-S56E Bonum 1
+S56E DirecTV 1R
S57E NSS 12
S60E Intelsat 904
S62E Intelsat 902
S64E Intelsat 906
S66E Intelsat 17
S68.5E Intelsat 7/10
-S70.5E Eutelsat W5
-S72E Intelsat 709
+S70.5E Eutelsat 70B
+S72E Intelsat 22
# Asia
S74E Insat 3C/4CR
S75E ABS 1A
-S76.5E Apstar 2R
-S78.5E Thaicom 5
-S80E Express AM2/MD1
-S83E Insat 2E/4A
-S85.2E Intelsat 15
-S87.5E Chinasat 5A
-S88E ST 1/2
-S90E Yamal 201
+S76.5E Apstar 7
+S78.5E Thaicom 5/6A
+S80E Express AM2
+S83E Insat 4A
+S85.2E Intelsat 15 & Horizons 2
+S87.5E ChinaSat 12
+S88E ST 2
+S90E Yamal 201/300K
S91.5E Measat 3/3A
-S92.2E Chinasat 9
+S92.2E ChinaSat 9
S93.5E Insat 3A/4B
S95E NSS 6
S96.5E Express AM33
@@ -77,21 +79,22 @@ S100.5E Asiasat 5
S103E Express A2
S105.5E Asiasat 3S
S108.2E Telkom 1 & NSS 11 & SES 7
-S110E N-Sat 110 & BSAT 2C/3A
-S110.5E Chinasat 10
+S110E N-Sat 110 & BSAT 3A/3C
+S110.5E ChinaSat 10
S113E Palapa D & Koreasat 5
-S116E Koreasat 6
+S115.5E ChinaSat 6B
+S116E ABS 7 & Koreasat 6
S118E Telkom 2
+S119.5E Thaicom 4
S122.2E Asiasat 4
-S124E JCSAT 4A
-S125E Chinasat 6A
-S128E JCSAT RA
-S132E Vinasat 1 & JCSAT5A
+S124E JCSAT 4B
+S125E ChinaSat 6A
+S128E JCSAT 3A
+S132E Vinasat 1/2 & JCSAT 5A
S134E Apstar 6
S138E Telstar 18
S140E Express AM3
S144E Superbird C2
-S146E ABS 5
S150E JCSAT 1B
S152E Optus D2
S154E JCSAT 2A
@@ -99,73 +102,73 @@ S156E Optus C1/D3
S160E Optus D1
S162E Superbird B2
S164E Optus B3
-S166E Intelsat 8
-S169E Intelsat 5
-S172E GE 23
-S180E Intelsat 701
+S166E Intelsat 19
+S169E Intelsat 8
+S172E Eutelsat 172A
+S180E Intelsat 18
S177W NSS 9
# Atlantic
S1W Thor 5/6 & Intelsat 10-02
S4W Amos 2/3
-S5W Atlantic Bird 3
-S7W Nilesat 101/102/201 & Atlantic Bird 4A
-S8W Telecom 2D & Atlantic Bird 2
+S5W Eutelsat 5 West A
+S7W Nilesat 101/201 & Eutelsat 7 West A
+S8W Eutelsat 8 West A/C
S11W Express AM44
-S12.5W Atlantic Bird 1
+S12.5W Eutelsat 12 West A
S14W Express A4
S15W Telstar 12
S18W Intelsat 901
-S20W NSS 5
-S22W NSS 7
+S20W NSS 7
+S22W SES 4
S24.5W Intelsat 905
S27.5W Intelsat 907
-S30W Hispasat 1C/1D/1E
+S30W Hispasat 1D/1E
S31.5W Intelsat 25
S34.5W Intelsat 903
S37.5W NSS 10 & Telstar 11N
-S40.5W NSS 806
+S40.5W SES 6
S43W Intelsat 11
S45W Intelsat 14
S50W Intelsat 1R
-S53W Intelsat 707
+S53W Intelsat 23
S55.5W Intelsat 805
-S58W Intelsat 9/16
-S61W Amazonas 1/2
+S58W Intelsat 21
+S61W Amazonas 2/3
# America
-S61.5W Echostar 12/15
+S61.5W Echostar 16
S63W Telstar 14R
S65W Star One C1
+S67W AMC 4
S70W Star One C2
S72W AMC 6
-S72.5W DirecTV 1R & Nimiq 5
-S74W Horizons 2
-S77W Echostar 1/8
-S79W AMC 2/5
+S72.7W Nimiq 5
+S75W Star One C3
+S77W QuetzSat 1
S82W Nimiq 4
S83W AMC 9
S84W Brasilsat B4
S85W AMC 16
S85.1W XM 3
-S87W AMC 3
+S87W SES 2
S89W Galaxy 28
-S91W Galaxy 17 & Nimiq 1
-S93W Galaxy 25
+S91W Galaxy 17 & Nimiq 6
+S93.1W Galaxy 25
S95W Galaxy 3C
S97W Galaxy 19
-S99W Galaxy 16
-S99.2W Spaceway 2 & DirecTV 11
+S99.2W Galaxy 16
S101W DirecTV 4S/8 & SES 1
S103W AMC 1
S105W AMC 15/18
-S107.3W Anik F1/F1R
+S107.3W Anik F1R/G1
S110W DirecTV 5 & Echostar 10/11
S111.1W Anik F2
S113W SatMex 6
-S116.8W SatMex 5
+S114.9W SatMex 5
+S116.8W SatMex 8
S118.8W Anik F3
S119W Echostar 14 & DirecTV 7S
S121W Echostar 9/Galaxy 23
@@ -174,7 +177,7 @@ S125W Galaxy 14 & AMC 21
S127W Galaxy 13/Horizons 1
S129W Ciel 2
S131W AMC 11
-S133W Galaxy 13/15
+S133W Galaxy 15
S135W AMC 10
S137W AMC 7
S139W AMC 8
diff --git a/sources.h b/sources.h
index 516a3ed..c83ec59 100644
--- a/sources.h
+++ b/sources.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: sources.h 2.4 2012/06/17 11:19:23 kls Exp $
+ * $Id: sources.h 2.4.1.1 2014/03/09 12:13:34 kls Exp $
*/
#ifndef __SOURCES_H
@@ -47,6 +47,7 @@ public:
class cSources : public cConfig<cSource> {
public:
cSource *Get(int Code);
+ bool ContainsSourceType(char SourceType);
};
extern cSources Sources;
diff --git a/vdr.1 b/vdr.1
index 6c37cc0..c9da711 100644
--- a/vdr.1
+++ b/vdr.1
@@ -8,7 +8,7 @@
.\" License as specified in the file COPYING that comes with the
.\" vdr distribution.
.\"
-.\" $Id: vdr.1 2.17 2013/03/15 10:44:54 kls Exp $
+.\" $Id: vdr.1 2.17.1.1 2013/12/25 11:05:27 kls Exp $
.\"
.TH vdr 1 "31 Mar 2013" "2.0" "Video Disk Recorder"
.SH NAME
@@ -201,7 +201,7 @@ operation.
Allow coredumps if -u is given (only for debugging).
.TP
.BI \-\-vfat
-For backwards compatibility (same as \-\-dirnames= 250,40,1.
+For backwards compatibility (same as \-\-dirnames= 250,40,1).
.TP
.BI \-v\ dir ,\ \-\-video= dir
Use \fIdir\fR as video directory.
diff --git a/vdr.c b/vdr.c
index c63eeca..ffd0e01 100644
--- a/vdr.c
+++ b/vdr.c
@@ -22,7 +22,7 @@
*
* The project's page is at http://www.tvdr.de
*
- * $Id: vdr.c 2.57 2013/03/15 10:44:54 kls Exp $
+ * $Id: vdr.c 2.57.1.5 2014/01/26 12:45:00 kls Exp $
*/
#include <getopt.h>
@@ -223,6 +223,7 @@ int main(int argc, char *argv[])
VdrUser = VDR_USER;
#endif
+ SetVideoDirectory(VideoDirectory);
cPluginManager PluginManager(DEFAULTPLUGINDIR);
static struct option long_options[] = {
@@ -443,6 +444,7 @@ int main(int argc, char *argv[])
case 'v': VideoDirectory = optarg;
while (optarg && *optarg && optarg[strlen(optarg) - 1] == '/')
optarg[strlen(optarg) - 1] = 0;
+ SetVideoDirectory(VideoDirectory);
break;
case 'w': if (isnumber(optarg)) {
int t = atoi(optarg);
@@ -540,7 +542,7 @@ int main(int argc, char *argv[])
" -v DIR, --video=DIR use DIR as video directory (default: %s)\n"
" -V, --version print version information and exit\n"
" --vfat for backwards compatibility (same as\n"
- " --dirnames=250,40,1\n"
+ " --dirnames=250,40,1)\n"
" -w SEC, --watchdog=SEC activate the watchdog timer with a timeout of SEC\n"
" seconds (default: %d); '0' disables the watchdog\n"
"\n",
@@ -663,7 +665,6 @@ int main(int argc, char *argv[])
// Directories:
- SetVideoDirectory(VideoDirectory);
if (!ConfigDirectory)
ConfigDirectory = DEFAULTCONFDIR;
cPlugin::SetConfigDirectory(ConfigDirectory);
@@ -908,7 +909,7 @@ int main(int argc, char *argv[])
for (cChannel *Channel = Channels.First(); Channel; Channel = Channels.Next(Channel)) {
if (Channel->Modification(CHANNELMOD_RETUNE)) {
cRecordControls::ChannelDataModified(Channel);
- if (Channel->Number() == cDevice::CurrentChannel()) {
+ if (Channel->Number() == cDevice::CurrentChannel() && cDevice::PrimaryDevice()->HasDecoder()) {
if (!cDevice::PrimaryDevice()->Replaying() || cDevice::PrimaryDevice()->Transferring()) {
if (cDevice::ActualDevice()->ProvidesTransponder(Channel)) { // avoids retune on devices that don't really access the transponder
isyslog("retuning due to modification of channel %d", Channel->Number());
@@ -1234,7 +1235,7 @@ int main(int argc, char *argv[])
case osRecordings:
DELETE_MENU;
cControl::Shutdown();
- Menu = new cMenuMain(osRecordings);
+ Menu = new cMenuMain(osRecordings, true);
break;
case osReplay: DELETE_MENU;
cControl::Shutdown();
@@ -1360,6 +1361,7 @@ int main(int argc, char *argv[])
// Disk housekeeping:
RemoveDeletedRecordings();
+ ClearVanishedRecordings();
cSchedules::Cleanup();
// Plugins housekeeping:
PluginManager.Housekeeping();
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vdr-dvb/vdr.git
More information about the pkg-vdr-dvb-changes
mailing list