mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 23:42:58 +02:00
add new includes
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@619 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -3,15 +3,13 @@
|
|||||||
#ifndef _AUDIO_CS_H_
|
#ifndef _AUDIO_CS_H_
|
||||||
#define _AUDIO_CS_H_
|
#define _AUDIO_CS_H_
|
||||||
|
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
AUDIO_SYNC_WITH_PTS,
|
AUDIO_SYNC_WITH_PTS,
|
||||||
AUDIO_NO_SYNC,
|
AUDIO_NO_SYNC,
|
||||||
AUDIO_SYNC_AUDIO_MASTER
|
AUDIO_SYNC_AUDIO_MASTER
|
||||||
} AUDIO_SYNC_MODE;
|
} AUDIO_SYNC_MODE;
|
||||||
|
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
AUDIO_FMT_AUTO = 0,
|
AUDIO_FMT_AUTO = 0,
|
||||||
AUDIO_FMT_MPEG,
|
AUDIO_FMT_MPEG,
|
||||||
AUDIO_FMT_MP3,
|
AUDIO_FMT_MP3,
|
||||||
@@ -33,22 +31,21 @@ typedef enum
|
|||||||
|
|
||||||
#include "cs_types.h"
|
#include "cs_types.h"
|
||||||
|
|
||||||
class cAudio
|
class cAudio {
|
||||||
{
|
|
||||||
private:
|
private:
|
||||||
CS_AUDIO_PDATA *privateData;
|
CS_AUDIO_PDATA *privateData;
|
||||||
unsigned int cEncodedDataOnSPDIF, cEncodedDataOnHDMI;
|
unsigned int cEncodedDataOnSPDIF, cEncodedDataOnHDMI;
|
||||||
bool Muted;
|
bool muted;
|
||||||
|
|
||||||
AUDIO_FORMAT StreamType;
|
AUDIO_FORMAT streamType;
|
||||||
AUDIO_SYNC_MODE SyncMode;
|
AUDIO_SYNC_MODE syncMode;
|
||||||
bool started;
|
bool started;
|
||||||
unsigned int uAudioPTSDelay;
|
unsigned int uAudioPTSDelay;
|
||||||
unsigned int uAudioDolbyPTSDelay, uAudioMpegPTSDelay;
|
unsigned int uAudioDolbyPTSDelay, uAudioMpegPTSDelay;
|
||||||
bool receivedDelay;
|
bool receivedDelay;
|
||||||
|
|
||||||
/* internal methods */
|
/* internal methods */
|
||||||
int setBypassMode(int disable);
|
int setBypassMode(bool Disable);
|
||||||
int LipsyncAdjust(void);
|
int LipsyncAdjust(void);
|
||||||
int atten;
|
int atten;
|
||||||
int volume;
|
int volume;
|
||||||
@@ -63,54 +60,54 @@ class cAudio
|
|||||||
cAudio(void *hBuffer, void *encHD, void *encSD);
|
cAudio(void *hBuffer, void *encHD, void *encSD);
|
||||||
~cAudio(void);
|
~cAudio(void);
|
||||||
|
|
||||||
void * GetHandle();
|
void *GetHandle(void);
|
||||||
void * GetDSP();
|
void *GetDSP(void);
|
||||||
void HandleAudioMessage(int Event, void *pData);
|
void HandleAudioMessage(int Event, void *pData);
|
||||||
void HandlePcmMessage(int Event, void *pData);
|
void HandlePcmMessage(int Event, void *pData);
|
||||||
/* shut up */
|
/* shut up */
|
||||||
int mute(void);
|
int mute(void);
|
||||||
int unmute(void);
|
int unmute(void);
|
||||||
int SetMute(int enable);
|
int SetMute(bool Enable);
|
||||||
|
|
||||||
/* bypass audio to external decoder */
|
/* bypass audio to external decoder */
|
||||||
int enableBypass(void);
|
int enableBypass(void);
|
||||||
int disableBypass(void);
|
int disableBypass(void);
|
||||||
|
|
||||||
/* volume, min = 0, max = 255 */
|
/* volume, min = 0, max = 255 */
|
||||||
int setVolume(unsigned int left, unsigned int right);
|
int setVolume(unsigned int Left, unsigned int Right);
|
||||||
int getVolume(void) { return volume;}
|
int getVolume(void) { return volume;}
|
||||||
bool getMuteStatus(void) { return Muted; }
|
bool getMuteStatus(void) { return muted; }
|
||||||
|
|
||||||
/* start and stop audio */
|
/* start and stop audio */
|
||||||
int Start(void);
|
int Start(void);
|
||||||
int Stop(void);
|
int Stop(void);
|
||||||
bool Pause(bool Pcm = true);
|
bool Pause(bool Pcm = true);
|
||||||
bool Resume(bool Pcm = true);
|
bool Resume(bool Pcm = true);
|
||||||
void SetStreamType(AUDIO_FORMAT type) { StreamType = type; };
|
void SetStreamType(AUDIO_FORMAT StreamType) { streamType = StreamType; };
|
||||||
AUDIO_FORMAT GetStreamType(void) { return StreamType; }
|
AUDIO_FORMAT GetStreamType(void) { return streamType; }
|
||||||
bool ReceivedAudioDelay(void) { return receivedDelay; }
|
bool ReceivedAudioDelay(void) { return receivedDelay; }
|
||||||
void SetReceivedAudioDelay(bool set = false) { receivedDelay = set; }
|
void SetReceivedAudioDelay(bool Set = false) { receivedDelay = Set; }
|
||||||
unsigned int GetAudioDelay(void) { return (StreamType == AUDIO_FMT_DOLBY_DIGITAL) ? uAudioDolbyPTSDelay : uAudioMpegPTSDelay; }
|
unsigned int GetAudioDelay(void) { return (streamType == AUDIO_FMT_DOLBY_DIGITAL) ? uAudioDolbyPTSDelay : uAudioMpegPTSDelay; }
|
||||||
void SetSyncMode(AVSYNC_TYPE Mode);
|
void SetSyncMode(AVSYNC_TYPE SyncMode);
|
||||||
|
|
||||||
/* stream source */
|
/* stream source */
|
||||||
int getSource(void);
|
int getSource(void);
|
||||||
int setSource(int source);
|
int setSource(int Source);
|
||||||
int Flush(void);
|
int Flush(void);
|
||||||
|
|
||||||
/* select channels */
|
/* select channels */
|
||||||
int setChannel(int channel);
|
int setChannel(int Channel);
|
||||||
int getChannel(void);
|
int getChannel(void);
|
||||||
int PrepareClipPlay(int uNoOfChannels, int uSampleRate, int uBitsPerSample, int bLittleEndian);
|
int PrepareClipPlay(int uNoOfChannels, int uSampleRate, int uBitsPerSample, int bLittleEndian);
|
||||||
int WriteClip(unsigned char * buffer, int size);
|
int WriteClip(unsigned char *Buffer, int Size);
|
||||||
int StopClip();
|
int StopClip(void);
|
||||||
void getAudioInfo(int &type, int &layer, int& freq, int &bitrate, int &mode);
|
void getAudioInfo(int &Type, int &Layer, int &Freq, int &Bitrate, int &Mode);
|
||||||
void SetSRS(int iq_enable, int nmgr_enable, int iq_mode, int iq_level);
|
void SetSRS(int iq_enable, int nmgr_enable, int iq_mode, int iq_level);
|
||||||
bool IsHdmiDDSupported();
|
bool IsHdmiDDSupported(void);
|
||||||
void SetHdmiDD(bool enable);
|
void SetHdmiDD(bool Enable);
|
||||||
void SetSpdifDD(bool enable);
|
void SetSpdifDD(bool Enable);
|
||||||
void ScheduleMute(bool On);
|
void ScheduleMute(bool On);
|
||||||
void EnableAnalogOut(bool enable);
|
void EnableAnalogOut(bool Enable);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -3,6 +3,23 @@
|
|||||||
|
|
||||||
typedef void (*cs_messenger) (unsigned int msg, unsigned int data);
|
typedef void (*cs_messenger) (unsigned int msg, unsigned int data);
|
||||||
|
|
||||||
|
enum CS_LOG_MODULE {
|
||||||
|
CS_LOG_CI = 0,
|
||||||
|
CS_LOG_HDMI_CEC,
|
||||||
|
CS_LOG_HDMI,
|
||||||
|
CS_LOG_VIDEO,
|
||||||
|
CS_LOG_VIDEO_DRM,
|
||||||
|
CS_LOG_AUDIO,
|
||||||
|
CS_LOG_DEMUX,
|
||||||
|
CS_LOG_DENC,
|
||||||
|
CS_LOG_PVR_RECORD,
|
||||||
|
CS_LOG_PVR_PLAY,
|
||||||
|
CS_LOG_POWER_CTRL,
|
||||||
|
CS_LOG_POWER_CLK,
|
||||||
|
CS_LOG_MEM,
|
||||||
|
CS_LOG_API,
|
||||||
|
};
|
||||||
|
|
||||||
// Initialization
|
// Initialization
|
||||||
void cs_api_init(void);
|
void cs_api_init(void);
|
||||||
void cs_api_exit(void);
|
void cs_api_exit(void);
|
||||||
@@ -20,7 +37,10 @@ cs_messenger cs_get_messenger(void);
|
|||||||
// Logging functions
|
// Logging functions
|
||||||
void cs_log_enable(void);
|
void cs_log_enable(void);
|
||||||
void cs_log_disable(void);
|
void cs_log_disable(void);
|
||||||
void cs_log_message(const char *module, const char *fmt, ...);
|
void cs_log_message(const char *prefix, const char *fmt, ...);
|
||||||
|
void cs_log_module_enable(enum CS_LOG_MODULE module);
|
||||||
|
void cs_log_module_disable(enum CS_LOG_MODULE module);
|
||||||
|
void cs_log_module_message(enum CS_LOG_MODULE module, const char *fmt, ...);
|
||||||
|
|
||||||
// TS Routing
|
// TS Routing
|
||||||
unsigned int cs_get_ts_output(void);
|
unsigned int cs_get_ts_output(void);
|
||||||
|
@@ -24,8 +24,7 @@
|
|||||||
|
|
||||||
#include "cs_types.h"
|
#include "cs_types.h"
|
||||||
|
|
||||||
typedef enum
|
typedef enum {
|
||||||
{
|
|
||||||
DMX_VIDEO_CHANNEL = 1,
|
DMX_VIDEO_CHANNEL = 1,
|
||||||
DMX_AUDIO_CHANNEL,
|
DMX_AUDIO_CHANNEL,
|
||||||
DMX_PES_CHANNEL,
|
DMX_PES_CHANNEL,
|
||||||
@@ -35,8 +34,7 @@ typedef enum
|
|||||||
DMX_PCR_ONLY_CHANNEL
|
DMX_PCR_ONLY_CHANNEL
|
||||||
} DMX_CHANNEL_TYPE;
|
} DMX_CHANNEL_TYPE;
|
||||||
|
|
||||||
class cDemux
|
class cDemux {
|
||||||
{
|
|
||||||
private:
|
private:
|
||||||
int timeout;
|
int timeout;
|
||||||
unsigned short pid;
|
unsigned short pid;
|
||||||
@@ -44,7 +42,7 @@ class cDemux
|
|||||||
bool nb; // non block
|
bool nb; // non block
|
||||||
pthread_cond_t read_cond;
|
pthread_cond_t read_cond;
|
||||||
pthread_mutex_t mutex;
|
pthread_mutex_t mutex;
|
||||||
AVSYNC_TYPE SyncMode;
|
AVSYNC_TYPE syncMode;
|
||||||
int uLength;
|
int uLength;
|
||||||
bool enabled;
|
bool enabled;
|
||||||
int unit;
|
int unit;
|
||||||
@@ -52,6 +50,9 @@ class cDemux
|
|||||||
DMX_CHANNEL_TYPE type;
|
DMX_CHANNEL_TYPE type;
|
||||||
CS_DMX_PDATA * privateData;
|
CS_DMX_PDATA * privateData;
|
||||||
public:
|
public:
|
||||||
|
cDemux(int num = 0);
|
||||||
|
~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(void);
|
||||||
@@ -63,15 +64,12 @@ class cDemux
|
|||||||
const unsigned char *GetFilterMask(void) { return mask; }
|
const unsigned char *GetFilterMask(void) { return mask; }
|
||||||
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 pesFilter(const unsigned short Pid);
|
bool pesFilter(const unsigned short Pid);
|
||||||
void SetSyncMode(AVSYNC_TYPE mode);
|
void SetSyncMode(AVSYNC_TYPE SyncMode);
|
||||||
void * getBuffer();
|
void *getBuffer(void);
|
||||||
void * getChannel();
|
void *getChannel(void);
|
||||||
DMX_CHANNEL_TYPE getChannelType(void);
|
DMX_CHANNEL_TYPE getChannelType(void);
|
||||||
void addPid(unsigned short Pid);
|
void addPid(unsigned short Pid);
|
||||||
void getSTC(int64_t *STC);
|
void getSTC(int64_t *STC);
|
||||||
//
|
//
|
||||||
cDemux(int num = 0);
|
|
||||||
~cDemux();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //__DEMUX_H
|
#endif //__DEMUX_H
|
||||||
|
@@ -11,6 +11,7 @@ void CI_EnterMenu(unsigned char bSlotIndex);
|
|||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#include <cs_api.h>
|
||||||
|
|
||||||
#define MAX_MMI_ITEMS 20
|
#define MAX_MMI_ITEMS 20
|
||||||
#define MAX_MMI_TEXT_LEN 255
|
#define MAX_MMI_TEXT_LEN 255
|
||||||
@@ -34,7 +35,6 @@ typedef struct
|
|||||||
char enguiryText[MAX_MMI_TEXT_LEN];
|
char enguiryText[MAX_MMI_TEXT_LEN];
|
||||||
} MMI_ENGUIRY_INFO;
|
} MMI_ENGUIRY_INFO;
|
||||||
|
|
||||||
typedef void (*SEND_MSG_HOOK) (unsigned int msg, unsigned int data);
|
|
||||||
|
|
||||||
class cDvbCi {
|
class cDvbCi {
|
||||||
private:
|
private:
|
||||||
@@ -44,16 +44,14 @@ class cDvbCi {
|
|||||||
unsigned char * pmtbuf;
|
unsigned char * pmtbuf;
|
||||||
void SendPMT();
|
void SendPMT();
|
||||||
pthread_mutex_t ciMutex;
|
pthread_mutex_t ciMutex;
|
||||||
|
cDvbCi(int Slots);
|
||||||
public:
|
public:
|
||||||
bool Init(void);
|
bool Init(void);
|
||||||
bool SendPMT(unsigned char *data, int len);
|
bool SendPMT(unsigned char *data, int len);
|
||||||
bool SendDateTime(void);
|
bool SendDateTime(void);
|
||||||
//
|
//
|
||||||
cDvbCi(int Slots);
|
|
||||||
~cDvbCi();
|
~cDvbCi();
|
||||||
static cDvbCi * getInstance();
|
static cDvbCi * getInstance();
|
||||||
SEND_MSG_HOOK SendMessage;
|
|
||||||
void SetHook(SEND_MSG_HOOK _SendMessage) { SendMessage = _SendMessage; };
|
|
||||||
bool CamPresent(int slot);
|
bool CamPresent(int slot);
|
||||||
bool GetName(int slot, char * name);
|
bool GetName(int slot, char * name);
|
||||||
bool Reset(int slot);
|
bool Reset(int slot);
|
||||||
|
@@ -38,7 +38,7 @@ private:
|
|||||||
bool opened;
|
bool opened;
|
||||||
PWR_STATE powerState;
|
PWR_STATE powerState;
|
||||||
//
|
//
|
||||||
static void ApplicationCallback(void */*hHandle*/, void */*pUserData*/, signed long /*eEvent*/, void */*pEventData*/, void */*pTag*/) {}
|
static void ApplicationCallback(void *hHandle, void *pUserData, signed long eEvent, void *pEventData, void *pTag) {}
|
||||||
bool SetState(PWR_STATE PowerState);
|
bool SetState(PWR_STATE PowerState);
|
||||||
public:
|
public:
|
||||||
bool Open(void);
|
bool Open(void);
|
||||||
|
@@ -110,7 +110,8 @@ class cVideo
|
|||||||
VIDEO_FORMAT StreamType;
|
VIDEO_FORMAT StreamType;
|
||||||
VIDEO_DEFINITION VideoDefinition;
|
VIDEO_DEFINITION VideoDefinition;
|
||||||
DISPLAY_AR DisplayAR;
|
DISPLAY_AR DisplayAR;
|
||||||
VIDEO_PLAY_MODE SyncMode;
|
VIDEO_PLAY_MODE playMode;
|
||||||
|
AVSYNC_TYPE syncMode;
|
||||||
DISPLAY_AR_MODE ARMode;
|
DISPLAY_AR_MODE ARMode;
|
||||||
VIDEO_DB_DR eDbDr;
|
VIDEO_DB_DR eDbDr;
|
||||||
DISPLAY_AR PictureAR;
|
DISPLAY_AR PictureAR;
|
||||||
|
Reference in New Issue
Block a user