mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
The dvbsddevice plugin now supports the new option --outputonly
This commit is contained in:
parent
6700e772e5
commit
d2342ae2ef
@ -1716,6 +1716,7 @@ Udo Richter <udo_richter@gmx.de>
|
|||||||
for fixing handling the channelID in cMenuEditChanItem
|
for fixing handling the channelID in cMenuEditChanItem
|
||||||
for a patch that sets the start time of an edited recording to the time of the first
|
for a patch that sets the start time of an edited recording to the time of the first
|
||||||
editing mark
|
editing mark
|
||||||
|
for adding the option --outputonly to the dvbsddevice plugin
|
||||||
|
|
||||||
Sven Kreiensen <svenk@kammer.uni-hannover.de>
|
Sven Kreiensen <svenk@kammer.uni-hannover.de>
|
||||||
for his help in keeping 'channels.conf.terr' up to date
|
for his help in keeping 'channels.conf.terr' up to date
|
||||||
|
3
HISTORY
3
HISTORY
@ -6734,3 +6734,6 @@ Video Disk Recorder Revision History
|
|||||||
recording time to the length column. This new format is also used by the SVDRP
|
recording time to the length column. This new format is also used by the SVDRP
|
||||||
command LSTR, so in case you have an application that parses the LSTR output,
|
command LSTR, so in case you have an application that parses the LSTR output,
|
||||||
you will need to adjust it to the new format.
|
you will need to adjust it to the new format.
|
||||||
|
- The dvbsddevice plugin now supports the new option --outputonly, which disables
|
||||||
|
receiving on SD FF devices and uses the device only for output (thanks to Udo
|
||||||
|
Richter).
|
||||||
|
@ -19,3 +19,7 @@ VDR Plugin 'dvbsddevice' Revision History
|
|||||||
2011-04-17: Version 0.0.4
|
2011-04-17: Version 0.0.4
|
||||||
|
|
||||||
- Removed an obsolete local variable in dvbsdffosd.c (thanks to Paul Menzel).
|
- Removed an obsolete local variable in dvbsdffosd.c (thanks to Paul Menzel).
|
||||||
|
|
||||||
|
2011-08-27: Version 0.0.5
|
||||||
|
|
||||||
|
- Added option --outputonly to use the device only for output (thanks to Udo Richter).
|
||||||
|
@ -3,13 +3,14 @@
|
|||||||
*
|
*
|
||||||
* See the README file for copyright information and how to reach the author.
|
* See the README file for copyright information and how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: dvbsddevice.c 1.4 2011/04/17 12:55:43 kls Exp $
|
* $Id: dvbsddevice.c 1.5 2011/08/27 11:34:58 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <getopt.h>
|
||||||
#include <vdr/plugin.h>
|
#include <vdr/plugin.h>
|
||||||
#include "dvbsdffdevice.h"
|
#include "dvbsdffdevice.h"
|
||||||
|
|
||||||
static const char *VERSION = "0.0.4";
|
static const char *VERSION = "0.0.5";
|
||||||
static const char *DESCRIPTION = "SD Full Featured DVB device";
|
static const char *DESCRIPTION = "SD Full Featured DVB device";
|
||||||
|
|
||||||
class cPluginDvbsddevice : public cPlugin {
|
class cPluginDvbsddevice : public cPlugin {
|
||||||
@ -20,6 +21,8 @@ public:
|
|||||||
virtual ~cPluginDvbsddevice();
|
virtual ~cPluginDvbsddevice();
|
||||||
virtual const char *Version(void) { return VERSION; }
|
virtual const char *Version(void) { return VERSION; }
|
||||||
virtual const char *Description(void) { return DESCRIPTION; }
|
virtual const char *Description(void) { return DESCRIPTION; }
|
||||||
|
virtual const char *CommandLineHelp(void);
|
||||||
|
virtual bool ProcessArgs(int argc, char *argv[]);
|
||||||
};
|
};
|
||||||
|
|
||||||
cPluginDvbsddevice::cPluginDvbsddevice(void)
|
cPluginDvbsddevice::cPluginDvbsddevice(void)
|
||||||
@ -32,4 +35,27 @@ cPluginDvbsddevice::~cPluginDvbsddevice()
|
|||||||
delete probe;
|
delete probe;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char *cPluginDvbsddevice::CommandLineHelp(void)
|
||||||
|
{
|
||||||
|
return " -o --outputonly do not receive, just use as output device\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
bool cPluginDvbsddevice::ProcessArgs(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
static struct option long_options[] = {
|
||||||
|
{ "outputonly", no_argument, NULL, 'o' },
|
||||||
|
{ NULL, no_argument, NULL, 0 }
|
||||||
|
};
|
||||||
|
|
||||||
|
int c;
|
||||||
|
while ((c = getopt_long(argc, argv, "", long_options, NULL)) != -1) {
|
||||||
|
switch (c) {
|
||||||
|
case 'o': probe->SetOutputOnly(true);
|
||||||
|
break;
|
||||||
|
default: return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
VDRPLUGINCREATOR(cPluginDvbsddevice); // Don't touch this!
|
VDRPLUGINCREATOR(cPluginDvbsddevice); // Don't touch this!
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* See the README file for copyright information and how to reach the author.
|
* See the README file for copyright information and how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: dvbsdffdevice.c 2.29 2011/05/22 15:22:14 kls Exp $
|
* $Id: dvbsdffdevice.c 2.30 2011/08/27 11:33:57 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "dvbsdffdevice.h"
|
#include "dvbsdffdevice.h"
|
||||||
@ -23,12 +23,13 @@
|
|||||||
|
|
||||||
int cDvbSdFfDevice::devVideoOffset = -1;
|
int cDvbSdFfDevice::devVideoOffset = -1;
|
||||||
|
|
||||||
cDvbSdFfDevice::cDvbSdFfDevice(int Adapter, int Frontend)
|
cDvbSdFfDevice::cDvbSdFfDevice(int Adapter, int Frontend, bool OutputOnly)
|
||||||
:cDvbDevice(Adapter, Frontend)
|
:cDvbDevice(Adapter, Frontend)
|
||||||
{
|
{
|
||||||
spuDecoder = NULL;
|
spuDecoder = NULL;
|
||||||
digitalAudio = false;
|
digitalAudio = false;
|
||||||
playMode = pmNone;
|
playMode = pmNone;
|
||||||
|
outputOnly = OutputOnly;
|
||||||
|
|
||||||
// Devices that are only present on cards with decoders:
|
// Devices that are only present on cards with decoders:
|
||||||
|
|
||||||
@ -357,6 +358,14 @@ bool cDvbSdFfDevice::SetPid(cPidHandle *Handle, int Type, bool On)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool cDvbSdFfDevice::ProvidesSource(int Source) const
|
||||||
|
{
|
||||||
|
if (outputOnly)
|
||||||
|
return false;
|
||||||
|
else
|
||||||
|
return cDvbDevice::ProvidesSource(Source);
|
||||||
|
}
|
||||||
|
|
||||||
void cDvbSdFfDevice::TurnOffLiveMode(bool LiveView)
|
void cDvbSdFfDevice::TurnOffLiveMode(bool LiveView)
|
||||||
{
|
{
|
||||||
if (LiveView) {
|
if (LiveView) {
|
||||||
@ -761,6 +770,11 @@ int cDvbSdFfDevice::PlayTsAudio(const uchar *Data, int Length)
|
|||||||
|
|
||||||
// --- cDvbSdFfDeviceProbe ---------------------------------------------------
|
// --- cDvbSdFfDeviceProbe ---------------------------------------------------
|
||||||
|
|
||||||
|
cDvbSdFfDeviceProbe::cDvbSdFfDeviceProbe(void)
|
||||||
|
{
|
||||||
|
outputOnly = false;
|
||||||
|
}
|
||||||
|
|
||||||
bool cDvbSdFfDeviceProbe::Probe(int Adapter, int Frontend)
|
bool cDvbSdFfDeviceProbe::Probe(int Adapter, int Frontend)
|
||||||
{
|
{
|
||||||
static uint32_t SubsystemIds[] = {
|
static uint32_t SubsystemIds[] = {
|
||||||
@ -781,7 +795,7 @@ bool cDvbSdFfDeviceProbe::Probe(int Adapter, int Frontend)
|
|||||||
for (uint32_t *sid = SubsystemIds; *sid; sid++) {
|
for (uint32_t *sid = SubsystemIds; *sid; sid++) {
|
||||||
if (*sid == SubsystemId) {
|
if (*sid == SubsystemId) {
|
||||||
dsyslog("creating cDvbSdFfDevice");
|
dsyslog("creating cDvbSdFfDevice");
|
||||||
new cDvbSdFfDevice(Adapter, Frontend);
|
new cDvbSdFfDevice(Adapter, Frontend, outputOnly);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* See the README file for copyright information and how to reach the author.
|
* See the README file for copyright information and how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: dvbsdffdevice.h 2.12 2011/05/21 12:56:49 kls Exp $
|
* $Id: dvbsdffdevice.h 2.13 2011/08/27 11:32:42 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __DVBSDFFDEVICE_H
|
#ifndef __DVBSDFFDEVICE_H
|
||||||
@ -17,10 +17,11 @@
|
|||||||
class cDvbSdFfDevice : public cDvbDevice {
|
class cDvbSdFfDevice : public cDvbDevice {
|
||||||
private:
|
private:
|
||||||
int fd_osd, fd_audio, fd_video, fd_stc;
|
int fd_osd, fd_audio, fd_video, fd_stc;
|
||||||
|
bool outputOnly;
|
||||||
protected:
|
protected:
|
||||||
virtual void MakePrimaryDevice(bool On);
|
virtual void MakePrimaryDevice(bool On);
|
||||||
public:
|
public:
|
||||||
cDvbSdFfDevice(int Adapter, int Frontend);
|
cDvbSdFfDevice(int Adapter, int Frontend, bool OutputOnly);
|
||||||
virtual ~cDvbSdFfDevice();
|
virtual ~cDvbSdFfDevice();
|
||||||
virtual bool HasDecoder(void) const;
|
virtual bool HasDecoder(void) const;
|
||||||
virtual bool AvoidRecording(void) const;
|
virtual bool AvoidRecording(void) const;
|
||||||
@ -34,6 +35,8 @@ public:
|
|||||||
|
|
||||||
// Channel facilities
|
// Channel facilities
|
||||||
|
|
||||||
|
public:
|
||||||
|
virtual bool ProvidesSource(int Source) const;
|
||||||
private:
|
private:
|
||||||
void TurnOffLiveMode(bool LiveView);
|
void TurnOffLiveMode(bool LiveView);
|
||||||
protected:
|
protected:
|
||||||
@ -101,7 +104,11 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
class cDvbSdFfDeviceProbe : public cDvbDeviceProbe {
|
class cDvbSdFfDeviceProbe : public cDvbDeviceProbe {
|
||||||
|
private:
|
||||||
|
bool outputOnly;
|
||||||
public:
|
public:
|
||||||
|
cDvbSdFfDeviceProbe(void);
|
||||||
|
void SetOutputOnly(bool On) { outputOnly = On; }
|
||||||
virtual bool Probe(int Adapter, int Frontend);
|
virtual bool Probe(int Adapter, int Frontend);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user