2004-12-30 23:43:55 +01:00
|
|
|
/*
|
2010-12-02 09:57:17 +01:00
|
|
|
* $Id: common.h,v 1.16 2010/07/19 13:49:24 schmirl Exp $
|
2004-12-30 23:43:55 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef VDR_STREAMDEV_COMMON_H
|
|
|
|
#define VDR_STREAMDEV_COMMON_H
|
|
|
|
|
2008-03-12 10:36:27 +01:00
|
|
|
/* FreeBSD has it's own version of isnumber(),
|
|
|
|
but VDR's version is incompatible */
|
|
|
|
#ifdef __FreeBSD__
|
|
|
|
#undef isnumber
|
|
|
|
#endif
|
|
|
|
|
2004-12-30 23:43:55 +01:00
|
|
|
#include <vdr/tools.h>
|
|
|
|
#include <vdr/plugin.h>
|
|
|
|
|
|
|
|
#include "tools/socket.h"
|
|
|
|
|
|
|
|
#ifdef DEBUG
|
2012-05-21 00:37:41 +02:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <time.h>
|
|
|
|
#define Dprintf(fmt, x...) {\
|
|
|
|
struct timespec ts;\
|
|
|
|
clock_gettime(CLOCK_MONOTONIC, &ts);\
|
|
|
|
fprintf(stderr, "%ld.%.3ld [%d] "fmt,\
|
|
|
|
ts.tv_sec, ts.tv_nsec / 1000000, cThread::ThreadId(), ##x);\
|
|
|
|
}
|
2004-12-30 23:43:55 +01:00
|
|
|
#else
|
2012-05-21 00:37:41 +02:00
|
|
|
#define Dprintf(x...)
|
2004-12-30 23:43:55 +01:00
|
|
|
#endif
|
|
|
|
|
2011-06-27 13:07:05 +02:00
|
|
|
#if APIVERSNUM >= 10714
|
|
|
|
#define TRANSPONDER(c1, c2) (c1->Transponder() == c2->Transponder() && !c1->IsSourceType('V'))
|
|
|
|
#else
|
2009-09-18 12:41:41 +02:00
|
|
|
#define TRANSPONDER(c1, c2) (c1->Transponder() == c2->Transponder())
|
2011-06-27 13:07:05 +02:00
|
|
|
#endif
|
2004-12-30 23:43:55 +01:00
|
|
|
|
2009-09-18 12:41:41 +02:00
|
|
|
#define MAXPARSEBUFFER KILOBYTE(16)
|
2005-11-06 17:43:58 +01:00
|
|
|
|
2011-12-11 17:03:09 +01:00
|
|
|
/* Service ID for loop prevention */
|
|
|
|
#define LOOP_PREVENTION_SERVICE "StreamdevLoopPrevention"
|
|
|
|
|
2004-12-30 23:43:55 +01:00
|
|
|
/* Check if a channel is a radio station. */
|
|
|
|
#define ISRADIO(x) ((x)->Vpid()==0||(x)->Vpid()==1||(x)->Vpid()==0x1fff)
|
|
|
|
|
|
|
|
class cChannel;
|
|
|
|
|
|
|
|
enum eStreamType {
|
|
|
|
stTS,
|
|
|
|
stPES,
|
|
|
|
stPS,
|
|
|
|
stES,
|
2010-12-02 09:57:17 +01:00
|
|
|
stEXT,
|
2005-02-08 16:34:38 +01:00
|
|
|
stTSPIDS,
|
2009-09-18 12:41:41 +02:00
|
|
|
st_Count
|
2004-12-30 23:43:55 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
enum eSocketId {
|
|
|
|
siLive,
|
|
|
|
siReplay,
|
2007-04-24 12:50:13 +02:00
|
|
|
siLiveFilter,
|
2009-07-01 12:46:15 +02:00
|
|
|
siDataRespond,
|
2004-12-30 23:43:55 +01:00
|
|
|
si_Count
|
|
|
|
};
|
|
|
|
|
|
|
|
extern const char *VERSION;
|
|
|
|
|
|
|
|
class cMenuEditIpItem: public cMenuEditItem {
|
|
|
|
private:
|
2009-09-18 12:41:41 +02:00
|
|
|
static const char IpCharacters[];
|
2004-12-30 23:43:55 +01:00
|
|
|
char *value;
|
|
|
|
int curNum;
|
|
|
|
int pos;
|
|
|
|
bool step;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual void Set(void);
|
|
|
|
|
|
|
|
public:
|
|
|
|
cMenuEditIpItem(const char *Name, char *Value); // Value must be 16 bytes
|
|
|
|
~cMenuEditIpItem();
|
|
|
|
|
|
|
|
virtual eOSState ProcessKey(eKeys Key);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // VDR_STREAMDEV_COMMON_H
|