mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Refactored setup parameter handling for output devices
This commit is contained in:
parent
7a114d640c
commit
af56e53315
19
HISTORY
19
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.
|
||||
|
4
MANUAL
4
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"
|
||||
|
@ -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.
|
||||
|
@ -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 {
|
||||
|
@ -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) {
|
||||
|
@ -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);
|
||||
|
||||
|
7
device.c
7
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;
|
||||
|
19
device.h
19
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);
|
||||
|
Loading…
Reference in New Issue
Block a user