vdr-plugin-streamdev/common.h

81 lines
1.3 KiB
C
Raw Normal View History

2010-12-02 08:53:01 +01:00
/*
2010-12-02 09:51:02 +01:00
* $Id: common.h,v 1.16 2010/07/19 13:49:24 schmirl Exp $
2010-12-02 08:53:01 +01:00
*/
#ifndef VDR_STREAMDEV_COMMON_H
#define VDR_STREAMDEV_COMMON_H
2010-12-02 09:02:31 +01:00
/* FreeBSD has it's own version of isnumber(),
but VDR's version is incompatible */
#ifdef __FreeBSD__
#undef isnumber
#endif
2010-12-02 08:53:01 +01:00
#include <vdr/tools.h>
#include <vdr/plugin.h>
#include "tools/socket.h"
#ifdef DEBUG
# include <stdio.h>
# define Dprintf(x...) fprintf(stderr, x)
#else
# define Dprintf(x...)
#endif
2010-12-02 09:48:23 +01:00
#define TRANSPONDER(c1, c2) (c1->Transponder() == c2->Transponder())
2010-12-02 08:53:01 +01:00
2010-12-02 09:48:23 +01:00
#define MAXPARSEBUFFER KILOBYTE(16)
2010-12-02 08:53:01 +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:48:23 +01:00
stEXT,
2010-12-02 08:53:01 +01:00
stTSPIDS,
2010-12-02 09:48:23 +01:00
st_Count
2010-12-02 08:53:01 +01:00
};
enum eSuspendMode {
smOffer,
smAlways,
smNever,
sm_Count
};
enum eSocketId {
siLive,
siReplay,
2010-12-02 08:59:14 +01:00
siLiveFilter,
2010-12-02 09:44:53 +01:00
siDataRespond,
2010-12-02 08:53:01 +01:00
si_Count
};
extern const char *VERSION;
class cMenuEditIpItem: public cMenuEditItem {
private:
2010-12-02 09:48:23 +01:00
static const char IpCharacters[];
2010-12-02 08:53:01 +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