mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
New command line option '-m'
This commit is contained in:
parent
9e20745fde
commit
7ada973f6c
@ -220,3 +220,6 @@ Adrian Stabiszewski <as@nitegate.de>
|
|||||||
|
|
||||||
Bernd Schweikert <bernd.schweikert@dit-gmbh.de>
|
Bernd Schweikert <bernd.schweikert@dit-gmbh.de>
|
||||||
for adding 'Ca' code 201 for 'Cryptoworks, GOD-DIGITAL' to 'ca.conf'
|
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
|
||||||
|
2
HISTORY
2
HISTORY
@ -1076,3 +1076,5 @@ Video Disk Recorder Revision History
|
|||||||
- Fixed reacting on changes in CICAM settings (needed to restart VDR before).
|
- 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
|
- The "Blue" button in the "Main" menu now works as "Stop" button if a recording
|
||||||
is currently being replayed.
|
is currently being replayed.
|
||||||
|
- New command line option '-m' to mute audio of the primary DVB device at
|
||||||
|
startup (suggested by Mirko Günther).
|
||||||
|
4
dvbapi.c
4
dvbapi.c
@ -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: 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"
|
#include "dvbapi.h"
|
||||||
@ -1751,7 +1751,7 @@ cDvbApi::cDvbApi(int n)
|
|||||||
#endif
|
#endif
|
||||||
currentChannel = 1;
|
currentChannel = 1;
|
||||||
mute = false;
|
mute = false;
|
||||||
volume = MAXVOLUME;
|
volume = Setup.CurrentVolume;
|
||||||
}
|
}
|
||||||
|
|
||||||
cDvbApi::~cDvbApi()
|
cDvbApi::~cDvbApi()
|
||||||
|
12
vdr.c
12
vdr.c
@ -22,7 +22,7 @@
|
|||||||
*
|
*
|
||||||
* The project's page is at http://www.cadsoft.de/people/kls/vdr
|
* 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>
|
#include <getopt.h>
|
||||||
@ -85,6 +85,7 @@ int main(int argc, char *argv[])
|
|||||||
int SVDRPport = DEFAULTSVDRPPORT;
|
int SVDRPport = DEFAULTSVDRPPORT;
|
||||||
const char *ConfigDirectory = NULL;
|
const char *ConfigDirectory = NULL;
|
||||||
bool DaemonMode = false;
|
bool DaemonMode = false;
|
||||||
|
bool MuteAudio = false;
|
||||||
int WatchdogTimeout = DEFAULTWATCHDOG;
|
int WatchdogTimeout = DEFAULTWATCHDOG;
|
||||||
const char *Terminal = NULL;
|
const char *Terminal = NULL;
|
||||||
const char *Shutdown = NULL;
|
const char *Shutdown = NULL;
|
||||||
@ -97,6 +98,7 @@ int main(int argc, char *argv[])
|
|||||||
{ "epgfile", required_argument, NULL, 'E' },
|
{ "epgfile", required_argument, NULL, 'E' },
|
||||||
{ "help", no_argument, NULL, 'h' },
|
{ "help", no_argument, NULL, 'h' },
|
||||||
{ "log", required_argument, NULL, 'l' },
|
{ "log", required_argument, NULL, 'l' },
|
||||||
|
{ "mute", no_argument, NULL, 'm' },
|
||||||
{ "port", required_argument, NULL, 'p' },
|
{ "port", required_argument, NULL, 'p' },
|
||||||
{ "record", required_argument, NULL, 'r' },
|
{ "record", required_argument, NULL, 'r' },
|
||||||
{ "shutdown", required_argument, NULL, 's' },
|
{ "shutdown", required_argument, NULL, 's' },
|
||||||
@ -108,7 +110,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
int c;
|
int c;
|
||||||
int option_index = 0;
|
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) {
|
switch (c) {
|
||||||
case 'a': cDvbApi::SetAudioCommand(optarg);
|
case 'a': cDvbApi::SetAudioCommand(optarg);
|
||||||
break;
|
break;
|
||||||
@ -143,6 +145,7 @@ int main(int argc, char *argv[])
|
|||||||
" -l LEVEL, --log=LEVEL set log level (default: 3)\n"
|
" -l LEVEL, --log=LEVEL set log level (default: 3)\n"
|
||||||
" 0 = no logging, 1 = errors only,\n"
|
" 0 = no logging, 1 = errors only,\n"
|
||||||
" 2 = errors and info, 3 = errors, info and debug\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"
|
" -p PORT, --port=PORT use PORT for SVDRP (default: %d)\n"
|
||||||
" 0 turns off SVDRP\n"
|
" 0 turns off SVDRP\n"
|
||||||
" -r CMD, --record=CMD call CMD before and after a recording\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);
|
fprintf(stderr, "vdr: invalid log level: %s\n", optarg);
|
||||||
return 2;
|
return 2;
|
||||||
break;
|
break;
|
||||||
|
case 'm': MuteAudio = true;
|
||||||
|
break;
|
||||||
case 'p': if (isnumber(optarg))
|
case 'p': if (isnumber(optarg))
|
||||||
SVDRPport = atoi(optarg);
|
SVDRPport = atoi(optarg);
|
||||||
else {
|
else {
|
||||||
@ -269,6 +274,9 @@ int main(int argc, char *argv[])
|
|||||||
cSIProcessor::Read();
|
cSIProcessor::Read();
|
||||||
|
|
||||||
Channels.SwitchTo(Setup.CurrentChannel);
|
Channels.SwitchTo(Setup.CurrentChannel);
|
||||||
|
if (MuteAudio)
|
||||||
|
cDvbApi::PrimaryDvbApi->ToggleMute();
|
||||||
|
else
|
||||||
cDvbApi::PrimaryDvbApi->SetVolume(Setup.CurrentVolume, true);
|
cDvbApi::PrimaryDvbApi->SetVolume(Setup.CurrentVolume, true);
|
||||||
|
|
||||||
cEITScanner EITScanner;
|
cEITScanner EITScanner;
|
||||||
|
Loading…
Reference in New Issue
Block a user