mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 16:01:10 +02:00
Merge branch 'neutrino-apollo' of coolstreamtech.de:cst-private-neutrino into neutrino-apollo
Conflicts:
src/timerd/timermanager.cpp
Origin commit data
------------------
Commit: a222240dbb
Author: [CST] Bas <bas@coolstreamtech.com>
Date: 2012-09-26 (Wed, 26 Sep 2012)
This commit is contained in:
@@ -118,7 +118,8 @@ AC_ARG_ENABLE(cleanup,
|
|||||||
[ --enable-cleanup enable cleanup on exit],
|
[ --enable-cleanup enable cleanup on exit],
|
||||||
[AC_DEFINE(EXIT_CLEANUP,1,[enable cleanup on exit])])
|
[AC_DEFINE(EXIT_CLEANUP,1,[enable cleanup on exit])])
|
||||||
|
|
||||||
AC_CHECK_HEADERS(coolstream/nevis_ir.h)
|
AC_CHECK_HEADERS(coolstream/cs_ir_generic.h)
|
||||||
|
AC_CHECK_HEADERS(coolstream/cs_frontpanel.h)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Check for libtdservicedb - the new one - for testing only
|
# Check for libtdservicedb - the new one - for testing only
|
||||||
|
@@ -56,6 +56,7 @@ typedef enum
|
|||||||
HDMI_AUDIO_FMT_ATRAC
|
HDMI_AUDIO_FMT_ATRAC
|
||||||
} HDMI_AUDIO_FORMAT;
|
} HDMI_AUDIO_FORMAT;
|
||||||
|
|
||||||
|
#define CS_MAX_AUDIO_DECODERS 1
|
||||||
#define CS_MAX_AUDIO_FORMATS 10
|
#define CS_MAX_AUDIO_FORMATS 10
|
||||||
|
|
||||||
typedef struct cs_audio_format {
|
typedef struct cs_audio_format {
|
||||||
@@ -68,8 +69,15 @@ typedef struct cs_audio_caps {
|
|||||||
cs_audio_format_t formats[CS_MAX_AUDIO_FORMATS];
|
cs_audio_format_t formats[CS_MAX_AUDIO_FORMATS];
|
||||||
} cs_audio_caps_t;
|
} cs_audio_caps_t;
|
||||||
|
|
||||||
|
class cDemux;
|
||||||
|
class cVideo;
|
||||||
|
|
||||||
class cAudio {
|
class cAudio {
|
||||||
private:
|
private:
|
||||||
|
static cAudio *instance[CS_MAX_AUDIO_DECODERS];
|
||||||
|
unsigned int unit;
|
||||||
|
cDemux *demux;
|
||||||
|
cVideo *video;
|
||||||
CS_AUDIO_PDATA *privateData;
|
CS_AUDIO_PDATA *privateData;
|
||||||
//unsigned int cEncodedDataOnSPDIF, cEncodedDataOnHDMI;
|
//unsigned int cEncodedDataOnSPDIF, cEncodedDataOnHDMI;
|
||||||
bool muted;
|
bool muted;
|
||||||
@@ -92,6 +100,8 @@ private:
|
|||||||
bool spdifDD;
|
bool spdifDD;
|
||||||
bool hasMuteScheduled;
|
bool hasMuteScheduled;
|
||||||
bool analogOut;
|
bool analogOut;
|
||||||
|
//
|
||||||
|
cAudio(unsigned int Unit);
|
||||||
public:
|
public:
|
||||||
/* construct & destruct */
|
/* construct & destruct */
|
||||||
cAudio(void *hBuffer, void *encHD, void *encSD);
|
cAudio(void *hBuffer, void *encHD, void *encSD);
|
||||||
@@ -149,6 +159,9 @@ public:
|
|||||||
bool IsHdmiAudioFormatSupported(HDMI_AUDIO_FORMAT format);
|
bool IsHdmiAudioFormatSupported(HDMI_AUDIO_FORMAT format);
|
||||||
void SetHdmiDD(HDMI_ENCODED_MODE type);
|
void SetHdmiDD(HDMI_ENCODED_MODE type);
|
||||||
bool IsHdmiDTSSupported(void);
|
bool IsHdmiDTSSupported(void);
|
||||||
|
void SetDemux(cDemux *Demux);
|
||||||
|
void SetVideo(cVideo *Video);
|
||||||
|
static cAudio *GetDecoder(unsigned int Unit);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //__AUDIO_CS_H_
|
#endif //__AUDIO_CS_H_
|
||||||
|
@@ -11,8 +11,8 @@
|
|||||||
#define __CA_CS_H_
|
#define __CA_CS_H_
|
||||||
|
|
||||||
#include <OpenThreads/Thread>
|
#include <OpenThreads/Thread>
|
||||||
#include "cs_types.h"
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include "cs_types.h"
|
||||||
|
|
||||||
enum CA_INIT_MASK {
|
enum CA_INIT_MASK {
|
||||||
CA_INIT_SC = 1,
|
CA_INIT_SC = 1,
|
||||||
@@ -23,7 +23,7 @@ enum CA_INIT_MASK {
|
|||||||
enum CA_SLOT_TYPE {
|
enum CA_SLOT_TYPE {
|
||||||
CA_SLOT_TYPE_SMARTCARD,
|
CA_SLOT_TYPE_SMARTCARD,
|
||||||
CA_SLOT_TYPE_CI,
|
CA_SLOT_TYPE_CI,
|
||||||
CA_SLOT_TYPE_ALL
|
CA_SLOT_TYPE_ALL,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum CA_MESSAGE_FLAGS {
|
enum CA_MESSAGE_FLAGS {
|
||||||
@@ -49,7 +49,7 @@ enum CA_MESSAGE_FLAGS {
|
|||||||
CA_MESSAGE_HAS_PARAM1_LONG = (1 << 19),
|
CA_MESSAGE_HAS_PARAM1_LONG = (1 << 19),
|
||||||
CA_MESSAGE_HAS_PARAM2_LONG = (1 << 20),
|
CA_MESSAGE_HAS_PARAM2_LONG = (1 << 20),
|
||||||
CA_MESSAGE_HAS_PARAM3_LONG = (1 << 21),
|
CA_MESSAGE_HAS_PARAM3_LONG = (1 << 21),
|
||||||
CA_MESSAGE_HAS_PARAM4_LONG = (1 << 22)
|
CA_MESSAGE_HAS_PARAM4_LONG = (1 << 22),
|
||||||
};
|
};
|
||||||
|
|
||||||
enum CA_MESSAGE_MSGID {
|
enum CA_MESSAGE_MSGID {
|
||||||
@@ -72,7 +72,7 @@ enum CA_MESSAGE_MSGID {
|
|||||||
CA_MESSAGE_MSG_EMM_ARRIVED,
|
CA_MESSAGE_MSG_EMM_ARRIVED,
|
||||||
CA_MESSAGE_MSG_CHANNEL_CHANGE,
|
CA_MESSAGE_MSG_CHANNEL_CHANGE,
|
||||||
CA_MESSAGE_MSG_GUI_READY,
|
CA_MESSAGE_MSG_GUI_READY,
|
||||||
CA_MESSAGE_MSG_EXIT
|
CA_MESSAGE_MSG_EXIT,
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct CA_MESSAGE {
|
typedef struct CA_MESSAGE {
|
||||||
|
@@ -36,8 +36,12 @@ typedef enum {
|
|||||||
} DMX_CHANNEL_TYPE;
|
} DMX_CHANNEL_TYPE;
|
||||||
|
|
||||||
class cDemuxData;
|
class cDemuxData;
|
||||||
|
class cVideo;
|
||||||
|
class cAudio;
|
||||||
|
|
||||||
class cDemux {
|
class cDemux {
|
||||||
|
friend class cVideo;
|
||||||
|
friend class cAudio;
|
||||||
private:
|
private:
|
||||||
DMX_CHANNEL_TYPE type;
|
DMX_CHANNEL_TYPE type;
|
||||||
int timeout;
|
int timeout;
|
||||||
|
@@ -11,6 +11,7 @@
|
|||||||
#define __PLAYBACK_CS_H_
|
#define __PLAYBACK_CS_H_
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
PLAYMODE_TS = 0,
|
PLAYMODE_TS = 0,
|
||||||
|
@@ -14,6 +14,10 @@
|
|||||||
|
|
||||||
class cRecordData;
|
class cRecordData;
|
||||||
|
|
||||||
|
#define REC_STATUS_OK 0
|
||||||
|
#define REC_STATUS_SLOW 1
|
||||||
|
#define REC_STATUS_OVERFLOW 2
|
||||||
|
|
||||||
class cRecord {
|
class cRecord {
|
||||||
private:
|
private:
|
||||||
cRecordData * rd;
|
cRecordData * rd;
|
||||||
@@ -29,6 +33,8 @@ public:
|
|||||||
bool Start(int fd, unsigned short vpid, unsigned short * apids, int numapids, uint64_t chid);
|
bool Start(int fd, unsigned short vpid, unsigned short * apids, int numapids, uint64_t chid);
|
||||||
bool Stop(void);
|
bool Stop(void);
|
||||||
bool AddPid(unsigned short pid);
|
bool AddPid(unsigned short pid);
|
||||||
|
int GetStatus();
|
||||||
|
void ResetStatus();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __RECORD_CS_H_
|
#endif // __RECORD_CS_H_
|
||||||
|
@@ -10,11 +10,13 @@
|
|||||||
#ifndef __VIDEO_CS_H_
|
#ifndef __VIDEO_CS_H_
|
||||||
#define __VIDEO_CS_H_
|
#define __VIDEO_CS_H_
|
||||||
|
|
||||||
#include <coolstream/cs_vfd.h>
|
#include <coolstream/cs_frontpanel.h>
|
||||||
#include <coolstream/control.h>
|
#include <coolstream/control.h>
|
||||||
|
|
||||||
#include "cs_types.h"
|
#include "cs_types.h"
|
||||||
|
|
||||||
|
#define CS_MAX_VIDEO_DECODERS 16
|
||||||
|
|
||||||
#ifndef CS_VIDEO_PDATA
|
#ifndef CS_VIDEO_PDATA
|
||||||
#define CS_VIDEO_PDATA void
|
#define CS_VIDEO_PDATA void
|
||||||
#endif
|
#endif
|
||||||
@@ -33,26 +35,26 @@ typedef enum {
|
|||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
VIDEO_FORMAT_MPEG2 = 0,
|
VIDEO_FORMAT_MPEG2 = 0,
|
||||||
VIDEO_FORMAT_MPEG4, /* H264 */
|
VIDEO_FORMAT_MPEG4, /* H264 */
|
||||||
VIDEO_FORMAT_VC1,
|
VIDEO_FORMAT_VC1,
|
||||||
VIDEO_FORMAT_JPEG,
|
VIDEO_FORMAT_JPEG,
|
||||||
VIDEO_FORMAT_GIF,
|
VIDEO_FORMAT_GIF,
|
||||||
VIDEO_FORMAT_PNG,
|
VIDEO_FORMAT_PNG,
|
||||||
VIDEO_FORMAT_DIVX,/* DIVX 3.11 */
|
VIDEO_FORMAT_DIVX,/* DIVX 3.11 */
|
||||||
VIDEO_FORMAT_MPEG4PART2,/* MPEG4 SVH, MPEG4 SP, MPEG4 ASP, DIVX4,5,6 */
|
VIDEO_FORMAT_MPEG4PART2,/* MPEG4 SVH, MPEG4 SP, MPEG4 ASP, DIVX4,5,6 */
|
||||||
VIDEO_FORMAT_REALVIDEO8,
|
VIDEO_FORMAT_REALVIDEO8,
|
||||||
VIDEO_FORMAT_REALVIDEO9,
|
VIDEO_FORMAT_REALVIDEO9,
|
||||||
VIDEO_FORMAT_ON2_VP6,
|
VIDEO_FORMAT_ON2_VP6,
|
||||||
VIDEO_FORMAT_ON2_VP8,
|
VIDEO_FORMAT_ON2_VP8,
|
||||||
VIDEO_FORMAT_SORENSON_SPARK,
|
VIDEO_FORMAT_SORENSON_SPARK,
|
||||||
VIDEO_FORMAT_H263,
|
VIDEO_FORMAT_H263,
|
||||||
VIDEO_FORMAT_H263_ENCODER,
|
VIDEO_FORMAT_H263_ENCODER,
|
||||||
VIDEO_FORMAT_H264_ENCODER,
|
VIDEO_FORMAT_H264_ENCODER,
|
||||||
VIDEO_FORMAT_MPEG4PART2_ENCODER,
|
VIDEO_FORMAT_MPEG4PART2_ENCODER,
|
||||||
VIDEO_FORMAT_AVS,
|
VIDEO_FORMAT_AVS,
|
||||||
VIDEO_FORMAT_VIP656,
|
VIDEO_FORMAT_VIP656,
|
||||||
VIDEO_FORMAT_UNSUPPORTED
|
VIDEO_FORMAT_UNSUPPORTED
|
||||||
} VIDEO_FORMAT;
|
} VIDEO_FORMAT;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
@@ -138,10 +140,17 @@ typedef enum
|
|||||||
VIDEO_CONTROL_MAX = VIDEO_CONTROL_SHARPNESS
|
VIDEO_CONTROL_MAX = VIDEO_CONTROL_SHARPNESS
|
||||||
} VIDEO_CONTROL;
|
} VIDEO_CONTROL;
|
||||||
|
|
||||||
|
class cDemux;
|
||||||
|
class cAudio;
|
||||||
|
|
||||||
class cVideo {
|
class cVideo {
|
||||||
|
friend class cAudio;
|
||||||
private:
|
private:
|
||||||
|
static cVideo *instance[CS_MAX_VIDEO_DECODERS];
|
||||||
|
|
||||||
|
unsigned int unit;
|
||||||
CS_VIDEO_PDATA *privateData;
|
CS_VIDEO_PDATA *privateData;
|
||||||
u32 streamType;
|
VIDEO_FORMAT streamType;
|
||||||
VIDEO_DEFINITION VideoDefinition;
|
VIDEO_DEFINITION VideoDefinition;
|
||||||
DISPLAY_AR DisplayAR;
|
DISPLAY_AR DisplayAR;
|
||||||
VIDEO_PLAY_MODE playMode;
|
VIDEO_PLAY_MODE playMode;
|
||||||
@@ -167,13 +176,16 @@ private:
|
|||||||
int cfd; // control driver fd
|
int cfd; // control driver fd
|
||||||
analog_mode_t analog_mode_cinch;
|
analog_mode_t analog_mode_cinch;
|
||||||
analog_mode_t analog_mode_scart;
|
analog_mode_t analog_mode_scart;
|
||||||
vfd_icon mode_icon;
|
fp_icon mode_icon;
|
||||||
|
cDemux *demux;
|
||||||
//
|
//
|
||||||
int SelectAutoFormat();
|
int SelectAutoFormat();
|
||||||
void ScalePic();
|
void ScalePic();
|
||||||
|
cVideo(unsigned int Unit);
|
||||||
public:
|
public:
|
||||||
/* constructor & destructor */
|
/* constructor & destructor */
|
||||||
cVideo(int mode, void * hChannel, void * hBuffer);
|
cVideo(int mode, void * hChannel, void * hBuffer);
|
||||||
|
|
||||||
~cVideo(void);
|
~cVideo(void);
|
||||||
|
|
||||||
void * GetVPP(void);
|
void * GetVPP(void);
|
||||||
@@ -247,6 +259,8 @@ public:
|
|||||||
int StartVBI(unsigned short pid);
|
int StartVBI(unsigned short pid);
|
||||||
int StopVBI(void);
|
int StopVBI(void);
|
||||||
bool GetScreenImage(unsigned char * &data, int &xres, int &yres, bool get_video = true, bool get_osd = false, bool scale_to_video = false);
|
bool GetScreenImage(unsigned char * &data, int &xres, int &yres, bool get_video = true, bool get_osd = false, bool scale_to_video = false);
|
||||||
|
void SetDemux(cDemux *Demux);
|
||||||
|
static cVideo *GetDecoder(unsigned int Unit);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __VIDEO_CS_H_
|
#endif // __VIDEO_CS_H_
|
||||||
|
@@ -65,8 +65,7 @@
|
|||||||
|
|
||||||
#define ENABLE_REPEAT_CHECK
|
#define ENABLE_REPEAT_CHECK
|
||||||
|
|
||||||
//const char * const RC_EVENT_DEVICE[NUMBER_OF_EVENT_DEVICES] = {"/dev/input/nevis_ir", "/dev/input/event0"};
|
const char * const RC_EVENT_DEVICE[NUMBER_OF_EVENT_DEVICES] = {"/dev/cs_ir"};
|
||||||
const char * const RC_EVENT_DEVICE[NUMBER_OF_EVENT_DEVICES] = {"/dev/input/nevis_ir"};
|
|
||||||
typedef struct input_event t_input_event;
|
typedef struct input_event t_input_event;
|
||||||
|
|
||||||
#ifdef KEYBOARD_INSTEAD_OF_REMOTE_CONTROL
|
#ifdef KEYBOARD_INSTEAD_OF_REMOTE_CONTROL
|
||||||
@@ -1574,8 +1573,8 @@ void CRCInput::play_click()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_COOLSTREAM_NEVIS_IR_H
|
#ifdef HAVE_COOLSTREAM_CS_IR_GENERIC_H
|
||||||
// hint: ir_protocol_t and other useful things are defined in nevis_ir.h
|
// hint: ir_protocol_t and other useful things are defined in cs_ir_generic.h
|
||||||
void CRCInput::set_rc_hw(ir_protocol_t ir_protocol, unsigned int ir_address)
|
void CRCInput::set_rc_hw(ir_protocol_t ir_protocol, unsigned int ir_address)
|
||||||
{
|
{
|
||||||
int ioctl_ret = -1;
|
int ioctl_ret = -1;
|
||||||
@@ -1599,7 +1598,7 @@ void CRCInput::set_rc_hw(ir_protocol_t ir_protocol, unsigned int ir_address)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// hint: ir_protocol_t and other useful things are defined in nevis_ir.h
|
// hint: ir_protocol_t and other useful things are defined in cs_ir_generic.h
|
||||||
void CRCInput::set_rc_hw(void)
|
void CRCInput::set_rc_hw(void)
|
||||||
{
|
{
|
||||||
ir_protocol_t ir_protocol = IR_PROTOCOL_UNKNOWN;
|
ir_protocol_t ir_protocol = IR_PROTOCOL_UNKNOWN;
|
||||||
|
@@ -38,8 +38,8 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#ifdef HAVE_COOLSTREAM_NEVIS_IR_H
|
#ifdef HAVE_COOLSTREAM_CS_IR_GENERIC_H
|
||||||
#include <coolstream/nevis_ir.h>
|
#include <coolstream/cs_ir_generic.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef KEY_OK
|
#ifndef KEY_OK
|
||||||
@@ -152,7 +152,7 @@ class CRCInput
|
|||||||
int translate(int code, int num);
|
int translate(int code, int num);
|
||||||
void calculateMaxFd(void);
|
void calculateMaxFd(void);
|
||||||
int checkTimers();
|
int checkTimers();
|
||||||
#ifdef HAVE_COOLSTREAM_NEVIS_IR_H
|
#ifdef HAVE_COOLSTREAM_CS_IR_GENERIC_H
|
||||||
void set_rc_hw(ir_protocol_t ir_protocol, unsigned int ir_address);
|
void set_rc_hw(ir_protocol_t ir_protocol, unsigned int ir_address);
|
||||||
#endif
|
#endif
|
||||||
public:
|
public:
|
||||||
|
@@ -169,9 +169,9 @@ void CVFD::setlcdparameter(int dimm, const int power)
|
|||||||
brightness = dimm;
|
brightness = dimm;
|
||||||
|
|
||||||
printf("CVFD::setlcdparameter dimm %d power %d\n", dimm, power);
|
printf("CVFD::setlcdparameter dimm %d power %d\n", dimm, power);
|
||||||
int ret = ioctl(fd, IOC_VFD_SET_BRIGHT, dimm);
|
int ret = ioctl(fd, IOC_FP_SET_BRIGHT, dimm);
|
||||||
if(ret < 0)
|
if(ret < 0)
|
||||||
perror("IOC_VFD_SET_BRIGHT");
|
perror("IOC_FP_SET_BRIGHT");
|
||||||
}
|
}
|
||||||
|
|
||||||
void CVFD::setlcdparameter(void)
|
void CVFD::setlcdparameter(void)
|
||||||
@@ -186,14 +186,14 @@ void CVFD::setled(int led1, int led2){
|
|||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
if(led1 != -1){
|
if(led1 != -1){
|
||||||
ret = ioctl(fd, IOC_VFD_LED_CTRL, led1);
|
ret = ioctl(fd, IOC_FP_LED_CTRL, led1);
|
||||||
if(ret < 0)
|
if(ret < 0)
|
||||||
perror("IOC_VFD_LED_CTRL");
|
perror("IOC_FP_LED_CTRL");
|
||||||
}
|
}
|
||||||
if(led2 != -1){
|
if(led2 != -1){
|
||||||
ret = ioctl(fd, IOC_VFD_LED_CTRL, led2);
|
ret = ioctl(fd, IOC_FP_LED_CTRL, led2);
|
||||||
if(ret < 0)
|
if(ret < 0)
|
||||||
perror("IOC_VFD_LED_CTRL");
|
perror("IOC_FP_LED_CTRL");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -206,13 +206,13 @@ void CVFD::setled(bool on_off)
|
|||||||
if(on_off){//on
|
if(on_off){//on
|
||||||
switch(g_settings.led_rec_mode){
|
switch(g_settings.led_rec_mode){
|
||||||
case 1:
|
case 1:
|
||||||
led1 = VFD_LED_1_ON; led2 = VFD_LED_2_ON;
|
led1 = FP_LED_1_ON; led2 = FP_LED_2_ON;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
led1 = VFD_LED_1_ON;
|
led1 = FP_LED_1_ON;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
led2 = VFD_LED_2_ON;
|
led2 = FP_LED_2_ON;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@@ -222,13 +222,13 @@ void CVFD::setled(bool on_off)
|
|||||||
switch(g_settings.led_rec_mode){
|
switch(g_settings.led_rec_mode){
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
led1 = VFD_LED_1_OFF;
|
led1 = FP_LED_1_OFF;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
led2 = VFD_LED_2_OFF;
|
led2 = FP_LED_2_OFF;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
led1 = VFD_LED_1_OFF; led2 = VFD_LED_2_OFF;
|
led1 = FP_LED_1_OFF; led2 = FP_LED_2_OFF;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -249,16 +249,16 @@ void CVFD::setled(void)
|
|||||||
|
|
||||||
switch(select){
|
switch(select){
|
||||||
case 0:
|
case 0:
|
||||||
led1 = VFD_LED_1_OFF; led2 = VFD_LED_2_OFF;
|
led1 = FP_LED_1_OFF; led2 = FP_LED_2_OFF;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
led1 = VFD_LED_1_ON; led2 = VFD_LED_2_ON;
|
led1 = FP_LED_1_ON; led2 = FP_LED_2_ON;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
led1 = VFD_LED_1_ON; led2 = VFD_LED_2_OFF;
|
led1 = FP_LED_1_ON; led2 = FP_LED_2_OFF;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
led1 = VFD_LED_1_OFF; led2 = VFD_LED_2_ON;
|
led1 = FP_LED_1_OFF; led2 = FP_LED_2_ON;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@@ -288,7 +288,7 @@ void CVFD::showTime(bool force)
|
|||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
if(has_lcd && mode == MODE_SHUTDOWN) {
|
if(has_lcd && mode == MODE_SHUTDOWN) {
|
||||||
ShowIcon(VFD_ICON_CAM1, false);
|
ShowIcon(FP_ICON_CAM1, false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (has_lcd && showclock) {
|
if (has_lcd && showclock) {
|
||||||
@@ -314,18 +314,18 @@ void CVFD::showTime(bool force)
|
|||||||
if(clearClock) {
|
if(clearClock) {
|
||||||
clearClock = 0;
|
clearClock = 0;
|
||||||
if(has_lcd)
|
if(has_lcd)
|
||||||
ShowIcon(VFD_ICON_CAM1, false);
|
ShowIcon(FP_ICON_CAM1, false);
|
||||||
setled(false);//off
|
setled(false);//off
|
||||||
} else {
|
} else {
|
||||||
clearClock = 1;
|
clearClock = 1;
|
||||||
if(has_lcd)
|
if(has_lcd)
|
||||||
ShowIcon(VFD_ICON_CAM1, true);
|
ShowIcon(FP_ICON_CAM1, true);
|
||||||
setled(true);//on
|
setled(true);//on
|
||||||
}
|
}
|
||||||
} else if(clearClock || (recstatus != tmp_recstatus)) { // in case icon ON after record stopped
|
} else if(clearClock || (recstatus != tmp_recstatus)) { // in case icon ON after record stopped
|
||||||
clearClock = 0;
|
clearClock = 0;
|
||||||
if(has_lcd)
|
if(has_lcd)
|
||||||
ShowIcon(VFD_ICON_CAM1, false);
|
ShowIcon(FP_ICON_CAM1, false);
|
||||||
setled();
|
setled();
|
||||||
}
|
}
|
||||||
recstatus = tmp_recstatus;
|
recstatus = tmp_recstatus;
|
||||||
@@ -340,13 +340,13 @@ void CVFD::showVolume(const char vol, const bool /*perform_update*/)
|
|||||||
static int oldpp = 0;
|
static int oldpp = 0;
|
||||||
if(!has_lcd) return;
|
if(!has_lcd) return;
|
||||||
|
|
||||||
ShowIcon(VFD_ICON_MUTE, muted);
|
ShowIcon(FP_ICON_MUTE, muted);
|
||||||
if(vol == volume)
|
if(vol == volume)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
volume = vol;
|
volume = vol;
|
||||||
wake_up();
|
wake_up();
|
||||||
ShowIcon(VFD_ICON_FRAME, true);
|
ShowIcon(FP_ICON_FRAME, true);
|
||||||
|
|
||||||
if ((mode == MODE_TVRADIO) && g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME]) {
|
if ((mode == MODE_TVRADIO) && g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME]) {
|
||||||
int pp = (int) round((double) vol * (double) 8 / (double) 100);
|
int pp = (int) round((double) vol * (double) 8 / (double) 100);
|
||||||
@@ -357,11 +357,11 @@ printf("CVFD::showVolume: %d, bar %d\n", (int) vol, pp);
|
|||||||
int i;
|
int i;
|
||||||
int j = 0x00000200;
|
int j = 0x00000200;
|
||||||
for(i = 0; i < pp; i++) {
|
for(i = 0; i < pp; i++) {
|
||||||
ShowIcon((vfd_icon) j, true);
|
ShowIcon((fp_icon) j, true);
|
||||||
j /= 2;
|
j /= 2;
|
||||||
}
|
}
|
||||||
for(;i < 8; i++) {
|
for(;i < 8; i++) {
|
||||||
ShowIcon((vfd_icon) j, false);
|
ShowIcon((fp_icon) j, false);
|
||||||
j /= 2;
|
j /= 2;
|
||||||
}
|
}
|
||||||
oldpp = pp;
|
oldpp = pp;
|
||||||
@@ -376,7 +376,7 @@ void CVFD::showPercentOver(const unsigned char perc, const bool /*perform_update
|
|||||||
if ((mode == MODE_TVRADIO) && !(g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME])) {
|
if ((mode == MODE_TVRADIO) && !(g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME])) {
|
||||||
//if (g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME] == 0)
|
//if (g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME] == 0)
|
||||||
{
|
{
|
||||||
ShowIcon(VFD_ICON_FRAME, true);
|
ShowIcon(FP_ICON_FRAME, true);
|
||||||
int pp;
|
int pp;
|
||||||
if(perc == 255)
|
if(perc == 255)
|
||||||
pp = 0;
|
pp = 0;
|
||||||
@@ -388,11 +388,11 @@ void CVFD::showPercentOver(const unsigned char perc, const bool /*perform_update
|
|||||||
int i;
|
int i;
|
||||||
int j = 0x00000200;
|
int j = 0x00000200;
|
||||||
for(i = 0; i < pp; i++) {
|
for(i = 0; i < pp; i++) {
|
||||||
ShowIcon((vfd_icon) j, true);
|
ShowIcon((fp_icon) j, true);
|
||||||
j /= 2;
|
j /= 2;
|
||||||
}
|
}
|
||||||
for(;i < 8; i++) {
|
for(;i < 8; i++) {
|
||||||
ShowIcon((vfd_icon) j, false);
|
ShowIcon((fp_icon) j, false);
|
||||||
j /= 2;
|
j /= 2;
|
||||||
}
|
}
|
||||||
percentOver = pp;
|
percentOver = pp;
|
||||||
@@ -432,16 +432,16 @@ void CVFD::showAudioPlayMode(AUDIOMODES m)
|
|||||||
if(!has_lcd) return;
|
if(!has_lcd) return;
|
||||||
switch(m) {
|
switch(m) {
|
||||||
case AUDIO_MODE_PLAY:
|
case AUDIO_MODE_PLAY:
|
||||||
ShowIcon(VFD_ICON_PLAY, true);
|
ShowIcon(FP_ICON_PLAY, true);
|
||||||
ShowIcon(VFD_ICON_PAUSE, false);
|
ShowIcon(FP_ICON_PAUSE, false);
|
||||||
break;
|
break;
|
||||||
case AUDIO_MODE_STOP:
|
case AUDIO_MODE_STOP:
|
||||||
ShowIcon(VFD_ICON_PLAY, false);
|
ShowIcon(FP_ICON_PLAY, false);
|
||||||
ShowIcon(VFD_ICON_PAUSE, false);
|
ShowIcon(FP_ICON_PAUSE, false);
|
||||||
break;
|
break;
|
||||||
case AUDIO_MODE_PAUSE:
|
case AUDIO_MODE_PAUSE:
|
||||||
ShowIcon(VFD_ICON_PLAY, false);
|
ShowIcon(FP_ICON_PLAY, false);
|
||||||
ShowIcon(VFD_ICON_PAUSE, true);
|
ShowIcon(FP_ICON_PAUSE, true);
|
||||||
break;
|
break;
|
||||||
case AUDIO_MODE_FF:
|
case AUDIO_MODE_FF:
|
||||||
break;
|
break;
|
||||||
@@ -474,11 +474,11 @@ void CVFD::setMode(const MODES m, const char * const title)
|
|||||||
if(!has_lcd) return;
|
if(!has_lcd) return;
|
||||||
|
|
||||||
if(mode == MODE_AUDIO)
|
if(mode == MODE_AUDIO)
|
||||||
ShowIcon(VFD_ICON_MP3, false);
|
ShowIcon(FP_ICON_MP3, false);
|
||||||
#if 0
|
#if 0
|
||||||
else if(mode == MODE_STANDBY) {
|
else if(mode == MODE_STANDBY) {
|
||||||
ShowIcon(VFD_ICON_COL1, false);
|
ShowIcon(FP_ICON_COL1, false);
|
||||||
ShowIcon(VFD_ICON_COL2, false);
|
ShowIcon(FP_ICON_COL2, false);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -511,7 +511,7 @@ void CVFD::setMode(const MODES m, const char * const title)
|
|||||||
break;
|
break;
|
||||||
case MODE_AUDIO:
|
case MODE_AUDIO:
|
||||||
{
|
{
|
||||||
ShowIcon(VFD_ICON_MP3, true);
|
ShowIcon(FP_ICON_MP3, true);
|
||||||
showAudioPlayMode(AUDIO_MODE_STOP);
|
showAudioPlayMode(AUDIO_MODE_STOP);
|
||||||
showVolume(volume, false);
|
showVolume(volume, false);
|
||||||
showclock = true;
|
showclock = true;
|
||||||
@@ -533,8 +533,8 @@ void CVFD::setMode(const MODES m, const char * const title)
|
|||||||
break;
|
break;
|
||||||
case MODE_STANDBY:
|
case MODE_STANDBY:
|
||||||
#if 0
|
#if 0
|
||||||
ShowIcon(VFD_ICON_COL1, true);
|
ShowIcon(FP_ICON_COL1, true);
|
||||||
ShowIcon(VFD_ICON_COL2, true);
|
ShowIcon(FP_ICON_COL2, true);
|
||||||
#endif
|
#endif
|
||||||
showclock = true;
|
showclock = true;
|
||||||
showTime(true); /* "showclock = true;" implies that "showTime();" does a "displayUpdate();" */
|
showTime(true); /* "showclock = true;" implies that "showTime();" does a "displayUpdate();" */
|
||||||
@@ -669,20 +669,20 @@ void CVFD::Unlock()
|
|||||||
void CVFD::Clear()
|
void CVFD::Clear()
|
||||||
{
|
{
|
||||||
if(!has_lcd) return;
|
if(!has_lcd) return;
|
||||||
int ret = ioctl(fd, IOC_VFD_CLEAR_ALL, 0);
|
int ret = ioctl(fd, IOC_FP_CLEAR_ALL, 0);
|
||||||
if(ret < 0)
|
if(ret < 0)
|
||||||
perror("IOC_VFD_SET_TEXT");
|
perror("IOC_FP_SET_TEXT");
|
||||||
else
|
else
|
||||||
text[0] = 0;
|
text[0] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CVFD::ShowIcon(vfd_icon icon, bool show)
|
void CVFD::ShowIcon(fp_icon icon, bool show)
|
||||||
{
|
{
|
||||||
if(!has_lcd) return;
|
if(!has_lcd) return;
|
||||||
//printf("CVFD::ShowIcon %s %x\n", show ? "show" : "hide", (int) icon);
|
//printf("CVFD::ShowIcon %s %x\n", show ? "show" : "hide", (int) icon);
|
||||||
int ret = ioctl(fd, show ? IOC_VFD_SET_ICON : IOC_VFD_CLEAR_ICON, icon);
|
int ret = ioctl(fd, show ? IOC_FP_SET_ICON : IOC_FP_CLEAR_ICON, icon);
|
||||||
if(ret < 0)
|
if(ret < 0)
|
||||||
perror(show ? "IOC_VFD_SET_ICON" : "IOC_VFD_CLEAR_ICON");
|
perror(show ? "IOC_FP_SET_ICON" : "IOC_FP_CLEAR_ICON");
|
||||||
}
|
}
|
||||||
|
|
||||||
void CVFD::ShowText(const char *str)
|
void CVFD::ShowText(const char *str)
|
||||||
@@ -707,9 +707,9 @@ printf("CVFD::ShowText: [%s]\n", str);
|
|||||||
|
|
||||||
//printf("****************************** CVFD::ShowText: %s\n", str);
|
//printf("****************************** CVFD::ShowText: %s\n", str);
|
||||||
//FIXME !!
|
//FIXME !!
|
||||||
ret = ioctl(fd, IOC_VFD_SET_TEXT, len ? str : NULL);
|
ret = ioctl(fd, IOC_FP_SET_TEXT, len ? str : NULL);
|
||||||
if(ret < 0)
|
if(ret < 0)
|
||||||
perror("IOC_VFD_SET_TEXT");
|
perror("IOC_FP_SET_TEXT");
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef VFD_UPDATE
|
#ifdef VFD_UPDATE
|
||||||
|
@@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <coolstream/cs_vfd.h>
|
#include <coolstream/cs_frontpanel.h>
|
||||||
|
|
||||||
class CVFD
|
class CVFD
|
||||||
{
|
{
|
||||||
@@ -143,7 +143,7 @@ class CVFD
|
|||||||
void Lock();
|
void Lock();
|
||||||
void Unlock();
|
void Unlock();
|
||||||
void Clear();
|
void Clear();
|
||||||
void ShowIcon(vfd_icon icon, bool show);
|
void ShowIcon(fp_icon icon, bool show);
|
||||||
void ShowText(const char *str);
|
void ShowText(const char *str);
|
||||||
void wake_up();
|
void wake_up();
|
||||||
MODES getMode(void) { return mode; };
|
MODES getMode(void) { return mode; };
|
||||||
|
@@ -33,7 +33,7 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_COOLSTREAM_NEVIS_IR_H
|
#ifdef HAVE_COOLSTREAM_CS_IR_GENERIC_H
|
||||||
/* define constants instead of #ifdef'ing the corresponding code.
|
/* define constants instead of #ifdef'ing the corresponding code.
|
||||||
* the compiler will optimize it away anyway, but the syntax is
|
* the compiler will optimize it away anyway, but the syntax is
|
||||||
* still checked */
|
* still checked */
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
#else
|
#else
|
||||||
#define RC_HW_SELECT false
|
#define RC_HW_SELECT false
|
||||||
#ifdef HAVE_COOL_HARDWARE
|
#ifdef HAVE_COOL_HARDWARE
|
||||||
#warning header coolstream/nevis_ir.h not found
|
#warning header coolstream/cs_ir_generic.h not found
|
||||||
#warning you probably have an old driver installation
|
#warning you probably have an old driver installation
|
||||||
#warning you´ll be missing the remotecontrol selection feature!
|
#warning you´ll be missing the remotecontrol selection feature!
|
||||||
#endif
|
#endif
|
||||||
|
@@ -432,7 +432,7 @@ void CMoviePlayerGui::PlayFile(void)
|
|||||||
playback->Close();
|
playback->Close();
|
||||||
} else {
|
} else {
|
||||||
playstate = CMoviePlayerGui::PLAY;
|
playstate = CMoviePlayerGui::PLAY;
|
||||||
CVFD::getInstance()->ShowIcon(VFD_ICON_PLAY, true);
|
CVFD::getInstance()->ShowIcon(FP_ICON_PLAY, true);
|
||||||
if(timeshift) {
|
if(timeshift) {
|
||||||
first_start_timeshift = true;
|
first_start_timeshift = true;
|
||||||
startposition = -1;
|
startposition = -1;
|
||||||
@@ -679,8 +679,8 @@ void CMoviePlayerGui::PlayFile(void)
|
|||||||
playback->SetSpeed(1);
|
playback->SetSpeed(1);
|
||||||
playback->Close();
|
playback->Close();
|
||||||
|
|
||||||
CVFD::getInstance()->ShowIcon(VFD_ICON_PLAY, false);
|
CVFD::getInstance()->ShowIcon(FP_ICON_PLAY, false);
|
||||||
CVFD::getInstance()->ShowIcon(VFD_ICON_PAUSE, false);
|
CVFD::getInstance()->ShowIcon(FP_ICON_PAUSE, false);
|
||||||
|
|
||||||
restoreNeutrino();
|
restoreNeutrino();
|
||||||
|
|
||||||
|
@@ -35,6 +35,10 @@
|
|||||||
#include <sectionsdclient/sectionsdclient.h>
|
#include <sectionsdclient/sectionsdclient.h>
|
||||||
#include <eitd/sectionsd.h>
|
#include <eitd/sectionsd.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_COOLSTREAM_CS_FRONTPANEL_H
|
||||||
|
#include <coolstream/cs_frontpanel.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
|
||||||
@@ -60,6 +64,32 @@ void CTimerManager::Init(void)
|
|||||||
m_saveEvents = false;
|
m_saveEvents = false;
|
||||||
m_isTimeSet = false;
|
m_isTimeSet = false;
|
||||||
wakeup = 0;
|
wakeup = 0;
|
||||||
|
timer_wakeup = false;
|
||||||
|
|
||||||
|
#if HAVE_COOL_HARDWARE
|
||||||
|
int fd = open("/dev/display", O_RDONLY);
|
||||||
|
|
||||||
|
if (fd < 0) {
|
||||||
|
perror("/dev/display");
|
||||||
|
} else {
|
||||||
|
fp_wakeup_data_t wk;
|
||||||
|
memset(&wk, 0, sizeof(wk));
|
||||||
|
int ret = ioctl(fd, IOC_FP_GET_WAKEUP, &wk);
|
||||||
|
if(ret >= 0)
|
||||||
|
wakeup = ((wk.source == FP_WAKEUP_SOURCE_TIMER) /* || (wk.source == WAKEUP_SOURCE_PWLOST)*/);
|
||||||
|
close(fd);
|
||||||
|
}
|
||||||
|
printf("[timerd] wakeup from standby: %s\n", wakeup ? "yes" : "no");
|
||||||
|
if(wakeup){
|
||||||
|
creat("/tmp/.wakeup", 0);
|
||||||
|
timer_wakeup = true;
|
||||||
|
}else{
|
||||||
|
const char *neutrino_leave_deepstandby_script = CONFIGDIR "/deepstandby.off";
|
||||||
|
printf("[%s] executing %s\n",__FILE__ ,neutrino_leave_deepstandby_script);
|
||||||
|
if (system(neutrino_leave_deepstandby_script) != 0)
|
||||||
|
perror( neutrino_leave_deepstandby_script );
|
||||||
|
}
|
||||||
|
#endif
|
||||||
loadRecordingSafety();
|
loadRecordingSafety();
|
||||||
|
|
||||||
//thread starten
|
//thread starten
|
||||||
|
@@ -2036,12 +2036,16 @@ bool CZapit::Start(Z_start_arg *ZapStart_arg)
|
|||||||
audioDemux = new cDemux();
|
audioDemux = new cDemux();
|
||||||
audioDemux->Open(DMX_AUDIO_CHANNEL);
|
audioDemux->Open(DMX_AUDIO_CHANNEL);
|
||||||
|
|
||||||
videoDecoder = cVideo::GetDecoder();
|
videoDecoder = cVideo::GetDecoder(0);
|
||||||
|
audioDecoder = cAudio::GetDecoder(0);
|
||||||
|
|
||||||
videoDecoder->SetDemux(videoDemux);
|
videoDecoder->SetDemux(videoDemux);
|
||||||
videoDecoder->SetVideoSystem(video_mode);
|
videoDecoder->SetVideoSystem(video_mode);
|
||||||
videoDecoder->Standby(false);
|
videoDecoder->Standby(false);
|
||||||
|
|
||||||
audioDecoder = new cAudio(audioDemux->getBuffer(), videoDecoder->GetTVEnc(), NULL /*videoDecoder->GetTVEncSD()*/);
|
audioDecoder->SetDemux(audioDemux);
|
||||||
|
audioDecoder->SetVideo(videoDecoder);
|
||||||
|
|
||||||
videoDecoder->SetAudioHandle(audioDecoder->GetHandle());
|
videoDecoder->SetAudioHandle(audioDecoder->GetHandle());
|
||||||
|
|
||||||
#ifdef USE_VBI
|
#ifdef USE_VBI
|
||||||
|
Reference in New Issue
Block a user