diff options
| author | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2007-03-24 00:49:20 +0000 |
|---|---|---|
| committer | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2007-03-24 00:49:20 +0000 |
| commit | d1e450f95a9b79b144a00dcf0f9356ff6cb9bfb2 (patch) | |
| tree | 85131a89500ccc60f343732e6727f00df907bc17 /lib/service | |
| parent | 058d38ca9bcfe94c5c551eac231f808330af3581 (diff) | |
| download | enigma2-d1e450f95a9b79b144a00dcf0f9356ff6cb9bfb2.tar.gz enigma2-d1e450f95a9b79b144a00dcf0f9356ff6cb9bfb2.zip | |
add a radiomode background picture (mvi file.. changable in
/etc/enigma2/config ... config.misc.radiopic = /bla/blubber.mvi
add support for radio text plus,
add rass (radio screen show) support (yes used by SWR3, cont.ra and DASDING)
thanks to seddi for some piece of code
for better single iframe support its recommend to update in
dreambox-dvb-modules.bb CVSDATE for dm7025 to 20070323
Diffstat (limited to 'lib/service')
| -rw-r--r-- | lib/service/iservice.h | 34 | ||||
| -rw-r--r-- | lib/service/servicedvb.cpp | 93 | ||||
| -rw-r--r-- | lib/service/servicedvb.h | 17 | ||||
| -rw-r--r-- | lib/service/servicemp3.h | 2 | ||||
| -rw-r--r-- | lib/service/servicexine.h | 2 |
5 files changed, 115 insertions, 33 deletions
diff --git a/lib/service/iservice.h b/lib/service/iservice.h index feaa771e..df4e302f 100644 --- a/lib/service/iservice.h +++ b/lib/service/iservice.h @@ -483,17 +483,30 @@ public: }; SWIG_TEMPLATE_TYPEDEF(ePtr<iAudioDelay>, iAudioDelayPtr); -SWIG_IGNORE(iRadioText); -class iRadioText: public iObject +class iRdsDecoder_ENUMS { #ifdef SWIG - iRadioText(); - ~iRadioText(); + iRdsDecoder_ENUMS(); + ~iRdsDecoder_ENUMS(); #endif public: - virtual std::string getRadioText(int x=0)=0; + enum { RadioText, RtpText }; }; -SWIG_TEMPLATE_TYPEDEF(ePtr<iRadioText>, iRadioTextPtr); + +SWIG_IGNORE(iRdsDecoder); +class iRdsDecoder: public iObject, public iRdsDecoder_ENUMS +{ +#ifdef SWIG + iRdsDecoder(); + ~iRdsDecoder(); +#endif +public: + virtual std::string getText(int x=RadioText)=0; + virtual void showRassSlidePicture()=0; + virtual void showRassInteractivePic(int page, int subpage)=0; + virtual SWIG_PYOBJECT(ePyObject) getRassInteractiveMask()=0; +}; +SWIG_TEMPLATE_TYPEDEF(ePtr<iRdsDecoder>, iRdsDecoderPtr); SWIG_IGNORE(iSubserviceList); class iSubserviceList: public iObject @@ -676,8 +689,13 @@ public: /* when cueSheet is implemented */ evCuesheetChanged, - /* when radioText is implemented */ + /* when rdsDecoder is implemented */ evUpdatedRadioText, + evUpdatedRtpText, + + /* Radio Screenshow Support */ + evUpdatedRassSlidePic, + evUpdatedRassInteractivePicMask, evVideoSizeChanged, @@ -712,7 +730,7 @@ public: virtual SWIG_VOID(RESULT) cueSheet(ePtr<iCueSheet> &SWIG_OUTPUT)=0; virtual SWIG_VOID(RESULT) subtitle(ePtr<iSubtitleOutput> &SWIG_OUTPUT)=0; virtual SWIG_VOID(RESULT) audioDelay(ePtr<iAudioDelay> &SWIG_OUTPUT)=0; - virtual SWIG_VOID(RESULT) radioText(ePtr<iRadioText> &SWIG_OUTPUT)=0; + virtual SWIG_VOID(RESULT) rdsDecoder(ePtr<iRdsDecoder> &SWIG_OUTPUT)=0; }; SWIG_TEMPLATE_TYPEDEF(ePtr<iPlayableService>, iPlayableServicePtr); diff --git a/lib/service/servicedvb.cpp b/lib/service/servicedvb.cpp index 9d9f2d1f..e47ae52c 100644 --- a/lib/service/servicedvb.cpp +++ b/lib/service/servicedvb.cpp @@ -1475,7 +1475,7 @@ RESULT eDVBServicePlay::audioDelay(ePtr<iAudioDelay> &ptr) return 0; } -RESULT eDVBServicePlay::radioText(ePtr<iRadioText> &ptr) +RESULT eDVBServicePlay::rdsDecoder(ePtr<iRdsDecoder> &ptr) { ptr = this; return 0; @@ -1705,8 +1705,8 @@ int eDVBServicePlay::selectAudioStream(int i) if (m_decoder->setAudioPID(program.audioStreams[i].pid, program.audioStreams[i].type)) return -4; - if (m_radiotext_parser) - m_radiotext_parser->start(program.audioStreams[i].pid); + if (m_rds_decoder) + m_rds_decoder->start(program.audioStreams[i].pid); if (m_dvb_service && !m_is_pvr) { @@ -1743,20 +1743,81 @@ RESULT eDVBServicePlay::selectChannel(int i) return 0; } -std::string eDVBServicePlay::getRadioText(int x) +std::string eDVBServicePlay::getText(int x) { - if (m_radiotext_parser) + if (m_rds_decoder) switch(x) { - case 0: - return convertLatin1UTF8(m_radiotext_parser->getCurrentText()); + case RadioText: + return convertLatin1UTF8(m_rds_decoder->getRadioText()); + case RtpText: + return convertLatin1UTF8(m_rds_decoder->getRtpText()); } return ""; } -void eDVBServicePlay::radioTextUpdated() +void eDVBServicePlay::rdsDecoderEvent(int what) { - m_event((iPlayableService*)this, evUpdatedRadioText); + switch(what) + { + case eDVBRdsDecoder::RadioTextChanged: + m_event((iPlayableService*)this, evUpdatedRadioText); + break; + case eDVBRdsDecoder::RtpTextChanged: + m_event((iPlayableService*)this, evUpdatedRtpText); + break; + case eDVBRdsDecoder::RassInteractivePicMaskChanged: + m_event((iPlayableService*)this, evUpdatedRassInteractivePicMask); + break; + case eDVBRdsDecoder::RecvRassSlidePic: + m_event((iPlayableService*)this, evUpdatedRassSlidePic); + break; + } +} + +void eDVBServicePlay::showRassSlidePicture() +{ + if (m_rds_decoder) + { + if (m_decoder) + { + std::string rass_slide_pic = m_rds_decoder->getRassSlideshowPicture(); + if (rass_slide_pic.length()) + m_decoder->showSinglePic(rass_slide_pic.c_str()); + else + eDebug("empty filename for rass slide picture received!!"); + } + else + eDebug("no MPEG Decoder to show iframes avail"); + } + else + eDebug("showRassSlidePicture called.. but not decoder"); +} + +void eDVBServicePlay::showRassInteractivePic(int page, int subpage) +{ + if (m_rds_decoder) + { + if (m_decoder) + { + std::string rass_interactive_pic = m_rds_decoder->getRassPicture(page, subpage); + if (rass_interactive_pic.length()) + m_decoder->showSinglePic(rass_interactive_pic.c_str()); + else + eDebug("empty filename for rass interactive picture %d/%d received!!", page, subpage); + } + else + eDebug("no MPEG Decoder to show iframes avail"); + } + else + eDebug("showRassInteractivePic called.. but not decoder"); +} + +ePyObject eDVBServicePlay::getRassInteractiveMask() +{ + if (m_rds_decoder) + return m_rds_decoder->getRassPictureMask(); + Py_RETURN_NONE; } int eDVBServiceBase::getFrontendInfo(int w) @@ -2089,11 +2150,11 @@ void eDVBServicePlay::switchToLive() m_decoder = 0; m_decode_demux = 0; m_teletext_parser = 0; - m_radiotext_parser = 0; + m_rds_decoder = 0; m_subtitle_parser = 0; m_new_dvb_subtitle_page_connection = 0; m_new_subtitle_page_connection = 0; - m_radiotext_updated_connection = 0; + m_rds_decoder_event_connection = 0; m_video_event_connection = 0; /* free the timeshift service handler, we need the resources */ @@ -2113,11 +2174,11 @@ void eDVBServicePlay::switchToTimeshift() m_decode_demux = 0; m_decoder = 0; m_teletext_parser = 0; - m_radiotext_parser = 0; + m_rds_decoder = 0; m_subtitle_parser = 0; m_new_subtitle_page_connection = 0; m_new_dvb_subtitle_page_connection = 0; - m_radiotext_updated_connection = 0; + m_rds_decoder_event_connection = 0; m_video_event_connection = 0; m_timeshift_active = 1; @@ -2259,9 +2320,9 @@ void eDVBServicePlay::updateDecoder() ePtr<iDVBDemux> data_demux; if (!h.getDataDemux(data_demux)) { - m_radiotext_parser = new eDVBRadioTextParser(data_demux); - m_radiotext_parser->connectUpdatedRadiotext(slot(*this, &eDVBServicePlay::radioTextUpdated), m_radiotext_updated_connection); - m_radiotext_parser->start(apid); + m_rds_decoder = new eDVBRdsDecoder(data_demux); + m_rds_decoder->connectEvent(slot(*this, &eDVBServicePlay::rdsDecoderEvent), m_rds_decoder_event_connection); + m_rds_decoder->start(apid); } } } diff --git a/lib/service/servicedvb.h b/lib/service/servicedvb.h index 34ed9720..7c785c4e 100644 --- a/lib/service/servicedvb.h +++ b/lib/service/servicedvb.h @@ -89,7 +89,7 @@ class eDVBServicePlay: public eDVBServiceBase, public iAudioTrackSelection, public iAudioChannelSelection, public iSubserviceList, public iTimeshiftService, public iCueSheet, public iSubtitleOutput, public iAudioDelay, - public iRadioText + public iRdsDecoder { DECLARE_REF(eDVBServicePlay); public: @@ -112,7 +112,7 @@ public: RESULT cueSheet(ePtr<iCueSheet> &ptr); RESULT subtitle(ePtr<iSubtitleOutput> &ptr); RESULT audioDelay(ePtr<iAudioDelay> &ptr); - RESULT radioText(ePtr<iRadioText> &ptr); + RESULT rdsDecoder(ePtr<iRdsDecoder> &ptr); // iPauseableService RESULT pause(); @@ -144,8 +144,11 @@ public: int getCurrentChannel(); RESULT selectChannel(int i); - // iRadioText - std::string getRadioText(int i=0); + // iRdsDecoder + std::string getText(int i=0); + void showRassSlidePicture(); + void showRassInteractivePic(int page, int subpage); + ePyObject getRassInteractiveMask(); // iSubserviceList int getNumberOfSubservices(); @@ -267,9 +270,9 @@ private: void checkSubtitleTiming(); /* radiotext */ - ePtr<eDVBRadioTextParser> m_radiotext_parser; - ePtr<eConnection> m_radiotext_updated_connection; - void radioTextUpdated(); + ePtr<eDVBRdsDecoder> m_rds_decoder; + ePtr<eConnection> m_rds_decoder_event_connection; + void rdsDecoderEvent(int); ePtr<eConnection> m_video_event_connection; void video_event(struct iTSMPEGDecoder::videoEvent); diff --git a/lib/service/servicemp3.h b/lib/service/servicemp3.h index 4245c816..49964883 100644 --- a/lib/service/servicemp3.h +++ b/lib/service/servicemp3.h @@ -66,7 +66,7 @@ public: RESULT cueSheet(ePtr<iCueSheet> &ptr) { ptr = 0; return -1; } RESULT subtitle(ePtr<iSubtitleOutput> &ptr) { ptr = 0; return -1; } RESULT audioDelay(ePtr<iAudioDelay> &ptr) { ptr = 0; return -1; } - RESULT radioText(ePtr<iRadioText> &ptr) { ptr = 0; return -1; } + RESULT rdsDecoder(ePtr<iRdsDecoder> &ptr) { ptr = 0; return -1; } // iPausableService RESULT pause(); diff --git a/lib/service/servicexine.h b/lib/service/servicexine.h index 4a50b11f..b56a4858 100644 --- a/lib/service/servicexine.h +++ b/lib/service/servicexine.h @@ -69,7 +69,7 @@ public: RESULT cueSheet(ePtr<iCueSheet> &ptr) { ptr = 0; return -1; } RESULT subtitle(ePtr<iSubtitleOutput> &ptr) { ptr = 0; return -1; } RESULT audioDelay(ePtr<iAudioDelay> &ptr) { ptr = 0; return -1; } - RESULT radioText(ePtr<iRadioText> &ptr) { ptr = 0; return -1; } + RESULT rdsDecoder(ePtr<iRdsDecoder> &ptr) { ptr = 0; return -1; } // iPausableService RESULT pause(); |
