mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 15:32:52 +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
Origin commit data
------------------
Branch: ni/coolstream
Commit: 4a3af851ef
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2011-07-21 (Thu, 21 Jul 2011)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -10,19 +10,14 @@
|
|||||||
#define __DEMUX_CS_H_
|
#define __DEMUX_CS_H_
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include "cs_types.h"
|
||||||
|
|
||||||
#define DEMUX_POLL_TIMEOUT 0 // timeout in ms
|
#define DEMUX_POLL_TIMEOUT 0 // timeout in ms
|
||||||
#define MAX_FILTER_LENGTH 12 // maximum number of filters
|
#define MAX_FILTER_LENGTH 12 // maximum number of filters
|
||||||
#ifndef DMX_FILTER_SIZE
|
#ifndef DMX_FILTER_SIZE
|
||||||
#define DMX_FILTER_SIZE MAX_FILTER_LENGTH
|
#define DMX_FILTER_SIZE MAX_FILTER_LENGTH
|
||||||
#endif
|
#endif
|
||||||
#define MAX_DMX_UNITS 4 //DMX_NUM_TSS_INPUTS_REVB
|
#define MAX_DMX_UNITS 4
|
||||||
|
|
||||||
#ifndef CS_DMX_PDATA
|
|
||||||
#define CS_DMX_PDATA void
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "cs_types.h"
|
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
DMX_VIDEO_CHANNEL = 1,
|
DMX_VIDEO_CHANNEL = 1,
|
||||||
@@ -34,45 +29,48 @@ typedef enum {
|
|||||||
DMX_PCR_ONLY_CHANNEL
|
DMX_PCR_ONLY_CHANNEL
|
||||||
} DMX_CHANNEL_TYPE;
|
} DMX_CHANNEL_TYPE;
|
||||||
|
|
||||||
|
class cDemuxData;
|
||||||
|
|
||||||
class cDemux {
|
class cDemux {
|
||||||
private:
|
private:
|
||||||
|
DMX_CHANNEL_TYPE type;
|
||||||
int timeout;
|
int timeout;
|
||||||
unsigned short pid;
|
unsigned short pid;
|
||||||
bool nb; // non block
|
|
||||||
pthread_cond_t read_cond;
|
|
||||||
pthread_mutex_t mutex;
|
|
||||||
AVSYNC_TYPE syncMode;
|
AVSYNC_TYPE syncMode;
|
||||||
int uLength;
|
|
||||||
bool enabled;
|
bool enabled;
|
||||||
int unit;
|
int unit;
|
||||||
|
|
||||||
DMX_CHANNEL_TYPE type;
|
cDemuxData * dd;
|
||||||
CS_DMX_PDATA *privateData;
|
|
||||||
public:
|
public:
|
||||||
cDemux(int num = 0);
|
cDemux(int num = 0);
|
||||||
~cDemux();
|
~cDemux();
|
||||||
//
|
//
|
||||||
bool Open(DMX_CHANNEL_TYPE pes_type, void * hVideoBuffer = NULL, int uBufferSize = 8192);
|
bool Open(DMX_CHANNEL_TYPE pes_type, void * hVideoBuffer = NULL, int uBufferSize = 8192);
|
||||||
void Close(void);
|
void Close(void);
|
||||||
bool Start(void);
|
bool Start(bool record = false);
|
||||||
bool Stop(void);
|
bool Stop(void);
|
||||||
int Read(unsigned char *buff, int len, int Timeout = 0);
|
int Read(unsigned char *buff, int len, int Timeout = 0);
|
||||||
void SignalRead(int len);
|
bool SetSource(int source);
|
||||||
unsigned short GetPID(void) { return pid; }
|
|
||||||
const unsigned char *GetFilterTID(u8 FilterIndex = 0);
|
|
||||||
const unsigned char *GetFilterMask(u8 FilterIndex = 0);
|
|
||||||
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 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 pesFilter(const unsigned short Pid);
|
||||||
|
bool addPid(unsigned short Pid);
|
||||||
void SetSyncMode(AVSYNC_TYPE SyncMode);
|
void SetSyncMode(AVSYNC_TYPE SyncMode);
|
||||||
void *getBuffer(void);
|
void *getBuffer(void);
|
||||||
void *getChannel(void);
|
void *getChannel(void);
|
||||||
DMX_CHANNEL_TYPE getChannelType(void);
|
|
||||||
void addPid(unsigned short Pid);
|
|
||||||
void getSTC(int64_t *STC);
|
void getSTC(int64_t *STC);
|
||||||
int getUnit(void);
|
|
||||||
|
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);
|
||||||
|
const unsigned int GetFilterLength(u8 FilterIndex = 0);
|
||||||
|
unsigned int GetFilterCount(void);
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
#endif //__DMX_CS_H_
|
#endif //__DMX_CS_H_
|
||||||
|
@@ -11,28 +11,23 @@
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#ifndef CS_PLAYBACK_PDATA
|
|
||||||
#define CS_PLAYBACK_PDATA void
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
PLAYMODE_TS = 0,
|
PLAYMODE_TS = 0,
|
||||||
PLAYMODE_FILE
|
PLAYMODE_FILE
|
||||||
} playmode_t;
|
} playmode_t;
|
||||||
|
|
||||||
|
class cPlaybackData;
|
||||||
|
|
||||||
class cPlayback {
|
class cPlayback {
|
||||||
private:
|
private:
|
||||||
int timeout;
|
cPlaybackData * pd;
|
||||||
pthread_cond_t read_cond;
|
|
||||||
pthread_mutex_t mutex;
|
|
||||||
CS_PLAYBACK_PDATA * privateData;
|
|
||||||
bool enabled;
|
bool enabled;
|
||||||
bool paused;
|
bool paused;
|
||||||
bool playing;
|
bool playing;
|
||||||
int unit;
|
int unit;
|
||||||
int nPlaybackFD;
|
int nPlaybackFD;
|
||||||
int video_type;
|
int video_type;
|
||||||
int nPlaybackSpeed;
|
|
||||||
int mSpeed;
|
int mSpeed;
|
||||||
playmode_t playMode;
|
playmode_t playMode;
|
||||||
//
|
//
|
||||||
@@ -40,8 +35,9 @@ private:
|
|||||||
void Detach(void);
|
void Detach(void);
|
||||||
bool SetAVDemuxChannel(bool On, bool Video = true, bool Audio = true);
|
bool SetAVDemuxChannel(bool On, bool Video = true, bool Audio = true);
|
||||||
public:
|
public:
|
||||||
void PlaybackNotify (int Event, void *pData, void *pTag);
|
cPlayback(int num = 0);
|
||||||
void DMNotify(int Event, void *pTsBuf, void *Tag);
|
~cPlayback();
|
||||||
|
|
||||||
bool Open(playmode_t PlayMode);
|
bool Open(playmode_t PlayMode);
|
||||||
void Close(void);
|
void Close(void);
|
||||||
bool Start(char * filename, unsigned short vpid, int vtype, unsigned short apid, int audio_flag, unsigned int duration = 0);
|
bool Start(char * filename, unsigned short vpid, int vtype, unsigned short apid, int audio_flag, unsigned int duration = 0);
|
||||||
@@ -54,13 +50,8 @@ public:
|
|||||||
bool SetPosition(int position, bool absolute = false);
|
bool SetPosition(int position, bool absolute = false);
|
||||||
bool IsPlaying(void) const { return playing; }
|
bool IsPlaying(void) const { return playing; }
|
||||||
bool IsEnabled(void) const { return enabled; }
|
bool IsEnabled(void) const { return enabled; }
|
||||||
void * GetHandle(void);
|
|
||||||
void * GetDmHandle(void);
|
|
||||||
int GetCurrPlaybackSpeed(void) const { return nPlaybackSpeed; }
|
|
||||||
void FindAllPids(uint16_t *apids, unsigned short *ac3flags, uint16_t *numpida, std::string *language);
|
void FindAllPids(uint16_t *apids, unsigned short *ac3flags, uint16_t *numpida, std::string *language);
|
||||||
//
|
|
||||||
cPlayback(int num = 0);
|
|
||||||
~cPlayback();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __PLAYBACK_CS_H_
|
#endif // __PLAYBACK_CS_H_
|
||||||
|
@@ -11,13 +11,11 @@
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#ifndef CS_RECORD_PDATA
|
class cRecordData;
|
||||||
#define CS_RECORD_PDATA void
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class cRecord {
|
class cRecord {
|
||||||
private:
|
private:
|
||||||
CS_RECORD_PDATA * privateData;
|
cRecordData * rd;
|
||||||
bool enabled;
|
bool enabled;
|
||||||
int num_apids;
|
int num_apids;
|
||||||
int unit;
|
int unit;
|
||||||
@@ -27,11 +25,11 @@ public:
|
|||||||
cRecord(int num = 0);
|
cRecord(int num = 0);
|
||||||
~cRecord();
|
~cRecord();
|
||||||
|
|
||||||
bool Open(int numpids);
|
bool Open();
|
||||||
void Close(void);
|
void Close(void);
|
||||||
bool Start(int fd, unsigned short vpid, unsigned short * apids, int numapids);
|
bool Start(int fd, unsigned short vpid, unsigned short * apids, int numapids);
|
||||||
bool Stop(void);
|
bool Stop(void);
|
||||||
void RecordNotify(int Event, void *pData);
|
bool AddPid(unsigned short pid);
|
||||||
/* not tested */
|
/* not tested */
|
||||||
bool ChangePids(unsigned short vpid, unsigned short * apids, int numapids);
|
bool ChangePids(unsigned short vpid, unsigned short * apids, int numapids);
|
||||||
};
|
};
|
||||||
|
@@ -213,7 +213,7 @@ public:
|
|||||||
void SetCECAutoStandby(bool OnOff);
|
void SetCECAutoStandby(bool OnOff);
|
||||||
void ShowPicture(const char * fname);
|
void ShowPicture(const char * fname);
|
||||||
void StopPicture();
|
void StopPicture();
|
||||||
void Standby(unsigned int bOn);
|
void Standby(bool bOn);
|
||||||
void Pig(int x, int y, int w, int h, int osd_w = 1064, int osd_h = 600);
|
void Pig(int x, int y, int w, int h, int osd_w = 1064, int osd_h = 600);
|
||||||
void SetControl(int num, int val);
|
void SetControl(int num, int val);
|
||||||
bool ReceivedDRMDelay(void) { return receivedDRMDelay; }
|
bool ReceivedDRMDelay(void) { return receivedDRMDelay; }
|
||||||
|
@@ -92,7 +92,7 @@ neutrino_LDADD = \
|
|||||||
|
|
||||||
if BOXTYPE_COOL
|
if BOXTYPE_COOL
|
||||||
neutrino_LDADD += \
|
neutrino_LDADD += \
|
||||||
-lcoolstream \
|
-lcoolstream-mt \
|
||||||
-lOpenThreads \
|
-lOpenThreads \
|
||||||
-lnxp
|
-lnxp
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user