mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 15:32:59 +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_
|
||||
#define _AUDIO_CS_H_
|
||||
|
||||
typedef enum
|
||||
{
|
||||
typedef enum {
|
||||
AUDIO_SYNC_WITH_PTS,
|
||||
AUDIO_NO_SYNC,
|
||||
AUDIO_SYNC_AUDIO_MASTER
|
||||
} AUDIO_SYNC_MODE;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
typedef enum {
|
||||
AUDIO_FMT_AUTO = 0,
|
||||
AUDIO_FMT_MPEG,
|
||||
AUDIO_FMT_MP3,
|
||||
@@ -33,22 +31,21 @@ typedef enum
|
||||
|
||||
#include "cs_types.h"
|
||||
|
||||
class cAudio
|
||||
{
|
||||
private:
|
||||
CS_AUDIO_PDATA * privateData;
|
||||
class cAudio {
|
||||
private:
|
||||
CS_AUDIO_PDATA *privateData;
|
||||
unsigned int cEncodedDataOnSPDIF, cEncodedDataOnHDMI;
|
||||
bool Muted;
|
||||
bool muted;
|
||||
|
||||
AUDIO_FORMAT StreamType;
|
||||
AUDIO_SYNC_MODE SyncMode;
|
||||
AUDIO_FORMAT streamType;
|
||||
AUDIO_SYNC_MODE syncMode;
|
||||
bool started;
|
||||
unsigned int uAudioPTSDelay;
|
||||
unsigned int uAudioDolbyPTSDelay, uAudioMpegPTSDelay;
|
||||
bool receivedDelay;
|
||||
|
||||
/* internal methods */
|
||||
int setBypassMode(int disable);
|
||||
int setBypassMode(bool Disable);
|
||||
int LipsyncAdjust(void);
|
||||
int atten;
|
||||
int volume;
|
||||
@@ -58,59 +55,59 @@ class cAudio
|
||||
bool spdifDD;
|
||||
bool hasMuteScheduled;
|
||||
bool analogOut;
|
||||
public:
|
||||
public:
|
||||
/* construct & destruct */
|
||||
cAudio(void * hBuffer, void * encHD, void * encSD);
|
||||
cAudio(void *hBuffer, void *encHD, void *encSD);
|
||||
~cAudio(void);
|
||||
|
||||
void * GetHandle();
|
||||
void * GetDSP();
|
||||
void *GetHandle(void);
|
||||
void *GetDSP(void);
|
||||
void HandleAudioMessage(int Event, void *pData);
|
||||
void HandlePcmMessage(int Event, void *pData);
|
||||
/* shut up */
|
||||
int mute(void);
|
||||
int unmute(void);
|
||||
int SetMute(int enable);
|
||||
int SetMute(bool Enable);
|
||||
|
||||
/* bypass audio to external decoder */
|
||||
int enableBypass(void);
|
||||
int disableBypass(void);
|
||||
|
||||
/* 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;}
|
||||
bool getMuteStatus(void) { return Muted; }
|
||||
bool getMuteStatus(void) { return muted; }
|
||||
|
||||
/* start and stop audio */
|
||||
int Start(void);
|
||||
int Stop(void);
|
||||
bool Pause(bool Pcm = true);
|
||||
bool Resume(bool Pcm = true);
|
||||
void SetStreamType(AUDIO_FORMAT type) { StreamType = type; };
|
||||
AUDIO_FORMAT GetStreamType(void) { return StreamType; }
|
||||
void SetStreamType(AUDIO_FORMAT StreamType) { streamType = StreamType; };
|
||||
AUDIO_FORMAT GetStreamType(void) { return streamType; }
|
||||
bool ReceivedAudioDelay(void) { return receivedDelay; }
|
||||
void SetReceivedAudioDelay(bool set = false) { receivedDelay = set; }
|
||||
unsigned int GetAudioDelay(void) { return (StreamType == AUDIO_FMT_DOLBY_DIGITAL) ? uAudioDolbyPTSDelay : uAudioMpegPTSDelay; }
|
||||
void SetSyncMode(AVSYNC_TYPE Mode);
|
||||
void SetReceivedAudioDelay(bool Set = false) { receivedDelay = Set; }
|
||||
unsigned int GetAudioDelay(void) { return (streamType == AUDIO_FMT_DOLBY_DIGITAL) ? uAudioDolbyPTSDelay : uAudioMpegPTSDelay; }
|
||||
void SetSyncMode(AVSYNC_TYPE SyncMode);
|
||||
|
||||
/* stream source */
|
||||
int getSource(void);
|
||||
int setSource(int source);
|
||||
int setSource(int Source);
|
||||
int Flush(void);
|
||||
|
||||
/* select channels */
|
||||
int setChannel(int channel);
|
||||
int setChannel(int Channel);
|
||||
int getChannel(void);
|
||||
int PrepareClipPlay(int uNoOfChannels, int uSampleRate, int uBitsPerSample, int bLittleEndian);
|
||||
int WriteClip(unsigned char * buffer, int size);
|
||||
int StopClip();
|
||||
void getAudioInfo(int &type, int &layer, int& freq, int &bitrate, int &mode);
|
||||
int WriteClip(unsigned char *Buffer, int Size);
|
||||
int StopClip(void);
|
||||
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);
|
||||
bool IsHdmiDDSupported();
|
||||
void SetHdmiDD(bool enable);
|
||||
void SetSpdifDD(bool enable);
|
||||
bool IsHdmiDDSupported(void);
|
||||
void SetHdmiDD(bool Enable);
|
||||
void SetSpdifDD(bool Enable);
|
||||
void ScheduleMute(bool On);
|
||||
void EnableAnalogOut(bool enable);
|
||||
void EnableAnalogOut(bool Enable);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -3,6 +3,23 @@
|
||||
|
||||
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
|
||||
void cs_api_init(void);
|
||||
void cs_api_exit(void);
|
||||
@@ -20,7 +37,10 @@ cs_messenger cs_get_messenger(void);
|
||||
// Logging functions
|
||||
void cs_log_enable(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
|
||||
unsigned int cs_get_ts_output(void);
|
||||
|
@@ -24,8 +24,7 @@
|
||||
|
||||
#include "cs_types.h"
|
||||
|
||||
typedef enum
|
||||
{
|
||||
typedef enum {
|
||||
DMX_VIDEO_CHANNEL = 1,
|
||||
DMX_AUDIO_CHANNEL,
|
||||
DMX_PES_CHANNEL,
|
||||
@@ -35,23 +34,25 @@ typedef enum
|
||||
DMX_PCR_ONLY_CHANNEL
|
||||
} DMX_CHANNEL_TYPE;
|
||||
|
||||
class cDemux
|
||||
{
|
||||
private:
|
||||
class cDemux {
|
||||
private:
|
||||
int timeout;
|
||||
unsigned short pid;
|
||||
unsigned char tid[MAX_FILTER_LENGTH], mask[MAX_FILTER_LENGTH];
|
||||
bool nb; // non block
|
||||
pthread_cond_t read_cond;
|
||||
pthread_mutex_t mutex;
|
||||
AVSYNC_TYPE SyncMode;
|
||||
AVSYNC_TYPE syncMode;
|
||||
int uLength;
|
||||
bool enabled;
|
||||
int unit;
|
||||
|
||||
DMX_CHANNEL_TYPE type;
|
||||
CS_DMX_PDATA * privateData;
|
||||
public:
|
||||
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);
|
||||
@@ -63,15 +64,12 @@ class cDemux
|
||||
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 pesFilter(const unsigned short Pid);
|
||||
void SetSyncMode(AVSYNC_TYPE mode);
|
||||
void * getBuffer();
|
||||
void * getChannel();
|
||||
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);
|
||||
void getSTC(int64_t *STC);
|
||||
//
|
||||
cDemux(int num = 0);
|
||||
~cDemux();
|
||||
};
|
||||
|
||||
#endif //__DEMUX_H
|
||||
|
@@ -11,6 +11,7 @@ void CI_EnterMenu(unsigned char bSlotIndex);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include <cs_api.h>
|
||||
|
||||
#define MAX_MMI_ITEMS 20
|
||||
#define MAX_MMI_TEXT_LEN 255
|
||||
@@ -34,7 +35,6 @@ typedef struct
|
||||
char enguiryText[MAX_MMI_TEXT_LEN];
|
||||
} MMI_ENGUIRY_INFO;
|
||||
|
||||
typedef void (*SEND_MSG_HOOK) (unsigned int msg, unsigned int data);
|
||||
|
||||
class cDvbCi {
|
||||
private:
|
||||
@@ -44,16 +44,14 @@ class cDvbCi {
|
||||
unsigned char * pmtbuf;
|
||||
void SendPMT();
|
||||
pthread_mutex_t ciMutex;
|
||||
cDvbCi(int Slots);
|
||||
public:
|
||||
bool Init(void);
|
||||
bool SendPMT(unsigned char *data, int len);
|
||||
bool SendDateTime(void);
|
||||
//
|
||||
cDvbCi(int Slots);
|
||||
~cDvbCi();
|
||||
static cDvbCi * getInstance();
|
||||
SEND_MSG_HOOK SendMessage;
|
||||
void SetHook(SEND_MSG_HOOK _SendMessage) { SendMessage = _SendMessage; };
|
||||
bool CamPresent(int slot);
|
||||
bool GetName(int slot, char * name);
|
||||
bool Reset(int slot);
|
||||
|
@@ -38,7 +38,7 @@ private:
|
||||
bool opened;
|
||||
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);
|
||||
public:
|
||||
bool Open(void);
|
||||
|
@@ -110,7 +110,8 @@ class cVideo
|
||||
VIDEO_FORMAT StreamType;
|
||||
VIDEO_DEFINITION VideoDefinition;
|
||||
DISPLAY_AR DisplayAR;
|
||||
VIDEO_PLAY_MODE SyncMode;
|
||||
VIDEO_PLAY_MODE playMode;
|
||||
AVSYNC_TYPE syncMode;
|
||||
DISPLAY_AR_MODE ARMode;
|
||||
VIDEO_DB_DR eDbDr;
|
||||
DISPLAY_AR PictureAR;
|
||||
|
Reference in New Issue
Block a user