summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2002-09-15 18:00:00 +0200
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2002-09-15 18:00:00 +0200
commit346f4cd1420bb02bd9cec4059385c9922d64fc3f (patch)
tree69d37a27b1b95df39f390b8ef34225da2234265e
parent523c4a07aa9112841743fca2ebcce957fde03bc8 (diff)
downloadvdr-patch-lnbsharing-346f4cd1420bb02bd9cec4059385c9922d64fc3f.tar.gz
vdr-patch-lnbsharing-346f4cd1420bb02bd9cec4059385c9922d64fc3f.tar.bz2
Version 1.1.10vdr-1.1.10
- Removed a superfluous error message from cLockFile::Unlock() (reported by Helmut Auer). - Fixed starting a recording of the current channel with only one DVB card (thanks to Stefan Huelswitt for his help). - A previous 'Transfer Mode' is now automatically re-started after a replay stops. - Only calling cStatus::MsgChannelSwitch() if a channel is actually going to be switched or has actually been switched successfully (thanks to Stefan Huelswitt). - The EPG now drops events from "other" streams that have a duration of 86400 seconds or more (this avoids bogus entries like "PROGRAMMES ALLEMANDS"). - Fixed opening /dev/video in cDvbDevice::GrabImage() in case of NEWSTRUCT driver (thanks to Andreas Schultz). - Added a missing StripAudioPackets() to cDvbPlayer::Action() (thanks to Stefan Huelswitt). - Added an EPG bugfix for the latest VOX EPG data format.
-rw-r--r--CONTRIBUTORS8
-rw-r--r--HISTORY19
-rw-r--r--channels.conf22
-rw-r--r--config.h4
-rw-r--r--device.c43
-rw-r--r--device.h7
-rw-r--r--dvbdevice.c123
-rw-r--r--dvbplayer.c3
-rw-r--r--eit.c43
-rw-r--r--tools.c4
-rw-r--r--vdr.c5
11 files changed, 181 insertions, 100 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 1431bf7..642d445 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -147,6 +147,10 @@ Stefan Huelswitt <huels@iname.com>
for improving cCondVar::Wait() and implementing cCondVar::TimedWait()
for reporting a bug when entering an integer value outside the limit
for adding play mode pmAudioOnlyBlack
+ for helping to fix starting a recording of the current channel with only one DVB card
+ for making cStatus::MsgChannelSwitch() only be called if a channel is actually going to
+ be switched or has actually been switched successfully
+ for adding a missing StripAudioPackets() to cDvbPlayer::Action()
Ulrich Röder <roeder@efr-net.de>
for pointing out that there are channels that have a symbol rate higher than
@@ -169,6 +173,7 @@ Andreas Schultz <aschultz@warp10.net>
for adding cDevice::NewOsd() to allow a derived cDevice class to implement its own
OSD capabilities
for implementing an SPU decoder
+ for fixing opening /dev/video in cDvbDevice::GrabImage() in case of NEWSTRUCT driver
Aaron Holtzman
for writing 'ac3dec'
@@ -391,3 +396,6 @@ Holger Wächtler <holger@convergence.de>
Jürgen Zimmermann <jnzimmer@informatik.uni-kl.de>
for adding some missing #includes to files in libdtv for gcc 3.2
+
+Helmut Auer <vdr@helmutauer.de>
+ for reporting a superfluous error message in cLockFile.
diff --git a/HISTORY b/HISTORY
index bfecec8..d464a22 100644
--- a/HISTORY
+++ b/HISTORY
@@ -1459,3 +1459,22 @@ Video Disk Recorder Revision History
- Fixed a crash when entering an integer value outside the limits (thanks to
Stefan Huelswitt for reporting this one).
- Added play mode pmAudioOnlyBlack (thanks to Stefan Huelswitt).
+
+2002-09-15: Version 1.1.10
+
+- Removed a superfluous error message from cLockFile::Unlock() (reported by
+ Helmut Auer).
+- Fixed starting a recording of the current channel with only one DVB card
+ (thanks to Stefan Huelswitt for his help).
+- A previous 'Transfer Mode' is now automatically re-started after a replay
+ stops.
+- Only calling cStatus::MsgChannelSwitch() if a channel is actually going to
+ be switched or has actually been switched successfully (thanks to Stefan
+ Huelswitt).
+- The EPG now drops events from "other" streams that have a duration of 86400
+ seconds or more (this avoids bogus entries like "PROGRAMMES ALLEMANDS").
+- Fixed opening /dev/video in cDvbDevice::GrabImage() in case of NEWSTRUCT
+ driver (thanks to Andreas Schultz).
+- Added a missing StripAudioPackets() to cDvbPlayer::Action() (thanks to
+ Stefan Huelswitt).
+- Added an EPG bugfix for the latest VOX EPG data format.
diff --git a/channels.conf b/channels.conf
index 09cf433..ad868d9 100644
--- a/channels.conf
+++ b/channels.conf
@@ -7,7 +7,7 @@ BR3:11837:h:0:27500:201:202:204:0:28107
Hessen-3:11837:h:0:27500:301:302:304:0:28108
N3:12110:h:0:27500:2401:2402:2404:0:28224
SR3:11837:h:0:27500:501:502:504:0:28110
-WDR:11837:h:0:27500:601:602:0:0:28111
+WDR:11837:h:0:27500:601:602:604:0:28111
BR-alpha:11837:h:0:27500:701:702:704:0:28112
SWR BW:11837:h:0:27500:801:802:804:0:28113
Phoenix:11837:h:0:27500:901:902:904:0:28114
@@ -21,10 +21,10 @@ ORF Sat:11954:h:0:27500:506:507:0:0:28010
ZDF.info:11954:h:0:27500:610:620:0:0:28011
CNN:12168:v:0:27500:165:100:0:0:28512
Super RTL:12188:h:0:27500:165:120:65:0:12040
-VOX:12188:h:0:27500:167:136:0:0:12060
+VOX:12188:h:0:27500:167:136:71:0:12060
DW TV:10788:v:0:22000:305:306:0:0:8905
Kabel 1:12480:v:0:27500:511:512:33:0:899
-Neun Live:12480:v:0:27500:767:768:0:0:897
+Neun Live:12480:v:0:27500:767:768:35:0:897
DSF:12480:v:0:27500:1023:1024:0:0:900
HOT:12480:v:0:27500:1279:1280:0:0:40
Bloomberg TV Germany:12551:v:0:22000:162:99:0:0:12160
@@ -46,7 +46,7 @@ MDR:12110:h:0:27500:401:402:404:0:28204
NICK-PARAMOUNT:12246:v:0:27500:167:108:0:0:29312
ORB:12110:h:0:27500:501:502:504:0:28205
B1:12110:h:0:27500:601:602:604:0:28206
-ARD Online-Kanal:12722:h:0:22000:700:701:0:0:0
+ARD Online-Kanal:12722:h:0:22000:0:701:0:0:0
:Premiere World
Premiere Start:11797:h:0:27500:255:256:0:101:8
Premiere 1:11797:h:0:27500:511:512,513;515:0:101:10
@@ -78,7 +78,7 @@ Premiere Direkt 2B:11719:h:0:27500:767:768;769:0:101:181
Premiere Direkt 3A:11719:h:0:27500:511:512;515:0:101:180
Premiere Direkt 3B:11719:h:0:27500:1279:1280;1283:0:101:183
Premiere Direkt 4A:12031:h:0:27500:2815:2816:0:101:18
-Premiere Direkt 4B:12070:h:0:27500:1535:1536:0:101:216
+:#Premiere Direkt 4B:12070:h:0:27500:1535:1536:0:101:216
:PW Erotic
Beate-Uhse.TV:11758:h:0:27500:1023:1024:0:101:21
Premiere Erotik 1:12031:h:0:27500:1279:1280:0:101:513
@@ -89,11 +89,11 @@ Premiere Erotik 4:11719:h:0:27500:3583:3584:0:101:780
Premiere Sport 1:11720:h:0:27500:255:256,257:0:101:17
Premiere Sport 2:12031:h:0:27500:3839:3840:0:101:27
:Formel 1
-Supersignal:12070:h:0:27500:255:256:0:101:211
-Cockpitkanal:12070:h:0:27500:511:512:0:101:212
-Boxengasse:12070:h:0:27500:767:768:0:101:213
-Verfolgerfeld:12070:h:0:27500:1023:1024:0:101:214
-Infokanal:12070:h:0:27500:1279:1280:0:101:215
+:#Supersignal:12070:h:0:27500:255:256:0:101:211
+:#Cockpitkanal:12070:h:0:27500:511:512:0:101:212
+:#Boxengasse:12070:h:0:27500:767:768:0:101:213
+:#Verfolgerfeld:12070:h:0:27500:1023:1024:0:101:214
+:#Infokanal:12070:h:0:27500:1279:1280:0:101:215
Multikanal:11720:h:0:27500:255:256:0:101:17
:Beta Digital
N24:12480:v:0:27500:2047:2048:0:0:47
@@ -111,7 +111,7 @@ BuLi 7:11719:h:0:27500:3327:3328,3329:0:101:245
BuLi 8:12031:h:0:27500:3071:3072,3073:0:101:208
BuLi 9:12031:h:0:27500:3327:3328,3329:0:101:209
:
-TV Niepokalanow:11876:h:0:27500:305:321:0:0:20601
+:#TV Niepokalanow:11876:h:0:27500:305:321:0:0:20601
Mosaico:11934:v:0:27500:165:100:0:0:29010
Andalucia TV:11934:v:0:27500:166:104:0:0:29011
TVC Internacional:11934:v:0:27500:167:108:0:0:0
diff --git a/config.h b/config.h
index bbc006b..85e14dd 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.126 2002/09/04 11:04:55 kls Exp $
+ * $Id: config.h 1.127 2002/09/09 21:35:55 kls Exp $
*/
#ifndef __CONFIG_H
@@ -20,7 +20,7 @@
#include "eit.h"
#include "tools.h"
-#define VDRVERSION "1.1.9"
+#define VDRVERSION "1.1.10"
#define MAXPRIORITY 99
#define MAXLIFETIME 99
diff --git a/device.c b/device.c
index 72f1fc6..830c3ef 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 1.19 2002/09/08 14:03:43 kls Exp $
+ * $Id: device.c 1.21 2002/09/15 11:50:19 kls Exp $
*/
#include "device.h"
@@ -47,6 +47,8 @@ cDevice::cDevice(void)
player = NULL;
+ playerDetached = false;
+
for (int i = 0; i < MAXRECEIVERS; i++)
receiver[i] = NULL;
ca = -1;
@@ -108,6 +110,13 @@ bool cDevice::HasDecoder(void) const
return false;
}
+bool cDevice::PlayerDetached(void)
+{
+ bool result = playerDetached;
+ playerDetached = false;
+ return result;
+}
+
cOsdBase *cDevice::NewOsd(int x, int y)
{
return NULL;
@@ -317,8 +326,6 @@ bool cDevice::SwitchChannel(int Direction)
eSetChannelResult cDevice::SetChannel(const cChannel *Channel, bool LiveView)
{
- cStatus::MsgChannelSwitch(this, 0);
-
if (LiveView)
StopReplay();
@@ -335,6 +342,7 @@ eSetChannelResult cDevice::SetChannel(const cChannel *Channel, bool LiveView)
if (NeedsTransferMode) {
cDevice *CaDevice = GetDevice(Channel, 0);
if (CaDevice) {
+ cStatus::MsgChannelSwitch(this, 0); // only report status if we are actually going to switch the channel
if (CaDevice->SetChannel(Channel, false) == scrOk) // calling SetChannel() directly, not SwitchChannel()!
cControl::Launch(new cTransferControl(CaDevice, Channel->vpid, Channel->apid1, 0, 0, 0));//XXX+
else
@@ -343,15 +351,19 @@ eSetChannelResult cDevice::SetChannel(const cChannel *Channel, bool LiveView)
else
Result = scrNotAvailable;
}
- else if (!SetChannelDevice(Channel, LiveView))
- Result = scrFailed;
-
- if (Result == scrOk && LiveView && IsPrimaryDevice()) {
- cSIProcessor::SetCurrentServiceID(Channel->pnr);
- currentChannel = Channel->number;
+ else {
+ cStatus::MsgChannelSwitch(this, 0); // only report status if we are actually going to switch the channel
+ if (!SetChannelDevice(Channel, LiveView))
+ Result = scrFailed;
}
- cStatus::MsgChannelSwitch(this, Channel->number);
+ if (Result == scrOk) {
+ if (LiveView && IsPrimaryDevice()) {
+ cSIProcessor::SetCurrentServiceID(Channel->pnr);
+ currentChannel = Channel->number;
+ }
+ cStatus::MsgChannelSwitch(this, Channel->number); // only report status if channel switch successfull
+ }
return Result;
}
@@ -438,6 +450,7 @@ void cDevice::Detach(cPlayer *Player)
player->device = NULL;
player = NULL;
SetPlayMode(pmNone);
+ playerDetached = true;
}
}
@@ -447,16 +460,6 @@ void cDevice::StopReplay(void)
Detach(player);
if (IsPrimaryDevice())
cControl::Shutdown();
- /*XXX+
- if (IsPrimaryDevice()) {
- // let's explicitly switch the channel back in case it was in Transfer Mode:
- cChannel *Channel = Channels.GetByNumber(currentChannel);
- if (Channel) {
- Channel->Switch(this, false);
- usleep(100000); // allow driver to sync in case a new replay will start immediately
- }
- }
- XXX*/
}
}
diff --git a/device.h b/device.h
index 0d10793..2366237 100644
--- a/device.h
+++ b/device.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: device.h 1.16 2002/09/08 14:56:21 kls Exp $
+ * $Id: device.h 1.18 2002/09/14 15:24:47 kls Exp $
*/
#ifndef __DEVICE_H
@@ -177,7 +177,7 @@ private:
bool active;
virtual void Action(void);
protected:
- enum ePidType { ptVideo, ptAudio, ptTeletext, ptDolby, ptOther };
+ enum ePidType { ptAudio, ptVideo, ptTeletext, ptDolby, ptOther };
class cPidHandle {
public:
int pid;
@@ -236,6 +236,7 @@ public:
private:
cPlayer *player;
+ bool playerDetached;
protected:
virtual bool SetPlayMode(ePlayMode PlayMode);
// Sets the device into the given play mode.
@@ -276,6 +277,8 @@ public:
// Attaches the given player to this device.
void Detach(cPlayer *Player);
// Detaches the given player from this device.
+ bool PlayerDetached(void);
+ // Returns true if a player has been detached and resets the 'playerDetached' flag.
// Receiver facilities
diff --git a/dvbdevice.c b/dvbdevice.c
index a130112..0ba7c25 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 1.13 2002/09/08 15:00:46 kls Exp $
+ * $Id: dvbdevice.c 1.19 2002/09/15 13:12:25 kls Exp $
*/
#include "dvbdevice.h"
@@ -200,7 +200,11 @@ cSpuDecoder *cDvbDevice::GetSpuDecoder(void)
bool cDvbDevice::GrabImage(const char *FileName, bool Jpeg, int Quality, int SizeX, int SizeY)
{
- int videoDev = DvbOpen(DEV_VIDEO, CardIndex(), O_RDWR, true);
+ char buffer[PATH_MAX];
+ snprintf(buffer, sizeof(buffer), "%s%d", DEV_VIDEO, CardIndex());
+ int videoDev = open(buffer, O_RDWR);
+ if (videoDev < 0)
+ LOG_ERROR_STR(buffer);
if (videoDev >= 0) {
int result = 0;
struct video_mbuf mbuf;
@@ -297,51 +301,44 @@ void cDvbDevice::SetVideoFormat(bool VideoFormat16_9)
CHECK(ioctl(fd_video, VIDEO_SET_FORMAT, VideoFormat16_9 ? VIDEO_FORMAT_16_9 : VIDEO_FORMAT_4_3));
}
-// ptVideo ptAudio ptTeletext ptDolby ptOther
-dmxPesType_t PesTypes[] = { DMX_PES_VIDEO, DMX_PES_AUDIO, DMX_PES_TELETEXT, DMX_PES_OTHER, DMX_PES_OTHER };
+// ptAudio ptVideo ptTeletext ptDolby ptOther
+dmxPesType_t PesTypes[] = { DMX_PES_AUDIO, DMX_PES_VIDEO, DMX_PES_TELETEXT, DMX_PES_OTHER, DMX_PES_OTHER };
bool cDvbDevice::SetPid(cPidHandle *Handle, int Type, bool On)
{
if (Handle->pid) {
+ dmxPesFilterParams pesFilterParams;
+ memset(&pesFilterParams, 0, sizeof(pesFilterParams));
if (On) {
if (Handle->handle < 0) {
Handle->handle = DvbOpen(DEV_DVB_DEMUX, CardIndex(), O_RDWR | O_NONBLOCK, true);
if (Handle->handle < 0)
return false;
}
+ pesFilterParams.pid = Handle->pid;
+ pesFilterParams.input = DMX_IN_FRONTEND;
+ pesFilterParams.output = (Type <= ptTeletext && Handle->used <= 1) ? DMX_OUT_DECODER : DMX_OUT_TS_TAP;
+ pesFilterParams.pesType = PesTypes[Type < ptOther ? Type : ptOther];
+ pesFilterParams.flags = DMX_IMMEDIATE_START;
+ if (ioctl(Handle->handle, DMX_SET_PES_FILTER, &pesFilterParams) < 0) {
+ LOG_ERROR;
+ return false;
+ }
}
- else {
+ else if (!Handle->used) {
CHECK(ioctl(Handle->handle, DMX_STOP));
- if (Handle->used == 0) {
- dmxPesFilterParams pesFilterParams;
- memset(&pesFilterParams, 0, sizeof(pesFilterParams));
+ if (Type <= ptTeletext) {
pesFilterParams.pid = 0x1FFF;
pesFilterParams.input = DMX_IN_FRONTEND;
pesFilterParams.output = DMX_OUT_DECODER;
- pesFilterParams.pesType = PesTypes[Type < ptOther ? Type : ptOther];
+ pesFilterParams.pesType = PesTypes[Type];
pesFilterParams.flags = DMX_IMMEDIATE_START;
CHECK(ioctl(Handle->handle, DMX_SET_PES_FILTER, &pesFilterParams));
close(Handle->handle);
Handle->handle = -1;
- return true;
- }
- }
-
- if (Handle->pid != 0x1FFF) {
- dmxPesFilterParams pesFilterParams;
- memset(&pesFilterParams, 0, sizeof(pesFilterParams));
- pesFilterParams.pid = Handle->pid;
- pesFilterParams.input = DMX_IN_FRONTEND;
- pesFilterParams.output = (Type <= ptTeletext && Handle->used <= 1) ? DMX_OUT_DECODER : DMX_OUT_TS_TAP;
- pesFilterParams.pesType = PesTypes[Type < ptOther ? Type : ptOther];
- pesFilterParams.flags = DMX_IMMEDIATE_START;
- //XXX+ pesFilterParams.flags = DMX_CHECK_CRC;//XXX
- if (ioctl(Handle->handle, DMX_SET_PES_FILTER, &pesFilterParams) < 0) {
- LOG_ERROR;
- return false;
+ if (PesTypes[Type] == DMX_PES_VIDEO) // let's only do this once
+ SetPlayMode(pmNone); // necessary to switch a PID from DMX_PES_VIDEO/AUDIO to DMX_PES_OTHER
}
- //XXX+ CHECK(ioctl(Handle->handle, DMX_SET_BUFFER_SIZE, KILOBYTE(32)));//XXX
- //XXX+ CHECK(ioctl(Handle->handle, DMX_START));//XXX
}
}
return true;
@@ -362,8 +359,8 @@ bool cDvbDevice::ProvidesChannel(const cChannel *Channel, int Priority, bool *Ne
needsDetachReceivers = true;
result = hasPriority;
}
- else if (!HasDecoder())
- result = true; // if it has no decoder it can't be the primary device
+ else if (!IsPrimaryDevice())
+ result = true;
else {
#define DVB_DRIVER_VERSION 2002090101 //XXX+
#define MIN_DVB_DRIVER_VERSION_FOR_TIMESHIFT 2002090101
@@ -397,30 +394,52 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView)
LiveView = true;
#endif
- // Avoid noise while switching:
+ bool DoTune = frequency != Channel->frequency; // TODO will be changed when DiSEqC handling is revised
- if (HasDecoder()) {
- CHECK(ioctl(fd_audio, AUDIO_SET_MUTE, true));
- CHECK(ioctl(fd_video, VIDEO_SET_BLANK, true));
- CHECK(ioctl(fd_audio, AUDIO_CLEAR_BUFFER));
- CHECK(ioctl(fd_video, VIDEO_CLEAR_BUFFER));
- }
+ bool TurnOffLivePIDs = HasDecoder()
+ && (DoTune
+ || Channel->ca > CACONFBASE && pidHandles[ptVideo].pid != Channel->vpid // CA channels can only be decrypted in "live" mode
+ || IsPrimaryDevice()
+ && (LiveView // for a new live view the old PIDs need to be turned off
+ || pidHandles[ptVideo].pid == Channel->vpid // for recording the PIDs must be shifted from DMX_PES_AUDIO/VIDEO to DMX_PES_OTHER
+ )
+ );
+
+ bool StartTransferMode = IsPrimaryDevice() && !DoTune
+ && (LiveView && HasPid(Channel->vpid) && pidHandles[ptVideo].pid != Channel->vpid // the PID is already set as DMX_PES_OTHER
+ || !LiveView && pidHandles[ptVideo].pid == Channel->vpid // a recording is going to shift the PIDs from DMX_PES_AUDIO/VIDEO to DMX_PES_OTHER
+ );
+
+ bool TurnOnLivePIDs = HasDecoder() && !StartTransferMode
+ && (Channel->ca > CACONFBASE // CA channels can only be decrypted in "live" mode
+ || LiveView
+ );
// Stop setting system time:
if (siProcessor)
siProcessor->SetCurrentTransponder(0);
- // Turn off current PIDs:
+ // Turn off live PIDs if necessary:
+
+ if (TurnOffLivePIDs) {
+
+ // Avoid noise while switching:
+
+ CHECK(ioctl(fd_audio, AUDIO_SET_MUTE, true));
+ CHECK(ioctl(fd_video, VIDEO_SET_BLANK, true));
+ CHECK(ioctl(fd_audio, AUDIO_CLEAR_BUFFER));
+ CHECK(ioctl(fd_video, VIDEO_CLEAR_BUFFER));
+
+ // Turn off live PIDs:
- if (HasDecoder() && (LiveView || pidHandles[ptVideo].pid == Channel->vpid)) {
- DelPid(pidHandles[ptVideo].pid);
DelPid(pidHandles[ptAudio].pid);
+ DelPid(pidHandles[ptVideo].pid);
DelPid(pidHandles[ptTeletext].pid);
DelPid(pidHandles[ptDolby].pid);
}
- if (frequency != Channel->frequency || Channel->ca > CACONFBASE) { // CA channels can only be decrypted in "live" mode
+ if (DoTune) {
#ifdef NEWSTRUCT
dvb_frontend_parameters Frontend;
@@ -602,21 +621,19 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView)
// PID settings:
- if (HasDecoder() && (LiveView || Channel->ca > CACONFBASE)) { // CA channels can only be decrypted in "live" mode
- if (!HasPid(Channel->vpid)) {
- if (!(AddPid(Channel->vpid, ptVideo) && AddPid(Channel->apid1, ptAudio))) {//XXX+ dolby dpid1!!! (if audio plugins are attached)
- esyslog("ERROR: failed to set PIDs for channel %d", Channel->number);
- return false;
- }
- if (IsPrimaryDevice())
- AddPid(Channel->tpid, ptTeletext);
- CHECK(ioctl(fd_audio, AUDIO_SET_AV_SYNC, true));
- CHECK(ioctl(fd_audio, AUDIO_SET_MUTE, false));
- CHECK(ioctl(fd_video, VIDEO_SET_BLANK, false));
+ if (TurnOnLivePIDs) {
+ if (!(AddPid(Channel->apid1, ptAudio) && AddPid(Channel->vpid, ptVideo))) {//XXX+ dolby dpid1!!! (if audio plugins are attached)
+ esyslog("ERROR: failed to set PIDs for channel %d on device %d", Channel->number, CardIndex() + 1);
+ return false;
}
- else
- cControl::Launch(new cTransferControl(this, Channel->vpid, Channel->apid1, 0, 0, 0));
+ if (IsPrimaryDevice())
+ AddPid(Channel->tpid, ptTeletext);
+ CHECK(ioctl(fd_audio, AUDIO_SET_AV_SYNC, true));
+ CHECK(ioctl(fd_audio, AUDIO_SET_MUTE, false));
+ CHECK(ioctl(fd_video, VIDEO_SET_BLANK, false));
}
+ else if (StartTransferMode)
+ cControl::Launch(new cTransferControl(this, Channel->vpid, Channel->apid1, 0, 0, 0));
// Start setting system time:
diff --git a/dvbplayer.c b/dvbplayer.c
index 7a6d76d..7edadfb 100644
--- a/dvbplayer.c
+++ b/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.12 2002/08/24 14:59:35 kls Exp $
+ * $Id: dvbplayer.c 1.13 2002/09/15 13:33:31 kls Exp $
*/
#include "dvbplayer.h"
@@ -353,6 +353,7 @@ void cDvbPlayer::Action(void)
continue;
}
r = ReadFrame(replayFile, b, Length, sizeof(b));
+ StripAudioPackets(b, r, 0xC0); //XXX+ audioTrack
}
else // allows replay even if the index file is missing
r = read(replayFile, b, sizeof(b));
diff --git a/eit.c b/eit.c
index 8659049..d4912c2 100644
--- a/eit.c
+++ b/eit.c
@@ -16,7 +16,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * $Id: eit.c 1.49 2002/08/25 10:43:36 kls Exp $
+ * $Id: eit.c 1.51 2002/09/15 14:35:32 kls Exp $
***************************************************************************/
#include "eit.h"
@@ -405,7 +405,7 @@ bool cEventInfo::Read(FILE *f, cSchedule *Schedule)
return false;
}
-#define MAXEPGBUGFIXSTATS 5
+#define MAXEPGBUGFIXSTATS 6
#define MAXEPGBUGFIXCHANS 50
struct tEpgBugFixStats {
int hits;
@@ -485,6 +485,32 @@ void cEventInfo::FixEpgBugs(void)
// EPG data. Let's fix their bugs as good as we can:
if (pTitle) {
+ // VOX puts too much information into the Subtitle and leaves the Extended
+ // Description empty:
+ //
+ // Title
+ // (NAT, Year Min')[ ["Subtitle". ]Extended Description]
+ //
+ if (pSubtitle && !pExtendedDescription) {
+ if (*pSubtitle == '(') {
+ char *e = strchr(pSubtitle + 1, ')');
+ if (e) {
+ if (*(e + 1)) {
+ if (*++e == ' ')
+ if (*(e + 1) == '"')
+ e++;
+ }
+ else
+ e = NULL;
+ char *s = e ? strdup(e) : NULL;
+ free(pSubtitle);
+ pSubtitle = s;
+ EpgBugFixStat(0, GetServiceID());
+ // now the fixes #1 and #2 below will handle the rest
+ }
+ }
+ }
+
// VOX and VIVA put the Subtitle in quotes and use either the Subtitle
// or the Extended Description field, depending on how long the string is:
//
@@ -504,7 +530,7 @@ void cEventInfo::FixEpgBugs(void)
free(pExtendedDescription);
pSubtitle = s;
pExtendedDescription = d;
- EpgBugFixStat(0, GetServiceID());
+ EpgBugFixStat(1, GetServiceID());
}
}
}
@@ -521,7 +547,7 @@ void cEventInfo::FixEpgBugs(void)
memmove(pSubtitle, pSubtitle + 1, strlen(pSubtitle));
pExtendedDescription = pSubtitle;
pSubtitle = NULL;
- EpgBugFixStat(1, GetServiceID());
+ EpgBugFixStat(2, GetServiceID());
}
}
@@ -533,7 +559,7 @@ void cEventInfo::FixEpgBugs(void)
if (pSubtitle && strcmp(pTitle, pSubtitle) == 0) {
free(pSubtitle);
pSubtitle = NULL;
- EpgBugFixStat(2, GetServiceID());
+ EpgBugFixStat(3, GetServiceID());
}
// ZDF.info puts the Subtitle between double quotes, which is nothing
@@ -549,7 +575,7 @@ void cEventInfo::FixEpgBugs(void)
char *p = strrchr(pSubtitle, '"');
if (p)
*p = 0;
- EpgBugFixStat(3, GetServiceID());
+ EpgBugFixStat(4, GetServiceID());
}
}
@@ -570,7 +596,7 @@ void cEventInfo::FixEpgBugs(void)
if (*p == '-' && *(p + 1) == ' ' && *(p + 2) && islower(*(p - 1)) && islower(*(p + 2))) {
if (!startswith(p + 2, "und ")) { // special case in German, as in "Lach- und Sachgeschichten"
memmove(p, p + 2, strlen(p + 2) + 1);
- EpgBugFixStat(4, GetServiceID());
+ EpgBugFixStat(5, GetServiceID());
}
}
p++;
@@ -895,6 +921,9 @@ int cEIT::ProcessEIT(unsigned char *buffer)
if (VdrProgramInfos) {
for (VdrProgramInfo = (struct VdrProgramInfo *) VdrProgramInfos->Head; VdrProgramInfo; VdrProgramInfo = (struct VdrProgramInfo *) xSucc (VdrProgramInfo)) {
+ // Drop events that belong to an "other TS" and are very long (some stations broadcast bogus data for "other" channels):
+ if (VdrProgramInfo->Duration >= 86400 && (tid == 0x4F || tid == 0x60 || tid == 0x61))
+ continue;
pSchedule = (cSchedule *)schedules->GetSchedule(VdrProgramInfo->ServiceID);
if (!pSchedule) {
schedules->Add(new cSchedule(VdrProgramInfo->ServiceID));
diff --git a/tools.c b/tools.c
index 29c5f2d..b3b64fc 100644
--- a/tools.c
+++ b/tools.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: tools.c 1.70 2002/08/16 13:43:40 kls Exp $
+ * $Id: tools.c 1.71 2002/09/09 21:35:49 kls Exp $
*/
#include "tools.h"
@@ -739,8 +739,6 @@ void cLockFile::Unlock(void)
remove(fileName);
f = -1;
}
- else
- esyslog("ERROR: attempt to unlock %s without holding a lock!", fileName);
}
// --- cListObject -----------------------------------------------------------
diff --git a/vdr.c b/vdr.c
index 355a515..1f38af4 100644
--- a/vdr.c
+++ b/vdr.c
@@ -22,7 +22,7 @@
*
* The project's page is at http://www.cadsoft.de/people/kls/vdr
*
- * $Id: vdr.c 1.122 2002/09/08 11:19:01 kls Exp $
+ * $Id: vdr.c 1.123 2002/09/15 11:08:35 kls Exp $
*/
#include <getopt.h>
@@ -400,6 +400,9 @@ int main(int argc, char *argv[])
}
// Attach launched player control:
cControl::Attach();
+ // Make sure Transfer-Mode is re-started after detaching a player:
+ if (cDevice::PrimaryDevice()->PlayerDetached() && !cDevice::PrimaryDevice()->Replaying())
+ Channels.SwitchTo(cDevice::CurrentChannel());
// Restart the Watchdog timer:
if (WatchdogTimeout > 0) {
int LatencyTime = WatchdogTimeout - alarm(WatchdogTimeout);