mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 15:32:59 +02:00
New library headers, change library name
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1573 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -10,19 +10,14 @@
|
||||
#define __DEMUX_CS_H_
|
||||
|
||||
#include <string>
|
||||
#include "cs_types.h"
|
||||
|
||||
#define DEMUX_POLL_TIMEOUT 0 // timeout in ms
|
||||
#define MAX_FILTER_LENGTH 12 // maximum number of filters
|
||||
#ifndef DMX_FILTER_SIZE
|
||||
#define DMX_FILTER_SIZE MAX_FILTER_LENGTH
|
||||
#endif
|
||||
#define MAX_DMX_UNITS 4 //DMX_NUM_TSS_INPUTS_REVB
|
||||
|
||||
#ifndef CS_DMX_PDATA
|
||||
#define CS_DMX_PDATA void
|
||||
#endif
|
||||
|
||||
#include "cs_types.h"
|
||||
#define MAX_DMX_UNITS 4
|
||||
|
||||
typedef enum {
|
||||
DMX_VIDEO_CHANNEL = 1,
|
||||
@@ -34,45 +29,48 @@ typedef enum {
|
||||
DMX_PCR_ONLY_CHANNEL
|
||||
} DMX_CHANNEL_TYPE;
|
||||
|
||||
class cDemuxData;
|
||||
|
||||
class cDemux {
|
||||
private:
|
||||
int timeout;
|
||||
unsigned short pid;
|
||||
bool nb; // non block
|
||||
pthread_cond_t read_cond;
|
||||
pthread_mutex_t mutex;
|
||||
AVSYNC_TYPE syncMode;
|
||||
int uLength;
|
||||
bool enabled;
|
||||
int unit;
|
||||
DMX_CHANNEL_TYPE type;
|
||||
int timeout;
|
||||
unsigned short pid;
|
||||
AVSYNC_TYPE syncMode;
|
||||
bool enabled;
|
||||
int unit;
|
||||
|
||||
DMX_CHANNEL_TYPE type;
|
||||
CS_DMX_PDATA *privateData;
|
||||
cDemuxData * dd;
|
||||
public:
|
||||
cDemux(int num = 0);
|
||||
~cDemux();
|
||||
//
|
||||
bool Open(DMX_CHANNEL_TYPE pes_type, void * hVideoBuffer = NULL, int uBufferSize = 8192);
|
||||
void Close(void);
|
||||
bool Start(void);
|
||||
bool Stop(void);
|
||||
int Read(unsigned char *buff, int len, int Timeout = 0);
|
||||
void SignalRead(int len);
|
||||
unsigned short GetPID(void) { return pid; }
|
||||
bool Open(DMX_CHANNEL_TYPE pes_type, void * hVideoBuffer = NULL, int uBufferSize = 8192);
|
||||
void Close(void);
|
||||
bool Start(bool record = false);
|
||||
bool Stop(void);
|
||||
int Read(unsigned char *buff, int len, int Timeout = 0);
|
||||
bool SetSource(int source);
|
||||
|
||||
bool sectionFilter(unsigned short Pid, const unsigned char * const Tid, const unsigned char * const Mask, int len, int Timeout = DEMUX_POLL_TIMEOUT, const unsigned char * const nMask = NULL);
|
||||
bool AddSectionFilter(unsigned short Pid, const unsigned char * const Filter, const unsigned char * const Mask, int len, const unsigned char * const nMask = NULL);
|
||||
|
||||
bool pesFilter(const unsigned short Pid);
|
||||
bool addPid(unsigned short Pid);
|
||||
void SetSyncMode(AVSYNC_TYPE SyncMode);
|
||||
void *getBuffer(void);
|
||||
void *getChannel(void);
|
||||
void getSTC(int64_t *STC);
|
||||
|
||||
DMX_CHANNEL_TYPE getChannelType(void) { return type; };
|
||||
int getUnit(void) { return unit; };
|
||||
unsigned short GetPID(void) { return pid; }
|
||||
//
|
||||
#if 0
|
||||
const unsigned char *GetFilterTID(u8 FilterIndex = 0);
|
||||
const unsigned char *GetFilterMask(u8 FilterIndex = 0);
|
||||
unsigned int GetFilterLength(u8 FilterIndex = 0);
|
||||
const unsigned int GetFilterLength(u8 FilterIndex = 0);
|
||||
unsigned int GetFilterCount(void);
|
||||
bool AddSectionFilter(unsigned short Pid, const unsigned char * const Filter, const unsigned char * const Mask, int len, const unsigned char * const nMask = NULL);
|
||||
bool sectionFilter(unsigned short Pid, const unsigned char * const Tid, const unsigned char * const Mask, int len, int Timeout = DEMUX_POLL_TIMEOUT, const unsigned char * const nMask = NULL);
|
||||
bool pesFilter(const unsigned short Pid);
|
||||
void SetSyncMode(AVSYNC_TYPE SyncMode);
|
||||
void *getBuffer(void);
|
||||
void *getChannel(void);
|
||||
DMX_CHANNEL_TYPE getChannelType(void);
|
||||
void addPid(unsigned short Pid);
|
||||
void getSTC(int64_t *STC);
|
||||
int getUnit(void);
|
||||
//
|
||||
#endif
|
||||
};
|
||||
#endif //__DMX_CS_H_
|
||||
|
Reference in New Issue
Block a user