summaryrefslogtreecommitdiff
path: root/vdr.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2001-08-03 14:18:08 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2001-08-03 14:18:08 +0200
commitbff17fb1d0e39583e44ba93ea214d7434ecef2ce (patch)
treedf3c64f93c4a572feca8de742f2300bfa0f687ee /vdr.c
parent1962940c39c1951bd107f63d2e071df58ba0b125 (diff)
downloadvdr-bff17fb1d0e39583e44ba93ea214d7434ecef2ce.tar.gz
vdr-bff17fb1d0e39583e44ba93ea214d7434ecef2ce.tar.bz2
Added support for replaying DVDs
Diffstat (limited to 'vdr.c')
-rw-r--r--vdr.c28
1 files changed, 19 insertions, 9 deletions
diff --git a/vdr.c b/vdr.c
index 12b1a538..765eb29b 100644
--- a/vdr.c
+++ b/vdr.c
@@ -2,27 +2,27 @@
* vdr.c: Video Disk Recorder main program
*
* Copyright (C) 2000 Klaus Schmidinger
- *
+ *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Or, point your browser to http://www.gnu.org/copyleft/gpl.html
- *
+ *
* The author can be reached at kls@cadsoft.de
*
* The project's page is at http://www.cadsoft.de/people/kls/vdr
*
- * $Id: vdr.c 1.58 2001/06/23 12:29:41 kls Exp $
+ * $Id: vdr.c 1.59 2001/08/02 13:48:51 kls Exp $
*/
#include <getopt.h>
@@ -31,6 +31,7 @@
#include <unistd.h>
#include "config.h"
#include "dvbapi.h"
+#include "dvd.h"
#include "i18n.h"
#include "interface.h"
#include "menu.h"
@@ -85,14 +86,15 @@ int main(int argc, char *argv[])
{ "log", required_argument, NULL, 'l' },
{ "port", required_argument, NULL, 'p' },
{ "video", required_argument, NULL, 'v' },
+ { "dvd", required_argument, NULL, 'V' },
{ "watchdog", required_argument, NULL, 'w' },
{ "terminal", required_argument, NULL, 't' },
{ 0 }
};
-
+
int c;
int option_index = 0;
- while ((c = getopt_long(argc, argv, "a:c:dD:hl:p:v:w:t:", long_options, &option_index)) != -1) {
+ while ((c = getopt_long(argc, argv, "a:c:dD:hl:p:v:V:w:t:", long_options, &option_index)) != -1) {
switch (c) {
case 'a': cDvbApi::SetAudioCommand(optarg);
break;
@@ -124,6 +126,7 @@ int main(int argc, char *argv[])
" -p PORT, --port=PORT use PORT for SVDRP (default: %d)\n"
" 0 turns off SVDRP\n"
" -v DIR, --video=DIR use DIR as video directory (default: %s)\n"
+ " -V DEV, --dvd=DEV use DEV as the DVD device (default: %s)\n"
" -w SEC, --watchdog=SEC activate the watchdog timer with a timeout of SEC\n"
" seconds (default: %d); '0' disables the watchdog\n"
" -t TTY, --terminal=TTY controlling tty\n"
@@ -131,6 +134,7 @@ int main(int argc, char *argv[])
"Report bugs to <vdr-bugs@cadsoft.de>\n",
DEFAULTSVDRPPORT,
VideoDirectory,
+ cDVD::DeviceName(),
DEFAULTWATCHDOG
);
return 0;
@@ -158,6 +162,8 @@ int main(int argc, char *argv[])
while (optarg && *optarg && optarg[strlen(optarg) - 1] == '/')
optarg[strlen(optarg) - 1] = 0;
break;
+ case 'V': cDVD::SetDeviceName(optarg);
+ break;
case 'w': if (isnumber(optarg)) {
int t = atoi(optarg);
if (t >= 0) {
@@ -173,7 +179,7 @@ int main(int argc, char *argv[])
}
// Log file:
-
+
if (SysLogLevel > 0)
openlog("vdr", LOG_PID | LOG_CONS, LOG_USER);
@@ -324,6 +330,10 @@ int main(int argc, char *argv[])
DELETENULL(ReplayControl);
ReplayControl = new cReplayControl;
break;
+ case osDVD: DELETENULL(Menu);
+ DELETENULL(ReplayControl);
+ Menu = new cMenuDVD;
+ break;
case osStopReplay:
DELETENULL(*Interact);
DELETENULL(ReplayControl);
@@ -358,7 +368,7 @@ int main(int argc, char *argv[])
case kRight: if (!Interface->Recording()) {
int SaveGroup = CurrentGroup;
if (NORMALKEY(key) == kRight)
- CurrentGroup = Channels.GetNextGroup(CurrentGroup) ;
+ CurrentGroup = Channels.GetNextGroup(CurrentGroup) ;
else
CurrentGroup = Channels.GetPrevGroup(CurrentGroup < 1 ? 1 : CurrentGroup);
if (CurrentGroup < 0)