mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
Version 1.3.24
- Now including the optional user defined Make.config from the 'libsi' Makefile (thanks to Ville Skyttä). - Updated the Danish OSD texts (thanks to Mogens Elneff). - Fixed a memory leak in tComponent (thanks to Stefan Huelswitt and Daniel Thompson). - Fixed a memory leak in cDvbPlayer (thanks to Stefan Huelswitt). - Added missing text internationalization for "Starting EPG scan" (thanks to Matthias Lötzke). - Updated the Finnish OSD texts (thanks to Rolf Ahrenberg). - Fixed handling transparent areas in cDvbSpuBitmap (thanks to Marco Schlüßler). - Now also considering the "EPG linger time" when saving the EPG data to file or listing it via LSTE (thanks to Roman Krenický). - Fixed handling fragments of less than 4 byte in cPesAssembler (thanks to Reinhard Nissl). - Fixed a bug in libsi's SubtitlingDescriptor::getLength() (thanks to Marco Schlüßler). - When reading the channels.conf file, duplicate channels (i.e. ones that have the same channel ID) are now automatically deleted and only the first one is actually stored. - Fixed handling lifetime when deciding whether to delete a recording (thanks to Udo Richter). - Fixed timeout handling in cRwLock::Lock() (thanks to Sascha Volkenandt for reporting this one). - Since there are several places in thread.c where a timeout value is calculated, this has been put into a separate function. - The timer status now has a new bit that is set when that timer is currently recording (suggested by Matthias Schniedermeyer). See man vdr(5) for details. - Removed scaling coordinates in letterbox mode from cDvbSpu - the DVD plugin, which was the only one needing this, doesn't need it any more (thanks to Marco Schlüßler). - No longer retuning or restarting a recording if only the language code of an audio or Dolby PID changes. - Now preferring budget cards when selecting a DVB device for recording. - Recordings now avoid zero sized video data files (thanks to Wolfgang Fitz). - Some rearrangements in cDvbPlayer::Action() to avoid lockups on NPTL systems (thanks to Reinhard Nissl). - Fixed a wrong inheritance in libsi's SubtitlingDescriptor::Subtitling (thanks to Marco Schlüßler).
This commit is contained in:
parent
782b517c51
commit
c23522ade2
24
CONTRIBUTORS
24
CONTRIBUTORS
@ -64,6 +64,8 @@ Matthias Schniedermeyer <ms@citd.de>
|
||||
for suggesting the SVDRP command CLRE
|
||||
for reporting a bug in handling one-shot timers that were already recording
|
||||
and had their start time changed into the future
|
||||
for suggesting to give the timer status a bit that is set when that timer
|
||||
is currently recording
|
||||
|
||||
Miha Setina <mihasetina@softhome.net>
|
||||
for translating OSD texts to the Slovenian language
|
||||
@ -193,6 +195,8 @@ Stefan Huelswitt <huels@iname.com>
|
||||
for reporting several memory leaks that were introduced through the use of cString
|
||||
for adding MPEG1 replay capability to cPesAssembler
|
||||
for fixing handling symbolic links in cRecordings::ScanVideoDir()
|
||||
for reporting a memory leak in tComponent
|
||||
for fixing a memory leak in cDvbPlayer
|
||||
|
||||
Ulrich Röder <roeder@efr-net.de>
|
||||
for pointing out that there are channels that have a symbol rate higher than 27500
|
||||
@ -763,6 +767,7 @@ Sascha Volkenandt <sascha@akv-soft.de>
|
||||
for reporting a problem when starting replay of a recording that has no Dolby
|
||||
Digital audio after switching to a channel that has DD and selecting the DD audio
|
||||
track
|
||||
for reporting a bug in timeout handling in cRwLock::Lock()
|
||||
|
||||
Malcolm Caldwell <malcolm.caldwell@ntu.edu.au>
|
||||
for modifying LOF handling to allow for C-band reception
|
||||
@ -936,6 +941,8 @@ Reinhard Nissl <rnissl@gmx.de>
|
||||
for fixing a possible freeze in pause mode in case a device's PlayPesPacket()
|
||||
function permanently returns 0
|
||||
for fixing a typo in detecting UTF-8
|
||||
for fixing handling fragments of less than 3 byte in cPesAssembler
|
||||
for some rearrangements in cDvbPlayer::Action() to avoid lockups on NPTL systems
|
||||
|
||||
Richard Robson <richard_robson@beeb.net>
|
||||
for reporting freezing replay if a timer starts while in Transfer Mode from the
|
||||
@ -1158,6 +1165,10 @@ Marco Schl
|
||||
for increasing POLLTIMEOUTS_BEFORE_DEVICECLEAR in transfer.c to 6 to avoid problems
|
||||
with the larger buffer reserve
|
||||
for adding support for setting the video display mode
|
||||
for fixing handling transparent areas in cDvbSpuBitmap
|
||||
for fixing a bug in libsi's SubtitlingDescriptor::getLength()
|
||||
for removing scaling coordinates in letterbox mode from cDvbSpu
|
||||
for fixing a wrong inheritance in libsi's SubtitlingDescriptor::Subtitling
|
||||
|
||||
Jürgen Schmitz <j.schmitz@web.de>
|
||||
for reporting a bug in displaying the current channel when switching via the SVDRP
|
||||
@ -1202,6 +1213,7 @@ Milos Kapoun <m.kapoun@cra.cz>
|
||||
|
||||
Udo Richter <udo_richter@gmx.de>
|
||||
for refining the formula for making volume control more linear
|
||||
for fixing handling lifetime when deciding whether to delete a recording
|
||||
|
||||
Sven Kreiensen <svenk@kammer.uni-hannover.de>
|
||||
for his help in keeping 'channels.conf.terr' up to date
|
||||
@ -1300,10 +1312,22 @@ Mikko Salo <mikko.salo@ppe.inet.fi>
|
||||
|
||||
Roman Krenický <free-rtk@gmx.de>
|
||||
for a patch that was used a a basis for changing a timer's day handling to full date
|
||||
for considering the "EPG linger time" when saving the EPG data to file or listing
|
||||
it via LSTE
|
||||
|
||||
Ville Skyttä <ville.skytta@iki.fi>
|
||||
for reporting several compiler warnings in gcc 4.0
|
||||
for including the optional user defined Make.config from the 'libsi' Makefile
|
||||
|
||||
Steffen Beyer <cpunk@reactor.de>
|
||||
for fixing setting the colored button help after deleting a recording in case the next
|
||||
menu entry is a directory
|
||||
|
||||
Daniel Thompson <daniel.thompson@st.com>
|
||||
for fixing a memory leak in tComponent
|
||||
|
||||
Matthias Lötzke <Matthias@Loetzke.de>
|
||||
for adding missing text internationalization for "Starting EPG scan"
|
||||
|
||||
Wolfgang Fritz <wolfgang.fritz@gmx.net>
|
||||
for making recordings avoid zero sized video data files
|
||||
|
39
HISTORY
39
HISTORY
@ -3473,3 +3473,42 @@ Video Disk Recorder Revision History
|
||||
than 30 seconds.
|
||||
- Added a missing cMutexLock to cRemote::HasKeys() (thanks to Wolfgang Rohdewald).
|
||||
- All log entries regarding timers now contain a short description of the timer.
|
||||
|
||||
2005-05-08: Version 1.3.24
|
||||
|
||||
- Now including the optional user defined Make.config from the 'libsi' Makefile
|
||||
(thanks to Ville Skyttä).
|
||||
- Updated the Danish OSD texts (thanks to Mogens Elneff).
|
||||
- Fixed a memory leak in tComponent (thanks to Stefan Huelswitt and Daniel Thompson).
|
||||
- Fixed a memory leak in cDvbPlayer (thanks to Stefan Huelswitt).
|
||||
- Added missing text internationalization for "Starting EPG scan" (thanks to
|
||||
Matthias Lötzke).
|
||||
- Updated the Finnish OSD texts (thanks to Rolf Ahrenberg).
|
||||
- Fixed handling transparent areas in cDvbSpuBitmap (thanks to Marco Schlüßler).
|
||||
- Now also considering the "EPG linger time" when saving the EPG data to file or
|
||||
listing it via LSTE (thanks to Roman Krenický).
|
||||
- Fixed handling fragments of less than 3 byte in cPesAssembler (thanks to
|
||||
Reinhard Nissl).
|
||||
- Fixed a bug in libsi's SubtitlingDescriptor::getLength() (thanks to Marco
|
||||
Schlüßler).
|
||||
- When reading the channels.conf file, duplicate channels (i.e. ones that have
|
||||
the same channel ID) are now automatically deleted and only the first one is
|
||||
actually stored.
|
||||
- Fixed handling lifetime when deciding whether to delete a recording (thanks to
|
||||
Udo Richter).
|
||||
- Fixed timeout handling in cRwLock::Lock() (thanks to Sascha Volkenandt for reporting
|
||||
this one).
|
||||
- Since there are several places in thread.c where a timeout value is calculated,
|
||||
this has been put into a separate function.
|
||||
- The timer status now has a new bit that is set when that timer is currently
|
||||
recording (suggested by Matthias Schniedermeyer). See man vdr(5) for details.
|
||||
- Removed scaling coordinates in letterbox mode from cDvbSpu - the DVD plugin, which
|
||||
was the only one needing this, doesn't need it any more (thanks to Marco Schlüßler).
|
||||
- No longer retuning or restarting a recording if only the language code of an
|
||||
audio or dolby PID changes.
|
||||
- Now preferring budget cards when selecting a DVB device for recording.
|
||||
- Recordings now avoid zero sized video data files (thanks to Wolfgang Fitz).
|
||||
- Some rearrangements in cDvbPlayer::Action() to avoid lockups on NPTL systems
|
||||
(thanks to Reinhard Nissl).
|
||||
- Fixed a wrong inheritance in libsi's SubtitlingDescriptor::Subtitling (thanks to
|
||||
Marco Schlüßler).
|
||||
|
64
channels.c
64
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 1.36 2005/03/19 15:56:38 kls Exp $
|
||||
* $Id: channels.c 1.38 2005/05/07 13:14:32 kls Exp $
|
||||
*/
|
||||
|
||||
#include "channels.h"
|
||||
@ -389,15 +389,21 @@ void cChannel::SetPortalName(const char *PortalName)
|
||||
}
|
||||
}
|
||||
|
||||
static bool IntArraysDiffer(const int *a, const int *b, const char na[][4] = NULL, const char nb[][4] = NULL)
|
||||
#define STRDIFF 0x01
|
||||
#define VALDIFF 0x02
|
||||
|
||||
static int IntArraysDiffer(const int *a, const int *b, const char na[][4] = NULL, const char nb[][4] = NULL)
|
||||
{
|
||||
int i = 0;
|
||||
while (a[i] && b[i]) {
|
||||
if (a[i] != b[i] || na && nb && strcmp(na[i], nb[i]) != 0)
|
||||
return true;
|
||||
i++;
|
||||
int result = 0;
|
||||
for (int i = 0; a[i] || b[i]; i++) {
|
||||
if (a[i] && na && nb && strcmp(na[i], nb[i]) != 0)
|
||||
result |= STRDIFF;
|
||||
if (a[i] != b[i])
|
||||
result |= VALDIFF;
|
||||
if (!a[i] || !b[i])
|
||||
break;
|
||||
}
|
||||
return a[i] != b[i] || a[i] && na && nb && strcmp(na[i], nb[i]) != 0;
|
||||
return result;
|
||||
}
|
||||
|
||||
static int IntArrayToString(char *s, const int *a, int Base = 10, const char n[][4] = NULL)
|
||||
@ -418,10 +424,15 @@ static int IntArrayToString(char *s, const int *a, int Base = 10, const char n[]
|
||||
|
||||
void cChannel::SetPids(int Vpid, int Ppid, int *Apids, char ALangs[][4], int *Dpids, char DLangs[][4], int Tpid)
|
||||
{
|
||||
bool modified = vpid != Vpid || ppid != Ppid || tpid != Tpid;
|
||||
if (!modified)
|
||||
modified = IntArraysDiffer(apids, Apids, alangs, ALangs) || IntArraysDiffer(dpids, Dpids, dlangs, DLangs);
|
||||
if (modified) {
|
||||
int mod = CHANNELMOD_NONE;
|
||||
if (vpid != Vpid || ppid != Ppid || tpid != Tpid)
|
||||
mod |= CHANNELMOD_PIDS;
|
||||
int m = IntArraysDiffer(apids, Apids, alangs, ALangs) | IntArraysDiffer(dpids, Dpids, dlangs, DLangs);
|
||||
if (m & STRDIFF)
|
||||
mod |= CHANNELMOD_LANGS;
|
||||
if (m & VALDIFF)
|
||||
mod |= CHANNELMOD_PIDS;
|
||||
if (mod) {
|
||||
char OldApidsBuf[(MAXAPIDS + MAXDPIDS) * 10 + 10]; // 10: 5 digits plus delimiting ',' or ';' plus optional '=cod', +10: paranoia
|
||||
char NewApidsBuf[(MAXAPIDS + MAXDPIDS) * 10 + 10];
|
||||
char *q = OldApidsBuf;
|
||||
@ -450,7 +461,7 @@ void cChannel::SetPids(int Vpid, int Ppid, int *Apids, char ALangs[][4], int *Dp
|
||||
strn0cpy(dlangs[i], DLangs[i], 4);
|
||||
}
|
||||
tpid = Tpid;
|
||||
modification |= CHANNELMOD_PIDS;
|
||||
modification |= mod;
|
||||
Channels.SetModified();
|
||||
}
|
||||
}
|
||||
@ -648,7 +659,7 @@ cString cChannel::ToText(void) const
|
||||
return ToText(this);
|
||||
}
|
||||
|
||||
bool cChannel::Parse(const char *s, bool AllowNonUniqueID)
|
||||
bool cChannel::Parse(const char *s)
|
||||
{
|
||||
bool ok = true;
|
||||
if (*s == ':') {
|
||||
@ -791,10 +802,6 @@ bool cChannel::Parse(const char *s, bool AllowNonUniqueID)
|
||||
esyslog("ERROR: channel data results in invalid ID!");
|
||||
return false;
|
||||
}
|
||||
if (!AllowNonUniqueID && Channels.GetByChannelID(GetChannelID())) {
|
||||
esyslog("ERROR: channel data not unique!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
return false;
|
||||
@ -817,9 +824,30 @@ cChannels::cChannels(void)
|
||||
modified = CHANNELSMOD_NONE;
|
||||
}
|
||||
|
||||
void cChannels::DeleteDuplicateChannels(void)
|
||||
{
|
||||
for (cChannel *channel = First(); channel; channel = Next(channel)) {
|
||||
if (!channel->GroupSep()) {
|
||||
tChannelID ChannelID = channel->GetChannelID();
|
||||
cChannel *other = Next(channel);
|
||||
while (other) {
|
||||
cChannel *d = NULL;
|
||||
if (!other->GroupSep() && other->GetChannelID() == ChannelID)
|
||||
d = other;
|
||||
other = Next(other);
|
||||
if (d) {
|
||||
dsyslog("deleting duplicate channel %s", *d->ToText());
|
||||
Del(d);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool cChannels::Load(const char *FileName, bool AllowComments, bool MustExist)
|
||||
{
|
||||
if (cConfig<cChannel>::Load(FileName, AllowComments, MustExist)) {
|
||||
DeleteDuplicateChannels();
|
||||
ReNumber();
|
||||
return true;
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ Bloomberg TV Germany;Bloomberg:12551:vC56:S19.2E:22000:162:99=deu:0:0:12160:1:11
|
||||
EURONEWS;CSAT:11817:vC34:S19.2E:27500:163:92=fra,93=eng,94=ita,95=esl,91=rus,98=por,99=deu:0:0:8004:1:1070:0
|
||||
rbb Brandenburg;ARD:12109:hC34:S19.2E:27500:601:602=deu:604:0:28205:1:1073:0
|
||||
Sky News;BSkyB:11597:vC56:S19.2E:22000:305+131:306=eng:0:0:28707:1:1026:0
|
||||
Veronica/JETIX;CANAL+:12574:hC56:S19.2E:22000:518+8190:92=dut:38:622,602,100:5020:53:1109:0
|
||||
Veronica/JETIX;CANAL+:12574:hC56:S19.2E:22000:518+8190:92=dut:38:622,100:5020:53:1109:0
|
||||
BVN;CANAL+:12574:hC56:S19.2E:22000:515+8190:96=dut:36:0:5025:53:1109:0
|
||||
n-tv;RTL World:12187:hC34:S19.2E:27500:169:73=deu:80:0:12090:1:1089:0
|
||||
Al Jazeera;CANALSATELLITE:11567:vC56:S19.2E:22000:55:56=ara:0:0:9021:1:1024:0
|
||||
@ -37,7 +37,7 @@ TW1 - 28Feb05;ORF:12692:hC56:S19.2E:22000:166:167=deu:168:0:13013:1:1117:0
|
||||
Eurosport;ZDFvision:11953:hC34:S19.2E:27500:410:420=deu:430:0:28009:1:1079:0
|
||||
EinsExtra;ARD:12109:hC34:S19.2E:27500:101:102=deu:0:0:28201:1:1073:0
|
||||
EinsFestival;ARD:12109:hC34:S19.2E:27500:201:202=deu:0:0:28202:1:1073:0
|
||||
EinsMuXx;ARD:12109:hC34:S19.2E:27500:301:302=deu:0:0:28203:1:1073:0
|
||||
EinsPlus;ARD:12109:hC34:S19.2E:27500:301:302=deu:0:0:28203:1:1073:0
|
||||
ZDFtheaterkanal;ZDFvision:11953:hC34:S19.2E:27500:1110:1120=deu:130:0:28016:1:1079:0
|
||||
ZDFdokukanal;ZDFvision:11953:hC34:S19.2E:27500:660:670=deu:130:0:28014:1:1079:0
|
||||
MDR FERNSEHEN;ARD:12109:hC34:S19.2E:27500:401:402=deu:404:0:28204:1:1073:0
|
||||
@ -51,7 +51,7 @@ PREMIERE 4,PREM 4;PREMIERE:11797:hC34:S19.2E:27500:767:768=deu,769=deu:32:1801,1
|
||||
PREMIERE 5,PREM 5;PREMIERE:11797:hC34:S19.2E:27500:1279:1280=deu,1281=deu:32:1801,1722,1702:29:133:2:0
|
||||
PREMIERE 6,PREM 6;PREMIERE:11797:hC34:S19.2E:27500:1535:1536=deu:32:1702,1722,1801:41:133:2:0
|
||||
PREMIERE 7,PREM 7;PREMIERE:11797:hC34:S19.2E:27500:1023:1024=deu:32:1722,1702,1801:20:133:2:0
|
||||
DISNEY CHANNEL,DISNEY;PREMIERE:11758:hC34:S19.2E:27500:2559:2560=deu:0:1722,1801,1702:34:133:17:0
|
||||
DISNEY CHANNEL,DISNEY;PREMIERE:11758:hC34:S19.2E:27500:2559:2560=deu:32:1722,1801,1702:34:133:17:0
|
||||
:Premiere Direkt
|
||||
PREMIERE DIREKT,DIREKT;PREMIERE:12031:hC34:S19.2E:27500:2815:2816=deu,2817=deu;2819=deu:0:0:18:133:4:0
|
||||
:PW Erotic
|
||||
@ -69,7 +69,7 @@ Kabel 1 Schweiz;ProSiebenSat.1:12051:vC34:S19.2E:27500:162:163=deu:165:0:20003:1
|
||||
Kabel 1 Austria;ProSiebenSat.1:12051:vC34:S19.2E:27500:166:167=deu:169:0:20004:1:1082:0
|
||||
ProSieben Schweiz;ProSiebenSat.1:12051:vC34:S19.2E:27500:289:290=deu:33:0:20001:1:1082:0
|
||||
FRANCE 5;CSAT:12207:vC34:S19.2E:27500:160:80=fra:32:500,100:8501:1:1090:0
|
||||
LCP;CSAT:12207:vC34:S19.2E:27500:165:100=fra:0:0:8506:1:1090:0
|
||||
LCP;CSAT:12207:vC34:S19.2E:27500:2047+8191:0:0:0:8506:1:1090:0
|
||||
ESCALES;ABSAT:12285:vC34:S19.2E:27500:165:100:41:500,100:17025:1:1094:0
|
||||
Best of Shopping;CSAT:12324:vC34:S19.2E:27500:160:80=fra:0:0:8612:1:1096:0
|
||||
ASTRA-Mosaic;ASTRA:12551:vC56:S19.2E:22000:175:176=fra:0:0:3988:1:1108:0
|
||||
@ -89,9 +89,9 @@ QVC Deutschland;QVC:12551:vC56:S19.2E:22000:165:166:167:0:12100:1:1108:0
|
||||
TELE 5;BetaDigital:12480:vC34:S19.2E:27500:1535:1536=deu:38:0:51:133:33:0
|
||||
:@201 Sky
|
||||
Sky One;BSkyB:12226:hC23:S28.2E:27500:2305+2304:2306=eng:2307:960,961:4705:2:2027:0
|
||||
Sky Mix;BSkyB:12226:hC23:S28.2E:27500:2314+2304:2315=eng,2316=NAR:2317:960,961:5104:2:2027:0
|
||||
Sky Mix;BSkyB:12226:hC23:S28.2E:27500:2311+2304:2312=eng,2313=NAR:2314:960,961:5104:2:2027:0
|
||||
ITV2;BSkyB:10906:vC56:S28.2E:22000:2350:2351=eng:2353:960,961:10240:2:2054:0
|
||||
Sci-Fi;BSkyB:12148:hC23:S28.2E:27500:2320+2304:2321=eng:2322:960,961:4905:2:2023:0
|
||||
Sci-Fi;BSkyB:12148:hC23:S28.2E:27500:512+8190:640=eng:576:960,961:4905:2:2023:0
|
||||
Paramount;BSkyB:12187:hC23:S28.2E:27500:2313+2304:2317=eng,2318=NAR:2315:960,961:5904:2:2025:0
|
||||
Discovery;BSkyB:11875:hC23:S28.2E:27500:2304:2306=eng,2307=NAR:2305:960,961:6201:2:2009:0
|
||||
Sky Movies 1;BSkyB:11836:hC23:S28.2E:27500:518+8190:646=eng,653=NAR;686=eng:582:960,961:4303:2:2007:0
|
||||
@ -113,7 +113,7 @@ Animal Plnt+;BSkyB:12070:hC23:S28.2E:27500:2314+2307:2315=eng:0:960,961:50002:2:
|
||||
S1T;BSkyB:12285:vC23:S28.2E:27500:513+8190:641=eng,661=NAR:577:960,961:4409:2:2030:0
|
||||
CNN;BSkyB:12051:vC23:S28.2E:27500:2313:2315=eng:2314:0:7140:2:2018:0
|
||||
BBC PARL'MNT:12129:vC23:S28.2E:27500:2304:2306=eng,2307=eng:2305:0:7300:2:2022:0
|
||||
JOLLY FILM;T-Systems/MTI:11200:vC56:S13.0E:27500:413:414=ita:0:0:4733:318:13400:0
|
||||
BTL TV;T-Systems/MTI:11200:vC56:S13.0E:27500:413:414=ita:0:0:4733:318:13400:0
|
||||
Euro1080;EURO1080:12168:vC34:S19.2E:27500:308:256:0:FF:21100:1:1088:0
|
||||
Astra HD:12441:vC34:S19.2E:27500:133+80:134=eng:0:FF:29700:0:0:0
|
||||
eng-WRN-multi;WRN:12597:vC34:S13.0E:27500:0:2132:0:0:8230:318:9400:0
|
||||
|
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: channels.h 1.26 2005/02/20 14:05:24 kls Exp $
|
||||
* $Id: channels.h 1.28 2005/05/07 13:07:09 kls Exp $
|
||||
*/
|
||||
|
||||
#ifndef __CHANNELS_H
|
||||
@ -24,6 +24,7 @@
|
||||
#define CHANNELMOD_ID 0x04
|
||||
#define CHANNELMOD_CA 0x10
|
||||
#define CHANNELMOD_TRANSP 0x20
|
||||
#define CHANNELMOD_LANGS 0x40
|
||||
#define CHANNELMOD_RETUNE (CHANNELMOD_PIDS | CHANNELMOD_CA | CHANNELMOD_TRANSP)
|
||||
|
||||
#define CHANNELSMOD_NONE 0
|
||||
@ -135,7 +136,7 @@ public:
|
||||
~cChannel();
|
||||
cChannel& operator= (const cChannel &Channel);
|
||||
cString ToText(void) const;
|
||||
bool Parse(const char *s, bool AllowNonUniqueID = false);
|
||||
bool Parse(const char *s);
|
||||
bool Save(FILE *f);
|
||||
const char *Name(void) const { return name; }
|
||||
const char *ShortName(bool OrName = false) const { return (OrName && isempty(shortName)) ? name : shortName; }
|
||||
@ -198,6 +199,7 @@ private:
|
||||
int maxNumber;
|
||||
int modified;
|
||||
int beingEdited;
|
||||
void DeleteDuplicateChannels(void);
|
||||
public:
|
||||
cChannels(void);
|
||||
bool Load(const char *FileName, bool AllowComments = false, bool MustExist = false);
|
||||
|
6
config.h
6
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.216 2005/03/05 15:44:35 kls Exp $
|
||||
* $Id: config.h 1.217 2005/05/05 11:04:18 kls Exp $
|
||||
*/
|
||||
|
||||
#ifndef __CONFIG_H
|
||||
@ -20,8 +20,8 @@
|
||||
#include "i18n.h"
|
||||
#include "tools.h"
|
||||
|
||||
#define VDRVERSION "1.3.23"
|
||||
#define VDRVERSNUM 10323 // Version * 10000 + Major * 100 + Minor
|
||||
#define VDRVERSION "1.3.24"
|
||||
#define VDRVERSNUM 10324 // Version * 10000 + Major * 100 + Minor
|
||||
|
||||
#define MAXPRIORITY 99
|
||||
#define MAXLIFETIME 99
|
||||
|
24
device.c
24
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 1.99 2005/02/27 13:55:15 kls Exp $
|
||||
* $Id: device.c 1.101 2005/05/07 15:04:17 kls Exp $
|
||||
*/
|
||||
|
||||
#include "device.h"
|
||||
@ -34,7 +34,7 @@ public:
|
||||
int ExpectedLength(void) { return PacketSize(data); }
|
||||
static int PacketSize(const uchar *data);
|
||||
int Length(void) { return length; }
|
||||
const uchar *Data(void) { return data; }
|
||||
const uchar *Data(void) { return data; } // only valid if Length() >= 4
|
||||
void Reset(void);
|
||||
void Put(uchar c);
|
||||
void Put(const uchar *Data, int Length);
|
||||
@ -76,7 +76,7 @@ bool cPesAssembler::Realloc(int Size)
|
||||
|
||||
void cPesAssembler::Put(uchar c)
|
||||
{
|
||||
if (!length) {
|
||||
if (length < 4) {
|
||||
tag = (tag << 8) | c;
|
||||
if ((tag & 0xFFFFFF00) == 0x00000100) {
|
||||
if (Realloc(4)) {
|
||||
@ -84,6 +84,8 @@ void cPesAssembler::Put(uchar c)
|
||||
length = 4;
|
||||
}
|
||||
}
|
||||
else if (length < 3)
|
||||
length++;
|
||||
}
|
||||
else if (Realloc(length + 1))
|
||||
data[length++] = c;
|
||||
@ -91,7 +93,7 @@ void cPesAssembler::Put(uchar c)
|
||||
|
||||
void cPesAssembler::Put(const uchar *Data, int Length)
|
||||
{
|
||||
while (!length && Length > 0) {
|
||||
while (length < 4 && Length > 0) {
|
||||
Put(*Data++);
|
||||
Length--;
|
||||
}
|
||||
@ -268,7 +270,7 @@ cDevice *cDevice::GetDevice(int Index)
|
||||
cDevice *cDevice::GetDevice(const cChannel *Channel, int Priority, bool *NeedsDetachReceivers)
|
||||
{
|
||||
cDevice *d = NULL;
|
||||
int select = 7, pri;
|
||||
int select = 8, pri;
|
||||
|
||||
for (int i = 0; i < numDevices; i++) {
|
||||
bool ndr;
|
||||
@ -277,16 +279,18 @@ cDevice *cDevice::GetDevice(const cChannel *Channel, int Priority, bool *NeedsDe
|
||||
pri = 0; // receiving and allows additional receivers
|
||||
else if (d && !device[i]->Receiving() && device[i]->ProvidesCa(Channel) < d->ProvidesCa(Channel))
|
||||
pri = 1; // free and fewer Ca's
|
||||
else if (!device[i]->Receiving() && !device[i]->HasDecoder())
|
||||
pri = 2; // free and not a full featured card
|
||||
else if (!device[i]->Receiving() && !device[i]->IsPrimaryDevice())
|
||||
pri = 2; // free and not the primary device
|
||||
pri = 3; // free and not the primary device
|
||||
else if (!device[i]->Receiving())
|
||||
pri = 3; // free
|
||||
pri = 4; // free
|
||||
else if (d && device[i]->Priority() < d->Priority())
|
||||
pri = 4; // receiving but priority is lower
|
||||
pri = 5; // receiving but priority is lower
|
||||
else if (d && device[i]->Priority() == d->Priority() && device[i]->ProvidesCa(Channel) < d->ProvidesCa(Channel))
|
||||
pri = 5; // receiving with same priority but fewer Ca's
|
||||
pri = 6; // receiving with same priority but fewer Ca's
|
||||
else
|
||||
pri = 6; // all others
|
||||
pri = 7; // all others
|
||||
if (pri < select) {
|
||||
select = pri;
|
||||
d = device[i];
|
||||
|
17
dvbplayer.c
17
dvbplayer.c
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: dvbplayer.c 1.30 2005/01/14 14:00:56 kls Exp $
|
||||
* $Id: dvbplayer.c 1.33 2005/05/08 14:52:49 kls Exp $
|
||||
*/
|
||||
|
||||
#include "dvbplayer.h"
|
||||
@ -263,6 +263,7 @@ cDvbPlayer::~cDvbPlayer()
|
||||
{
|
||||
Detach();
|
||||
Save();
|
||||
delete readFrame; // might not have been stored in the buffer in Action()
|
||||
delete index;
|
||||
delete fileName;
|
||||
delete backTrace;
|
||||
@ -296,6 +297,7 @@ void cDvbPlayer::Empty(void)
|
||||
nonBlockingFileReader->Clear();
|
||||
if ((readIndex = backTrace->Get(playDir == pdForward)) < 0)
|
||||
readIndex = writeIndex;
|
||||
delete readFrame; // might not have been stored in the buffer in Action()
|
||||
readFrame = NULL;
|
||||
playFrame = NULL;
|
||||
ringBuffer->Clear();
|
||||
@ -370,9 +372,14 @@ void cDvbPlayer::Action(void)
|
||||
|
||||
nonBlockingFileReader = new cNonBlockingFileReader;
|
||||
int Length = 0;
|
||||
bool Sleep = false;
|
||||
|
||||
running = true;
|
||||
while (running && (NextFile() || readIndex >= 0 || ringBuffer->Available() || !DeviceFlush(100))) {
|
||||
if (Sleep) {
|
||||
cCondWait::SleepMs(3); // this keeps the CPU load low
|
||||
Sleep = false;
|
||||
}
|
||||
cPoller Poller;
|
||||
if (DevicePoll(Poller, 100)) {
|
||||
|
||||
@ -380,8 +387,8 @@ void cDvbPlayer::Action(void)
|
||||
|
||||
// Read the next frame from the file:
|
||||
|
||||
if (playMode != pmStill && playMode != pmPause) {
|
||||
if (!readFrame && (replayFile >= 0 || readIndex >= 0)) {
|
||||
if (playMode != pmStill) {
|
||||
if (!nonBlockingFileReader->Reading()) {
|
||||
if (playMode == pmFast || (playMode == pmSlow && playDir == pdBackward)) {
|
||||
uchar FileNumber;
|
||||
@ -438,9 +445,6 @@ void cDvbPlayer::Action(void)
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
cCondWait::SleepMs(3); // this keeps the CPU load low
|
||||
}
|
||||
|
||||
// Store the frame in the buffer:
|
||||
|
||||
@ -448,6 +452,9 @@ void cDvbPlayer::Action(void)
|
||||
if (ringBuffer->Put(readFrame))
|
||||
readFrame = NULL;
|
||||
}
|
||||
}
|
||||
else
|
||||
Sleep = true;
|
||||
|
||||
// Get the next frame from the buffer:
|
||||
|
||||
|
35
dvbspu.c
35
dvbspu.c
@ -8,7 +8,7 @@
|
||||
*
|
||||
* parts of this file are derived from the OMS program.
|
||||
*
|
||||
* $Id: dvbspu.c 1.12 2005/02/06 09:54:51 kls Exp $
|
||||
* $Id: dvbspu.c 1.14 2005/05/07 11:13:48 kls Exp $
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
@ -143,6 +143,8 @@ bool cDvbSpuBitmap::getMinSize(const aDvbSpuPalDescr paldescr,
|
||||
if (ret)
|
||||
DEBUG("MinSize: (%d, %d) x (%d, %d)\n",
|
||||
size.x1, size.y1, size.x2, size.y2);
|
||||
if (size.x1 > size.x2 || size.y1 > size.y2)
|
||||
return false;
|
||||
|
||||
return ret;
|
||||
}
|
||||
@ -304,24 +306,6 @@ void cDvbSpuDecoder::clearHighlight(void)
|
||||
hlpsize.y2 = -1;
|
||||
}
|
||||
|
||||
int cDvbSpuDecoder::ScaleYcoord(int value)
|
||||
{
|
||||
if (scaleMode == eSpuLetterBox) {
|
||||
int offset = cDevice::PrimaryDevice()->GetVideoSystem() == vsPAL ? 72 : 60;
|
||||
return lround((value * 3.0) / 4.0) + offset;
|
||||
}
|
||||
else
|
||||
return value;
|
||||
}
|
||||
|
||||
int cDvbSpuDecoder::ScaleYres(int value)
|
||||
{
|
||||
if (scaleMode == eSpuLetterBox)
|
||||
return lround((value * 3.0) / 4.0);
|
||||
else
|
||||
return value;
|
||||
}
|
||||
|
||||
sDvbSpuRect cDvbSpuDecoder::CalcAreaSize(sDvbSpuRect fgsize, cBitmap *fgbmp, sDvbSpuRect bgsize, cBitmap *bgbmp)
|
||||
{
|
||||
sDvbSpuRect size;
|
||||
@ -365,22 +349,15 @@ void cDvbSpuDecoder::Draw(void)
|
||||
sDvbSpuRect hlsize;
|
||||
|
||||
hlsize.x1 = hlpsize.x1;
|
||||
hlsize.y1 = ScaleYcoord(hlpsize.y1);
|
||||
hlsize.y1 = hlpsize.y1;
|
||||
hlsize.x2 = hlpsize.x2;
|
||||
hlsize.y2 = ScaleYcoord(hlpsize.y2);
|
||||
hlsize.y2 = hlpsize.y2;
|
||||
|
||||
if (highlight)
|
||||
fg = spubmp->getBitmap(hlpDescr, palette, hlsize);
|
||||
|
||||
if (spubmp->getMinSize(palDescr, bgsize)) {
|
||||
if (spubmp->getMinSize(palDescr, bgsize))
|
||||
bg = spubmp->getBitmap(palDescr, palette, bgsize);
|
||||
if (scaleMode == eSpuLetterBox) {
|
||||
// the coordinates have to be modified for letterbox
|
||||
int y1 = ScaleYres(bgsize.y1) + bgsize.height();
|
||||
bgsize.y2 = y1 + bgsize.height();
|
||||
bgsize.y1 = y1;
|
||||
}
|
||||
}
|
||||
|
||||
sDvbSpuRect areaSize = CalcAreaSize(hlsize, fg, bgsize, bg);
|
||||
|
||||
|
4
dvbspu.h
4
dvbspu.h
@ -8,7 +8,7 @@
|
||||
*
|
||||
* parts of this file are derived from the OMS program.
|
||||
*
|
||||
* $Id: dvbspu.h 1.8 2005/02/20 11:20:43 kls Exp $
|
||||
* $Id: dvbspu.h 1.9 2005/05/07 11:14:03 kls Exp $
|
||||
*/
|
||||
|
||||
#ifndef __DVBSPU_H
|
||||
@ -129,8 +129,6 @@ class cDvbSpuDecoder:public cSpuDecoder {
|
||||
return ((spu[0] << 8) | spu[1]);
|
||||
};
|
||||
|
||||
int ScaleYcoord(int value);
|
||||
int ScaleYres(int value);
|
||||
sDvbSpuRect CalcAreaSize(sDvbSpuRect fgsize, cBitmap *fgbmp, sDvbSpuRect bgsize, cBitmap *bgbmp);
|
||||
|
||||
public:
|
||||
|
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: eitscan.c 1.23 2004/10/31 16:19:49 kls Exp $
|
||||
* $Id: eitscan.c 1.24 2005/05/05 13:05:00 kls Exp $
|
||||
*/
|
||||
|
||||
#include "eitscan.h"
|
||||
@ -152,7 +152,7 @@ void cEITScanner::Process(void)
|
||||
if ((!Channel->Ca() || Channel->Ca() == Device->DeviceNumber() + 1 || Channel->Ca() >= 0x0100) && Device->ProvidesTransponder(Channel)) {
|
||||
if (Device == cDevice::PrimaryDevice() && !currentChannel) {
|
||||
currentChannel = Device->CurrentChannel();
|
||||
Skins.Message(mtInfo, "Starting EPG scan");
|
||||
Skins.Message(mtInfo, tr("Starting EPG scan"));
|
||||
}
|
||||
currentDevice = Device;//XXX see also dvbdevice.c!!!
|
||||
Device->SwitchChannel(Channel, false);
|
||||
|
8
epg.c
8
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.27 2005/03/20 12:34:19 kls Exp $
|
||||
* $Id: epg.c 1.29 2005/05/05 13:53:19 kls Exp $
|
||||
*/
|
||||
|
||||
#include "epg.h"
|
||||
@ -29,9 +29,7 @@ bool tComponent::FromString(const char *s)
|
||||
{
|
||||
unsigned int Stream, Type;
|
||||
int n = sscanf(s, "%X %02X %3c %a[^\n]", &Stream, &Type, language, &description);
|
||||
if (n != 4)
|
||||
description = NULL;
|
||||
else if (isempty(description)) {
|
||||
if (n != 4 || isempty(description)) {
|
||||
free(description);
|
||||
description = NULL;
|
||||
}
|
||||
@ -225,7 +223,7 @@ cString cEvent::GetVpsString(void) const
|
||||
|
||||
void cEvent::Dump(FILE *f, const char *Prefix) const
|
||||
{
|
||||
if (startTime + duration >= time(NULL)) {
|
||||
if (startTime + duration + Setup.EPGLinger * 60 >= time(NULL)) {
|
||||
fprintf(f, "%sE %u %ld %d %X\n", Prefix, eventID, startTime, duration, tableID);
|
||||
if (!isempty(title))
|
||||
fprintf(f, "%sT %s\n", Prefix, title);
|
||||
|
43
i18n.c
43
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.185 2005/03/12 10:43:16 kls Exp $
|
||||
* $Id: i18n.c 1.188 2005/05/05 13:12:54 kls Exp $
|
||||
*
|
||||
* Translations provided by:
|
||||
*
|
||||
@ -89,7 +89,7 @@ const tI18nPhrase Phrases[] = {
|
||||
"Português",
|
||||
"Français",
|
||||
"Norsk",
|
||||
"suomi", // this is not a typo - it's really lowercase!
|
||||
"suomi", // Finnish (this is not a typo - it's really lowercase!)
|
||||
"Polski",
|
||||
"Español",
|
||||
"ÅëëçíéêÜ", // Greek
|
||||
@ -1334,7 +1334,7 @@ const tI18nPhrase Phrases[] = {
|
||||
"PID de Vídeo",
|
||||
"PID Vidéo",
|
||||
"Vpid",
|
||||
"Kuva PID",
|
||||
"Kuva-PID",
|
||||
"Vpid",
|
||||
"Vpid",
|
||||
"Bßíôåï PID",
|
||||
@ -1355,7 +1355,7 @@ const tI18nPhrase Phrases[] = {
|
||||
"Ppid",
|
||||
"Ppid",
|
||||
"Ppid",
|
||||
"Aikatieto PID",
|
||||
"Aikatieto-PID",
|
||||
"Ppid",
|
||||
"Ppid",
|
||||
"Ppid",
|
||||
@ -1376,7 +1376,7 @@ const tI18nPhrase Phrases[] = {
|
||||
"PID Áudio (1)",
|
||||
"PID Audio (1)",
|
||||
"Apid1",
|
||||
"Ääni PID1",
|
||||
"Ääni-PID (1)",
|
||||
"Apid1",
|
||||
"Apid1",
|
||||
"Apid1",
|
||||
@ -1397,7 +1397,7 @@ const tI18nPhrase Phrases[] = {
|
||||
"Apid2",
|
||||
"PID Audio (2)",
|
||||
"Apid2",
|
||||
"Ääni PID2",
|
||||
"Ääni-PID (2)",
|
||||
"Apid2",
|
||||
"Apid2",
|
||||
"Apid2",
|
||||
@ -1418,7 +1418,7 @@ const tI18nPhrase Phrases[] = {
|
||||
"PID AC3 (1)",
|
||||
"PID AC3 (1)",
|
||||
"AC3pid1",
|
||||
"Dolby PID1",
|
||||
"Dolby-PID (1)",
|
||||
"Dpid1",
|
||||
"Dpid1",
|
||||
"Dpid1",
|
||||
@ -1439,7 +1439,7 @@ const tI18nPhrase Phrases[] = {
|
||||
"PID AC3 (2)",
|
||||
"PID AC3 (2)",
|
||||
"AC3pid2",
|
||||
"Dolby PID2",
|
||||
"Dolby-PID (2)",
|
||||
"Dpid2",
|
||||
"Dpid2",
|
||||
"Dpid2",
|
||||
@ -1460,7 +1460,7 @@ const tI18nPhrase Phrases[] = {
|
||||
"PID Teletexto",
|
||||
"PID Télétexte",
|
||||
"Tekst-TV pid",
|
||||
"Teksti-TV PID",
|
||||
"Teksti-TV-PID",
|
||||
"Tpid",
|
||||
"Tpid",
|
||||
"Tpid",
|
||||
@ -1502,7 +1502,7 @@ const tI18nPhrase Phrases[] = {
|
||||
"Sid",
|
||||
"Sid",
|
||||
"Sid",
|
||||
"Palvelu ID",
|
||||
"Palvelu-ID",
|
||||
"Sid",
|
||||
"Sid",
|
||||
"Sid",
|
||||
@ -3113,7 +3113,7 @@ const tI18nPhrase Phrases[] = {
|
||||
"ÈØàÞÚÞíÚàÐÝÝÞÕ Ø×ÞÑàÐÖÕÝØÕ",
|
||||
"",//TODO
|
||||
"",//TODO
|
||||
"",//TODO
|
||||
"Video display format",
|
||||
},
|
||||
{ "pan&scan",
|
||||
"pan&scan",
|
||||
@ -5241,6 +5241,27 @@ const tI18nPhrase Phrases[] = {
|
||||
"Saate edastamise peatamine...",
|
||||
"Pausere live udsendelse...",
|
||||
},
|
||||
{ "Starting EPG scan",
|
||||
"Beginne mit EPG-Scan",
|
||||
"",// TODO
|
||||
"",// TODO
|
||||
"",// TODO
|
||||
"",// TODO
|
||||
"",// TODO
|
||||
"",// TODO
|
||||
"Ohjelmaoppaan päivitys aloitettu",
|
||||
"",// TODO
|
||||
"",// TODO
|
||||
"",// TODO
|
||||
"",// TODO
|
||||
"",// TODO
|
||||
"",// TODO
|
||||
"",// TODO
|
||||
"",// TODO
|
||||
"",// TODO
|
||||
"",// TODO
|
||||
"",// TODO
|
||||
},
|
||||
{ "This plugin has no setup parameters!",
|
||||
"Dieses Plugin hat keine Setup-Parameter!",
|
||||
"Ta plugin nima nastavitvenih parametrov!",
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# Makefile for a libsi
|
||||
#
|
||||
# $Id: Makefile 1.3 2004/10/16 13:31:50 kls Exp $
|
||||
# $Id: Makefile 1.4 2005/05/05 11:01:46 kls Exp $
|
||||
|
||||
### The C++ compiler and options:
|
||||
|
||||
@ -11,6 +11,8 @@ AR = ar
|
||||
ARFLAGS = ru
|
||||
RANLIB = ranlib
|
||||
|
||||
-include ../Make.config
|
||||
|
||||
### The directory environment:
|
||||
|
||||
INCLUDES +=
|
||||
|
@ -6,7 +6,7 @@
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* $Id: descriptor.h 1.10 2004/06/06 13:51:29 kls Exp $
|
||||
* $Id: descriptor.h 1.12 2005/05/08 14:08:19 kls Exp $
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
@ -283,13 +283,13 @@ private:
|
||||
|
||||
class SubtitlingDescriptor : public Descriptor {
|
||||
public:
|
||||
class Subtitling : public Descriptor {
|
||||
class Subtitling : public LoopElement {
|
||||
public:
|
||||
char languageCode[4];
|
||||
int getSubtitlingType() const;
|
||||
int getCompositionPageId() const;
|
||||
int getAncillaryPageId() const;
|
||||
virtual int getLength() { return sizeof(item_nvod_reference); }
|
||||
virtual int getLength() { return sizeof(item_subtitling); }
|
||||
protected:
|
||||
virtual void Parse();
|
||||
private:
|
||||
|
21
recording.c
21
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.96 2005/02/12 10:17:47 kls Exp $
|
||||
* $Id: recording.c 1.98 2005/05/07 15:25:15 kls Exp $
|
||||
*/
|
||||
|
||||
#include "recording.h"
|
||||
@ -126,7 +126,7 @@ void AssertFreeDiskSpace(int Priority)
|
||||
while (r) {
|
||||
if (!r->IsEdited() && r->lifetime < MAXLIFETIME) { // edited recordings and recordings with MAXLIFETIME live forever
|
||||
if ((r->lifetime == 0 && Priority > r->priority) || // the recording has no guaranteed lifetime and the new recording has higher priority
|
||||
(time(NULL) - r->start) / SECSINDAY > r->lifetime) { // the recording's guaranteed lifetime has expired
|
||||
(r->lifetime > 0 && (time(NULL) - r->start) / SECSINDAY >= r->lifetime)) { // the recording's guaranteed lifetime has expired
|
||||
if (r0) {
|
||||
if (r->priority < r0->priority || (r->priority == r0->priority && r->start < r0->start))
|
||||
r0 = r; // in any case we delete the one with the lowest priority (or the older one in case of equal priorities)
|
||||
@ -1124,8 +1124,21 @@ int cFileName::SetOffset(int Number, int Offset)
|
||||
fileNumber = Number;
|
||||
sprintf(pFileNumber, RECORDFILESUFFIX, fileNumber);
|
||||
if (record) {
|
||||
if (access(fileName, F_OK) == 0) // file exists, let's try next suffix
|
||||
return SetOffset(Number + 1);
|
||||
if (access(fileName, F_OK) == 0) {
|
||||
// files exists, check if it has non-zero size
|
||||
struct stat buf;
|
||||
if (stat(fileName, &buf) == 0) {
|
||||
if (buf.st_size != 0)
|
||||
return SetOffset(Number + 1); // file exists and has non zero size, let's try next suffix
|
||||
else {
|
||||
// zero size file, remove it
|
||||
dsyslog ("cFileName::SetOffset: removing zero-sized file %s\n", fileName);
|
||||
unlink (fileName);
|
||||
}
|
||||
}
|
||||
else
|
||||
return SetOffset(Number + 1); // error with fstat - should not happen, just to be on the safe side
|
||||
}
|
||||
else if (errno != ENOENT) { // something serious has happened
|
||||
LOG_ERROR_STR(fileName);
|
||||
return -1;
|
||||
|
6
svdrp.c
6
svdrp.c
@ -10,7 +10,7 @@
|
||||
* and interact with the Video Disk Recorder - or write a full featured
|
||||
* graphical interface that sits on top of an SVDRP connection.
|
||||
*
|
||||
* $Id: svdrp.c 1.69 2005/03/20 15:04:00 kls Exp $
|
||||
* $Id: svdrp.c 1.70 2005/05/06 13:47:39 kls Exp $
|
||||
*/
|
||||
|
||||
#include "svdrp.h"
|
||||
@ -875,7 +875,7 @@ void cSVDRP::CmdMODC(const char *Option)
|
||||
cChannel *channel = Channels.GetByNumber(n);
|
||||
if (channel) {
|
||||
cChannel ch;
|
||||
if (ch.Parse(tail, true)) {
|
||||
if (ch.Parse(tail)) {
|
||||
if (Channels.HasUniqueChannelID(&ch, channel)) {
|
||||
*channel = ch;
|
||||
Channels.ReNumber();
|
||||
@ -948,7 +948,7 @@ void cSVDRP::CmdNEWC(const char *Option)
|
||||
{
|
||||
if (*Option) {
|
||||
cChannel ch;
|
||||
if (ch.Parse(Option, true)) {
|
||||
if (ch.Parse(Option)) {
|
||||
if (Channels.HasUniqueChannelID(&ch)) {
|
||||
cChannel *channel = new cChannel;
|
||||
*channel = ch;
|
||||
|
46
thread.c
46
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.41 2005/01/14 13:59:48 kls Exp $
|
||||
* $Id: thread.c 1.42 2005/05/06 14:39:15 kls Exp $
|
||||
*/
|
||||
|
||||
#include "thread.h"
|
||||
@ -17,6 +17,22 @@
|
||||
#include <unistd.h>
|
||||
#include "tools.h"
|
||||
|
||||
static bool GetAbsTime(struct timespec *Abstime, int MillisecondsFromNow)
|
||||
{
|
||||
struct timeval now;
|
||||
if (gettimeofday(&now, NULL) == 0) { // get current time
|
||||
now.tv_usec += MillisecondsFromNow * 1000; // add the timeout
|
||||
while (now.tv_usec >= 1000000) { // take care of an overflow
|
||||
now.tv_sec++;
|
||||
now.tv_usec -= 1000000;
|
||||
}
|
||||
Abstime->tv_sec = now.tv_sec; // seconds
|
||||
Abstime->tv_nsec = now.tv_usec * 1000; // nano seconds
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// --- cCondWait -------------------------------------------------------------
|
||||
|
||||
cCondWait::cCondWait(void)
|
||||
@ -44,15 +60,8 @@ bool cCondWait::Wait(int TimeoutMs)
|
||||
pthread_mutex_lock(&mutex);
|
||||
if (!signaled) {
|
||||
if (TimeoutMs) {
|
||||
struct timeval now;
|
||||
if (gettimeofday(&now, NULL) == 0) { // get current time
|
||||
now.tv_usec += TimeoutMs * 1000; // add the timeout
|
||||
int sec = now.tv_usec / 1000000;
|
||||
now.tv_sec += sec;
|
||||
now.tv_usec -= sec * 1000000;
|
||||
struct timespec abstime; // build timespec for timedwait
|
||||
abstime.tv_sec = now.tv_sec; // seconds
|
||||
abstime.tv_nsec = now.tv_usec * 1000; // nano seconds
|
||||
struct timespec abstime;
|
||||
if (GetAbsTime(&abstime, TimeoutMs)) {
|
||||
while (!signaled) {
|
||||
if (pthread_cond_timedwait(&cond, &mutex, &abstime) == ETIMEDOUT)
|
||||
break;
|
||||
@ -105,17 +114,8 @@ bool cCondVar::TimedWait(cMutex &Mutex, int TimeoutMs)
|
||||
bool r = true; // true = condition signaled false = timeout
|
||||
|
||||
if (Mutex.locked) {
|
||||
struct timeval now; // unfortunately timedwait needs the absolute time, not the delta :-(
|
||||
if (gettimeofday(&now, NULL) == 0) { // get current time
|
||||
now.tv_usec += TimeoutMs * 1000; // add the timeout
|
||||
while (now.tv_usec >= 1000000) { // take care of an overflow
|
||||
now.tv_sec++;
|
||||
now.tv_usec -= 1000000;
|
||||
}
|
||||
struct timespec abstime; // build timespec for timedwait
|
||||
abstime.tv_sec = now.tv_sec; // seconds
|
||||
abstime.tv_nsec = now.tv_usec * 1000; // nano seconds
|
||||
|
||||
struct timespec abstime;
|
||||
if (GetAbsTime(&abstime, TimeoutMs)) {
|
||||
int locked = Mutex.locked;
|
||||
Mutex.locked = 0; // have to clear the locked count here, as pthread_cond_timedwait
|
||||
// does an implizit unlock of the mutex.
|
||||
@ -150,8 +150,8 @@ bool cRwLock::Lock(bool Write, int TimeoutMs)
|
||||
int Result = 0;
|
||||
struct timespec abstime;
|
||||
if (TimeoutMs) {
|
||||
abstime.tv_sec = TimeoutMs / 1000;
|
||||
abstime.tv_nsec = (TimeoutMs % 1000) * 1000000;
|
||||
if (!GetAbsTime(&abstime, TimeoutMs))
|
||||
TimeoutMs = 0;
|
||||
}
|
||||
if (Write)
|
||||
Result = TimeoutMs ? pthread_rwlock_timedwrlock(&rwlock, &abstime) : pthread_rwlock_wrlock(&rwlock);
|
||||
|
6
timers.c
6
timers.c
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: timers.c 1.30 2005/03/20 14:50:37 kls Exp $
|
||||
* $Id: timers.c 1.31 2005/05/07 11:10:56 kls Exp $
|
||||
*/
|
||||
|
||||
#include "timers.h"
|
||||
@ -441,6 +441,10 @@ void cTimer::SetEvent(const cSchedule *Schedule, const cEvent *Event)
|
||||
void cTimer::SetRecording(bool Recording)
|
||||
{
|
||||
recording = Recording;
|
||||
if (recording)
|
||||
SetFlags(tfRecording);
|
||||
else
|
||||
ClrFlags(tfRecording);
|
||||
isyslog("timer %s %s", *ToDescr(), recording ? "start" : "stop");
|
||||
}
|
||||
|
||||
|
3
timers.h
3
timers.h
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: timers.h 1.18 2005/03/20 14:47:45 kls Exp $
|
||||
* $Id: timers.h 1.19 2005/05/07 10:36:35 kls Exp $
|
||||
*/
|
||||
|
||||
#ifndef __TIMERS_H
|
||||
@ -19,6 +19,7 @@ enum eTimerFlags { tfNone = 0x0000,
|
||||
tfActive = 0x0001,
|
||||
tfInstant = 0x0002,
|
||||
tfVps = 0x0004,
|
||||
tfRecording = 0x0008,
|
||||
tfAll = 0xFFFF,
|
||||
};
|
||||
enum eTimerMatch { tmNone, tmPartial, tmFull };
|
||||
|
3
vdr.5
3
vdr.5
@ -8,7 +8,7 @@
|
||||
.\" License as specified in the file COPYING that comes with the
|
||||
.\" vdr distribution.
|
||||
.\"
|
||||
.\" $Id: vdr.5 1.35 2005/03/19 15:20:47 kls Exp $
|
||||
.\" $Id: vdr.5 1.36 2005/05/07 10:40:23 kls Exp $
|
||||
.\"
|
||||
.TH vdr 5 "19 Mar 2005" "1.3.23" "Video Disk Recorder Files"
|
||||
.SH NAME
|
||||
@ -210,6 +210,7 @@ l l.
|
||||
\fB1\fR@the timer is active (and will record if it hits)
|
||||
\fB2\fR@this is an instant recording timer
|
||||
\fB4\fR@this timer uses VPS
|
||||
\fB8\fR@this timer is currently recording (may only be up-to-date with SVDRP)
|
||||
.TE
|
||||
Bits other than these can be used by external programs to mark active timers
|
||||
and recognize if the user has modified them. When a user modifies an active
|
||||
|
Loading…
x
Reference in New Issue
Block a user