- removed legacy code for pre VDR 1.4

- dropped patches for pre VDR 1.4
This commit is contained in:
schmirl
2008-04-07 14:27:27 +00:00
parent 71cc16a1eb
commit f51d6eb2df
30 changed files with 36 additions and 855 deletions

View File

@@ -1,5 +1,5 @@
/*
* $Id: assembler.c,v 1.2 2005/01/25 14:14:43 lordjaxom Exp $
* $Id: assembler.c,v 1.3 2008/04/07 14:27:28 schmirl Exp $
*/
#include "client/assembler.h"
@@ -15,9 +15,7 @@
#include <unistd.h>
cStreamdevAssembler::cStreamdevAssembler(cTBSocket *Socket)
#if VDRVERSNUM >= 10300
:cThread("Streamdev: UDP-TS Assembler")
#endif
{
m_Socket = Socket;
if (pipe(m_Pipe) != 0) {
@@ -50,11 +48,6 @@ void cStreamdevAssembler::Action(void) {
const int rbminfill = rbmargin * 50;
cRingBufferLinear ringbuf(rbsize, rbmargin, true);
#if VDRVERSNUM < 10300
isyslog("streamdev-client: UDP-TS Assembler thread started (pid=%d)",
getpid());
#endif
m_Mutex.Lock();
m_Active = true;
@@ -113,10 +106,6 @@ void cStreamdevAssembler::Action(void) {
}
}
}
#if VDRVERSNUM < 10300
isyslog("streamdev-client: UDP-TS Assembler thread stopped", getpid());
#endif
}
void cStreamdevAssembler::WaitForFill(void) {

View File

@@ -1,5 +1,5 @@
/*
* $Id: device.c,v 1.15 2007/12/12 12:22:45 schmirl Exp $
* $Id: device.c,v 1.16 2008/04/07 14:27:28 schmirl Exp $
*/
#include "client/device.h"
@@ -28,18 +28,9 @@ cStreamdevDevice::cStreamdevDevice(void) {
m_TSBuffer = NULL;
m_Assembler = NULL;
#if VDRVERSNUM < 10300
# if defined(HAVE_AUTOPID)
(void)new cSIProcessor(new cSectionsScanner(""));
# else
(void)new cSIProcessor("");
# endif
cSIProcessor::Read();
#else
m_Filters = new cStreamdevFilters;
StartSectionHandler();
cSchedules::Read();
#endif
m_Device = this;
m_Pids = 0;
@@ -61,9 +52,7 @@ cStreamdevDevice::~cStreamdevDevice() {
Cancel(3);
#if VDRVERSNUM >= 10300
DELETENULL(m_Filters);
#endif
DELETENULL(m_TSBuffer);
delete m_Assembler;
}
@@ -121,19 +110,7 @@ bool cStreamdevDevice::SetChannelDevice(const cChannel *Channel,
&& TRANSPONDER(Channel, m_Channel))
return true;
#if VDRVERSNUM < 10338
DetachAll(pidHandles[ptAudio].pid);
DetachAll(pidHandles[ptVideo].pid);
DetachAll(pidHandles[ptPcr].pid);
DetachAll(pidHandles[ptTeletext].pid);
DelPid(pidHandles[ptAudio].pid);
DelPid(pidHandles[ptVideo].pid);
DelPid(pidHandles[ptPcr].pid, ptPcr);
DelPid(pidHandles[ptTeletext].pid);
DelPid(pidHandles[ptDolby].pid);
#else
DetachAllReceivers();
#endif
m_Channel = Channel;
bool r = ClientSocket.SetChannelDevice(m_Channel);
Dprintf("setchanneldevice r=%d\n", r);
@@ -268,7 +245,6 @@ esyslog("cStreamDevice::GetTSPacket: GetChecked: NOTHING (%d)", m_TSFails);
return false;
}
#if VDRVERSNUM >= 10300
int cStreamdevDevice::OpenFilter(u_short Pid, u_char Tid, u_char Mask) {
Dprintf("OpenFilter\n");
@@ -290,7 +266,6 @@ int cStreamdevDevice::OpenFilter(u_short Pid, u_char Tid, u_char Mask) {
return -1;
}
#endif
bool cStreamdevDevice::Init(void) {
if (m_Device == NULL && StreamdevClientSetup.StartClient)

View File

@@ -1,5 +1,5 @@
/*
* $Id: device.h,v 1.5 2007/04/24 10:43:40 schmirl Exp $
* $Id: device.h,v 1.6 2008/04/07 14:27:28 schmirl Exp $
*/
#ifndef VDR_STREAMDEV_DEVICE_H
@@ -22,9 +22,7 @@ private:
const cChannel *m_Channel;
cTSBuffer *m_TSBuffer;
cStreamdevAssembler *m_Assembler;
#if VDRVERSNUM >= 10307
cStreamdevFilters *m_Filters;
#endif
int m_Pids;
bool m_DvrClosed;
@@ -47,9 +45,7 @@ protected:
virtual void CloseDvr(void);
virtual bool GetTSPacket(uchar *&Data);
#if VDRVERSNUM >= 10300
virtual int OpenFilter(u_short Pid, u_char Tid, u_char Mask);
#endif
public:
cStreamdevDevice(void);

View File

@@ -1,5 +1,5 @@
/*
* $Id: filter.c,v 1.11 2007/04/24 11:23:16 schmirl Exp $
* $Id: filter.c,v 1.12 2008/04/07 14:27:28 schmirl Exp $
*/
#include "client/filter.h"
@@ -9,8 +9,6 @@
#include <vdr/device.h>
#if VDRVERSNUM >= 10300
// --- cStreamdevFilter ------------------------------------------------------
class cStreamdevFilter: public cListObject {
@@ -290,5 +288,3 @@ void cStreamdevFilters::Action(void) {
DELETENULL(m_TSBuffer);
dsyslog("StreamdevFilters::Action() ended");
}
#endif // VDRVERSNUM >= 10300

View File

@@ -1,14 +1,11 @@
/*
* $Id: filter.h,v 1.4 2007/04/24 11:23:16 schmirl Exp $
* $Id: filter.h,v 1.5 2008/04/07 14:27:28 schmirl Exp $
*/
#ifndef VDR_STREAMDEV_FILTER_H
#define VDR_STREAMDEV_FILTER_H
#include <vdr/config.h>
# if VDRVERSNUM >= 10300
#include <vdr/tools.h>
#include <vdr/thread.h>
@@ -33,5 +30,4 @@ public:
int OpenFilter(u_short Pid, u_char Tid, u_char Mask);
};
# endif // VDRVERSNUM >= 10300
#endif // VDR_STREAMDEV_FILTER_H

View File

@@ -1,5 +1,5 @@
/*
* $Id: menu.c,v 1.4 2005/03/12 12:54:19 lordjaxom Exp $
* $Id: menu.c,v 1.5 2008/04/07 14:27:28 schmirl Exp $
*/
#include <vdr/menuitems.h>
@@ -53,54 +53,6 @@ void cStreamdevMenu::SuspendServer(void) {
ERROR(tr("Couldn't suspend Server!"));
}
#if VDRVERSNUM < 10307
// --- cMenuEditChanItem -----------------------------------------------------
class cMenuEditChanItem : public cMenuEditIntItem {
protected:
virtual void Set(void);
public:
cMenuEditChanItem(const char *Name, int *Value);
virtual eOSState ProcessKey(eKeys Key);
};
// --- cMenuEditDateItem -----------------------------------------------------
class cMenuEditDateItem : public cMenuEditItem {
protected:
time_t *value;
virtual void Set(void);
public:
cMenuEditDateItem(const char *Name, time_t *Value);
virtual eOSState ProcessKey(eKeys Key);
};
// --- cMenuEditDayItem ------------------------------------------------------
class cMenuEditDayItem : public cMenuEditIntItem {
protected:
static int days[];
int d;
virtual void Set(void);
public:
cMenuEditDayItem(const char *Name, int *Value);
virtual eOSState ProcessKey(eKeys Key);
};
// --- cMenuEditTimeItem -----------------------------------------------------
class cMenuEditTimeItem : public cMenuEditItem {
protected:
int *value;
int hh, mm;
int pos;
virtual void Set(void);
public:
cMenuEditTimeItem(const char *Name, int *Value);
virtual eOSState ProcessKey(eKeys Key);
};
#endif // VDRVERSNUM < 10307
// --- cStreamdevMenuEditTimer -----------------------------------------------
class cStreamdevMenuEditTimer : public cOsdMenu {
@@ -132,18 +84,12 @@ cStreamdevMenuEditTimer::cStreamdevMenuEditTimer(cRemoteTimer *Timer, bool New):
if (New)
m_Data.m_Active = 1;
m_Channel = m_Data.Channel()->Number();
#if VDRVERSNUM < 10300
Add(new cMenuEditBoolItem(tr("Active"), &m_Data.m_Active));
#else
Add(new cMenuEditBitItem( tr("Active"), &m_Data.m_Active, tfActive));
#endif
Add(new cMenuEditChanItem(tr("Channel"), &m_Channel));
Add(new cMenuEditDayItem( tr("Day"), &m_Data.m_Day));
Add(new cMenuEditTimeItem(tr("Start"), &m_Data.m_Start));
Add(new cMenuEditTimeItem(tr("Stop"), &m_Data.m_Stop));
#if VDRVERSNUM >= 10300
Add(new cMenuEditBitItem( tr("VPS"), &m_Data.m_Active, tfVps));
#endif
Add(new cMenuEditIntItem( tr("Priority"), &m_Data.m_Priority, 0,
MAXPRIORITY));
Add(new cMenuEditIntItem( tr("Lifetime"), &m_Data.m_Lifetime, 0,
@@ -227,54 +173,15 @@ eOSState cStreamdevMenuEditTimer::ProcessKey(eKeys Key) {
// --- cMenuWhatsOnItem ------------------------------------------------------
#if VDRVERSNUM < 10300
class cMenuWhatsOnItem : public cOsdItem {
public:
const cEventInfo *eventInfo;
# ifdef HAVE_BEAUTYPATCH
cMenuWhatsOnItem(const cEventInfo *EventInfo, bool ShowProgressBar);
~cMenuWhatsOnItem();
virtual void Display(int Offset= -1, eDvbColor FgColor = clrWhite, eDvbColor BgColor = clrBackground);
protected:
cBitmap *progressBar;
bool showProgressBar;
float percent;
private:
void DrawProgressBar(eDvbColor FgColor, eDvbColor BgColor);
# else
cMenuWhatsOnItem(const cEventInfo *EventInfo);
# endif
};
#else
class cMenuWhatsOnItem : public cOsdItem {
public:
const cEvent *event;
const cChannel *channel;
cMenuWhatsOnItem(const cEvent *Event, cChannel *Channel); //, bool Now = false);
};
#endif
// --- cMenuEvent ------------------------------------------------------------
#if VDRVERSNUM < 10300
class cMenuEvent : public cOsdMenu {
private:
const cEventInfo *eventInfo;
public:
cMenuEvent(const cEventInfo *EventInfo, bool CanSwitch = false);
cMenuEvent(bool Now);
virtual eOSState ProcessKey(eKeys Key);
};
#elif VDRVERSNUM < 10307
class cMenuEvent : public cOsdMenu {
private:
const cEvent *event;
public:
cMenuEvent(const cEvent *Event, bool CanSwitch = false);
cMenuEvent(bool Now);
virtual eOSState ProcessKey(eKeys Key);
};
#else
class cMenuEvent : public cOsdMenu {
private:
const cEvent *event;
@@ -283,58 +190,16 @@ public:
virtual void Display(void);
virtual eOSState ProcessKey(eKeys Key);
};
#endif
// --- cStreamdevMenuWhatsOn -------------------------------------------------
int cStreamdevMenuWhatsOn::m_CurrentChannel = 0;
#if VDRVERSNUM < 10300
const cEventInfo *cStreamdevMenuWhatsOn::m_ScheduleEventInfo = NULL;
#else
const cEvent *cStreamdevMenuWhatsOn::m_ScheduleEventInfo = NULL;
#endif
#if VDRVERSNUM < 10300
static int CompareEventChannel(const void *p1, const void *p2) {
return (int)((*(const cEventInfo**)p1)->GetChannelNumber()
- (*(const cEventInfo**)p2)->GetChannelNumber());
}
#endif
cStreamdevMenuWhatsOn::cStreamdevMenuWhatsOn(const cSchedules *Schedules,
bool Now, int CurrentChannel):
cOsdMenu(Now ? tr("What's on now?") : tr("What's on next?"), CHNUMWIDTH,
7, 6) {
#if VDRVERSNUM < 10300
const cSchedule *Schedule = Schedules->First();
const cEventInfo **pArray = NULL;
int num = 0;
while (Schedule) {
pArray=(const cEventInfo**)realloc(pArray, (num + 1) * sizeof(cEventInfo*));
pArray[num] = Now ? Schedule->GetPresentEvent()
: Schedule->GetFollowingEvent();
if (pArray[num]) {
cChannel *channel
= Channels.GetByChannelID(pArray[num]->GetChannelID(), true);
if (channel)
pArray[num++]->SetChannelNumber(channel->Number());
}
Schedule = Schedules->Next(Schedule);
}
qsort(pArray, num, sizeof(cEventInfo*), CompareEventChannel);
for (int a = 0; a < num; ++a) {
int channelnr = pArray[a]->GetChannelNumber();
# ifdef HAVE_BEAUTYPATCH
Add(new cMenuWhatsOnItem(pArray[a],Now), channelnr == CurrentChannel);
# else
Add(new cMenuWhatsOnItem(pArray[a]), channelnr == CurrentChannel);
# endif
}
free(pArray);
#else
for (cChannel *Channel = Channels.First(); Channel;
Channel = Channels.Next(Channel)) {
if (!Channel->GroupSep()) {
@@ -349,35 +214,22 @@ cStreamdevMenuWhatsOn::cStreamdevMenuWhatsOn(const cSchedules *Schedules,
}
}
}
#endif
m_CurrentChannel = CurrentChannel;
SetHelp(Count() ? tr("Record") : NULL, Now ? tr("Next") : tr("Now"),
tr("Schedule"), tr("Switch"));
}
#if VDRVERSNUM < 10300
const cEventInfo *cStreamdevMenuWhatsOn::ScheduleEventInfo(void) {
const cEventInfo *ei = m_ScheduleEventInfo;
m_ScheduleEventInfo = NULL;
return ei;
}
#else
const cEvent *cStreamdevMenuWhatsOn::ScheduleEventInfo(void) {
const cEvent *ei = m_ScheduleEventInfo;
m_ScheduleEventInfo = NULL;
return ei;
}
#endif
eOSState cStreamdevMenuWhatsOn::Switch(void) {
cMenuWhatsOnItem *item = (cMenuWhatsOnItem*)Get(Current());
if (item) {
cChannel *channel
#if VDRVERSNUM < 10300
= Channels.GetByChannelID(item->eventInfo->GetChannelID(), true);
#else
= Channels.GetByChannelID(item->event->ChannelID(), true);
#endif
if (channel && cDevice::PrimaryDevice()->SwitchChannel(channel, true))
return osEnd;
}
@@ -389,11 +241,7 @@ eOSState cStreamdevMenuWhatsOn::Record(void) {
cMenuWhatsOnItem *item = (cMenuWhatsOnItem*)Get(Current());
if (item) {
cRemoteTimer *timer
#if VDRVERSNUM < 10300
= new cRemoteTimer(item->eventInfo);
#else
= new cRemoteTimer(item->event);
#endif
return AddSubMenu(new cStreamdevMenuEditTimer(timer));
// Load remote timers and see if timer exists before editing
}
@@ -414,13 +262,8 @@ eOSState cStreamdevMenuWhatsOn::ProcessKey(eKeys Key) {
{
cMenuWhatsOnItem *mi = (cMenuWhatsOnItem*)Get(Current());
if (mi) {
#if VDRVERSNUM < 10300
m_ScheduleEventInfo = mi->eventInfo;
m_CurrentChannel = mi->eventInfo->GetChannelNumber();
#else
m_ScheduleEventInfo = mi->event;
m_CurrentChannel = mi->channel->Number();
#endif
}
}
break;
@@ -430,13 +273,8 @@ eOSState cStreamdevMenuWhatsOn::ProcessKey(eKeys Key) {
case kOk:
if (Count())
#if VDRVERSNUM < 10300
return AddSubMenu(new cMenuEvent(
((cMenuWhatsOnItem*)Get(Current()))->eventInfo, true));
#else
return AddSubMenu(new cMenuEvent(
((cMenuWhatsOnItem*)Get(Current()))->event, true));
#endif
break;
default:
@@ -448,28 +286,16 @@ eOSState cStreamdevMenuWhatsOn::ProcessKey(eKeys Key) {
// --- cMenuScheduleItem -----------------------------------------------------
#if VDRVERSNUM < 10300
class cMenuScheduleItem : public cOsdItem {
public:
const cEventInfo *eventInfo;
cMenuScheduleItem(const cEventInfo *EventInfo);
};
#else
class cMenuScheduleItem : public cOsdItem {
public:
const cEvent *event;
cMenuScheduleItem(const cEvent *Event);
};
#endif
// --- cStreamdevMenuSchedule ------------------------------------------------
cStreamdevMenuSchedule::cStreamdevMenuSchedule(void):
#if VDRVERSNUM < 10300
cOsdMenu("", 6, 6)
#else
cOsdMenu("", 7, 6, 4)
#endif
{
m_Now = false;
m_Next = false;
@@ -478,11 +304,7 @@ cStreamdevMenuSchedule::cStreamdevMenuSchedule(void):
cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel());
if (channel) {
#if VDRVERSNUM < 10300
m_Schedules = cSIProcessor::Schedules(m_Lock);
#else
m_Schedules = cSchedules::Schedules(m_Lock);
#endif
PrepareSchedule(channel);
SetHelp(Count() ? tr("Record") : NULL, tr("Now"), tr("Next"));
}
@@ -491,46 +313,7 @@ cStreamdevMenuSchedule::cStreamdevMenuSchedule(void):
cStreamdevMenuSchedule::~cStreamdevMenuSchedule() {
}
#if VDRVERSNUM < 10307
static int CompareEventTime(const void *p1, const void *p2) {
#if VDRVERSNUM < 10300
return (int)((*(cEventInfo **)p1)->GetTime()
- (*(cEventInfo **)p2)->GetTime());
#else
return (int)((*(cEvent**)p1)->StartTime()
- (*(cEvent**)p2)->StartTime());
#endif
}
#endif
void cStreamdevMenuSchedule::PrepareSchedule(cChannel *Channel) {
#if VDRVERSNUM < 10300
cTBString buffer;
Clear();
buffer.Format(tr("Schedule - %s"), Channel->Name());
SetTitle(buffer);
if (m_Schedules) {
const cSchedule *Schedule=m_Schedules->GetSchedule(Channel->GetChannelID());
if (Schedule) {
int num = Schedule->NumEvents();
const cEventInfo **pArray = MALLOC(const cEventInfo*, num);
if (pArray) {
time_t now = time(NULL);
int numreal = 0;
for (int a = 0; a < num; ++a) {
const cEventInfo *EventInfo = Schedule->GetEventNumber(a);
if (EventInfo->GetTime() + EventInfo->GetDuration() > now)
pArray[numreal++] = EventInfo;
}
qsort(pArray, numreal, sizeof(cEventInfo*), CompareEventTime);
for (int a = 0; a < numreal; ++a)
Add(new cMenuScheduleItem(pArray[a]));
free(pArray);
}
}
}
#else
Clear();
char *buffer = NULL;
asprintf(&buffer, tr("Schedule - %s"), Channel->Name());
@@ -547,7 +330,6 @@ void cStreamdevMenuSchedule::PrepareSchedule(cChannel *Channel) {
}
}
}
#endif
}
eOSState cStreamdevMenuSchedule::Switch(void) {
@@ -563,11 +345,7 @@ eOSState cStreamdevMenuSchedule::Record(void) {
cMenuScheduleItem *item = (cMenuScheduleItem*)Get(Current());
if (item) {
cRemoteTimer *timer
#if VDRVERSNUM < 10300
= new cRemoteTimer(item->eventInfo);
#else
= new cRemoteTimer(item->event);
#endif
return AddSubMenu(new cStreamdevMenuEditTimer(timer));
// Load remote timers and see if timer exists before editing
}
@@ -588,14 +366,8 @@ eOSState cStreamdevMenuSchedule::ProcessKey(eKeys Key) {
int channelnr = 0;
if (Count()) {
cChannel *channel
#if VDRVERSNUM < 10300
= Channels.GetByChannelID(
((cMenuScheduleItem*)Get(Current()))->eventInfo->GetChannelID(),
true);
#else
= Channels.GetByChannelID(
((cMenuScheduleItem*)Get(Current()))->event->ChannelID(), true);
#endif
if (channel)
channelnr = channel->Number();
}
@@ -622,13 +394,8 @@ eOSState cStreamdevMenuSchedule::ProcessKey(eKeys Key) {
case kOk:
if (Count())
#if VDRVERSNUM < 10300
return AddSubMenu(new cMenuEvent(
((cMenuScheduleItem*)Get(Current()))->eventInfo, m_OtherChannel));
#else
return AddSubMenu(new cMenuEvent(
((cMenuScheduleItem*)Get(Current()))->event, m_OtherChannel));
#endif
break;
default:
@@ -637,19 +404,11 @@ eOSState cStreamdevMenuSchedule::ProcessKey(eKeys Key) {
} else if (!HasSubMenu()) {
m_Now = false;
m_Next = false;
#if VDRVERSNUM < 10300
const cEventInfo *ei
#else
const cEvent *ei
#endif
= cStreamdevMenuWhatsOn::ScheduleEventInfo();
if (ei) {
cChannel *channel
#if VDRVERSNUM < 10300
= Channels.GetByChannelID(ei->GetChannelID(), true);
#else
= Channels.GetByChannelID(ei->ChannelID(), true);
#endif
if (channel) {
PrepareSchedule(channel);
if (channel->Number() != cDevice::CurrentChannel()) {
@@ -753,10 +512,8 @@ cStreamdevMenuRecordings::cStreamdevMenuRecordings(const char *Base, int Level,
return;
}
#if VDRVERSNUM >= 10307
STATUS(NULL);
FLUSH();
#endif
SetHelpKeys();
}

View File

@@ -1,5 +1,5 @@
/*
* $Id: menu.h,v 1.1 2004/12/30 22:44:02 lordjaxom Exp $
* $Id: menu.h,v 1.2 2008/04/07 14:27:28 schmirl Exp $
*/
#ifndef VDR_STREAMDEV_MENU_H
@@ -42,11 +42,7 @@ private:
bool m_Next;
int m_OtherChannel;
const cSchedules *m_Schedules;
#if VDRVERSNUM < 10300
cMutexLock m_Lock;
#else
cSchedulesLock m_Lock;
#endif
protected:
void PrepareSchedule(cChannel *Channel);
@@ -66,11 +62,7 @@ public:
class cStreamdevMenuWhatsOn: public cOsdMenu {
private:
static int m_CurrentChannel;
#if VDRVERSNUM < 10300
static const cEventInfo *m_ScheduleEventInfo;
#else
static const cEvent *m_ScheduleEventInfo;
#endif
protected:
eOSState Switch(void);
@@ -82,11 +74,7 @@ public:
static int CurrentChannel(void) { return m_CurrentChannel; }
static void SetCurrentChannel(int Channel) { m_CurrentChannel = Channel; }
#if VDRVERSNUM < 10300
static const cEventInfo *ScheduleEventInfo(void);
#else
static const cEvent *ScheduleEventInfo(void);
#endif
virtual eOSState ProcessKey(eKeys Key);
};

View File

@@ -1,5 +1,5 @@
/*
* $Id: remote.c,v 1.4 2005/04/24 16:26:14 lordjaxom Exp $
* $Id: remote.c,v 1.5 2008/04/07 14:27:28 schmirl Exp $
*/
#include <ctype.h>
@@ -196,16 +196,6 @@ cRemoteTimer::cRemoteTimer(const char *Text) {
m_IsValid = true;
}
#if VDRVERSNUM < 10300
cRemoteTimer::cRemoteTimer(const cEventInfo *EventInfo) {
time_t tstart = EventInfo->GetTime();
time_t tstop = tstart + EventInfo->GetDuration() + Setup.MarginStop * 60;
tstart -= Setup.MarginStart * 60;
struct tm tm_r;
struct tm *time = localtime_r(&tstart, &tm_r);
const char *title = EventInfo->GetTitle();
cChannel *channel = Channels.GetByChannelID(EventInfo->GetChannelID(), true);
#else
cRemoteTimer::cRemoteTimer(const cEvent *Event) {
time_t tstart = Event->StartTime();
time_t tstop = tstart + Event->Duration() + Setup.MarginStop * 60;
@@ -214,7 +204,6 @@ cRemoteTimer::cRemoteTimer(const cEvent *Event) {
struct tm *time = localtime_r(&tstart, &tm_r);
const char *title = Event->Title();
cChannel *channel = Channels.GetByChannelID(Event->ChannelID(), true);
#endif
m_IsValid = true;
m_Index = -1;

View File

@@ -1,5 +1,5 @@
/*
* $Id: remote.h,v 1.2 2005/02/08 17:22:35 lordjaxom Exp $
* $Id: remote.h,v 1.3 2008/04/07 14:27:28 schmirl Exp $
*/
#ifndef VDR_STREAMDEV_REMOTE_H
@@ -8,11 +8,7 @@
#include <vdr/config.h>
#include <string>
#if VDRVERSNUM < 10300
class cEventInfo;
#else
class cEvent;
#endif
class cChannel;
class cRemoteRecording: public cListObject {
@@ -76,11 +72,7 @@ private:
public:
cRemoteTimer(const char *Text);
#if VDRVERSNUM < 10300
cRemoteTimer(const cEventInfo *EventInfo);
#else
cRemoteTimer(const cEvent *Event);
#endif
cRemoteTimer(void);
~cRemoteTimer();

View File

@@ -1,5 +1,5 @@
/*
* $Id: setup.c,v 1.2 2005/02/08 15:34:38 lordjaxom Exp $
* $Id: setup.c,v 1.3 2008/04/07 14:27:28 schmirl Exp $
*/
#include <vdr/menuitems.h>
@@ -13,9 +13,7 @@ cStreamdevClientSetup StreamdevClientSetup;
cStreamdevClientSetup::cStreamdevClientSetup(void) {
StartClient = false;
RemotePort = 2004;
#if VDRVERSNUM >= 10300
StreamFilters = false;
#endif
SyncEPG = false;
strcpy(RemoteIp, "");
}
@@ -29,9 +27,7 @@ bool cStreamdevClientSetup::SetupParse(const char *Name, const char *Value) {
strcpy(RemoteIp, Value);
}
else if (strcmp(Name, "RemotePort") == 0) RemotePort = atoi(Value);
#if VDRVERSNUM >= 10300
else if (strcmp(Name, "StreamFilters") == 0) StreamFilters = atoi(Value);
#endif
else if (strcmp(Name, "SyncEPG") == 0) SyncEPG = atoi(Value);
else return false;
return true;
@@ -43,9 +39,7 @@ cStreamdevClientMenuSetupPage::cStreamdevClientMenuSetupPage(void) {
AddBoolEdit (tr("Start Client"), m_NewSetup.StartClient);
AddIpEdit (tr("Remote IP"), m_NewSetup.RemoteIp);
AddShortEdit(tr("Remote Port"), m_NewSetup.RemotePort);
#if VDRVERSNUM >= 10300
AddBoolEdit (tr("Filter Streaming"), m_NewSetup.StreamFilters);
#endif
AddBoolEdit (tr("Synchronize EPG"), m_NewSetup.SyncEPG);
SetCurrent(Get(0));
}
@@ -67,9 +61,7 @@ void cStreamdevClientMenuSetupPage::Store(void) {
else
SetupStore("RemoteIp", m_NewSetup.RemoteIp);
SetupStore("RemotePort", m_NewSetup.RemotePort);
#if VDRVERSNUM >= 10300
SetupStore("StreamFilters", m_NewSetup.StreamFilters);
#endif
SetupStore("SyncEPG", m_NewSetup.SyncEPG);
StreamdevClientSetup = m_NewSetup;

View File

@@ -1,5 +1,5 @@
/*
* $Id: setup.h,v 1.2 2005/02/08 15:34:38 lordjaxom Exp $
* $Id: setup.h,v 1.3 2008/04/07 14:27:28 schmirl Exp $
*/
#ifndef VDR_STREAMDEV_SETUPCLIENT_H
@@ -15,9 +15,7 @@ struct cStreamdevClientSetup {
int StartClient;
char RemoteIp[20];
int RemotePort;
#if VDRVERSNUM >= 10300
int StreamFilters;
#endif
int SyncEPG;
};

View File

@@ -1,5 +1,5 @@
/*
* $Id: socket.c,v 1.9 2008/03/13 16:01:17 schmirl Exp $
* $Id: socket.c,v 1.10 2008/04/07 14:27:28 schmirl Exp $
*/
#include <tools/select.h>
@@ -141,10 +141,8 @@ bool cClientSocket::CheckConnection(void) {
}
const char *Filters = "";
#if VDRVERSNUM >= 10300
if(Command("CAPS FILTERS", 220))
Filters = ",FILTERS";
#endif
isyslog("Streamdev: Connected to server %s:%d using capabilities TSPIDS%s",
RemoteIp().c_str(), RemotePort(), Filters);
@@ -270,7 +268,6 @@ bool cClientSocket::SetPid(int Pid, bool On) {
return true;
}
#if VDRVERSNUM >= 10300
bool cClientSocket::SetFilter(ushort Pid, uchar Tid, uchar Mask, bool On) {
if (!CheckConnection()) return false;
@@ -286,7 +283,6 @@ bool cClientSocket::SetFilter(ushort Pid, uchar Tid, uchar Mask, bool On) {
}
return true;
}
#endif
bool cClientSocket::CloseDvr(void) {
if (!CheckConnection()) return false;
@@ -342,11 +338,7 @@ bool cClientSocket::SynchronizeEPG(void) {
rewind(epgfd);
if (cSchedules::Read(epgfd))
#if VDRVERSNUM < 10300
cSIProcessor::TriggerDump();
#else
cSchedules::Cleanup(true);
#endif
else {
esyslog("ERROR: Streamdev: Parsing EPG data failed");
fclose(epgfd);

View File

@@ -1,5 +1,5 @@
/*
* $Id: socket.h,v 1.4 2007/04/24 10:57:34 schmirl Exp $
* $Id: socket.h,v 1.5 2008/04/07 14:27:28 schmirl Exp $
*/
#ifndef VDR_STREAMDEV_CLIENT_CONNECTION_H
@@ -50,9 +50,7 @@ public:
bool CloseDataConnection(eSocketId Id);
bool SetChannelDevice(const cChannel *Channel);
bool SetPid(int Pid, bool On);
#if VDRVERSNUM >= 10300
bool SetFilter(ushort Pid, uchar Tid, uchar Mask, bool On);
#endif
bool CloseDvr(void);
bool SynchronizeEPG(void);
bool LoadRecordings(cRemoteRecordings &Recordings);