diff --git a/configure.ac b/configure.ac index d1d0378da..e8edf01bf 100644 --- a/configure.ac +++ b/configure.ac @@ -118,7 +118,8 @@ AC_ARG_ENABLE(cleanup, [ --enable-cleanup 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 diff --git a/lib/libcoolstream/audio_cs.h b/lib/libcoolstream/audio_cs.h index e311cf79c..a5aa5d866 100644 --- a/lib/libcoolstream/audio_cs.h +++ b/lib/libcoolstream/audio_cs.h @@ -56,6 +56,7 @@ typedef enum HDMI_AUDIO_FMT_ATRAC } HDMI_AUDIO_FORMAT; +#define CS_MAX_AUDIO_DECODERS 1 #define CS_MAX_AUDIO_FORMATS 10 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_caps_t; +class cDemux; +class cVideo; + class cAudio { private: + static cAudio *instance[CS_MAX_AUDIO_DECODERS]; + unsigned int unit; + cDemux *demux; + cVideo *video; CS_AUDIO_PDATA *privateData; //unsigned int cEncodedDataOnSPDIF, cEncodedDataOnHDMI; bool muted; @@ -92,6 +100,8 @@ private: bool spdifDD; bool hasMuteScheduled; bool analogOut; + // + cAudio(unsigned int Unit); public: /* construct & destruct */ cAudio(void *hBuffer, void *encHD, void *encSD); @@ -149,6 +159,9 @@ public: bool IsHdmiAudioFormatSupported(HDMI_AUDIO_FORMAT format); void SetHdmiDD(HDMI_ENCODED_MODE type); bool IsHdmiDTSSupported(void); + void SetDemux(cDemux *Demux); + void SetVideo(cVideo *Video); + static cAudio *GetDecoder(unsigned int Unit); }; #endif //__AUDIO_CS_H_ diff --git a/lib/libcoolstream/ca_cs.h b/lib/libcoolstream/ca_cs.h index b2aa613ca..d7afc535f 100644 --- a/lib/libcoolstream/ca_cs.h +++ b/lib/libcoolstream/ca_cs.h @@ -11,8 +11,8 @@ #define __CA_CS_H_ #include -#include "cs_types.h" #include +#include "cs_types.h" enum CA_INIT_MASK { CA_INIT_SC = 1, @@ -23,7 +23,7 @@ enum CA_INIT_MASK { enum CA_SLOT_TYPE { CA_SLOT_TYPE_SMARTCARD, CA_SLOT_TYPE_CI, - CA_SLOT_TYPE_ALL + CA_SLOT_TYPE_ALL, }; enum CA_MESSAGE_FLAGS { @@ -49,7 +49,7 @@ enum CA_MESSAGE_FLAGS { CA_MESSAGE_HAS_PARAM1_LONG = (1 << 19), CA_MESSAGE_HAS_PARAM2_LONG = (1 << 20), 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 { @@ -72,7 +72,7 @@ enum CA_MESSAGE_MSGID { CA_MESSAGE_MSG_EMM_ARRIVED, CA_MESSAGE_MSG_CHANNEL_CHANGE, CA_MESSAGE_MSG_GUI_READY, - CA_MESSAGE_MSG_EXIT + CA_MESSAGE_MSG_EXIT, }; typedef struct CA_MESSAGE { diff --git a/lib/libcoolstream/dmx_cs.h b/lib/libcoolstream/dmx_cs.h index c189e64c9..e80a29204 100644 --- a/lib/libcoolstream/dmx_cs.h +++ b/lib/libcoolstream/dmx_cs.h @@ -36,8 +36,12 @@ typedef enum { } DMX_CHANNEL_TYPE; class cDemuxData; +class cVideo; +class cAudio; class cDemux { +friend class cVideo; +friend class cAudio; private: DMX_CHANNEL_TYPE type; int timeout; diff --git a/lib/libcoolstream/playback_cs.h b/lib/libcoolstream/playback_cs.h index a9192bfdc..80ecb4ccd 100644 --- a/lib/libcoolstream/playback_cs.h +++ b/lib/libcoolstream/playback_cs.h @@ -11,6 +11,7 @@ #define __PLAYBACK_CS_H_ #include +#include typedef enum { PLAYMODE_TS = 0, diff --git a/lib/libcoolstream/record_cs.h b/lib/libcoolstream/record_cs.h index e139495f2..4ef6f3df0 100644 --- a/lib/libcoolstream/record_cs.h +++ b/lib/libcoolstream/record_cs.h @@ -14,6 +14,10 @@ class cRecordData; +#define REC_STATUS_OK 0 +#define REC_STATUS_SLOW 1 +#define REC_STATUS_OVERFLOW 2 + class cRecord { private: cRecordData * rd; @@ -29,6 +33,8 @@ public: bool Start(int fd, unsigned short vpid, unsigned short * apids, int numapids, uint64_t chid); bool Stop(void); bool AddPid(unsigned short pid); + int GetStatus(); + void ResetStatus(); }; #endif // __RECORD_CS_H_ diff --git a/lib/libcoolstream/video_cs.h b/lib/libcoolstream/video_cs.h index 353e3446b..2b8a8f034 100644 --- a/lib/libcoolstream/video_cs.h +++ b/lib/libcoolstream/video_cs.h @@ -10,11 +10,13 @@ #ifndef __VIDEO_CS_H_ #define __VIDEO_CS_H_ -#include +#include #include #include "cs_types.h" +#define CS_MAX_VIDEO_DECODERS 16 + #ifndef CS_VIDEO_PDATA #define CS_VIDEO_PDATA void #endif @@ -33,26 +35,26 @@ typedef enum { typedef enum { - VIDEO_FORMAT_MPEG2 = 0, - VIDEO_FORMAT_MPEG4, /* H264 */ - VIDEO_FORMAT_VC1, - VIDEO_FORMAT_JPEG, - VIDEO_FORMAT_GIF, - VIDEO_FORMAT_PNG, - VIDEO_FORMAT_DIVX,/* DIVX 3.11 */ - VIDEO_FORMAT_MPEG4PART2,/* MPEG4 SVH, MPEG4 SP, MPEG4 ASP, DIVX4,5,6 */ - VIDEO_FORMAT_REALVIDEO8, - VIDEO_FORMAT_REALVIDEO9, - VIDEO_FORMAT_ON2_VP6, - VIDEO_FORMAT_ON2_VP8, - VIDEO_FORMAT_SORENSON_SPARK, - VIDEO_FORMAT_H263, - VIDEO_FORMAT_H263_ENCODER, - VIDEO_FORMAT_H264_ENCODER, - VIDEO_FORMAT_MPEG4PART2_ENCODER, - VIDEO_FORMAT_AVS, - VIDEO_FORMAT_VIP656, - VIDEO_FORMAT_UNSUPPORTED + VIDEO_FORMAT_MPEG2 = 0, + VIDEO_FORMAT_MPEG4, /* H264 */ + VIDEO_FORMAT_VC1, + VIDEO_FORMAT_JPEG, + VIDEO_FORMAT_GIF, + VIDEO_FORMAT_PNG, + VIDEO_FORMAT_DIVX,/* DIVX 3.11 */ + VIDEO_FORMAT_MPEG4PART2,/* MPEG4 SVH, MPEG4 SP, MPEG4 ASP, DIVX4,5,6 */ + VIDEO_FORMAT_REALVIDEO8, + VIDEO_FORMAT_REALVIDEO9, + VIDEO_FORMAT_ON2_VP6, + VIDEO_FORMAT_ON2_VP8, + VIDEO_FORMAT_SORENSON_SPARK, + VIDEO_FORMAT_H263, + VIDEO_FORMAT_H263_ENCODER, + VIDEO_FORMAT_H264_ENCODER, + VIDEO_FORMAT_MPEG4PART2_ENCODER, + VIDEO_FORMAT_AVS, + VIDEO_FORMAT_VIP656, + VIDEO_FORMAT_UNSUPPORTED } VIDEO_FORMAT; typedef enum { @@ -138,10 +140,17 @@ typedef enum VIDEO_CONTROL_MAX = VIDEO_CONTROL_SHARPNESS } VIDEO_CONTROL; +class cDemux; +class cAudio; + class cVideo { +friend class cAudio; private: + static cVideo *instance[CS_MAX_VIDEO_DECODERS]; + + unsigned int unit; CS_VIDEO_PDATA *privateData; - u32 streamType; + VIDEO_FORMAT streamType; VIDEO_DEFINITION VideoDefinition; DISPLAY_AR DisplayAR; VIDEO_PLAY_MODE playMode; @@ -167,13 +176,16 @@ private: int cfd; // control driver fd analog_mode_t analog_mode_cinch; analog_mode_t analog_mode_scart; - vfd_icon mode_icon; + fp_icon mode_icon; + cDemux *demux; // int SelectAutoFormat(); void ScalePic(); + cVideo(unsigned int Unit); public: /* constructor & destructor */ cVideo(int mode, void * hChannel, void * hBuffer); + ~cVideo(void); void * GetVPP(void); @@ -247,6 +259,8 @@ public: int StartVBI(unsigned short pid); 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); + void SetDemux(cDemux *Demux); + static cVideo *GetDecoder(unsigned int Unit); }; #endif // __VIDEO_CS_H_ diff --git a/src/driver/rcinput.cpp b/src/driver/rcinput.cpp index 30f970f71..f4047ecba 100644 --- a/src/driver/rcinput.cpp +++ b/src/driver/rcinput.cpp @@ -65,8 +65,7 @@ #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/input/nevis_ir"}; +const char * const RC_EVENT_DEVICE[NUMBER_OF_EVENT_DEVICES] = {"/dev/cs_ir"}; typedef struct input_event t_input_event; #ifdef KEYBOARD_INSTEAD_OF_REMOTE_CONTROL @@ -1574,8 +1573,8 @@ void CRCInput::play_click() } -#ifdef HAVE_COOLSTREAM_NEVIS_IR_H -// hint: ir_protocol_t and other useful things are defined in nevis_ir.h +#ifdef HAVE_COOLSTREAM_CS_IR_GENERIC_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) { 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) { ir_protocol_t ir_protocol = IR_PROTOCOL_UNKNOWN; diff --git a/src/driver/rcinput.h b/src/driver/rcinput.h index ce2150e28..5a88f0d48 100644 --- a/src/driver/rcinput.h +++ b/src/driver/rcinput.h @@ -38,8 +38,8 @@ #include #include #include -#ifdef HAVE_COOLSTREAM_NEVIS_IR_H -#include +#ifdef HAVE_COOLSTREAM_CS_IR_GENERIC_H +#include #endif #ifndef KEY_OK @@ -152,7 +152,7 @@ class CRCInput int translate(int code, int num); void calculateMaxFd(void); 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); #endif public: diff --git a/src/driver/vfd.cpp b/src/driver/vfd.cpp index 670f0a66f..82d59f54d 100644 --- a/src/driver/vfd.cpp +++ b/src/driver/vfd.cpp @@ -169,9 +169,9 @@ void CVFD::setlcdparameter(int dimm, const int power) brightness = dimm; 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) - perror("IOC_VFD_SET_BRIGHT"); + perror("IOC_FP_SET_BRIGHT"); } void CVFD::setlcdparameter(void) @@ -186,14 +186,14 @@ void CVFD::setled(int led1, int led2){ int ret = -1; if(led1 != -1){ - ret = ioctl(fd, IOC_VFD_LED_CTRL, led1); + ret = ioctl(fd, IOC_FP_LED_CTRL, led1); if(ret < 0) - perror("IOC_VFD_LED_CTRL"); + perror("IOC_FP_LED_CTRL"); } if(led2 != -1){ - ret = ioctl(fd, IOC_VFD_LED_CTRL, led2); + ret = ioctl(fd, IOC_FP_LED_CTRL, led2); 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 switch(g_settings.led_rec_mode){ case 1: - led1 = VFD_LED_1_ON; led2 = VFD_LED_2_ON; + led1 = FP_LED_1_ON; led2 = FP_LED_2_ON; break; case 2: - led1 = VFD_LED_1_ON; + led1 = FP_LED_1_ON; break; case 3: - led2 = VFD_LED_2_ON; + led2 = FP_LED_2_ON; break; default: break; @@ -222,13 +222,13 @@ void CVFD::setled(bool on_off) switch(g_settings.led_rec_mode){ break; case 2: - led1 = VFD_LED_1_OFF; + led1 = FP_LED_1_OFF; break; case 3: - led2 = VFD_LED_2_OFF; + led2 = FP_LED_2_OFF; break; default: - led1 = VFD_LED_1_OFF; led2 = VFD_LED_2_OFF; + led1 = FP_LED_1_OFF; led2 = FP_LED_2_OFF; break; } } @@ -249,16 +249,16 @@ void CVFD::setled(void) switch(select){ case 0: - led1 = VFD_LED_1_OFF; led2 = VFD_LED_2_OFF; + led1 = FP_LED_1_OFF; led2 = FP_LED_2_OFF; break; case 1: - led1 = VFD_LED_1_ON; led2 = VFD_LED_2_ON; + led1 = FP_LED_1_ON; led2 = FP_LED_2_ON; break; case 2: - led1 = VFD_LED_1_ON; led2 = VFD_LED_2_OFF; + led1 = FP_LED_1_ON; led2 = FP_LED_2_OFF; break; case 3: - led1 = VFD_LED_1_OFF; led2 = VFD_LED_2_ON; + led1 = FP_LED_1_OFF; led2 = FP_LED_2_ON; break; default: break; @@ -288,7 +288,7 @@ void CVFD::showTime(bool force) return; #endif if(has_lcd && mode == MODE_SHUTDOWN) { - ShowIcon(VFD_ICON_CAM1, false); + ShowIcon(FP_ICON_CAM1, false); return; } if (has_lcd && showclock) { @@ -314,18 +314,18 @@ void CVFD::showTime(bool force) if(clearClock) { clearClock = 0; if(has_lcd) - ShowIcon(VFD_ICON_CAM1, false); + ShowIcon(FP_ICON_CAM1, false); setled(false);//off } else { clearClock = 1; if(has_lcd) - ShowIcon(VFD_ICON_CAM1, true); + ShowIcon(FP_ICON_CAM1, true); setled(true);//on } } else if(clearClock || (recstatus != tmp_recstatus)) { // in case icon ON after record stopped clearClock = 0; if(has_lcd) - ShowIcon(VFD_ICON_CAM1, false); + ShowIcon(FP_ICON_CAM1, false); setled(); } recstatus = tmp_recstatus; @@ -340,13 +340,13 @@ void CVFD::showVolume(const char vol, const bool /*perform_update*/) static int oldpp = 0; if(!has_lcd) return; - ShowIcon(VFD_ICON_MUTE, muted); + ShowIcon(FP_ICON_MUTE, muted); if(vol == volume) return; volume = vol; wake_up(); - ShowIcon(VFD_ICON_FRAME, true); + ShowIcon(FP_ICON_FRAME, true); if ((mode == MODE_TVRADIO) && g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME]) { 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 j = 0x00000200; for(i = 0; i < pp; i++) { - ShowIcon((vfd_icon) j, true); + ShowIcon((fp_icon) j, true); j /= 2; } for(;i < 8; i++) { - ShowIcon((vfd_icon) j, false); + ShowIcon((fp_icon) j, false); j /= 2; } 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 (g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME] == 0) { - ShowIcon(VFD_ICON_FRAME, true); + ShowIcon(FP_ICON_FRAME, true); int pp; if(perc == 255) pp = 0; @@ -388,11 +388,11 @@ void CVFD::showPercentOver(const unsigned char perc, const bool /*perform_update int i; int j = 0x00000200; for(i = 0; i < pp; i++) { - ShowIcon((vfd_icon) j, true); + ShowIcon((fp_icon) j, true); j /= 2; } for(;i < 8; i++) { - ShowIcon((vfd_icon) j, false); + ShowIcon((fp_icon) j, false); j /= 2; } percentOver = pp; @@ -432,16 +432,16 @@ void CVFD::showAudioPlayMode(AUDIOMODES m) if(!has_lcd) return; switch(m) { case AUDIO_MODE_PLAY: - ShowIcon(VFD_ICON_PLAY, true); - ShowIcon(VFD_ICON_PAUSE, false); + ShowIcon(FP_ICON_PLAY, true); + ShowIcon(FP_ICON_PAUSE, false); break; case AUDIO_MODE_STOP: - ShowIcon(VFD_ICON_PLAY, false); - ShowIcon(VFD_ICON_PAUSE, false); + ShowIcon(FP_ICON_PLAY, false); + ShowIcon(FP_ICON_PAUSE, false); break; case AUDIO_MODE_PAUSE: - ShowIcon(VFD_ICON_PLAY, false); - ShowIcon(VFD_ICON_PAUSE, true); + ShowIcon(FP_ICON_PLAY, false); + ShowIcon(FP_ICON_PAUSE, true); break; case AUDIO_MODE_FF: break; @@ -474,11 +474,11 @@ void CVFD::setMode(const MODES m, const char * const title) if(!has_lcd) return; if(mode == MODE_AUDIO) - ShowIcon(VFD_ICON_MP3, false); + ShowIcon(FP_ICON_MP3, false); #if 0 else if(mode == MODE_STANDBY) { - ShowIcon(VFD_ICON_COL1, false); - ShowIcon(VFD_ICON_COL2, false); + ShowIcon(FP_ICON_COL1, false); + ShowIcon(FP_ICON_COL2, false); } #endif @@ -511,7 +511,7 @@ void CVFD::setMode(const MODES m, const char * const title) break; case MODE_AUDIO: { - ShowIcon(VFD_ICON_MP3, true); + ShowIcon(FP_ICON_MP3, true); showAudioPlayMode(AUDIO_MODE_STOP); showVolume(volume, false); showclock = true; @@ -533,8 +533,8 @@ void CVFD::setMode(const MODES m, const char * const title) break; case MODE_STANDBY: #if 0 - ShowIcon(VFD_ICON_COL1, true); - ShowIcon(VFD_ICON_COL2, true); + ShowIcon(FP_ICON_COL1, true); + ShowIcon(FP_ICON_COL2, true); #endif showclock = true; showTime(true); /* "showclock = true;" implies that "showTime();" does a "displayUpdate();" */ @@ -669,20 +669,20 @@ void CVFD::Unlock() void CVFD::Clear() { 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) - perror("IOC_VFD_SET_TEXT"); + perror("IOC_FP_SET_TEXT"); else text[0] = 0; } -void CVFD::ShowIcon(vfd_icon icon, bool show) +void CVFD::ShowIcon(fp_icon icon, bool show) { if(!has_lcd) return; //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) - 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) @@ -707,9 +707,9 @@ printf("CVFD::ShowText: [%s]\n", str); //printf("****************************** CVFD::ShowText: %s\n", str); //FIXME !! - ret = ioctl(fd, IOC_VFD_SET_TEXT, len ? str : NULL); + ret = ioctl(fd, IOC_FP_SET_TEXT, len ? str : NULL); if(ret < 0) - perror("IOC_VFD_SET_TEXT"); + perror("IOC_FP_SET_TEXT"); } #ifdef VFD_UPDATE diff --git a/src/driver/vfd.h b/src/driver/vfd.h index 1519021d3..5de521eb1 100644 --- a/src/driver/vfd.h +++ b/src/driver/vfd.h @@ -42,7 +42,7 @@ #include #include -#include +#include class CVFD { @@ -143,7 +143,7 @@ class CVFD void Lock(); void Unlock(); void Clear(); - void ShowIcon(vfd_icon icon, bool show); + void ShowIcon(fp_icon icon, bool show); void ShowText(const char *str); void wake_up(); MODES getMode(void) { return mode; }; diff --git a/src/gui/keybind_setup.cpp b/src/gui/keybind_setup.cpp index 608046f6c..8ef889b29 100644 --- a/src/gui/keybind_setup.cpp +++ b/src/gui/keybind_setup.cpp @@ -33,7 +33,7 @@ #include #endif -#ifdef HAVE_COOLSTREAM_NEVIS_IR_H +#ifdef HAVE_COOLSTREAM_CS_IR_GENERIC_H /* define constants instead of #ifdef'ing the corresponding code. * the compiler will optimize it away anyway, but the syntax is * still checked */ @@ -41,7 +41,7 @@ #else #define RC_HW_SELECT false #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´ll be missing the remotecontrol selection feature! #endif diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index d2b299c5b..9839f1f0d 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -432,7 +432,7 @@ void CMoviePlayerGui::PlayFile(void) playback->Close(); } else { playstate = CMoviePlayerGui::PLAY; - CVFD::getInstance()->ShowIcon(VFD_ICON_PLAY, true); + CVFD::getInstance()->ShowIcon(FP_ICON_PLAY, true); if(timeshift) { first_start_timeshift = true; startposition = -1; @@ -679,8 +679,8 @@ void CMoviePlayerGui::PlayFile(void) playback->SetSpeed(1); playback->Close(); - CVFD::getInstance()->ShowIcon(VFD_ICON_PLAY, false); - CVFD::getInstance()->ShowIcon(VFD_ICON_PAUSE, false); + CVFD::getInstance()->ShowIcon(FP_ICON_PLAY, false); + CVFD::getInstance()->ShowIcon(FP_ICON_PAUSE, false); restoreNeutrino(); diff --git a/src/timerd/timermanager.cpp b/src/timerd/timermanager.cpp index ef84e1526..3c87eab53 100644 --- a/src/timerd/timermanager.cpp +++ b/src/timerd/timermanager.cpp @@ -35,6 +35,10 @@ #include #include +#ifdef HAVE_COOLSTREAM_CS_FRONTPANEL_H +#include +#endif + #include #include @@ -60,6 +64,32 @@ void CTimerManager::Init(void) m_saveEvents = false; m_isTimeSet = false; 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(); //thread starten diff --git a/src/zapit/src/zapit.cpp b/src/zapit/src/zapit.cpp index 226b59f42..dda82cee6 100644 --- a/src/zapit/src/zapit.cpp +++ b/src/zapit/src/zapit.cpp @@ -2036,12 +2036,16 @@ bool CZapit::Start(Z_start_arg *ZapStart_arg) audioDemux = new cDemux(); audioDemux->Open(DMX_AUDIO_CHANNEL); - videoDecoder = cVideo::GetDecoder(); + videoDecoder = cVideo::GetDecoder(0); + audioDecoder = cAudio::GetDecoder(0); + videoDecoder->SetDemux(videoDemux); videoDecoder->SetVideoSystem(video_mode); videoDecoder->Standby(false); - audioDecoder = new cAudio(audioDemux->getBuffer(), videoDecoder->GetTVEnc(), NULL /*videoDecoder->GetTVEncSD()*/); + audioDecoder->SetDemux(audioDemux); + audioDecoder->SetVideo(videoDecoder); + videoDecoder->SetAudioHandle(audioDecoder->GetHandle()); #ifdef USE_VBI