summaryrefslogtreecommitdiff
path: root/vdr.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2002-03-17 18:00:00 +0100
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2002-03-17 18:00:00 +0100
commit217fcb26808f74c9de81b4c653757f75ba13852f (patch)
treeaf479bc0ed80611549280dcdc8ed324ace38b32e /vdr.c
parenta001a4bf97715d62b387d1da9fd1e48382508428 (diff)
downloadvdr-patch-lnbsharing-217fcb26808f74c9de81b4c653757f75ba13852f.tar.gz
vdr-patch-lnbsharing-217fcb26808f74c9de81b4c653757f75ba13852f.tar.bz2
Version 1.0.0pre4vdr-1.0.0pre4
- Added 'Ca' code 201 for 'Cryptoworks, GOD-DIGITAL' to 'ca.conf' (thanks to Bernd Schweikert). - Fixed avoiding the primary DVB interface in case Setup.PrimaryLimit is 0. - Fixed handling CICAM settings if the first one of a DVB card was FTA. - Fixed reacting on changes in CICAM settings (needed to restart VDR before). - The "Blue" button in the "Main" menu now works as "Stop" button if a recording is currently being replayed. - New command line option '-m' to mute audio of the primary DVB device at startup (suggested by Mirko Günther). - The new SVDRP command VOLU can be used to control the audio volume (suggested by Mirko Günther). - Fixed resetting 'mute' state when setting the volume to a non-zero value. - Added log messages when deleting recordings in case the disk runs full while recording. - Fixed closing a pipe (used for replaying Dolby Digital audio), which sometimes left 'zombie' processes behind (thanks to Werner Fink for helping to debug this one). - Now starting the Dolby Digital output thread only if the recording actually contains Dolby Digital audio data (thanks to Werner Fink). - Implemented OSD for Volume and Mute (works only if there is no other OSD activity, but this should be no problem for normal use). - Changed the MANUAL description of the "Conditional Access" setup parameters to reflect the actual "CICAM DVBn m" notation in the "Setup" menu. - The new Setup parameter "Use time from transponder" can be used to define which transponder shall be used to set the system time (see MANUAL for details). If you have been using the SetSystemTime option previously, you now MUST select a channel that you trust to have a reliable time base. - Grouped the Setup parameters into several sub-menus, so that each group of parameters fits on a single screen - unless the height of the OSD has been set to a small value (based on code from Markus Lang). - Changed the title of the "Main" menu to "VDR". - Fixed displaying a system message while the replay mode is being shown. - Physically removing a deleted recording if one with the same name shall be deleted again. - The "Left" and "Right" keys are now used to page up and down in text displays (like the EPG descriptions or the results of commands executed from the "Commands" menu). - Fixed high CPU usage in transfer mode. - Replaced 'killproc' with 'killall' in 'runvdr', since apparently 'killproc' is not available by default on some Linux distributions, whereas 'killall' is. Please check if your system provides 'killall' - if it doesn't, please change this back in 'runvdr' and report this (thanks to Achim Lange). - The "Commands" menu now automatically assigns number keys as hotkeys to the commands. If you have preceeded your commands with digits you may want to remove these from your 'commands.conf' file. - The new Setup item "Restart" can be used to force a complete restart of VDR, including reloading the driver. Note that this can only work if VDR and the driver are wrapped into a mechanism that actually performs this action if VDR exits. The 'runvdr' script can be used for this purpose. - Refined texts of the "Setup" menu.
Diffstat (limited to 'vdr.c')
-rw-r--r--vdr.c28
1 files changed, 20 insertions, 8 deletions
diff --git a/vdr.c b/vdr.c
index a246be1..17ae148 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.98 2002/03/03 14:56:03 kls Exp $
+ * $Id: vdr.c 1.101 2002/03/09 17:10:16 kls Exp $
*/
#include <getopt.h>
@@ -50,8 +50,6 @@
#define SHUTDOWNWAIT 300 // seconds to wait in user prompt before automatic shutdown
#define MANUALSTART 600 // seconds the next timer must be in the future to assume manual start
-#define VOLUMEDELTA 5 // used to increase/decrease the volume
-
static int Interrupted = 0;
static void SignalHandler(int signum)
@@ -85,6 +83,7 @@ int main(int argc, char *argv[])
int SVDRPport = DEFAULTSVDRPPORT;
const char *ConfigDirectory = NULL;
bool DaemonMode = false;
+ bool MuteAudio = false;
int WatchdogTimeout = DEFAULTWATCHDOG;
const char *Terminal = NULL;
const char *Shutdown = NULL;
@@ -97,6 +96,7 @@ int main(int argc, char *argv[])
{ "epgfile", required_argument, NULL, 'E' },
{ "help", no_argument, NULL, 'h' },
{ "log", required_argument, NULL, 'l' },
+ { "mute", no_argument, NULL, 'm' },
{ "port", required_argument, NULL, 'p' },
{ "record", required_argument, NULL, 'r' },
{ "shutdown", required_argument, NULL, 's' },
@@ -108,7 +108,7 @@ int main(int argc, char *argv[])
int c;
int option_index = 0;
- while ((c = getopt_long(argc, argv, "a:c:dD:E:hl:p:r:s:t:v:w:", long_options, &option_index)) != -1) {
+ while ((c = getopt_long(argc, argv, "a:c:dD:E:hl:mp:r:s:t:v:w:", long_options, &option_index)) != -1) {
switch (c) {
case 'a': cDvbApi::SetAudioCommand(optarg);
break;
@@ -143,6 +143,7 @@ int main(int argc, char *argv[])
" -l LEVEL, --log=LEVEL set log level (default: 3)\n"
" 0 = no logging, 1 = errors only,\n"
" 2 = errors and info, 3 = errors, info and debug\n"
+ " -m, --mute mute audio of the primary DVB device at startup\n"
" -p PORT, --port=PORT use PORT for SVDRP (default: %d)\n"
" 0 turns off SVDRP\n"
" -r CMD, --record=CMD call CMD before and after a recording\n"
@@ -170,6 +171,8 @@ int main(int argc, char *argv[])
fprintf(stderr, "vdr: invalid log level: %s\n", optarg);
return 2;
break;
+ case 'm': MuteAudio = true;
+ break;
case 'p': if (isnumber(optarg))
SVDRPport = atoi(optarg);
else {
@@ -269,7 +272,10 @@ int main(int argc, char *argv[])
cSIProcessor::Read();
Channels.SwitchTo(Setup.CurrentChannel);
- cDvbApi::PrimaryDvbApi->SetVolume(Setup.CurrentVolume, true);
+ if (MuteAudio)
+ cDvbApi::PrimaryDvbApi->ToggleMute();
+ else
+ cDvbApi::PrimaryDvbApi->SetVolume(Setup.CurrentVolume, true);
cEITScanner EITScanner;
@@ -351,10 +357,16 @@ int main(int argc, char *argv[])
case kVolUp:
case kVolDn|k_Repeat:
case kVolDn:
- cDvbApi::PrimaryDvbApi->SetVolume(NORMALKEY(key) == kVolDn ? -VOLUMEDELTA : VOLUMEDELTA);
- break;
case kMute:
- cDvbApi::PrimaryDvbApi->ToggleMute();
+ if (key == kMute) {
+ if (!cDvbApi::PrimaryDvbApi->ToggleMute() && !Menu)
+ break; // no need to display "mute off"
+ }
+ else
+ cDvbApi::PrimaryDvbApi->SetVolume(NORMALKEY(key) == kVolDn ? -VOLUMEDELTA : VOLUMEDELTA);
+ if (!Menu && (!ReplayControl || !ReplayControl->Visible()))
+ Menu = cDisplayVolume::Create();
+ cDisplayVolume::Process(key);
break;
// Power off:
case kPower: isyslog(LOG_INFO, "Power button pressed");