--- sc/Makefile 2013-04-10 20:51:06.971326458 +0200
+++ vdr-plugin-sc-1.0.0+hg20121018/Makefile 2013-04-05 12:32:00.000000000 +0200
@@ -27,7 +27,8 @@ PLUGIN = sc
DISTFILE = .distvers
HGARCHIVE = .hg_archival.txt
RELEASE := $(shell grep 'define SC_RELEASE' version.h | awk '{ print $$3 }' | sed -e 's/[";]//g')
-SUBREL := $(shell if test -d .hg; then \
+SUBREL := $(shell cd build; \
+ if test -d .hg; then \
echo -n "HG-"; (hg identify 2>/dev/null || echo -n "Unknown") | sed -e 's/ .*//'; \
elif test -r $(HGARCHIVE); then \
echo -n "AR-"; grep "^node" $(HGARCHIVE) | awk '{ printf "%.12s",$$2 }'; \
@@ -71,13 +72,13 @@ CXXFLAGS += -fno-strict-aliasing
### The version number of VDR (taken from VDR's "config.h"):
-VDRVERSION := $(shell sed -ne '/define VDRVERSION/ s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/include/vdr/config.h)
-APIVERSION := $(shell sed -ne '/define APIVERSION/ s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/include/vdr/config.h)
+VDRVERSION := $(shell sed -ne '/define VDRVERSION/ s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/config.h)
+APIVERSION := $(shell sed -ne '/define APIVERSION/ s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/config.h)
ifeq ($(strip $(APIVERSION)),)
APIVERSION = $(VDRVERSION)
endif
-VDRVERSNUM := $(shell sed -ne '/define VDRVERSNUM/ s/^.[a-zA-Z ]*\([0-9]*\) .*$$/\1/p' $(VDRDIR)/include/vdr/config.h)
-APIVERSNUM := $(shell sed -ne '/define APIVERSNUM/ s/^.[a-zA-Z ]*\([0-9]*\) .*$$/\1/p' $(VDRDIR)/include/vdr/config.h)
+VDRVERSNUM := $(shell sed -ne '/define VDRVERSNUM/ s/^.[a-zA-Z ]*\([0-9]*\) .*$$/\1/p' $(VDRDIR)/config.h)
+APIVERSNUM := $(shell sed -ne '/define APIVERSNUM/ s/^.[a-zA-Z ]*\([0-9]*\) .*$$/\1/p' $(VDRDIR)/config.h)
ifeq ($(strip $(APIVERSNUM)),)
APIVERSNUM = $(VDRVERSNUM)
endif
@@ -101,7 +102,7 @@ LOCALEDIR = $(VDRDIR)/locale
# test VDR version
BYVERS = $(strip $(shell if test $(APIVERSNUM) -ge 010703; then echo "*"; fi))
# test if PlayTsVideo() exists (e.g. TSplay patch)
-BYTSPL = $(strip $(shell grep -l 'PlayTsVideo' $(VDRDIR)/include/vdr/device.h))
+BYTSPL = $(strip $(shell grep -l 'PlayTsVideo' $(VDRDIR)/device.h))
ifneq ($(BYVERS)$(BYTSPL),)
SHAREDDEFINES += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
@@ -138,17 +139,17 @@ endif
DEVPLUGOBJS += device-hd.o
# max number of CAIDs per slot
-MAXCAID := $(shell sed -ne '/define MAXCASYSTEMIDS/ s/^.[a-zA-Z ]*\([0-9]*\).*$$/\1/p' $(VDRDIR)/ci.c)
+MAXCAID = 64
ifneq ($(strip $(MAXCAID)),)
DEFINES += -DVDR_MAXCAID=$(MAXCAID)
endif
# FFdeCSA
-CPUOPT ?= pentium
-PARALLEL ?= PARALLEL_32_INT
-CSAFLAGS ?= -Wall -fPIC -g -O3 -mmmx -fomit-frame-pointer -fexpensive-optimizations -funroll-loops
-FFDECSADIR = FFdecsa
-FFDECSA = $(FFDECSADIR)/FFdecsa.o
+CPUOPT ?= k8
+PARALLEL ?= PARALLEL_128_SSE
+CSAFLAGS ?= -Wall -fPIC -g -O3 -mmmx -fomit-frame-pointer -fexpensive-optimizations -funroll-loops
+FFDECSADIR = FFdecsa
+FFDECSA = $(FFDECSADIR)/FFdecsa.o
FFDECSATEST = $(FFDECSADIR)/FFdecsa_test.done
# SASC
dag Patch für die aktuelle dvbhddevice Version 2.0.0 (vdr-2.0.0)
Link ist nicht mehr aktiv.
diff -upr dvbhddevice/dvbhddevice.c dvbhddevice.dag/dvbhddevice.c
--- dvbhddevice/dvbhddevice.c 2013-05-09 00:16:16.000000000 +0200
+++ dvbhddevice.dag/dvbhddevice.c 2013-05-09 00:16:16.000000000 +0200
@@ -10,13 +10,11 @@
#include "menu.h"
#include "setup.h"
-static const char *VERSION = "2.0.1";
+static const char *VERSION = "2.0.1dag";
static const char *DESCRIPTION = trNOOP("HD Full Featured DVB device");
static const char *MAINMENUENTRY = "dvbhddevice";
class cPluginDvbhddevice : public cPlugin {
-private:
- cDvbHdFfDeviceProbe *probe;
bool mIsUserInactive;
public:
cPluginDvbhddevice(void);
@@ -29,23 +27,62 @@ public:
virtual cOsdObject *MainMenuAction(void);
virtual cMenuSetupPage *SetupMenu(void);
virtual bool SetupParse(const char *Name, const char *Value);
+ virtual bool Initialize();
};
-cPluginDvbhddevice::cPluginDvbhddevice(void)
-: mIsUserInactive(true)
-{
- probe = new cDvbHdFfDeviceProbe;
-}
+cPluginDvbhddevice::cPluginDvbhddevice(void){}
-cPluginDvbhddevice::~cPluginDvbhddevice()
+cPluginDvbhddevice::~cPluginDvbhddevice(){}
+
+bool cPluginDvbhddevice::Initialize()
{
- delete probe;
+ mIsUserInactive = true;
+ dsyslog("cPluginDvbhddevice::Initialize");
+ static uint32_t SubsystemIds[] = {
+ 0x13C23009, // Technotrend S2-6400 HDFF development samples
+ 0x13C2300A, // Technotrend S2-6400 HDFF production version
+ 0x00000000
+ };
+
+ for (int Adapter = 0; Adapter<MAXDVBDEVICES; Adapter++)
+ {
+ cString FileName;
+ cReadLine ReadLine;
+ FILE *f = NULL;
+ uint32_t SubsystemId = 0;
+ FileName = cString::sprintf("/sys/class/dvb/dvb%d.frontend0/device/subsystem_vendor", Adapter);
+ if ((f = fopen(FileName, "r")) != NULL) {
+ if (char *s = ReadLine.Read(f))
+ SubsystemId = strtoul(s, NULL, 0) << 16;
+ fclose(f);
+ }
+ FileName = cString::sprintf("/sys/class/dvb/dvb%d.frontend0/device/subsystem_device", Adapter);
+ if ((f = fopen(FileName, "r")) != NULL) {
+ if (char *s = ReadLine.Read(f))
+ SubsystemId |= strtoul(s, NULL, 0);
+ fclose(f);
+ }
+ for (uint32_t *sid = SubsystemIds; *sid; sid++) {
+ if (*sid == SubsystemId) {
+ FileName = cString::sprintf("/dev/dvb/adapter%d/osd0", Adapter);
+ int fd = open(FileName, O_RDWR);
+ if (fd != -1) { //TODO treat the second path of the S2-6400 as a budget device
+ close(fd);
+ dsyslog("creating cDvbHdFfDevice");
+ new cDvbHdFfDevice(Adapter, 0);
+ return true;
+ }
+ }
+ }
+ }
+
+ return false;
}
void cPluginDvbhddevice::MainThreadHook(void)
{
bool isUserInactive = ShutdownHandler.IsUserInactive();
- if (isUserInactive != mIsUserInactive)
+ if (isUserInactive != mIsUserInactive)
{
mIsUserInactive = isUserInactive;
if (gHdffSetup.CecEnabled && gHdffSetup.CecTvOn)
diff -upr dvbhddevice/dvbhdffdevice.c dvbhddevice.dag/dvbhdffdevice.c
--- dvbhddevice/dvbhdffdevice.c 2013-05-09 00:16:16.000000000 +0200
+++ dvbhddevice.dag/dvbhdffdevice.c 2013-05-09 00:16:16.000000000 +0200
@@ -30,12 +30,13 @@ static uchar *YuvToJpeg(uchar *Mem, int
int cDvbHdFfDevice::devHdffOffset = -1;
cDvbHdFfDevice::cDvbHdFfDevice(int Adapter, int Frontend)
-:cDvbDevice(Adapter, Frontend)
{
spuDecoder = NULL;
audioChannel = 0;
playMode = pmNone;
mHdffCmdIf = NULL;
+ adapter = Adapter;
+ frontend = Frontend;
// Devices that are only present on cards with decoders:
@@ -47,7 +48,7 @@ cDvbHdFfDevice::cDvbHdFfDevice(int Adapt
isHdffPrimary = false;
if (devHdffOffset < 0) {
- devHdffOffset = adapter;
+ devHdffOffset = DeviceNumber();
isHdffPrimary = true;
mHdffCmdIf = new HDFF::cHdffCmdIf(fd_osd);
@@ -87,6 +88,7 @@ cDvbHdFfDevice::cDvbHdFfDevice(int Adapt
mHdffCmdIf->CmdRemoteSetProtocol((HdffRemoteProtocol_t) gHdffSetup.RemoteProtocol);
mHdffCmdIf->CmdRemoteSetAddressFilter(gHdffSetup.RemoteAddress >= 0, gHdffSetup.RemoteAddress);
}
+ SetPlayMode(pmNone);
}
cDvbHdFfDevice::~cDvbHdFfDevice()
@@ -100,11 +102,29 @@ cDvbHdFfDevice::~cDvbHdFfDevice()
// caused segfaults. Besides, the program is about to terminate anyway...
}
+cString cDvbHdFfDevice::DvbName(const char *Name, int Adapter, int Frontend)
+{
+#if VDRVERSNUM < 10724
+ return cString::sprintf("%s%d/%s%d", DEV_DVB_ADAPTER, Adapter, Name, Frontend);
+#else
+ return cString::sprintf("%s/%s%d/%s%d", DEV_DVB_BASE, DEV_DVB_ADAPTER, Adapter, Name, Frontend);
+#endif
+}
+
+int cDvbHdFfDevice::DvbOpen(const char *Name, int Adapter, int Frontend, int Mode, bool ReportError)
+{
+ cString FileName = DvbName(Name, Adapter, Frontend);
+ int fd = open(FileName, Mode);
+ if (fd < 0 && ReportError)
+ LOG_ERROR_STR(*FileName);
+ return fd;
+}
+
void cDvbHdFfDevice::MakePrimaryDevice(bool On)
{
if (On)
new cHdffOsdProvider(mHdffCmdIf);
- cDvbDevice::MakePrimaryDevice(On);
+ cDevice::MakePrimaryDevice(On);
}
bool cDvbHdFfDevice::HasDecoder(void) const
@@ -354,7 +374,7 @@ bool cDvbHdFfDevice::SetPid(cPidHandle *
return true;
}
-void cDvbHdFfDevice::TurnOffLiveMode(bool LiveView)
+/* void cDvbHdFfDevice::TurnOffLiveMode(bool LiveView)
{
// Turn off live PIDs:
@@ -419,7 +439,7 @@ bool cDvbHdFfDevice::SetChannelDevice(co
cControl::Launch(new cTransferControl(this, Channel));
return true;
-}
+}*/
int cDvbHdFfDevice::GetAudioChannelDevice(void)
{
@@ -499,9 +519,6 @@ bool cDvbHdFfDevice::SetPlayMode(ePlayMo
mHdffCmdIf->CmdAvMuteAudio(0, false);
}
else {
- if (playMode == pmNone)
- TurnOffLiveMode(true);
-
if (PlayMode == pmExtern_THIS_SHOULD_BE_AVOIDED)
{
close(fd_video);
@@ -950,46 +967,6 @@ HDFF::cHdffCmdIf *cDvbHdFfDevice::GetHdf
return NULL;
}
-// --- cDvbHdFfDeviceProbe ---------------------------------------------------
-
-bool cDvbHdFfDeviceProbe::Probe(int Adapter, int Frontend)
-{
- static uint32_t SubsystemIds[] = {
- 0x13C23009, // Technotrend S2-6400 HDFF development samples
- 0x13C2300A, // Technotrend S2-6400 HDFF production version
- 0x00000000
- };
- cString FileName;
- cReadLine ReadLine;
- FILE *f = NULL;
- uint32_t SubsystemId = 0;
- FileName = cString::sprintf("/sys/class/dvb/dvb%d.frontend%d/device/subsystem_vendor", Adapter, Frontend);
- if ((f = fopen(FileName, "r")) != NULL) {
- if (char *s = ReadLine.Read(f))
- SubsystemId = strtoul(s, NULL, 0) << 16;
- fclose(f);
- }
- FileName = cString::sprintf("/sys/class/dvb/dvb%d.frontend%d/device/subsystem_device", Adapter, Frontend);
- if ((f = fopen(FileName, "r")) != NULL) {
- if (char *s = ReadLine.Read(f))
- SubsystemId |= strtoul(s, NULL, 0);
- fclose(f);
- }
- for (uint32_t *sid = SubsystemIds; *sid; sid++) {
- if (*sid == SubsystemId) {
- FileName = cString::sprintf("/dev/dvb/adapter%d/osd0", Adapter);
- int fd = open(FileName, O_RDWR);
- if (fd != -1) { //TODO treat the second path of the S2-6400 as a budget device
- close(fd);
- dsyslog("creating cDvbHdFfDevice");
- new cDvbHdFfDevice(Adapter, Frontend);
- return true;
- }
- }
- }
- return false;
-}
-
// --- YuvToJpeg -------------------------------------------------------------
diff -upr dvbhddevice/dvbhdffdevice.h dvbhddevice.dag/dvbhdffdevice.h
--- dvbhddevice/dvbhdffdevice.h 2013-05-09 00:16:16.000000000 +0200
+++ dvbhddevice.dag/dvbhdffdevice.h 2013-05-09 00:16:16.000000000 +0200
@@ -8,16 +8,18 @@
#define __DVBHDFFDEVICE_H
#include "hdffcmd.h"
-#include <vdr/dvbdevice.h>
+#include <vdr/device.h>
#include <vdr/dvbspu.h>
/// The cDvbHdFfDevice implements a DVB device which can be accessed through the Linux DVB driver API.
-class cDvbHdFfDevice : public cDvbDevice {
+class cDvbHdFfDevice : public cDevice {
private:
- int fd_osd, fd_audio, fd_video;
+ int adapter, frontend, fd_osd, fd_audio, fd_video;
protected:
virtual void MakePrimaryDevice(bool On);
+ static cString DvbName(const char *Name, int Adapter, int Frontend);
+ static int DvbOpen(const char *Name, int Adapter, int Frontend, int Mode, bool ReportError = false);
public:
static bool Probe(int Adapter, int Frontend);
cDvbHdFfDevice(int Adapter, int Frontend);
@@ -31,13 +33,6 @@ private:
public:
virtual cSpuDecoder *GetSpuDecoder(void);
-// Channel facilities
-
-private:
- void TurnOffLiveMode(bool LiveView);
-protected:
- virtual bool SetChannelDevice(const cChannel *Channel, bool LiveView);
-
// PID handle facilities
protected:
@@ -118,9 +113,4 @@ private:
HDFF::cHdffCmdIf *mHdffCmdIf;
};
-class cDvbHdFfDeviceProbe : public cDvbDeviceProbe {
-public:
- virtual bool Probe(int Adapter, int Frontend);
- };
-
#endif //__DVBHDFFDEVICE_H
Wir verwenden Cookies und ähnliche Technologien für folgende Zwecke:
Akzeptieren Sie Cookies und diese Technologien?
Wir verwenden Cookies und ähnliche Technologien für folgende Zwecke:
Akzeptieren Sie Cookies und diese Technologien?