Commit ed6f1dd8 authored by etobi's avatar etobi

Imported Upstream version 2.0.6

parent 3ae0902c
......@@ -618,6 +618,10 @@ Helmut Auer <vdr@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@UU.NET>
for fixing an incomplete initialization of the filter parameters in eit.c
......@@ -702,6 +706,8 @@ Oliver Endriss <o.endriss@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@freenet.de>
for adding some satellites to 'sources.conf'
......@@ -1169,6 +1175,9 @@ Rolf Ahrenberg <Rolf.Ahrenberg@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@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@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@gmail.com>
Antti Hartikainen <ami+vdr@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@bernd-melcher.de>
for reporting a problem with the 'servicedemo' plugin having no PLUGIN macro
......@@ -2544,6 +2557,8 @@ Ulf Kiener <webmaster@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@jwendel.de>
for reporting that cPlugin::Active() was called too often
......@@ -2843,6 +2858,12 @@ Lars Hanisch <dvb@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@fepg.org>
for adding tuning support for ATSC devices
......@@ -2870,7 +2891,7 @@ Luis Fernandes <telping@gmail.com>
for suggesting to add handling MPEG audio type "ISO/IEC 14496-3 Audio with LATM
transport syntax"
Christopher Reimer <reimer.christopher@freenet.de>
Christopher Reimer <vdr@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@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@gmx.de>
for suggesting to make entering characters via the number keys
......@@ -3006,6 +3028,11 @@ Torsten Lang <info@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@gentoo.org>
for some improvements to the Makefiles
......@@ -3163,3 +3190,27 @@ Dominique Dumont <domi.dumont@free.fr>
Manfred Völkel <mvoelkel@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@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@edener.de>
for reporting a bug in writing group separators to channels.conf that contain a comma
Eike Sauer <EikeSauer@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@xeatre.tv>
for reporting a problem with frame detection in MPEG-2 streams that have "bottom fields"
or varying GOP structures
Mariusz Bialonczyk <manio@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@yahoo.de>
for reporting a problem with transfer mode on full featured DVB cards for encrypted
channels that have no audio pid
......@@ -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().
......@@ -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()
......
......@@ -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()
......
......@@ -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).
......@@ -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);
......
......@@ -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;
......
......@@ -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;
......
......@@ -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
......
......@@ -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);
}
......
......@@ -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"
......
......@@ -8,7 +8,7 @@
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
* Adapted to 'libsi' for VDR 1.3.0 by Marcel Wiesweg <marcel.wiesweg@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;
......
......@@ -6,7 +6,7 @@
*
* BiDi support by Osama Alrawab <alrawab@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)
......
......@@ -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,
......
......@@ -6,7 +6,7 @@
*
* LIRC support added by Carsten Koch <Carsten.Koch@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);
......
......@@ -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;
}
......
......@@ -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);
};
......
......@@ -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: {
......
......@@ -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);
};
......
......@@ -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