summaryrefslogtreecommitdiff
path: root/device.h
diff options
context:
space:
mode:
Diffstat (limited to 'device.h')
-rw-r--r--device.h39
1 files changed, 24 insertions, 15 deletions
diff --git a/device.h b/device.h
index 43d386b..eb409f9 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.66 2005/11/05 15:25:41 kls Exp $
+ * $Id: device.h 1.70 2006/01/08 10:10:26 kls Exp $
*/
#ifndef __DEVICE_H
@@ -170,14 +170,16 @@ public:
///< Returns the card index of this device (0 ... MAXDEVICES - 1).
int DeviceNumber(void) const;
///< Returns the number of this device (0 ... MAXDEVICES - 1).
- virtual int ProvidesCa(const cChannel *Channel) const;//XXX PLUGINS.html!!!
- //XXX describe changed functionality!!!
- ///< Checks whether this device provides the given value in its
- ///< caCaps. Returns 0 if the value is not provided, 1 if only this
- ///< value is provided, and > 1 if this and other values are provided.
- ///< If the given value is equal to the number of this device,
- ///< 1 is returned. If it is 0 (FTA), 1 plus the number of other values
- ///< in caCaps is returned.
+ virtual int ProvidesCa(const cChannel *Channel) const;
+ ///< Checks whether this device provides the conditional access
+ ///< facilities to decrypt the given Channel.
+ ///< Returns 0 if the Channel can't be decrypted, 1 if this is a
+ ///< Free To Air channel or only exactly this device can decrypt it,
+ ///< and > 1 if this device can decrypt the Channel.
+ ///< If the result is greater than 1 and the device has more than one
+ ///< CAM, the value will be increased by the number of CAMs, which
+ ///< allows to select the device with the smallest number of CAMs
+ ///< in order to preserve resources for other recordings.
virtual bool HasDecoder(void) const;
///< Tells whether this device has an MPEG decoder.
@@ -305,11 +307,9 @@ public:
// Image Grab facilities
public:
- virtual bool GrabImage(const char *FileName, bool Jpeg = true, int Quality = -1, int SizeX = -1, int SizeY = -1);
- ///< Capture a single frame as an image.
- ///< Grabs the currently visible screen image into the given file, with the
- ///< given parameters.
- ///< \param FileName The name of the file to write. Should include the proper extension.
+ virtual uchar *GrabImage(int &Size, bool Jpeg = true, int Quality = -1, int SizeX = -1, int SizeY = -1);
+ ///< Grabs the currently visible screen image.
+ ///< \param Size The size of the returned data block.
///< \param Jpeg If true will write a JPEG file. Otherwise a PNM file will be written.
///< \param Quality The compression factor for JPEG. 1 will create a very blocky
///< and small image, 70..80 will yield reasonable quality images while keeping the
@@ -317,7 +317,13 @@ public:
///< but very high quality image.
///< \param SizeX The number of horizontal pixels in the frame (default is the current screen width).
///< \param SizeY The number of vertical pixels in the frame (default is the current screen height).
- ///< \return True if all went well. */
+ ///< \return A pointer to the grabbed image data, or NULL in case of an error.
+ ///< The caller takes ownership of the returned memory and must free() it once it isn't needed any more.
+ bool GrabImageFile(const char *FileName, bool Jpeg = true, int Quality = -1, int SizeX = -1, int SizeY = -1);
+ ///< Calls GrabImage() and stores the resulting image in a file with the given name.
+ ///< \return True if all went well.
+ ///< The caller is responsible for making sure that the given file name
+ ///< doesn't lead to overwriting any important other file.
// Video format facilities
@@ -338,6 +344,7 @@ public:
private:
tTrackId availableTracks[ttMaxTrackTypes];
eTrackType currentAudioTrack;
+ cMutex mutexCurrentAudioTrack;
int currentAudioTrackMissingCount;
bool pre_1_3_19_PrivateStream;
protected:
@@ -516,6 +523,8 @@ public:
///< Detaches the given receiver from this device.
void DetachAll(int Pid);
///< Detaches all receivers from this device for this pid.
+ void DetachAllReceivers(void);
+ ///< Detaches all receivers from this device.
};
/// Derived cDevice classes that can receive channels will have to provide