summaryrefslogtreecommitdiff
path: root/dvbdevice.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2007-08-19 18:00:00 +0200
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2007-08-19 18:00:00 +0200
commite5a2aa41c9762bda4ce7b987aba1bcfa1cee6f70 (patch)
treecb794be1f7796ccbfdd1ce04bca0d75d997ead0b /dvbdevice.c
parent4c65b525dc1e3c62336b223d200a46fb30dc7e52 (diff)
downloadvdr-patch-lnbsharing-e5a2aa41c9762bda4ce7b987aba1bcfa1cee6f70.tar.gz
vdr-patch-lnbsharing-e5a2aa41c9762bda4ce7b987aba1bcfa1cee6f70.tar.bz2
Version 1.5.8vdr-1.5.8
- Added missing install-i18n to the install target in the Makefile (reported by Joachim Wilke). - Fixed a faulty comment in Make.config.template (reported by Marco Schlüßler). - Improved i18n-to-gettext.pl (thanks to Matthias Schwarzott). - Moved the "all" target in plugin Makefiles before the "Implicit rules", so that a plain "make" will compile everything (suggested by Matthias Schwarzott). The "newplugin" script has been changed accordingly. Plugin authors may want to change their Makefiles, too. - Added DESTDIR and PREFIX handling to the Makefile (thanks to Matthias Schwarzott). - Updated the Finnish OSD texts (thanks to Rolf Ahrenberg). - Added internationalization to the "skincurses" plugin (thanks to Rolf Ahrenberg). - Checking the string for NULL in I18nTranslate(). - Updated the French OSD texts (thanks to Bruno Roussel). - Some optimizations in cDvbDevice::SetChannelDevice() (thanks to Tobias Bratfisch). - Optimized cMenuEditChrItem::Set() (thanks to Tobias Bratfisch). - Optimized cNitFilter::Process() (thanks to Tobias Bratfisch). - Reduced the number of time(NULL) calls in vdr.c's main loop to a single call (thanks to Tobias Bratfisch). - Changed cBitmap::DrawText() to always draw the background unless ColorBg is clrTransparent (thanks to Christoph Haubrich). - The "Setup/OSD/Language" menu now only shows those languages that actually have a locale (suggested by Anssi Hannula). - Now using setenv() instead of setlocale() to set the language for gettext() (suggested by Anssi Hannula; thanks also to Ludwig Nussel for a hint on using _nl_msg_cat_cntr). - When scanning the locale directory, VDR now explicitly looks for a file named vdr.mo. Text files for plugins are now named "vdr-name.mo", when "name" is the name of the plugin. The "newplugin" script has been changed accordingly, and plugin authors should change their Makefiles, too.
Diffstat (limited to 'dvbdevice.c')
-rw-r--r--dvbdevice.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/dvbdevice.c b/dvbdevice.c
index 8757710..7d1a5c8 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.164 2007/02/25 11:46:52 kls Exp $
+ * $Id: dvbdevice.c 1.165 2007/08/17 13:37:56 kls Exp $
*/
#include "dvbdevice.h"
@@ -793,18 +793,25 @@ bool cDvbDevice::IsTunedToTransponder(const cChannel *Channel)
bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView)
{
+ int apid = Channel->Apid(0);
+ int vpid = Channel->Vpid();
+ int dpid = Channel->Dpid(0);
+
bool DoTune = !dvbTuner->IsTunedTo(Channel);
+ bool pidHandlesVideo = pidHandles[ptVideo].pid == vpid;
+ bool pidHandlesAudio = pidHandles[ptAudio].pid == apid;
+
bool TurnOffLivePIDs = HasDecoder()
&& (DoTune
|| !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
+ || pidHandlesVideo // for recording the PIDs must be shifted from DMX_PES_AUDIO/VIDEO to DMX_PES_OTHER
);
bool StartTransferMode = IsPrimaryDevice() && !DoTune
- && (LiveView && HasPid(Channel->Vpid() ? Channel->Vpid() : Channel->Apid(0)) && (pidHandles[ptVideo].pid != Channel->Vpid() || (pidHandles[ptAudio].pid != Channel->Apid(0) && (Channel->Dpid(0) ? pidHandles[ptAudio].pid != Channel->Dpid(0) : true)))// the PID is already set as DMX_PES_OTHER
- || !LiveView && (pidHandles[ptVideo].pid == Channel->Vpid() || pidHandles[ptAudio].pid == Channel->Apid(0)) // a recording is going to shift the PIDs from DMX_PES_AUDIO/VIDEO to DMX_PES_OTHER
+ && (LiveView && HasPid(vpid ? vpid : apid) && (!pidHandlesVideo || (!pidHandlesAudio && (dpid ? pidHandles[ptAudio].pid != dpid : true)))// the PID is already set as DMX_PES_OTHER
+ || !LiveView && (pidHandlesVideo || pidHandlesAudio) // a recording is going to shift the PIDs from DMX_PES_AUDIO/VIDEO to DMX_PES_OTHER
);
if (CamSlot() && !ChannelCamRelations.CamDecrypt(Channel->GetChannelID(), CamSlot()->SlotNumber()))
StartTransferMode |= LiveView && IsPrimaryDevice() && Channel->Ca() >= CA_ENCRYPTED_MIN;
@@ -836,7 +843,7 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView)
if (TurnOnLivePIDs) {
SetAudioBypass(false);
- if (!(AddPid(Channel->Ppid(), ptPcr) && AddPid(Channel->Vpid(), ptVideo) && AddPid(Channel->Apid(0), ptAudio))) {
+ if (!(AddPid(Channel->Ppid(), ptPcr) && AddPid(vpid, ptVideo) && AddPid(apid, ptAudio))) {
esyslog("ERROR: failed to set PIDs for channel %d on device %d", Channel->Number(), CardIndex() + 1);
return false;
}
@@ -848,7 +855,7 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView)
CHECK(ioctl(fd_audio, AUDIO_SET_AV_SYNC, true));
}
else if (StartTransferMode)
- cControl::Launch(new cTransferControl(this, Channel->GetChannelID(), Channel->Vpid(), Channel->Apids(), Channel->Dpids(), Channel->Spids()));
+ cControl::Launch(new cTransferControl(this, Channel->GetChannelID(), vpid, Channel->Apids(), Channel->Dpids(), Channel->Spids()));
return true;
}