summaryrefslogtreecommitdiff
path: root/device.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2002-08-15 11:16:34 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2002-08-15 11:16:34 +0200
commitc0ef9a35e2994aad863dfb2195211bb2d9dec766 (patch)
treedbd5b348d2ff8c0f5c3cef4f0521f090a47fef9b /device.h
parentd4ab35d1d92e14e9a4e7490058546642da728e02 (diff)
downloadvdr-c0ef9a35e2994aad863dfb2195211bb2d9dec766.tar.gz
vdr-c0ef9a35e2994aad863dfb2195211bb2d9dec766.tar.bz2
Implemented several replay modes to allow players that play only audio
Diffstat (limited to 'device.h')
-rw-r--r--device.h27
1 files changed, 21 insertions, 6 deletions
diff --git a/device.h b/device.h
index 6bd9828e..bba828a5 100644
--- a/device.h
+++ b/device.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: device.h 1.7 2002/08/15 09:22:13 kls Exp $
+ * $Id: device.h 1.8 2002/08/15 11:09:21 kls Exp $
*/
#ifndef __DEVICE_H
@@ -26,6 +26,23 @@
enum eSetChannelResult { scrOk, scrNoTransfer, scrFailed };
+enum ePlayMode { pmNone, // audio/video from decoder
+ pmAudioVideo, // audio/video from player
+ pmAudioOnly, // audio only from player, video from decoder
+ pmExtern_THIS_SHOULD_BE_AVOIDED
+ // external player (e.g. MPlayer), release the device
+ // WARNING: USE THIS MODE ONLY AS A LAST RESORT, IF YOU
+ // ABSOLUTELY, POSITIVELY CAN'T IMPLEMENT YOUR PLAYER
+ // THE WAY IT IS SUPPOSED TO WORK. FORCING THE DEVICE
+ // TO RELEASE ITS FILES HANDLES (OR WHATEVER RESOURCES
+ // IT MAY USE) TO ALLOW AN EXTERNAL PLAYER TO ACCESS
+ // THEM MEANS THAT SUCH A PLAYER WILL NEED TO HAVE
+ // DETAILED KNOWLEDGE ABOUT THE INTERNALS OF THE DEVICE
+ // IN USE. AS A CONSEQUENCE, YOUR PLAYER MAY NOT WORK
+ // IF A PARTICULAR VDR INSTALLATION USES A DEVICE NOT
+ // KNOWN TO YOUR PLAYER.
+ };
+
class cChannel;
class cPlayer;
class cReceiver;
@@ -190,11 +207,9 @@ public:
private:
cPlayer *player;
protected:
- virtual int SetPlayMode(bool On);
- // Sets the device into play mode (On = true) or normal
- // viewing mode (On = false). If On is true, it may return a file
- // handle that a player can use to poll this device when replaying.
- //XXX TODO should be implemented differently
+ virtual bool SetPlayMode(ePlayMode PlayMode);
+ // Sets the device into the given play mode.
+ // Returns true if the operation was successful.
public:
virtual void TrickSpeed(int Speed);
// Sets the device into a mode where replay is done slower.