summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY1
-rw-r--r--device.c13
-rw-r--r--device.h8
-rw-r--r--menu.c3
4 files changed, 18 insertions, 7 deletions
diff --git a/HISTORY b/HISTORY
index 3c28c07d..b8351eb5 100644
--- a/HISTORY
+++ b/HISTORY
@@ -4521,3 +4521,4 @@ Video Disk Recorder Revision History
- Reintroduced the log message "deleting plugin: ..." when shutting down VDR (upon
request by Ville Skyttä, as in the initial patch from Christoph Haubrich).
- Fixed the vdr.1 man page (a single DVB card can record and do live tv).
+- The preferred audio language is now automatically selected when starting replay.
diff --git a/device.c b/device.c
index b931527c..14b88178 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.127 2006/04/09 10:46:36 kls Exp $
+ * $Id: device.c 1.128 2006/04/14 14:34:43 kls Exp $
*/
#include "device.h"
@@ -790,14 +790,19 @@ void cDevice::SetVolume(int Volume, bool Absolute)
}
}
-void cDevice::ClrAvailableTracks(bool DescriptionsOnly)
+void cDevice::ClrAvailableTracks(bool DescriptionsOnly, bool IdsOnly)
{
if (DescriptionsOnly) {
for (int i = ttNone; i < ttMaxTrackTypes; i++)
*availableTracks[i].description = 0;
}
else {
- memset(availableTracks, 0, sizeof(availableTracks));
+ if (IdsOnly) {
+ for (int i = ttNone; i < ttMaxTrackTypes; i++)
+ availableTracks[i].id = 0;
+ }
+ else
+ memset(availableTracks, 0, sizeof(availableTracks));
pre_1_3_19_PrivateStream = false;
SetAudioChannel(0); // fall back to stereo
currentAudioTrackMissingCount = 0;
@@ -954,7 +959,7 @@ bool cDevice::AttachPlayer(cPlayer *Player)
pesAssembler->Reset();
player = Player;
if (!Transferring())
- ClrAvailableTracks();
+ ClrAvailableTracks(false, true);
SetPlayMode(player->playMode);
player->device = this;
player->Activate(true);
diff --git a/device.h b/device.h
index 23663e84..2a682a3a 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.74 2006/04/02 13:08:13 kls Exp $
+ * $Id: device.h 1.75 2006/04/14 14:35:13 kls Exp $
*/
#ifndef __DEVICE_H
@@ -356,7 +356,11 @@ protected:
virtual void SetAudioTrackDevice(eTrackType Type);
///< Sets the current audio track to the given value.
public:
- void ClrAvailableTracks(bool DescriptionsOnly = false);
+ void ClrAvailableTracks(bool DescriptionsOnly = false, bool IdsOnly = false);
+ ///< Clears the list of currently availabe tracks. If DescriptionsOnly
+ ///< is true, only the track descriptions will be cleared. With IdsOnly
+ ///< set to true only the ids will be cleared. IdsOnly is only taken
+ ///< into account if DescriptionsOnly is false.
bool SetAvailableTrack(eTrackType Type, int Index, uint16_t Id, const char *Language = NULL, const char *Description = NULL);
///< Sets the track of the given Type and Index to the given values.
///< Type must be one of the basic eTrackType values, like ttAudio or ttDolby.
diff --git a/menu.c b/menu.c
index fba03a32..bb72d9fa 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.428 2006/04/09 14:29:24 kls Exp $
+ * $Id: menu.c 1.429 2006/04/14 14:28:34 kls Exp $
*/
#include "menu.h"
@@ -3788,6 +3788,7 @@ cReplayControl::cReplayControl(void)
marks.Load(fileName);
cRecording Recording(fileName);
cStatus::MsgReplaying(this, Recording.Name(), Recording.FileName(), true);
+ SetTrackDescriptions(false);
}
cReplayControl::~cReplayControl()