1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Fixed displaying the current audio track in the channel display

This commit is contained in:
Klaus Schmidinger 2006-01-29 11:15:08 +01:00
parent e93ff79da8
commit f03ed68807
2 changed files with 10 additions and 7 deletions

View File

@ -4228,7 +4228,7 @@ Video Disk Recorder Revision History
- Fixed handling the '0' key for switching between the last two channels (thanks - Fixed handling the '0' key for switching between the last two channels (thanks
to Thomas Bergwinkl). to Thomas Bergwinkl).
2006-01-28: Version 1.3.41 2006-01-29: Version 1.3.41
- EPG events from epg.data or SVDRP's PUTE command now have their Title set to - EPG events from epg.data or SVDRP's PUTE command now have their Title set to
"No Title" if none was set. "No Title" if none was set.
@ -4259,3 +4259,4 @@ Video Disk Recorder Revision History
(reported by Rolf Ahrenberg). (reported by Rolf Ahrenberg).
- Changed DVBS_TUNE_TIMEOUT and DVBC_TUNE_TIMEOUT to 9000ms to avoid problems with - Changed DVBS_TUNE_TIMEOUT and DVBC_TUNE_TIMEOUT to 9000ms to avoid problems with
channels that have low symbol rates (reported by Suur Karu). channels that have low symbol rates (reported by Suur Karu).
- Fixed displaying the current audio track in the channel display.

14
menu.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: menu.c 1.405 2006/01/28 12:37:02 kls Exp $ * $Id: menu.c 1.406 2006/01/29 11:13:51 kls Exp $
*/ */
#include "menu.h" #include "menu.h"
@ -2956,13 +2956,13 @@ eOSState cMenuMain::ProcessKey(eKeys Key)
// --- SetTrackDescriptions -------------------------------------------------- // --- SetTrackDescriptions --------------------------------------------------
static void SetTrackDescriptions(bool Live) static void SetTrackDescriptions(int LiveChannel)
{ {
cDevice::PrimaryDevice()->ClrAvailableTracks(true); cDevice::PrimaryDevice()->ClrAvailableTracks(true);
const cComponents *Components = NULL; const cComponents *Components = NULL;
cSchedulesLock SchedulesLock; cSchedulesLock SchedulesLock;
if (Live) { if (LiveChannel) {
cChannel *Channel = Channels.GetByNumber(cDevice::CurrentChannel()); cChannel *Channel = Channels.GetByNumber(LiveChannel);
if (Channel) { if (Channel) {
const cSchedules *Schedules = cSchedules::Schedules(SchedulesLock); const cSchedules *Schedules = cSchedules::Schedules(SchedulesLock);
if (Schedules) { if (Schedules) {
@ -3061,7 +3061,7 @@ void cDisplayChannel::DisplayInfo(void)
const cEvent *Present = Schedule->GetPresentEvent(true); const cEvent *Present = Schedule->GetPresentEvent(true);
const cEvent *Following = Schedule->GetFollowingEvent(true); const cEvent *Following = Schedule->GetFollowingEvent(true);
if (Present != lastPresent || Following != lastFollowing) { if (Present != lastPresent || Following != lastFollowing) {
SetTrackDescriptions(true); SetTrackDescriptions(channel->Number());
displayChannel->SetEvents(Present, Following); displayChannel->SetEvents(Present, Following);
cStatus::MsgOsdProgramme(Present ? Present->StartTime() : 0, Present ? Present->Title() : NULL, Present ? Present->ShortText() : NULL, Following ? Following->StartTime() : 0, Following ? Following->Title() : NULL, Following ? Following->ShortText() : NULL); cStatus::MsgOsdProgramme(Present ? Present->StartTime() : 0, Present ? Present->Title() : NULL, Present ? Present->ShortText() : NULL, Following ? Following->StartTime() : 0, Following ? Following->Title() : NULL, Following ? Following->ShortText() : NULL);
lastPresent = Present; lastPresent = Present;
@ -3239,7 +3239,9 @@ eOSState cDisplayChannel::ProcessKey(eKeys Key)
DisplayInfo(); DisplayInfo();
displayChannel->Flush(); displayChannel->Flush();
if (NewChannel) { if (NewChannel) {
SetTrackDescriptions(NewChannel->Number()); // to make them immediately visible in the channel display
Channels.SwitchTo(NewChannel->Number()); Channels.SwitchTo(NewChannel->Number());
SetTrackDescriptions(NewChannel->Number()); // switching the channel has cleared them
channel = NewChannel; channel = NewChannel;
} }
return osContinue; return osContinue;
@ -3324,7 +3326,7 @@ cDisplayTracks::cDisplayTracks(void)
:cOsdObject(true) :cOsdObject(true)
{ {
cDevice::PrimaryDevice()->EnsureAudioTrack(); cDevice::PrimaryDevice()->EnsureAudioTrack();
SetTrackDescriptions(!cDevice::PrimaryDevice()->Replaying() || cTransferControl::ReceiverDevice()); SetTrackDescriptions(!cDevice::PrimaryDevice()->Replaying() || cTransferControl::ReceiverDevice() ? cDevice::CurrentChannel() : 0);
currentDisplayTracks = this; currentDisplayTracks = this;
numTracks = track = 0; numTracks = track = 0;
audioChannel = cDevice::PrimaryDevice()->GetAudioChannel(); audioChannel = cDevice::PrimaryDevice()->GetAudioChannel();