summaryrefslogtreecommitdiff
path: root/vdr.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2003-04-21 14:57:13 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2003-04-21 14:57:13 +0200
commita54427e28da2d644ca061b0dbbc2bf3cb32bade5 (patch)
tree43ac207c00603f46670667cfa9d434830094987d /vdr.c
parent33d670f7d7ce79d4c2996af0c86375edc881df75 (diff)
downloadvdr-a54427e28da2d644ca061b0dbbc2bf3cb32bade5.tar.gz
vdr-a54427e28da2d644ca061b0dbbc2bf3cb32bade5.tar.bz2
Implemented 'pause live video'1.1.28
Diffstat (limited to 'vdr.c')
-rw-r--r--vdr.c35
1 files changed, 27 insertions, 8 deletions
diff --git a/vdr.c b/vdr.c
index 3f0a7f0d..a160e4cf 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.149 2003/04/12 13:57:45 kls Exp $
+ * $Id: vdr.c 1.150 2003/04/21 14:41:41 kls Exp $
*/
#include <getopt.h>
@@ -553,6 +553,26 @@ int main(int argc, char *argv[])
cDisplayVolume::Process(key);
key = kNone; // nobody else needs to see these keys
break;
+ // Pausing live video:
+ case kPause:
+ if (!cControl::Control()) {
+ DELETENULL(Menu);
+ Temp = NULL;
+ if (!cRecordControls::PauseLiveVideo())
+ Interface->Error(tr("No free DVB device to record!"));
+ key = kNone; // nobody else needs to see this key
+ }
+ break;
+ // Instant recording:
+ case kRecord:
+ if (!cControl::Control()) {
+ if (cRecordControls::Start())
+ ;//XXX Interface->Info(tr("Recording"));
+ else
+ Interface->Error(tr("No free DVB device to record!"));
+ key = kNone; // nobody else needs to see this key
+ }
+ break;
// Power off:
case kPower: isyslog("Power button pressed");
DELETENULL(Menu);
@@ -577,6 +597,12 @@ int main(int argc, char *argv[])
if (state == osUnknown && ISMODELESSKEY(key) && cControl::Control() && Interact != cControl::Control())
state = cControl::Control()->ProcessKey(key);
switch (state) {
+ case osPause: DELETENULL(Menu);
+ cControl::Shutdown(); // just in case
+ Temp = NULL;
+ if (!cRecordControls::PauseLiveVideo())
+ Interface->Error(tr("No free DVB device to record!"));
+ break;
case osRecord: DELETENULL(Menu);
Temp = NULL;
if (cRecordControls::Start())
@@ -652,13 +678,6 @@ int main(int argc, char *argv[])
break;
// Viewing Control:
case kOk: LastChannel = -1; break; // forces channel display
- // Instant recording:
- case kRecord:
- if (cRecordControls::Start())
- ;//XXX Interface->Info(tr("Recording"));
- else
- Interface->Error(tr("No free DVB device to record!"));
- break;
// Key macros:
case kRed:
case kGreen: