summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTORS3
-rw-r--r--HISTORY2
-rw-r--r--dvbapi.c4
-rw-r--r--vdr.c14
4 files changed, 18 insertions, 5 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index b9e235b3..bdf43032 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -220,3 +220,6 @@ Adrian Stabiszewski <as@nitegate.de>
Bernd Schweikert <bernd.schweikert@dit-gmbh.de>
for adding 'Ca' code 201 for 'Cryptoworks, GOD-DIGITAL' to 'ca.conf'
+
+Mirko Günther <mi.guenther@ib-helms.de>
+ for suggesting the -m command line option
diff --git a/HISTORY b/HISTORY
index f809a29f..c97193c8 100644
--- a/HISTORY
+++ b/HISTORY
@@ -1076,3 +1076,5 @@ Video Disk Recorder Revision History
- 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).
diff --git a/dvbapi.c b/dvbapi.c
index 2f934e3a..f47ac937 100644
--- a/dvbapi.c
+++ b/dvbapi.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: dvbapi.c 1.157 2002/03/08 15:14:04 kls Exp $
+ * $Id: dvbapi.c 1.158 2002/03/08 16:31:23 kls Exp $
*/
#include "dvbapi.h"
@@ -1751,7 +1751,7 @@ cDvbApi::cDvbApi(int n)
#endif
currentChannel = 1;
mute = false;
- volume = MAXVOLUME;
+ volume = Setup.CurrentVolume;
}
cDvbApi::~cDvbApi()
diff --git a/vdr.c b/vdr.c
index a246be11..daf0baaf 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.99 2002/03/08 16:34:29 kls Exp $
*/
#include <getopt.h>
@@ -85,6 +85,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 +98,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 +110,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 +145,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 +173,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 +274,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;