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

The command line option -D now accepts the value '-' (as in -D-), which prevents VDR from using any DVB devices

This commit is contained in:
Klaus Schmidinger 2015-04-18 14:30:47 +02:00
parent 7aef23e97f
commit fa701228d7
6 changed files with 20 additions and 7 deletions

View File

@ -3351,6 +3351,7 @@ Dietmar Spingler <d_spingler@gmx.de>
for reporting a problem that led to a fix with EMM pids not being properly reset for
CAMs that need to receive the TS
for suggesting to add the channel name to log messages that reference a channel
for suggesting to provide a way of using no DVB devices at all
Stefan Schallenberg <infos@nafets.de>
for adding the functions IndexOf(), InsertUnique(), AppendUnique() and RemoveElement()

View File

@ -8631,3 +8631,5 @@ Video Disk Recorder Revision History
pressing '0', the default no longer applies to that folder. Repeating timers no
longer write a ".sort" file into a recordings folder to have the recordings sorted
by time.
- The command line option -D now accepts the value '-' (as in -D-), which prevents
VDR from using any DVB devices (suggested by Dietmar Spingler).

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: dvbdevice.c 3.14 2015/01/14 12:09:19 kls Exp $
* $Id: dvbdevice.c 4.1 2015/04/18 14:21:58 kls Exp $
*/
#include "dvbdevice.h"
@ -1064,6 +1064,7 @@ cOsdItem *cDvbSourceParam::GetOsdItem(void)
// --- cDvbDevice ------------------------------------------------------------
bool cDvbDevice::useDvbDevices = true;
int cDvbDevice::setTransferModeForDolbyDigital = 1;
cMutex cDvbDevice::bondMutex;
@ -1234,7 +1235,7 @@ bool cDvbDevice::Initialize(void)
if (Exists(Adapter, Frontend)) {
if (Found < MAXDEVICES) {
Found++;
if (UseDevice(NextCardIndex())) {
if (useDvbDevices && UseDevice(NextCardIndex())) {
if (Probe(Adapter, Frontend))
Used++;
}

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: dvbdevice.h 3.5 2014/03/16 10:38:31 kls Exp $
* $Id: dvbdevice.h 4.1 2015/04/18 13:57:27 kls Exp $
*/
#ifndef __DVBDEVICE_H
@ -174,6 +174,7 @@ private:
static bool Probe(int Adapter, int Frontend);
///< Probes for existing DVB devices.
public:
static bool useDvbDevices;
static bool Initialize(void);
///< Initializes the DVB devices.
///< Must be called before accessing any DVB functions.

4
vdr.1
View File

@ -8,7 +8,7 @@
.\" License as specified in the file COPYING that comes with the
.\" vdr distribution.
.\"
.\" $Id: vdr.1 3.6 2015/02/17 13:43:24 kls Exp $
.\" $Id: vdr.1 4.1 2015/04/18 14:25:07 kls Exp $
.\"
.TH vdr 1 "19 Feb 2015" "2.2" "Video Disk Recorder"
.SH NAME
@ -64,6 +64,8 @@ Run in daemon mode (implies \-\-no\-kbd).
.BI \-D\ num ,\ \-\-device= num
Use only the given DVB device (\fInum\fR = 0, 1, 2...).
There may be several \fB\-D\fR options (by default all DVB devices will be used).
If \fB\-D\-\fR is given, no DVB devices will be used at all, independent of any
other \-D options.
.TP
.BI \-\-dirnames= path [, name [, enc ]]
Set the maximum directory path length to \fIpath\fR (default is the maximum value

12
vdr.c
View File

@ -22,7 +22,7 @@
*
* The project's page is at http://www.tvdr.de
*
* $Id: vdr.c 3.16 2015/02/10 14:13:12 kls Exp $
* $Id: vdr.c 4.1 2015/04/18 14:22:47 kls Exp $
*/
#include <getopt.h>
@ -301,7 +301,11 @@ int main(int argc, char *argv[])
break;
case 'd': DaemonMode = true;
break;
case 'D': if (isnumber(optarg)) {
case 'D': if (*optarg == '-') {
cDvbDevice::useDvbDevices = false;
break;
}
if (isnumber(optarg)) {
int n = atoi(optarg);
if (0 <= n && n < MAXDEVICES) {
cDevice::SetUseDevice(n);
@ -536,7 +540,9 @@ int main(int argc, char *argv[])
" -d, --daemon run in daemon mode\n"
" -D NUM, --device=NUM use only the given DVB device (NUM = 0, 1, 2...)\n"
" there may be several -D options (default: all DVB\n"
" devices will be used)\n"
" devices will be used); if -D- is given, no DVB\n"
" devices will be used at all, independent of any\n"
" other -D options\n"
" --dirnames=PATH[,NAME[,ENC]]\n"
" set the maximum directory path length to PATH\n"
" (default: %d); if NAME is also given, it defines\n"