summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2006-10-08 18:00:00 +0200
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2006-10-08 18:00:00 +0200
commit948c370a29a21ac1fc9531f7e92d99e24734dcf4 (patch)
treef3c468622249d515fb7be6a114f2ee44e8de895d
parent312c21b832f89b600e44850a870ee160631c5ecd (diff)
downloadvdr-patch-lnbsharing-vdr-1.4.3-1.tar.gz
vdr-patch-lnbsharing-vdr-1.4.3-1.tar.bz2
Version 1.4.3-1vdr-1.4.3-1
- The function cThread::Cancel() now only sets 'running' to false and does not actually kill the thread if the special value -1 is given (suggested by Udo Richter). - Changed the I18nNormalizeLanguageCode() check to also allow blanks (and all other printable characters) in the language codes (thanks to Boguslaw Juza for reporting that there are stations that use blanks in these codes). Blanks are replaced with underlines, so that all parts of VDR that rely on language codes to be one word (without blanks) work as expected. - Now clearing an event's Title, ShortText and Description if there is no ShortEventDescriptor or ExtendedEventDescriptor, respectively (thanks to Boguslaw Juza for reporting that events without an ExtendedEventDescriptor may get duplicate information in their ShortText through the EPG bugfixes in case they are received again). - Fixed handling video directory updates in case an other process has touched the .update file after the last NeedsUpdate() check (thanks to Petri Hintukainen). - Fixed handling language codes and descriptions of recorded audio tracks on channels with multiple tracks where not all of them appear in the event data (reported by Boguslaw Juza).
-rw-r--r--CONTRIBUTORS12
-rw-r--r--HISTORY20
-rw-r--r--config.h4
-rw-r--r--eit.c8
-rw-r--r--epg.c5
-rw-r--r--epg.h3
-rw-r--r--i18n.c33
-rw-r--r--recording.c6
-rw-r--r--thread.c4
-rw-r--r--thread.h4
10 files changed, 81 insertions, 18 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 6d85336..6e79bc3 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -1468,6 +1468,8 @@ Udo Richter <udo_richter@gmx.de>
for reporting a problem with cPlugin::ConfigDirectory() in case a plugin calls it
from a separate thread
for reporting that an assignment in svdrp.c didn't use the cTimer::operator=())
+ for suggesting that the function cThread::Cancel() should only set 'running' to
+ false and not actually kill the thread if the special value -1 is given
Sven Kreiensen <svenk@kammer.uni-hannover.de>
for his help in keeping 'channels.conf.terr' up to date
@@ -1821,6 +1823,8 @@ Petri Hintukainen <Petri.Hintukainen@hut.fi>
the Makefile to avoid a crash in case a new version is installed on a running system
for fixing handling video directory updates in case the timestamp of the .update
file is in the future
+ for fixing handling video directory updates in case an other process has touched the
+ .update file after the last NeedsUpdate() check
Marcel Schaeben <mts280@gmx.de>
for his "Easy Input" patch
@@ -2003,3 +2007,11 @@ Matthias Schwarzott <zzam@gentoo.org>
Martin Ostermann <martin@familie-ostermann.de>
for fixing processing the PDCDescriptor in 'libsi' on big endian systems
+
+Boguslaw Juza <bogdan@uci.agh.edu.pl>
+ for reporting that there are stations that use blanks in the language codes
+ for reporting that events without an ExtendedEventDescriptor may get duplicate
+ information in their ShortText through the EPG bugfixes in case they are received
+ again
+ for reporting a problem with language codes of recorded audio tracks on channels with
+ multiple tracks
diff --git a/HISTORY b/HISTORY
index 455a6a1..c082442 100644
--- a/HISTORY
+++ b/HISTORY
@@ -4930,3 +4930,23 @@ Video Disk Recorder Revision History
2006-09-23: Version 1.4.3
- Official release.
+
+2006-10-08: Version 1.4.3-1
+
+- The function cThread::Cancel() now only sets 'running' to false and does not
+ actually kill the thread if the special value -1 is given (suggested by Udo Richter).
+- Changed the I18nNormalizeLanguageCode() check to also allow blanks (and all other
+ printable characters) in the language codes (thanks to Boguslaw Juza for reporting
+ that there are stations that use blanks in these codes). Blanks are replaced with
+ underlines, so that all parts of VDR that rely on language codes to be one word
+ (without blanks) work as expected.
+- Now clearing an event's Title, ShortText and Description if there is no
+ ShortEventDescriptor or ExtendedEventDescriptor, respectively (thanks to Boguslaw
+ Juza for reporting that events without an ExtendedEventDescriptor may get
+ duplicate information in their ShortText through the EPG bugfixes in case they
+ are received again).
+- Fixed handling video directory updates in case an other process has touched the
+ .update file after the last NeedsUpdate() check (thanks to Petri Hintukainen).
+- Fixed handling language codes and descriptions of recorded audio tracks on channels
+ with multiple tracks where not all of them appear in the event data (reported by
+ Boguslaw Juza).
diff --git a/config.h b/config.h
index bb9070e..bc3ebd6 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 1.271 2006/09/23 13:56:08 kls Exp $
+ * $Id: config.h 1.272 2006/09/24 10:09:25 kls Exp $
*/
#ifndef __CONFIG_H
@@ -21,7 +21,7 @@
// VDR's own version number:
-#define VDRVERSION "1.4.3"
+#define VDRVERSION "1.4.3-1"
#define VDRVERSNUM 10403 // Version * 10000 + Major * 100 + Minor
// The plugin API's version number:
diff --git a/eit.c b/eit.c
index fc65bc9..23ae987 100644
--- a/eit.c
+++ b/eit.c
@@ -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 1.120 2006/08/05 10:01:21 kls Exp $
+ * $Id: eit.c 1.121 2006/10/07 12:32:24 kls Exp $
*/
#include "eit.h"
@@ -234,10 +234,16 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data, bo
pEvent->SetTitle(ShortEventDescriptor->name.getText(buffer, sizeof(buffer)));
pEvent->SetShortText(ShortEventDescriptor->text.getText(buffer, sizeof(buffer)));
}
+ else {
+ pEvent->SetTitle(NULL);
+ pEvent->SetShortText(NULL);
+ }
if (ExtendedEventDescriptors) {
char buffer[ExtendedEventDescriptors->getMaximumTextLength(": ") + 1];
pEvent->SetDescription(ExtendedEventDescriptors->getText(buffer, sizeof(buffer), ": "));
}
+ else
+ pEvent->SetDescription(NULL);
}
delete ExtendedEventDescriptors;
delete ShortEventDescriptor;
diff --git a/epg.c b/epg.c
index b8b6b64..960934f 100644
--- a/epg.c
+++ b/epg.c
@@ -7,7 +7,7 @@
* Original version (as used in VDR before 1.3.0) written by
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
*
- * $Id: epg.c 1.79 2006/08/05 10:04:17 kls Exp $
+ * $Id: epg.c 1.80 2006/10/07 13:47:28 kls Exp $
*/
#include "epg.h"
@@ -87,7 +87,8 @@ void cComponents::SetComponent(int Index, uchar Stream, uchar Type, const char *
tComponent *cComponents::GetComponent(int Index, uchar Stream, uchar Type)
{
for (int i = 0; i < numComponents; i++) {
- if (components[i].stream == Stream && components[i].type == Type) {
+ // In case of an audio stream the 'type' check actually just distinguishes between "normal" and "Dolby Digital":
+ if (components[i].stream == Stream && (Stream != 2 || (components[i].type < 5) == (Type < 5))) {
if (!Index--)
return &components[i];
}
diff --git a/epg.h b/epg.h
index a937ff7..792bb13 100644
--- a/epg.h
+++ b/epg.h
@@ -7,7 +7,7 @@
* Original version (as used in VDR before 1.3.0) written by
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
*
- * $Id: epg.h 1.34 2006/03/25 12:39:39 kls Exp $
+ * $Id: epg.h 1.35 2006/10/07 13:47:19 kls Exp $
*/
#ifndef __EPG_H
@@ -43,6 +43,7 @@ public:
void SetComponent(int Index, uchar Stream, uchar Type, const char *Language, const char *Description);
tComponent *Component(int Index) const { return (Index < numComponents) ? &components[Index] : NULL; }
tComponent *GetComponent(int Index, uchar Stream, uchar Type); // Gets the Index'th component of Stream and Type, skipping other components
+ // In case of an audio stream the 'type' check actually just distinguishes between "normal" and "Dolby Digital"
};
class cSchedule;
diff --git a/i18n.c b/i18n.c
index 34c81f6..ee529d4 100644
--- a/i18n.c
+++ b/i18n.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: i18n.c 1.282 2006/09/16 09:08:30 kls Exp $
+ * $Id: i18n.c 1.284 2006/10/08 08:50:30 kls Exp $
*
* Translations provided by:
*
@@ -6243,12 +6243,31 @@ int I18nLanguageIndex(const char *Code)
const char *I18nNormalizeLanguageCode(const char *Code)
{
- if (Code[0] && !isalnum(Code[0]) || Code[1] && !isalnum(Code[1]) || Code[2] && !isalnum(Code[2])) {
- // ISO 639 language codes are defined as alphabetical characters, but digits are apparently
- // also used, for instance for "2ch"
- //dsyslog("invalid language code: '%s'", Code);
- return "???";
- }
+ for (int i = 0; i < 3; i++) {
+ if (Code[i]) {
+ // ETSI EN 300 468 defines language codes as consisting of three letters
+ // according to ISO 639-2. This means that they are supposed to always consist
+ // of exactly three letters in the range a-z - no digits, UTF-8 or other
+ // funny characters. However, some broadcasters apparently don't have a
+ // copy of the DVB standard (or they do, but are perhaps unable to read it),
+ // so they put all sorts of non-standard stuff into the language codes,
+ // like nonsense as "2ch" or "A 1" (yes, they even go as far as using
+ // blanks!). Such things should go into the description of the EPG event's
+ // ComponentDescriptor.
+ // So, as a workaround for this broadcaster stupidity, let's ignore
+ // language codes with unprintable characters...
+ if (!isprint(Code[i])) {
+ //dsyslog("invalid language code: '%s'", Code);
+ return "???";
+ }
+ // ...and replace blanks with underlines (ok, this breaks the 'const'
+ // of the Code parameter - but hey, it's them who started this):
+ if (Code[i] == ' ')
+ *((char *)&Code[i]) = '_';
+ }
+ else
+ break;
+ }
int n = I18nLanguageIndex(Code);
return n >= 0 ? I18nLanguageCode(n) : Code;
}
diff --git a/recording.c b/recording.c
index e60c478..5298de3 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 1.150 2006/09/16 12:12:34 kls Exp $
+ * $Id: recording.c 1.151 2006/10/07 12:46:22 kls Exp $
*/
#include "recording.h"
@@ -941,8 +941,10 @@ bool cRecordings::StateChanged(int &State)
void cRecordings::TouchUpdate(void)
{
+ bool needsUpdate = NeedsUpdate();
TouchFile(UpdateFileName());
- lastUpdate = time(NULL); // make sure we don't tigger ourselves
+ if (!needsUpdate)
+ lastUpdate = time(NULL); // make sure we don't tigger ourselves
}
bool cRecordings::NeedsUpdate(void)
diff --git a/thread.c b/thread.c
index 8b6e58f..2e145e5 100644
--- a/thread.c
+++ b/thread.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: thread.c 1.57 2006/08/20 10:20:44 kls Exp $
+ * $Id: thread.c 1.58 2006/09/24 12:54:47 kls Exp $
*/
#include "thread.h"
@@ -293,7 +293,7 @@ bool cThread::Active(void)
void cThread::Cancel(int WaitSeconds)
{
running = false;
- if (active) {
+ if (active && WaitSeconds > -1) {
if (WaitSeconds > 0) {
for (time_t t0 = time(NULL) + WaitSeconds; time(NULL) < t0; ) {
if (!Active())
diff --git a/thread.h b/thread.h
index 341e87d..6211e2c 100644
--- a/thread.h
+++ b/thread.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: thread.h 1.36 2006/01/08 11:40:23 kls Exp $
+ * $Id: thread.h 1.37 2006/09/24 10:10:37 kls Exp $
*/
#ifndef __THREAD_H
@@ -103,6 +103,8 @@ protected:
///< the Action() loop can finish in an orderly fashion and then waiting
///< up to WaitSeconds seconds for the thread to actually end. If the
///< thread doesn't end by itself, it is killed.
+ ///< If WaitSeconds is -1, only 'running' is set to false and Cancel()
+ ///< returns immediately, without killing the thread.
public:
cThread(const char *Description = NULL);
///< Creates a new thread.