From 4a1862984727aa41ddcdcaa733d3f4d4003a9ba5 Mon Sep 17 00:00:00 2001 From: max_10 Date: Wed, 29 Sep 2021 17:44:21 +0200 Subject: [PATCH] - make ait scan for hbbtv url configurable --- configure.ac | 5 +++++ src/zapit/include/zapit/channel.h | 6 ++++++ src/zapit/include/zapit/zapit.h | 4 ++++ src/zapit/src/Makefile.am | 6 +++++- src/zapit/src/channel.cpp | 2 ++ src/zapit/src/scanpmt.cpp | 4 ++++ src/zapit/src/zapit.cpp | 4 ++++ 7 files changed, 30 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 3271566f7..1bcf0dd72 100644 --- a/configure.ac +++ b/configure.ac @@ -180,6 +180,11 @@ AC_ARG_ENABLE(graphlcd, AC_DEFINE(ENABLE_GRAPHLCD, 1, [enable GraphLCD support])) AM_CONDITIONAL(ENABLE_GRAPHLCD, test "$enable_graphlcd" = "yes") +AC_ARG_ENABLE(hbbtv, + AS_HELP_STRING([--enable-hbbtv], [enable HBBTV support @<:@default=no@:>@]), + AC_DEFINE(ENABLE_HBBTV, 1, [enable HBBTV support])) +AM_CONDITIONAL(ENABLE_HBBTV, test "$enable_hbbtv" = "yes") + AC_ARG_ENABLE(keyboard-no-rc, AS_HELP_STRING([--enable-keyboard-no-rc], [enable keyboard control, disable rc control @<:@default=no@:>@]), AC_DEFINE(KEYBOARD_INSTEAD_OF_REMOTE_CONTROL, 1, [enable keyboard control, disable rc control])) diff --git a/src/zapit/include/zapit/channel.h b/src/zapit/include/zapit/channel.h index 3a280295e..ceb07c38f 100644 --- a/src/zapit/include/zapit/channel.h +++ b/src/zapit/include/zapit/channel.h @@ -142,7 +142,9 @@ class CZapitChannel unsigned short pcrPid; unsigned short pmtPid; +#if ENABLE_HBBTV unsigned short aitPid; +#endif unsigned short teletextPid; unsigned short videoPid; unsigned short audioPid; @@ -244,7 +246,9 @@ class CZapitChannel unsigned char getAudioChannelCount(void) { return (unsigned char) audioChannels.size(); } unsigned short getPcrPid(void) { return pcrPid; } unsigned short getPmtPid(void) { return pmtPid; } +#if ENABLE_HBBTV unsigned short getAitPid(void) { return aitPid; } +#endif unsigned short getTeletextPid(void) { return teletextPid; } const char * getTeletextLang(void) { return ttx_language_code.c_str(); } unsigned short getVideoPid(void) { return videoPid; } @@ -268,7 +272,9 @@ class CZapitChannel void setAudioChannel(unsigned char pAudioChannel) { if (pAudioChannel < audioChannels.size()) currentAudioChannel = pAudioChannel; } void setPcrPid(unsigned short pPcrPid) { pcrPid = pPcrPid; } void setPmtPid(unsigned short pPmtPid) { pmtPid = pPmtPid; } +#if ENABLE_HBBTV void setAitPid(unsigned short pAitPid) { aitPid = pAitPid; } +#endif void setTeletextPid(unsigned short pTeletextPid) { teletextPid = pTeletextPid; } void setTeletextLang(std::string lang) { ttx_language_code = lang; }; void setVideoPid(unsigned short pVideoPid) { videoPid = pVideoPid; } diff --git a/src/zapit/include/zapit/zapit.h b/src/zapit/include/zapit/zapit.h index 3d5240010..276f18215 100644 --- a/src/zapit/include/zapit/zapit.h +++ b/src/zapit/include/zapit/zapit.h @@ -19,7 +19,9 @@ #include #include #include +#if ENABLE_HBBTV #include +#endif #define PAL 0 #define NTSC 1 @@ -168,7 +170,9 @@ class CZapit : public OpenThreads::Thread t_channel_id lastChannelTV; int abort_zapit; int pmt_update_fd; +#if ENABLE_HBBTV CAit *ait; +#endif //void LoadAudioMap(); void SaveAudioMap(); void SaveVolumeMap(); diff --git a/src/zapit/src/Makefile.am b/src/zapit/src/Makefile.am index a9848fc5e..6395e51c2 100644 --- a/src/zapit/src/Makefile.am +++ b/src/zapit/src/Makefile.am @@ -25,7 +25,6 @@ libzapit_a_SOURCES = \ frontend.cpp \ getservices.cpp \ pat.cpp \ - scanait.cpp \ scanbat.cpp \ scan.cpp \ scannit.cpp \ @@ -39,6 +38,11 @@ libzapit_a_SOURCES += \ fastscan.cpp endif +if ENABLE_HBBTV +libzapit_a_SOURCES += \ + scanait.cpp +endif + bin_PROGRAMS = pzapit pzapit_SOURCES = \ diff --git a/src/zapit/src/channel.cpp b/src/zapit/src/channel.cpp index e62e0c878..ca2b8fea4 100644 --- a/src/zapit/src/channel.cpp +++ b/src/zapit/src/channel.cpp @@ -114,7 +114,9 @@ void CZapitChannel::Init() bUseCI = false; altlogo = ""; epgmapper = ""; +#if ENABLE_HBBTV aitPid = 0; +#endif } CZapitChannel::~CZapitChannel(void) diff --git a/src/zapit/src/scanpmt.cpp b/src/zapit/src/scanpmt.cpp index bf255af24..ec167e308 100644 --- a/src/zapit/src/scanpmt.cpp +++ b/src/zapit/src/scanpmt.cpp @@ -38,10 +38,12 @@ #include #include #include +#if ENABLE_HBBTV #include #include #include #include +#endif #define DEBUG_PMT //#define DEBUG_PMT_UNUSED @@ -335,6 +337,7 @@ bool CPmt::ParseEsInfo(ElementaryStreamInfo *esinfo, CZapitChannel * const chann audio_type = CZapitAudioChannel::EAC3; audio = true; break; +#if ENABLE_HBBTV case STREAM_TYPE_PRIVATE_SECTION: for (DescriptorConstIterator desc = esinfo->getDescriptors()->begin(); desc != esinfo->getDescriptors()->end(); ++desc) { @@ -347,6 +350,7 @@ bool CPmt::ParseEsInfo(ElementaryStreamInfo *esinfo, CZapitChannel * const chann } } break; +#endif default: #ifdef DEBUG_PMT_UNUSED printf("PMT: pid %04x stream_type: %02x\n", esinfo->getPid(), stream_type); diff --git a/src/zapit/src/zapit.cpp b/src/zapit/src/zapit.cpp index fe5c5e23a..6e270d9c7 100644 --- a/src/zapit/src/zapit.cpp +++ b/src/zapit/src/zapit.cpp @@ -141,7 +141,9 @@ CZapit::CZapit() pip_channel_id = 0; lock_channel_id = 0; pip_fe = NULL; +#if ENABLE_HBBTV ait = new CAit(); +#endif } CZapit::~CZapit() @@ -664,8 +666,10 @@ bool CZapit::ZapIt(const t_channel_id channel_id, bool forupdate, bool startplay if (update_pmt) pmt_set_update_filter(current_channel, &pmt_update_fd); +#if ENABLE_HBBTV ait->setDemux(current_channel->getRecordDemux()); ait->Parse(current_channel); +#endif return true; }