summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MANUAL8
-rw-r--r--config.c5
-rw-r--r--config.h3
-rw-r--r--device.c12
-rw-r--r--menu.c3
5 files changed, 24 insertions, 7 deletions
diff --git a/MANUAL b/MANUAL
index 428f6e69..9de3ebeb 100644
--- a/MANUAL
+++ b/MANUAL
@@ -183,7 +183,7 @@ Version 1.2
selected for at least 3 seconds.
After switching to a different channel the channel number and name, as well
- as the current time are displayed at the top of the screen. If available, the
+ as the current time are displayed in the OSD. If available, the
'current/next' information will be displayed below this line. This display
automatically goes away after about five seconds, or if any key is pressed.
To bring up the channel display without switching channels you can press
@@ -208,6 +208,12 @@ Version 1.2
The "Audio" menu will automatically disappear after 5 seconds of user inactivity,
or if any key other than the ones described above is pressed.
+ Once a Dolby Digital track has been selected on any channel, further channel
+ switches will first search for a Dolby Digital track of one of the preferred
+ audio languages. If no such track can be found, a normal audio track will
+ be selected. Note that this only works is the broadcasters use actual language
+ codes in their PID data, not things like "dd" or "2ch".
+
* Switching through channel groups
If the 'channels.conf' file contains "group separators" you can switch
diff --git a/config.c b/config.c
index eb182154..dff8f8e4 100644
--- a/config.c
+++ b/config.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: config.c 1.129 2005/01/04 13:48:49 kls Exp $
+ * $Id: config.c 1.130 2005/01/08 10:31:19 kls Exp $
*/
#include "config.h"
@@ -298,6 +298,7 @@ cSetup::cSetup(void)
ResumeID = 0;
CurrentChannel = -1;
CurrentVolume = MAXVOLUME;
+ CurrentDolby = 0;
}
cSetup& cSetup::operator= (const cSetup &s)
@@ -452,6 +453,7 @@ bool cSetup::Parse(const char *Name, const char *Value)
else if (!strcasecmp(Name, "ResumeID")) ResumeID = atoi(Value);
else if (!strcasecmp(Name, "CurrentChannel")) CurrentChannel = atoi(Value);
else if (!strcasecmp(Name, "CurrentVolume")) CurrentVolume = atoi(Value);
+ else if (!strcasecmp(Name, "CurrentDolby")) CurrentDolby = atoi(Value);
else
return false;
return true;
@@ -513,6 +515,7 @@ bool cSetup::Save(void)
Store("ResumeID", ResumeID);
Store("CurrentChannel", CurrentChannel);
Store("CurrentVolume", CurrentVolume);
+ Store("CurrentDolby", CurrentDolby);
Sort();
diff --git a/config.h b/config.h
index 4c7b4947..9a275154 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.207 2005/01/04 13:47:38 kls Exp $
+ * $Id: config.h 1.208 2005/01/08 10:30:40 kls Exp $
*/
#ifndef __CONFIG_H
@@ -252,6 +252,7 @@ public:
int ResumeID;
int CurrentChannel;
int CurrentVolume;
+ int CurrentDolby;
int __EndData__;
cSetup(void);
cSetup& operator= (const cSetup &s);
diff --git a/device.c b/device.c
index a0162fe8..442d3f0e 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.71 2005/01/08 10:15:00 kls Exp $
+ * $Id: device.c 1.72 2005/01/08 13:48:19 kls Exp $
*/
#include "device.h"
@@ -541,6 +541,7 @@ eSetChannelResult cDevice::SetChannel(const cChannel *Channel, bool LiveView)
if (Result == scrOk) {
if (LiveView && IsPrimaryDevice()) {
+ currentChannel = Channel->Number();
// Set the available audio tracks:
ClrAvailableTracks();
currentAudioTrack = ttAudioFirst;
@@ -551,16 +552,21 @@ eSetChannelResult cDevice::SetChannel(const cChannel *Channel, bool LiveView)
// Select the preferred audio track:
eTrackType PreferredTrack = ttAudioFirst;
int LanguagePreference = -1;
- for (int i = ttAudioFirst; i <= ttDolbyLast; i++) {
+ int StartCheck = Setup.CurrentDolby ? ttDolbyFirst : ttAudioFirst;
+ int EndCheck = ttDolbyLast;
+ for (int i = StartCheck; i <= EndCheck; i++) {
const tTrackId *TrackId = GetTrack(eTrackType(i));
if (TrackId && TrackId->id && I18nIsPreferredLanguage(Setup.AudioLanguages, I18nLanguageIndex(TrackId->language), LanguagePreference))
PreferredTrack = eTrackType(i);
+ if (Setup.CurrentDolby && i == ttDolbyLast) {
+ i = ttAudioFirst - 1;
+ EndCheck = ttAudioLast;
+ }
}
// Make sure we're set to an available audio track:
const tTrackId *Track = GetTrack(GetCurrentAudioTrack());
if (!Track || !Track->id || PreferredTrack != GetCurrentAudioTrack())
SetCurrentAudioTrack(PreferredTrack);
- currentChannel = Channel->Number();
}
cStatus::MsgChannelSwitch(this, Channel->Number()); // only report status if channel switch successfull
}
diff --git a/menu.c b/menu.c
index 1e8f1e4f..a82f6b21 100644
--- a/menu.c
+++ b/menu.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: menu.c 1.330 2005/01/08 10:15:00 kls Exp $
+ * $Id: menu.c 1.331 2005/01/08 10:46:44 kls Exp $
*/
#include "menu.h"
@@ -2951,6 +2951,7 @@ eOSState cDisplayTracks::ProcessKey(eKeys Key)
if (track != oldTrack) {
Show();
cDevice::PrimaryDevice()->SetCurrentAudioTrack(types[track]);
+ Setup.CurrentDolby = IS_DOLBY_TRACK(types[track]);
}
return timeout.TimedOut() ? osEnd : osContinue;
}