summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2014-03-15 14:05:15 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2014-03-15 14:05:15 +0100
commitaf56e53315ae5b06ca695d2f233239410b6147b4 (patch)
tree823a9683ed4186129f46bbf321d320056fddd709
parent7a114d640c55339264a09296c372ec983695d165 (diff)
downloadvdr-af56e53315ae5b06ca695d2f233239410b6147b4.tar.gz
vdr-af56e53315ae5b06ca695d2f233239410b6147b4.tar.bz2
Refactored setup parameter handling for output devices
-rw-r--r--HISTORY19
-rw-r--r--MANUAL4
-rw-r--r--PLUGINS/src/dvbsddevice/HISTORY4
-rw-r--r--PLUGINS/src/dvbsddevice/dvbsddevice.c4
-rw-r--r--PLUGINS/src/dvbsddevice/dvbsdffdevice.c17
-rw-r--r--PLUGINS/src/dvbsddevice/dvbsdffdevice.h3
-rw-r--r--device.c7
-rw-r--r--device.h19
8 files changed, 45 insertions, 32 deletions
diff --git a/HISTORY b/HISTORY
index 14412a6b..800a6fd0 100644
--- a/HISTORY
+++ b/HISTORY
@@ -8231,3 +8231,22 @@ Video Disk Recorder Revision History
created with the wrong source.
- Added a log message in case a receiver is detached from its device because the
assigned CAM can't decrypt the channel.
+- Refactored setup parameter handling for output devices:
+ + The function cDevice::GetVideoSystem() has been deprecated and will be removed
+ in a future version. In order to check whether a particular plugin needs to be
+ modified if this function is removed, you can comment out the line
+ #define DEPRECATED_VIDEOSYSTEM
+ in device.h.
+ + Handling the "video (display) format" (things like 16:9, 4:3, pan&scan, letterbox
+ etc) shall now be done by the individual output devices, because the types and
+ numbers of parameters are too device specific. The Setup/DVB parameters
+ "Video format" and "Video display format" are still there for now and can be used
+ by SD devices. HD devices, however, shall not use these parameters (any more),
+ but rather implement their own setup menu with the necessary parameters for
+ controlling output.
+ + The dvbhdffdevice plugin has been modified accordingly.
+ + Made it clear that cDevice::SetDigitalAudioDevice() merely tells the output device
+ that the current audio track is Dolby Digital. This function was only used by the
+ original "full featured" DVB cards - do not use it for new developments!
+ If an output device has several ways of replaying audio (like HDMI or analog jack)
+ it shall implement the proper options in its plugin's SetupMenu() function.
diff --git a/MANUAL b/MANUAL
index 9f2fef1d..83f16b9e 100644
--- a/MANUAL
+++ b/MANUAL
@@ -731,13 +731,13 @@ Version 2.0
1 = ANSI/SCTE
Video format = 4:3 The video format (or aspect ratio) of the tv set in use
- (4:3 or 16:9).
+ (4:3 or 16:9). Applies only to SD output devices.
Video display format = letterbox
The display format to use for playing wide screen video on
a 4:3 tv set ("pan & scan", "letterbox" or "center cut out").
This option is only available if "Video format" is set to
- 4:3.
+ 4:3. Applies only to SD output devices.
Use Dolby Digital = yes
Controls whether Dolby Digital tracks appear in the "Audio"
diff --git a/PLUGINS/src/dvbsddevice/HISTORY b/PLUGINS/src/dvbsddevice/HISTORY
index 1dcd561b..94e31ddb 100644
--- a/PLUGINS/src/dvbsddevice/HISTORY
+++ b/PLUGINS/src/dvbsddevice/HISTORY
@@ -55,3 +55,7 @@ VDR Plugin 'dvbsddevice' Revision History
- Avoiding unnecessary pkg-config warnings in plugin Makefiles.
- cDevice::TrickSpeed() now has an additional parameter named Forward.
+
+2014-03-15: Version 2.1.2
+
+- The function cDevice::GetVideoSystem() has been deprecated.
diff --git a/PLUGINS/src/dvbsddevice/dvbsddevice.c b/PLUGINS/src/dvbsddevice/dvbsddevice.c
index d398b152..0d06f17d 100644
--- a/PLUGINS/src/dvbsddevice/dvbsddevice.c
+++ b/PLUGINS/src/dvbsddevice/dvbsddevice.c
@@ -3,14 +3,14 @@
*
* See the README file for copyright information and how to reach the author.
*
- * $Id: dvbsddevice.c 3.2 2013/12/25 13:27:00 kls Exp $
+ * $Id: dvbsddevice.c 3.3 2014/03/15 12:28:14 kls Exp $
*/
#include <getopt.h>
#include <vdr/plugin.h>
#include "dvbsdffdevice.h"
-static const char *VERSION = "2.1.1";
+static const char *VERSION = "2.1.2";
static const char *DESCRIPTION = "SD Full Featured DVB device";
class cPluginDvbsddevice : public cPlugin {
diff --git a/PLUGINS/src/dvbsddevice/dvbsdffdevice.c b/PLUGINS/src/dvbsddevice/dvbsdffdevice.c
index 437fd9eb..5711e04d 100644
--- a/PLUGINS/src/dvbsddevice/dvbsdffdevice.c
+++ b/PLUGINS/src/dvbsddevice/dvbsdffdevice.c
@@ -3,7 +3,7 @@
*
* See the README file for copyright information and how to reach the author.
*
- * $Id: dvbsdffdevice.c 3.2 2014/02/27 15:34:33 kls Exp $
+ * $Id: dvbsdffdevice.c 3.3 2014/03/15 12:35:21 kls Exp $
*/
#include "dvbsdffdevice.h"
@@ -241,21 +241,6 @@ void cDvbSdFfDevice::SetVideoFormat(bool VideoFormat16_9)
SetVideoDisplayFormat(eVideoDisplayFormat(Setup.VideoDisplayFormat));
}
-eVideoSystem cDvbSdFfDevice::GetVideoSystem(void)
-{
- eVideoSystem VideoSystem = vsPAL;
- if (fd_video >= 0) {
- video_size_t vs;
- if (ioctl(fd_video, VIDEO_GET_SIZE, &vs) == 0) {
- if (vs.h == 480 || vs.h == 240)
- VideoSystem = vsNTSC;
- }
- else
- LOG_ERROR;
- }
- return VideoSystem;
-}
-
void cDvbSdFfDevice::GetVideoSize(int &Width, int &Height, double &VideoAspect)
{
if (fd_video >= 0) {
diff --git a/PLUGINS/src/dvbsddevice/dvbsdffdevice.h b/PLUGINS/src/dvbsddevice/dvbsdffdevice.h
index 0611cab3..f7348d0f 100644
--- a/PLUGINS/src/dvbsddevice/dvbsdffdevice.h
+++ b/PLUGINS/src/dvbsddevice/dvbsdffdevice.h
@@ -3,7 +3,7 @@
*
* See the README file for copyright information and how to reach the author.
*
- * $Id: dvbsdffdevice.h 3.1 2013/12/25 13:27:00 kls Exp $
+ * $Id: dvbsdffdevice.h 3.2 2014/03/15 12:36:35 kls Exp $
*/
#ifndef __DVBSDFFDEVICE_H
@@ -63,7 +63,6 @@ public:
public:
virtual void SetVideoDisplayFormat(eVideoDisplayFormat VideoDisplayFormat);
virtual void SetVideoFormat(bool VideoFormat16_9);
- virtual eVideoSystem GetVideoSystem(void);
virtual void GetVideoSize(int &Width, int &Height, double &VideoAspect);
virtual void GetOsdSize(int &Width, int &Height, double &PixelAspect);
diff --git a/device.c b/device.c
index 13397281..43bc0e08 100644
--- a/device.c
+++ b/device.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: device.c 3.14 2014/03/11 09:48:40 kls Exp $
+ * $Id: device.c 3.15 2014/03/15 13:23:28 kls Exp $
*/
#include "device.h"
@@ -430,11 +430,6 @@ void cDevice::SetVideoFormat(bool VideoFormat16_9)
{
}
-eVideoSystem cDevice::GetVideoSystem(void)
-{
- return vsPAL;
-}
-
void cDevice::GetVideoSize(int &Width, int &Height, double &VideoAspect)
{
Width = 0;
diff --git a/device.h b/device.h
index 368d5cfa..549bbe04 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 3.8 2014/01/02 10:47:08 kls Exp $
+ * $Id: device.h 3.9 2014/03/15 14:04:58 kls Exp $
*/
#ifndef __DEVICE_H
@@ -55,9 +55,12 @@ enum ePlayMode { pmNone, // audio/video from decoder
// KNOWN TO YOUR PLAYER.
};
+#define DEPRECATED_VIDEOSYSTEM
+#ifdef DEPRECATED_VIDEOSYSTEM
enum eVideoSystem { vsPAL,
vsNTSC
};
+#endif
enum eVideoDisplayFormat { vdfPanAndScan,
vdfLetterBox,
@@ -462,12 +465,19 @@ public:
///< Sets the video display format to the given one (only useful
///< if this device has an MPEG decoder).
///< A derived class must first call the base class function!
+ ///< NOTE: this is only for SD devices. HD devices shall implement their
+ ///< own setup menu with the necessary parameters for controlling output.
virtual void SetVideoFormat(bool VideoFormat16_9);
///< Sets the output video format to either 16:9 or 4:3 (only useful
///< if this device has an MPEG decoder).
- virtual eVideoSystem GetVideoSystem(void);
+ ///< NOTE: this is only for SD devices. HD devices shall implement their
+ ///< own setup menu with the necessary parameters for controlling output.
+#ifdef DEPRECATED_VIDEOSYSTEM
+ virtual eVideoSystem GetVideoSystem(void) { return vsPAL; }
///< Returns the video system of the currently displayed material
///< (default is PAL).
+ ///< This function is deprecated and will be removed in a future version!
+#endif
virtual void GetVideoSize(int &Width, int &Height, double &VideoAspect);
///< Returns the Width, Height and VideoAspect ratio of the currently
///< displayed video material. Width and Height are given in pixel
@@ -566,8 +576,9 @@ protected:
virtual void SetVolumeDevice(int Volume);
///< Sets the audio volume on this device (Volume = 0...255).
virtual void SetDigitalAudioDevice(bool On);
- ///< Tells the actual device that digital audio output shall be switched
- ///< on or off.
+ ///< Tells the output device that the current audio track is Dolby Digital.
+ ///< Only used by the original "full featured" DVB cards - do not use for new
+ ///< developments!
public:
bool IsMute(void) const { return mute; }
bool ToggleMute(void);