From: Andreas Monzner Date: Fri, 30 Sep 2005 19:32:54 +0000 (+0000) Subject: use libdvbsi++ from tuxbox-cvs, X-Git-Tag: 2.6.0~5541 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/8d8294b4b354436adde202604fffb55c181d686c use libdvbsi++ from tuxbox-cvs, please add http://ghost.dream-multimedia-tv.de/libdvbsi++.bb to your bitbake/openembedded/packages/tuxbox directory and exectute "bitbake -b ../openembedded/packages/tuxbox/libdvbsi++.bb" then install the libdvbsi++...ipk --- diff --git a/acinclude.m4 b/acinclude.m4 index 0dcafdec..b92d02fa 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -125,7 +125,7 @@ TUXBOX_APPS_DIRECTORY_ONE(fontdir,FONTDIR,datadir,/share,/fonts, TUXBOX_APPS_DIRECTORY_ONE(gamesdir,GAMESDIR,localstatedir,/var,/tuxbox/games, [--with-gamesdir=PATH ],[where games data is stored]) -TUXBOX_APPS_DIRECTORY_ONE(libdir,LIBDIR,libdir,/lib,, +TUXBOX_APPS_DIRECTORY_ONE(libdir,LIBDIR,libdir,/lib,/tuxbox, [--with-libdir=PATH ],[where to find the internal libs]) TUXBOX_APPS_DIRECTORY_ONE(plugindir,PLUGINDIR,libdir,/lib,/tuxbox/plugins, diff --git a/configure.ac b/configure.ac index eacbf2d9..e598b76b 100644 --- a/configure.ac +++ b/configure.ac @@ -29,6 +29,7 @@ TUXBOX_APPS_LIB_PKGCONFIG(MAD,mad) #TUXBOX_APPS_LIB_PKGCONFIG(PLUGINS,tuxbox-plugins) TUXBOX_APPS_LIB_PKGCONFIG(PNG,libpng) TUXBOX_APPS_LIB_PKGCONFIG(SIGC,sigc++-1.2) +TUXBOX_APPS_LIB_PKGCONFIG(DVBSI,libdvbsi++) #TUXBOX_APPS_LIB_PKGCONFIG(XMLTREE,tuxbox-xmltree) if test "$withsdl" = "yes" ; then TUXBOX_APPS_LIB_CONFIG(SDL,sdl-config) @@ -36,7 +37,7 @@ if test "$withsdl" = "yes" ; then fi # fixme: decent python stuff -CPPFLAGS="$CPPFLAGS $MD5SUM_CFLAGS $FREETYPE_CFLAGS $FRIBIDI_CFLAGS $ID3TAG_CFLAGS $MAD_CFLAGS $PLUGINS_CFLAGS $PNG_CFLAGS $SIGC_CFLAGS $XMLTREE_CFLAGS -I$PYTHON_INCDIR -DHAVE_CPP_FILT -DMEMLEAK_CHECK" +CPPFLAGS="$CPPFLAGS $MD5SUM_CFLAGS $FREETYPE_CFLAGS $FRIBIDI_CFLAGS $ID3TAG_CFLAGS $MAD_CFLAGS $PLUGINS_CFLAGS $PNG_CFLAGS $SIGC_CFLAGS $XMLTREE_CFLAGS $DVBSI_CFLAGS -I$PYTHON_INCDIR -DHAVE_CPP_FILT -DMEMLEAK_CHECK" CXXFLAGS="$CXXFLAGS -fno-rtti -fno-exceptions -Wall" LDFLAGS="$LDFLAGS -rdynamic" @@ -51,7 +52,6 @@ lib/base/Makefile lib/driver/Makefile lib/dvb/Makefile lib/dvb_ci/Makefile -lib/dvb_si/Makefile lib/gdi/Makefile lib/gui/Makefile lib/nav/Makefile diff --git a/lib/Makefile.am b/lib/Makefile.am index 8d07ec98..4372ccb1 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -1 +1 @@ -SUBDIRS = actions base components dvb dvb_ci dvb_si gdi network service driver nav gui python +SUBDIRS = actions base components dvb dvb_ci gdi network service driver nav gui python diff --git a/lib/dvb/db.cpp b/lib/dvb/db.cpp index 13bb900a..fdcd428d 100644 --- a/lib/dvb/db.cpp +++ b/lib/dvb/db.cpp @@ -3,10 +3,10 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include DEFINE_REF(eDVBService); diff --git a/lib/dvb/db.h b/lib/dvb/db.h index 3db7228e..084c877a 100644 --- a/lib/dvb/db.h +++ b/lib/dvb/db.h @@ -4,7 +4,7 @@ #include #include -class ServiceDescriptionTable; +class ServiceDescriptionSection; struct eDVBBouquet { diff --git a/lib/dvb/demux.h b/lib/dvb/demux.h index 23aef0f3..a01cf60b 100644 --- a/lib/dvb/demux.h +++ b/lib/dvb/demux.h @@ -14,6 +14,7 @@ class eDVBDemux: public iDVBDemux friend class eDVBVideo; friend class eDVBPCR; friend class eDVBTSRecorder; + friend class eDVBCAService; public: DECLARE_REF(eDVBDemux); eDVBDemux(int adapter, int demux); @@ -22,6 +23,7 @@ public: RESULT createTSRecorder(ePtr &recorder); RESULT getMPEGDecoder(ePtr &reader); RESULT getSTC(pts_t &pts); + RESULT getCADemuxID(uint8_t &id) { id = demux; return 0; } }; class eDVBSectionReader: public iDVBSectionReader, public Object diff --git a/lib/dvb/dvbtime.cpp b/lib/dvb/dvbtime.cpp index 795b5242..82ceffd5 100644 --- a/lib/dvb/dvbtime.cpp +++ b/lib/dvb/dvbtime.cpp @@ -97,10 +97,10 @@ void TDT::start() if ( chan ) { eDVBTableSpec spec; - spec.pid = TimeAndDateTable::PID; - spec.tid = TimeAndDateTable::TID; + spec.pid = TimeAndDateSection::PID; + spec.tid = TimeAndDateSection::TID; spec.tid_mask = 0xFC; - spec.timeout = TimeAndDateTable::TIMEOUT; + spec.timeout = TimeAndDateSection::TIMEOUT; spec.flags= eDVBTableSpec::tfAnyVersion | eDVBTableSpec::tfHaveTID | eDVBTableSpec::tfHaveTIDMask | diff --git a/lib/dvb/dvbtime.h b/lib/dvb/dvbtime.h index 3b92fd1e..fbc82f06 100644 --- a/lib/dvb/dvbtime.h +++ b/lib/dvb/dvbtime.h @@ -3,7 +3,7 @@ #include #include -#include +#include class eDVBChannel; diff --git a/lib/dvb/eit.cpp b/lib/dvb/eit.cpp index 2462d333..b78b2279 100644 --- a/lib/dvb/eit.cpp +++ b/lib/dvb/eit.cpp @@ -7,11 +7,11 @@ void eDVBServiceEITHandler::EITready(int error) { if (!error) { - ePtr > ptr; + ePtr > ptr; if (!m_EIT.getCurrent(ptr)) { int a = 0; - for (EventInformationTableConstIterator i = ptr->getSections().begin(); + for (std::vector::const_iterator i = ptr->getSections().begin(); i != ptr->getSections().end(); ++i) { for (EventConstIterator ev = (*i)->getEvents()->begin(); ev != (*i)->getEvents()->end(); ++ev) diff --git a/lib/dvb/eit.h b/lib/dvb/eit.h index a026773c..43bdb6b2 100644 --- a/lib/dvb/eit.h +++ b/lib/dvb/eit.h @@ -3,13 +3,13 @@ #include #include -#include +#include #include class eDVBServiceEITHandler: public Object { ePtr m_demux; - eAUTable > m_EIT; + eAUTable > m_EIT; void EITready(int error); RESULT parseEvent(ePtr &serviceevent, const Event &dvbevent); diff --git a/lib/dvb/frontend.cpp b/lib/dvb/frontend.cpp index d4704a9d..69519837 100644 --- a/lib/dvb/frontend.cpp +++ b/lib/dvb/frontend.cpp @@ -23,9 +23,9 @@ #include #endif -#include -#include -#include +#include +#include +#include void eDVBFrontendParametersSatellite::set(const SatelliteDeliverySystemDescriptor &descriptor) { diff --git a/lib/dvb/idvb.h b/lib/dvb/idvb.h index 683a7b71..add9ba85 100644 --- a/lib/dvb/idvb.h +++ b/lib/dvb/idvb.h @@ -476,6 +476,7 @@ public: virtual RESULT createTSRecorder(ePtr &recorder)=0; virtual RESULT getMPEGDecoder(ePtr &reader)=0; virtual RESULT getSTC(pts_t &pts)=0; + virtual RESULT getCADemuxID(uint8_t &id)=0; }; class iTSMPEGDecoder: public iObject diff --git a/lib/dvb/pmt.cpp b/lib/dvb/pmt.cpp index e62de9b8..57e617ca 100644 --- a/lib/dvb/pmt.cpp +++ b/lib/dvb/pmt.cpp @@ -50,14 +50,14 @@ void eDVBServicePMTHandler::PMTready(int error) void eDVBServicePMTHandler::PATready(int) { eDebug("got PAT"); - ePtr > ptr; + ePtr > ptr; if (!m_PAT.getCurrent(ptr)) { int pmtpid = -1; - ProgramAssociationTableConstIterator i; + std::vector::const_iterator i; for (i = ptr->getSections().begin(); i != ptr->getSections().end(); ++i) { - const ProgramAssociationTable &pat = **i; + const ProgramAssociationSection &pat = **i; ProgramAssociationConstIterator program; for (program = pat.getPrograms()->begin(); program != pat.getPrograms()->end(); ++program) if (eServiceID((*program)->getProgramNumber()) == m_reference.getServiceID()) @@ -74,7 +74,7 @@ void eDVBServicePMTHandler::PATready(int) int eDVBServicePMTHandler::getProgramInfo(struct program &program) { eDebug("got PMT"); - ePtr > ptr; + ePtr > ptr; program.videoStreams.clear(); program.audioStreams.clear(); @@ -82,10 +82,10 @@ int eDVBServicePMTHandler::getProgramInfo(struct program &program) if (!m_PMT.getCurrent(ptr)) { - ProgramMapTableConstIterator i; + std::vector::const_iterator i; for (i = ptr->getSections().begin(); i != ptr->getSections().end(); ++i) { - const ProgramMapTable &pmt = **i; + const ProgramMapSection &pmt = **i; program.pcrPid = pmt.getPcrPid(); ElementaryStreamInfoConstIterator es; diff --git a/lib/dvb/pmt.h b/lib/dvb/pmt.h index efe54ee7..2d47852f 100644 --- a/lib/dvb/pmt.h +++ b/lib/dvb/pmt.h @@ -5,8 +5,8 @@ #include #include #include -#include -#include +#include +#include class eDVBServicePMTHandler: public Object { @@ -15,8 +15,8 @@ class eDVBServicePMTHandler: public Object int m_last_channel_state; - eAUTable > m_PMT; - eAUTable > m_PAT; + eAUTable > m_PMT; + eAUTable > m_PAT; eUsePtr m_channel; eUsePtr m_pvr_channel; diff --git a/lib/dvb/scan.cpp b/lib/dvb/scan.cpp index 7e603314..11b4e7c6 100644 --- a/lib/dvb/scan.cpp +++ b/lib/dvb/scan.cpp @@ -1,11 +1,11 @@ #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -119,18 +119,18 @@ RESULT eDVBScan::startFilter() { assert(m_demux); - m_SDT = new eTable(); + m_SDT = new eTable(); if (m_SDT->start(m_demux, eDVBSDTSpec())) return -1; CONNECT(m_SDT->tableReady, eDVBScan::SDTready); m_NIT = 0; - m_NIT = new eTable(); + m_NIT = new eTable(); if (m_NIT->start(m_demux, eDVBNITSpec())) return -1; CONNECT(m_NIT->tableReady, eDVBScan::NITready); - m_BAT = new eTable(); + m_BAT = new eTable(); if (m_BAT->start(m_demux, eDVBBATSpec())) return -1; CONNECT(m_BAT->tableReady, eDVBScan::BATready); @@ -222,7 +222,7 @@ void eDVBScan::channelDone() hash); SCAN_eDebug("SDT: "); - ServiceDescriptionTableConstIterator i; + std::vector::const_iterator i; for (i = m_SDT->getSections().begin(); i != m_SDT->getSections().end(); ++i) processSDT(dvbnamespace, **i); m_ready &= ~validSDT; @@ -231,10 +231,10 @@ void eDVBScan::channelDone() if (m_ready & validNIT) { SCAN_eDebug("dumping NIT"); - NetworkInformationTableConstIterator i; + std::vector::const_iterator i; for (i = m_NIT->getSections().begin(); i != m_NIT->getSections().end(); ++i) { - const TransportStreamInfoVector &tsinfovec = *(*i)->getTsInfo(); + const TransportStreamInfoList &tsinfovec = *(*i)->getTsInfo(); for (TransportStreamInfoConstIterator tsinfo(tsinfovec.begin()); tsinfo != tsinfovec.end(); ++tsinfo) @@ -353,9 +353,9 @@ void eDVBScan::insertInto(iDVBChannelList *db) } } -RESULT eDVBScan::processSDT(eDVBNamespace dvbnamespace, const ServiceDescriptionTable &sdt) +RESULT eDVBScan::processSDT(eDVBNamespace dvbnamespace, const ServiceDescriptionSection &sdt) { - const ServiceDescriptionVector &services = *sdt.getDescriptions(); + const ServiceDescriptionList &services = *sdt.getDescriptions(); SCAN_eDebug("ONID: %04x", sdt.getOriginalNetworkId()); eDVBChannelID chid(dvbnamespace, sdt.getTransportStreamId(), sdt.getOriginalNetworkId()); @@ -394,9 +394,9 @@ RESULT eDVBScan::processSDT(eDVBNamespace dvbnamespace, const ServiceDescription case CA_IDENTIFIER_DESCRIPTOR: { CaIdentifierDescriptor &d = (CaIdentifierDescriptor&)**desc; - const CaSystemIdVector &caids = *d.getCaSystemIds(); + const CaSystemIdList &caids = *d.getCaSystemIds(); SCAN_eDebugNoNewLine("CA "); - for (CaSystemIdVector::const_iterator i(caids.begin()); i != caids.end(); ++i) + for (CaSystemIdList::const_iterator i(caids.begin()); i != caids.end(); ++i) { SCAN_eDebugNoNewLine("%04x ", *i); service->m_ca.insert(*i); diff --git a/lib/dvb/scan.h b/lib/dvb/scan.h index 743ea8d9..6abc1d0f 100644 --- a/lib/dvb/scan.h +++ b/lib/dvb/scan.h @@ -1,9 +1,9 @@ #ifndef __lib_dvb_scan_h #define __lib_dvb_scan_h -#include -#include -#include +#include +#include +#include #include #include #include @@ -45,9 +45,9 @@ private: ePtr m_ch_current; eDVBChannelID m_chid_current; - ePtr > m_SDT; - ePtr > m_NIT; - ePtr > m_BAT; + ePtr > m_SDT; + ePtr > m_NIT; + ePtr > m_BAT; void SDTready(int err); void NITready(int err); @@ -60,7 +60,7 @@ private: void channelDone(); Signal1 m_event; - RESULT processSDT(eDVBNamespace dvbnamespace, const ServiceDescriptionTable &sdt); + RESULT processSDT(eDVBNamespace dvbnamespace, const ServiceDescriptionSection &sdt); public: eDVBScan(iDVBChannel *channel); ~eDVBScan(); diff --git a/lib/dvb/specs.h b/lib/dvb/specs.h index 2e2eed9b..23ef2cec 100644 --- a/lib/dvb/specs.h +++ b/lib/dvb/specs.h @@ -3,12 +3,12 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include struct eDVBPMTSpec { @@ -17,9 +17,9 @@ public: eDVBPMTSpec(int pid, int sid) { m_spec.pid = pid; - m_spec.tid = ProgramMapTable::TID; + m_spec.tid = ProgramMapSection::TID; m_spec.tidext = sid; - m_spec.timeout = 20000; // ProgramMapTable::TIMEOUT; + m_spec.timeout = 20000; // ProgramMapSection::TIMEOUT; m_spec.flags = eDVBTableSpec::tfAnyVersion | eDVBTableSpec::tfHaveTID | eDVBTableSpec::tfHaveTIDExt | eDVBTableSpec::tfCheckCRC | eDVBTableSpec::tfHaveTimeout; @@ -36,9 +36,9 @@ struct eDVBSDTSpec public: eDVBSDTSpec() { - m_spec.pid = ServiceDescriptionTable::PID; - m_spec.tid = ServiceDescriptionTable::TID; - m_spec.timeout = 20000; // ServiceDescriptionTable::TIMEOUT; + m_spec.pid = ServiceDescriptionSection::PID; + m_spec.tid = ServiceDescriptionSection::TID; + m_spec.timeout = 20000; // ServiceDescriptionSection::TIMEOUT; m_spec.flags = eDVBTableSpec::tfAnyVersion | eDVBTableSpec::tfHaveTID | eDVBTableSpec::tfCheckCRC | eDVBTableSpec::tfHaveTimeout; @@ -55,9 +55,9 @@ struct eDVBNITSpec public: eDVBNITSpec() { - m_spec.pid = NetworkInformationTable::PID; - m_spec.tid = NetworkInformationTable::TID; - m_spec.timeout = NetworkInformationTable::TIMEOUT; + m_spec.pid = NetworkInformationSection::PID; + m_spec.tid = NetworkInformationSection::TID; + m_spec.timeout = NetworkInformationSection::TIMEOUT; m_spec.flags = eDVBTableSpec::tfAnyVersion | eDVBTableSpec::tfHaveTID | eDVBTableSpec::tfCheckCRC | eDVBTableSpec::tfHaveTimeout; @@ -74,9 +74,9 @@ struct eDVBBATSpec public: eDVBBATSpec() { - m_spec.pid = BouquetAssociationTable::PID; - m_spec.tid = BouquetAssociationTable::TID; - m_spec.timeout = BouquetAssociationTable::TIMEOUT; + m_spec.pid = BouquetAssociationSection::PID; + m_spec.tid = BouquetAssociationSection::TID; + m_spec.timeout = BouquetAssociationSection::TIMEOUT; m_spec.flags = eDVBTableSpec::tfAnyVersion | eDVBTableSpec::tfHaveTID | eDVBTableSpec::tfCheckCRC | eDVBTableSpec::tfHaveTimeout; @@ -93,9 +93,9 @@ struct eDVBPATSpec public: eDVBPATSpec() { - m_spec.pid = ProgramAssociationTable::PID; - m_spec.tid = ProgramAssociationTable::TID; - m_spec.timeout = 20000; // ProgramAssociationTable::TIMEOUT; + m_spec.pid = ProgramAssociationSection::PID; + m_spec.tid = ProgramAssociationSection::TID; + m_spec.timeout = 20000; // ProgramAssociationSection::TIMEOUT; m_spec.flags = eDVBTableSpec::tfAnyVersion | eDVBTableSpec::tfHaveTID | eDVBTableSpec::tfCheckCRC | eDVBTableSpec::tfHaveTimeout; @@ -113,10 +113,10 @@ public: /* this is for now&next on actual transponder. */ eDVBEITSpec(int sid) { - m_spec.pid = EventInformationTable::PID; - m_spec.tid = EventInformationTable::TID; + m_spec.pid = EventInformationSection::PID; + m_spec.tid = EventInformationSection::TID; m_spec.tidext = sid; - m_spec.timeout = EventInformationTable::TIMEOUT; + m_spec.timeout = EventInformationSection::TIMEOUT; m_spec.flags = eDVBTableSpec::tfAnyVersion | eDVBTableSpec::tfHaveTID | eDVBTableSpec::tfHaveTIDExt | eDVBTableSpec::tfCheckCRC | eDVBTableSpec::tfHaveTimeout; diff --git a/lib/dvb_si/.cvsignore b/lib/dvb_si/.cvsignore deleted file mode 100644 index e69de29b..00000000 diff --git a/lib/dvb_si/Makefile.am b/lib/dvb_si/Makefile.am deleted file mode 100644 index e69de29b..00000000 diff --git a/lib/dvb_si/ac3_descriptor.cpp b/lib/dvb_si/ac3_descriptor.cpp deleted file mode 100644 index a4f5d635..00000000 --- a/lib/dvb_si/ac3_descriptor.cpp +++ /dev/null @@ -1,102 +0,0 @@ -/* - * $Id: ac3_descriptor.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -Ac3Descriptor::Ac3Descriptor(const uint8_t * const buffer) : Descriptor(buffer) -{ - if (buffer[1] >= 1) - { - ac3TypeFlag = (buffer[2] >> 7) & 0x01; - bsidFlag = (buffer[2] >> 6) & 0x01; - mainidFlag = (buffer[2] >> 5) & 0x01; - asvcFlag = (buffer[2] >> 4) & 0x01; - reserved = buffer[2] & 0x0F; - if (ac3TypeFlag == 1) - ac3Type = buffer[3]; - - if (bsidFlag == 1) - bsid = buffer[ac3TypeFlag + 3]; - - if (mainidFlag == 1) - mainid = buffer[ac3TypeFlag + mainidFlag + 3]; - - if (asvcFlag == 1) - avsc = buffer[ac3TypeFlag + bsidFlag + mainidFlag + 3]; - - if (descriptorLength > ac3TypeFlag + bsidFlag + mainidFlag + asvcFlag) - for (uint16_t i = 0; i < descriptorLength - ac3TypeFlag - bsidFlag - mainidFlag - asvcFlag - 1; ++i) - additionalInfo.push_back(buffer[ac3TypeFlag + bsidFlag + mainidFlag + asvcFlag + i + 3]); - } else - { - ac3TypeFlag = 0; - bsidFlag = 0; - mainidFlag = 0; - asvcFlag = 0; - reserved = 0; - } -} - -uint8_t Ac3Descriptor::getAc3TypeFlag(void) const -{ - return ac3TypeFlag; -} - -uint8_t Ac3Descriptor::getBsidFlag(void) const -{ - return bsidFlag; -} - -uint8_t Ac3Descriptor::getMainidFlag(void) const -{ - return mainidFlag; -} - -uint8_t Ac3Descriptor::getAsvcFlag(void) const -{ - return asvcFlag; -} - -uint8_t Ac3Descriptor::getAc3Type(void) const -{ - return ac3Type; -} - -uint8_t Ac3Descriptor::getBsid(void) const -{ - return bsid; -} - -uint8_t Ac3Descriptor::getMainid(void) const -{ - return mainid; -} - -uint8_t Ac3Descriptor::getAvsc(void) const -{ - return avsc; -} - -const AdditionalInfoVector *Ac3Descriptor::getAdditionalInfo(void) const -{ - return &additionalInfo; -} - diff --git a/lib/dvb_si/ac3_descriptor.h b/lib/dvb_si/ac3_descriptor.h deleted file mode 100644 index d5eaf835..00000000 --- a/lib/dvb_si/ac3_descriptor.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * $Id: ac3_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_ac3_descriptor_h__ -#define __dvb_descriptor_ac3_descriptor_h__ - -#include "descriptor.h" - -typedef std::vector AdditionalInfoVector; -typedef AdditionalInfoVector::iterator AdditionalInfoIterator; -typedef AdditionalInfoVector::const_iterator AdditionalInfoConstIterator; - -class Ac3Descriptor : public Descriptor -{ - protected: - unsigned ac3TypeFlag : 1; - unsigned bsidFlag : 1; - unsigned mainidFlag : 1; - unsigned asvcFlag : 1; - unsigned reserved : 4; - unsigned ac3Type : 8; - unsigned bsid : 8; - unsigned mainid : 8; - unsigned avsc : 8; - AdditionalInfoVector additionalInfo; - - public: - Ac3Descriptor(const uint8_t * const buffer); - - uint8_t getAc3TypeFlag(void) const; - uint8_t getBsidFlag(void) const; - uint8_t getMainidFlag(void) const; - uint8_t getAsvcFlag(void) const; - uint8_t getAc3Type(void) const; - uint8_t getBsid(void) const; - uint8_t getMainid(void) const; - uint8_t getAvsc(void) const; - const AdditionalInfoVector *getAdditionalInfo(void) const; -}; - -#endif /* __dvb_descriptor_ac3_descriptor_h__ */ diff --git a/lib/dvb_si/ait.cpp b/lib/dvb_si/ait.cpp deleted file mode 100644 index 74e38ca2..00000000 --- a/lib/dvb_si/ait.cpp +++ /dev/null @@ -1,94 +0,0 @@ -/* - * $Id: ait.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -ApplicationIdentifier::ApplicationIdentifier(const uint8_t * const buffer) -{ - organisationId = (buffer[0] << 24) | (buffer[1] << 16) | (buffer[2] << 8) | buffer[3]; - applicationId = (buffer[4] << 8) | buffer[5]; -} - -uint32_t ApplicationIdentifier::getOrganisationId(void) const -{ - return organisationId; -} - -uint16_t ApplicationIdentifier::getApplicationId(void) const -{ - return applicationId; -} - -ApplicationInformation::ApplicationInformation(const uint8_t * const buffer) -{ - applicationIdentifier = new ApplicationIdentifier(&buffer[0]); - applicationControlCode = buffer[6]; - reserved = (buffer[7] >> 4) & 0x0f; - applicationDescriptorsLoopLength = ((buffer[7] & 0x0f) << 8) | buffer[8]; - - for (uint16_t i = 0; i < applicationDescriptorsLoopLength; i += buffer[i + 10] + 2) - descriptor(&buffer[i + 9]); -} - -ApplicationInformation::~ApplicationInformation(void) -{ - delete applicationIdentifier; -} - -const ApplicationIdentifier *ApplicationInformation::getApplicationIdentifier(void) const -{ - return applicationIdentifier; -} - -uint8_t ApplicationInformation::getApplicationControlCode(void) const -{ - return applicationControlCode; -} - -ApplicationInformationTable::ApplicationInformationTable(const uint8_t * const buffer) : LongCrcTable(buffer) -{ - reserved4 = (buffer[8] >> 4) & 0x0f; - commonDescriptorsLength = ((buffer[8] & 0x0f) << 8) | buffer[9]; - - for (uint16_t i = 0; i < commonDescriptorsLength; i += buffer[i + 11] + 2) - descriptor(&buffer[i + 10]); - - reserved5 = (buffer[commonDescriptorsLength + 10] >> 4) & 0x0f; - applicationLoopLength = ((buffer[commonDescriptorsLength + 10] & 0x0f) << 8) | buffer[commonDescriptorsLength + 11]; - - for (uint16_t i = 0; i < applicationLoopLength; i += 9) { - ApplicationInformation *a = new ApplicationInformation(&buffer[commonDescriptorsLength + 12]); - applicationInformation.push_back(a); - i += a->applicationDescriptorsLoopLength; - } -} - -ApplicationInformationTable::~ApplicationInformationTable(void) -{ - for (ApplicationInformationIterator i = applicationInformation.begin(); i != applicationInformation.end(); ++i) - delete *i; -} - -const ApplicationInformationVector *ApplicationInformationTable::getApplicationInformation(void) const -{ - return &applicationInformation; -} - diff --git a/lib/dvb_si/ait.h b/lib/dvb_si/ait.h deleted file mode 100644 index 8dd71f68..00000000 --- a/lib/dvb_si/ait.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * $Id: ait.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_table_ait_h__ -#define __dvb_table_ait_h__ - -#include -#include "long_crc_table.h" - -class ApplicationIdentifier -{ - protected: - unsigned organisationId : 32; - unsigned applicationId : 16; - - public: - ApplicationIdentifier(const uint8_t * const buffer); - - uint32_t getOrganisationId(void) const; - uint16_t getApplicationId(void) const; -}; - -class ApplicationInformation : public DescriptorContainer -{ - protected: - ApplicationIdentifier *applicationIdentifier; - unsigned applicationControlCode : 8; - unsigned reserved : 4; - unsigned applicationDescriptorsLoopLength : 12; - - public: - ApplicationInformation(const uint8_t * const buffer); - ~ApplicationInformation(void); - - const ApplicationIdentifier *getApplicationIdentifier(void) const; - uint8_t getApplicationControlCode(void) const; - - friend class ApplicationInformationTable; -}; - -typedef std::vector ApplicationInformationVector; -typedef ApplicationInformationVector::iterator ApplicationInformationIterator; -typedef ApplicationInformationVector::const_iterator ApplicationInformationConstIterator; - -class ApplicationInformationTable : public LongCrcTable, public DescriptorContainer -{ - protected: - unsigned reserved4 : 4; - unsigned commonDescriptorsLength : 12; - unsigned reserved5 : 4; - unsigned applicationLoopLength : 12; - ApplicationInformationVector applicationInformation; - - public: - ApplicationInformationTable(const uint8_t * const buffer); - ~ApplicationInformationTable(void); - - static const enum TableId TID = TID_AIT; - static const uint32_t TIMEOUT = 12000; - - const ApplicationInformationVector *getApplicationInformation(void) const; -}; - -typedef std::vector ApplicationInformationTableVector; -typedef ApplicationInformationTableVector::iterator ApplicationInformationTableIterator; -typedef ApplicationInformationTableVector::const_iterator ApplicationInformationTableConstIterator; - -#endif /* __dvb_table_ait_h__ */ diff --git a/lib/dvb_si/ancillary_data_descriptor.cpp b/lib/dvb_si/ancillary_data_descriptor.cpp deleted file mode 100644 index 33cb85c2..00000000 --- a/lib/dvb_si/ancillary_data_descriptor.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/* - * $Id: ancillary_data_descriptor.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -AncillaryDataDescriptor::AncillaryDataDescriptor(const uint8_t * const buffer) : Descriptor(buffer) -{ - ancillaryDataIdentifier = buffer[2]; -} - -uint8_t AncillaryDataDescriptor::getAncillaryDataIdentifier(void) const -{ - return ancillaryDataIdentifier; -} - diff --git a/lib/dvb_si/ancillary_data_descriptor.h b/lib/dvb_si/ancillary_data_descriptor.h deleted file mode 100644 index f6ddd115..00000000 --- a/lib/dvb_si/ancillary_data_descriptor.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * $Id: ancillary_data_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_ancillary_data_descriptor_h__ -#define __dvb_descriptor_ancillary_data_descriptor_h__ - -#include "descriptor.h" - -class AncillaryDataDescriptor : public Descriptor -{ - protected: - unsigned ancillaryDataIdentifier : 8; - - public: - AncillaryDataDescriptor(const uint8_t * const buffer); - - uint8_t getAncillaryDataIdentifier(void) const; -}; - -#endif /* __dvb_descriptor_ancillary_data_descriptor_h__ */ diff --git a/lib/dvb_si/announcement_support_descriptor.cpp b/lib/dvb_si/announcement_support_descriptor.cpp deleted file mode 100644 index 5cc13f7a..00000000 --- a/lib/dvb_si/announcement_support_descriptor.cpp +++ /dev/null @@ -1,107 +0,0 @@ -/* - * $Id: announcement_support_descriptor.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -Announcement::Announcement(const uint8_t * const buffer) -{ - announcementType = (buffer[0] >> 4) & 0x0f; - reserved = (buffer[0] >> 3) & 0x01; - referenceType = buffer[0] & 0x07; - - if ((referenceType >= 0x01) && (referenceType <= 0x03)) { - originalNetworkId = (buffer[1] << 8) | buffer[2]; - transportStreamId = (buffer[3] << 8) | buffer[4]; - serviceId = (buffer[5] << 8) | buffer[6]; - componentTag = buffer[7]; - } -} - -uint8_t Announcement::getAnnouncementType(void) const -{ - return announcementType; -} - -uint8_t Announcement::getReferenceType(void) const -{ - return referenceType; -} - -uint16_t Announcement::getOriginalNetworkId(void) const -{ - return originalNetworkId; -} - -uint16_t Announcement::getTransportStreamId(void) const -{ - return transportStreamId; -} - -uint16_t Announcement::getServiceId(void) const -{ - return serviceId; -} - -uint8_t Announcement::getComponentTag(void) const -{ - return componentTag; -} - -AnnouncementSupportDescriptor::AnnouncementSupportDescriptor(const uint8_t * const buffer) : Descriptor(buffer) -{ - Announcement *a; - - announcementSupportIndicator = (buffer[2] << 8) | buffer[3]; - - if (descriptorLength < 2) - return; - - for (uint16_t i = 0; i < descriptorLength - 2; ++i) { - a = new Announcement(&buffer[i + 4]); - announcements.push_back(a); - switch (a->getReferenceType()) { - case 0x01: - case 0x02: - case 0x03: - i += 7; - break; - default: - break; - } - } -} - -AnnouncementSupportDescriptor::~AnnouncementSupportDescriptor(void) -{ - for (AnnouncementIterator i = announcements.begin(); i != announcements.end(); ++i) - delete *i; -} - -uint16_t AnnouncementSupportDescriptor::getAnnouncementSupportIndicator(void) const -{ - return announcementSupportIndicator; -} - -const AnnouncementVector *AnnouncementSupportDescriptor::getAnnouncements(void) const -{ - return &announcements; -} - diff --git a/lib/dvb_si/announcement_support_descriptor.h b/lib/dvb_si/announcement_support_descriptor.h deleted file mode 100644 index ce80cbe7..00000000 --- a/lib/dvb_si/announcement_support_descriptor.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * $Id: announcement_support_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_announcement_support_descriptor_h__ -#define __dvb_descriptor_announcement_support_descriptor_h__ - -#include "descriptor.h" - -class Announcement -{ - protected: - unsigned announcementType : 4; - unsigned reserved : 1; - unsigned referenceType : 3; - unsigned originalNetworkId : 16; - unsigned transportStreamId : 16; - unsigned serviceId : 16; - unsigned componentTag : 8; - - public: - Announcement(const uint8_t * const buffer); - - uint8_t getAnnouncementType(void) const; - uint8_t getReferenceType(void) const; - uint16_t getOriginalNetworkId(void) const; - uint16_t getTransportStreamId(void) const; - uint16_t getServiceId(void) const; - uint8_t getComponentTag(void) const; -}; - -typedef std::vector AnnouncementVector; -typedef AnnouncementVector::iterator AnnouncementIterator; -typedef AnnouncementVector::const_iterator AnnouncementConstIterator; - -class AnnouncementSupportDescriptor : public Descriptor -{ - protected: - unsigned announcementSupportIndicator : 16; - AnnouncementVector announcements; - - public: - AnnouncementSupportDescriptor(const uint8_t * const buffer); - ~AnnouncementSupportDescriptor(void); - - uint16_t getAnnouncementSupportIndicator(void) const; - const AnnouncementVector *getAnnouncements(void) const; -}; - -#endif /* __dvb_descriptor_announcement_support_descriptor_h__ */ diff --git a/lib/dvb_si/application_signalling_descriptor.cpp b/lib/dvb_si/application_signalling_descriptor.cpp deleted file mode 100644 index 978780f7..00000000 --- a/lib/dvb_si/application_signalling_descriptor.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/* - * $Id: application_signalling_descriptor.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -ApplicationSignalling::ApplicationSignalling(const uint8_t * const buffer) -{ - applicationType = (buffer[0] << 8) | buffer[1]; - reserved = (buffer[2] >> 5) & 0x07; - aitVersionNumber = buffer[2] & 0x1f; -} - -uint16_t ApplicationSignalling::getApplicationType(void) const -{ - return applicationType; -} - -uint8_t ApplicationSignalling::getAitVersionNumber(void) const -{ - return aitVersionNumber; -} - -ApplicationSignallingDescriptor::ApplicationSignallingDescriptor(const uint8_t * const buffer) : Descriptor(buffer) -{ - for (uint16_t i = 0; i < descriptorLength; i += 3) - applicationSignallings.push_back(new ApplicationSignalling(&buffer[i + 2])); -} - -ApplicationSignallingDescriptor::~ApplicationSignallingDescriptor(void) -{ - for (ApplicationSignallingIterator i = applicationSignallings.begin(); i != applicationSignallings.end(); ++i) - delete *i; -} - -const ApplicationSignallingVector *ApplicationSignallingDescriptor::getApplicationSignallings(void) const -{ - return &applicationSignallings; -} - diff --git a/lib/dvb_si/application_signalling_descriptor.h b/lib/dvb_si/application_signalling_descriptor.h deleted file mode 100644 index c4533e13..00000000 --- a/lib/dvb_si/application_signalling_descriptor.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * $Id: application_signalling_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_application_signalling_descriptor_h__ -#define __dvb_descriptor_application_signalling_descriptor_h__ - -#include "descriptor.h" - -class ApplicationSignalling -{ - protected: - unsigned applicationType : 16; - unsigned reserved : 3; - unsigned aitVersionNumber : 5; - - public: - ApplicationSignalling(const uint8_t * const buffer); - - uint16_t getApplicationType(void) const; - uint8_t getAitVersionNumber(void) const; -}; - -typedef std::vector ApplicationSignallingVector; -typedef ApplicationSignallingVector::iterator ApplicationSignallingIterator; -typedef ApplicationSignallingVector::const_iterator ApplicationSignallingConstIterator; - -class ApplicationSignallingDescriptor : public Descriptor -{ - protected: - ApplicationSignallingVector applicationSignallings; - - public: - ApplicationSignallingDescriptor(const uint8_t * const buffer); - ~ApplicationSignallingDescriptor(void); - - const ApplicationSignallingVector *getApplicationSignallings(void) const; -}; - -#endif /* __dvb_descriptor_application_signalling_descriptor_h__ */ diff --git a/lib/dvb_si/audio_stream_descriptor.cpp b/lib/dvb_si/audio_stream_descriptor.cpp deleted file mode 100644 index 6a27af19..00000000 --- a/lib/dvb_si/audio_stream_descriptor.cpp +++ /dev/null @@ -1,52 +0,0 @@ -/* - * $Id: audio_stream_descriptor.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -AudioStreamDescriptor::AudioStreamDescriptor(const uint8_t * const buffer) : Descriptor(buffer) -{ - freeFormatFlag = (buffer[2] >> 7) & 0x01; - id = (buffer[2] >> 6) & 0x01; - layer = (buffer[2] >> 4) & 0x03; - variableRateAudioIndicator = (buffer[2] >> 3) & 0x01; - reserved = buffer[2] & 0x07; -} - -uint8_t AudioStreamDescriptor::getFreeFormatFlag(void) const -{ - return freeFormatFlag; -} - -uint8_t AudioStreamDescriptor::getId(void) const -{ - return id; -} - -uint8_t AudioStreamDescriptor::getLayer(void) const -{ - return layer; -} - -uint8_t AudioStreamDescriptor::getVariableRateAudioIndicator(void) const -{ - return variableRateAudioIndicator; -} - diff --git a/lib/dvb_si/audio_stream_descriptor.h b/lib/dvb_si/audio_stream_descriptor.h deleted file mode 100644 index 17876b7c..00000000 --- a/lib/dvb_si/audio_stream_descriptor.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * $Id: audio_stream_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_audio_stream_descriptor_h__ -#define __dvb_descriptor_audio_stream_descriptor_h__ - -#include "descriptor.h" - -class AudioStreamDescriptor : public Descriptor -{ - protected: - unsigned freeFormatFlag : 1; - unsigned id : 1; - unsigned layer : 2; - unsigned variableRateAudioIndicator : 1; - unsigned reserved : 3; - - public: - AudioStreamDescriptor(const uint8_t * const buffer); - - uint8_t getFreeFormatFlag(void) const; - uint8_t getId(void) const; - uint8_t getLayer(void) const; - uint8_t getVariableRateAudioIndicator(void) const; -}; - -#endif /* __dvb_descriptor_audio_stream_descriptor_h__ */ diff --git a/lib/dvb_si/bat.cpp b/lib/dvb_si/bat.cpp deleted file mode 100644 index a3763f71..00000000 --- a/lib/dvb_si/bat.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/* - * $Id: bat.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -BouquetAssociation::BouquetAssociation(const uint8_t * const buffer) -{ - transportStreamId = (buffer[0] << 8) | buffer[1]; - originalNetworkId = (buffer[2] << 8) | buffer[3]; - reserved = (buffer[4] >> 4) & 0x0f; - transportStreamLoopLength = ((buffer[4] & 0x0f) << 8) | buffer[5]; - - for (uint16_t i = 6; i < transportStreamLoopLength + 6; i += buffer[i + 1] + 2) - descriptor(&buffer[i]); -} - -BouquetAssociationTable::BouquetAssociationTable(const uint8_t * const buffer) : LongCrcTable(buffer) -{ - reserved4 = (buffer[8] >> 4) & 0x0f; - bouquetDescriptorsLength = ((buffer[8] & 0x0f) << 8) | buffer[9]; - - for (uint16_t i = 10; i < bouquetDescriptorsLength + 10; i += buffer[i + 1] + 2) - descriptor(&buffer[i]); - - reserved5 = (buffer[bouquetDescriptorsLength + 10] >> 4) & 0x0f; - transportStreamLoopLength = ((buffer[bouquetDescriptorsLength + 10] & 0x0f) << 8) | buffer[bouquetDescriptorsLength + 11]; - - for (uint16_t i = bouquetDescriptorsLength + 12; i < sectionLength - 1; i += ((buffer[i + 4] & 0x0f) | buffer[i + 5]) + 6) - bouquet.push_back(new BouquetAssociation(&buffer[i])); -} - -BouquetAssociationTable::~BouquetAssociationTable(void) -{ - for (BouquetAssociationIterator b = bouquet.begin(); b != bouquet.end(); ++b) - delete *b; -} - diff --git a/lib/dvb_si/bat.h b/lib/dvb_si/bat.h deleted file mode 100644 index 41fd97fe..00000000 --- a/lib/dvb_si/bat.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * $Id: bat.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_table_bat_h__ -#define __dvb_table_bat_h__ - -#include -#include "long_crc_table.h" - -class BouquetAssociation : public DescriptorContainer -{ - protected: - unsigned transportStreamId : 16; - unsigned originalNetworkId : 16; - unsigned reserved : 4; - unsigned transportStreamLoopLength : 12; - - public: - BouquetAssociation(const uint8_t * const buffer); -}; - -typedef std::vector BouquetAssociationVector; -typedef BouquetAssociationVector::iterator BouquetAssociationIterator; -typedef BouquetAssociationVector::const_iterator BouquetAssociationConstIterator; - -class BouquetAssociationTable : public LongCrcTable , public DescriptorContainer -{ - protected: - unsigned reserved4 : 4; - unsigned bouquetDescriptorsLength : 12; - unsigned reserved5 : 4; - unsigned transportStreamLoopLength : 12; - BouquetAssociationVector bouquet; - - public: - BouquetAssociationTable(const uint8_t * const buffer); - ~BouquetAssociationTable(void); - - static const enum PacketId PID = PID_BAT; - static const enum TableId TID = TID_BAT; - static const uint32_t TIMEOUT = 12000; -}; - -typedef std::vector BouquetAssociationTableVector; -typedef BouquetAssociationTableVector::iterator BouquetAssociationTableIterator; -typedef BouquetAssociationTableVector::const_iterator BouquetAssociationTableConstIterator; - -#endif /* __dvb_table_bat_h__ */ diff --git a/lib/dvb_si/bouquet_name_descriptor.cpp b/lib/dvb_si/bouquet_name_descriptor.cpp deleted file mode 100644 index e11a2088..00000000 --- a/lib/dvb_si/bouquet_name_descriptor.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/* - * $Id: bouquet_name_descriptor.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -BouquetNameDescriptor::BouquetNameDescriptor(const uint8_t * const buffer) : Descriptor(buffer) -{ - bouquetName.assign((char *)&buffer[2], descriptorLength); -} - -std::string BouquetNameDescriptor::getBouquetName(void) const -{ - return bouquetName; -} - diff --git a/lib/dvb_si/bouquet_name_descriptor.h b/lib/dvb_si/bouquet_name_descriptor.h deleted file mode 100644 index 5f608bc3..00000000 --- a/lib/dvb_si/bouquet_name_descriptor.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * $Id: bouquet_name_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_bouquet_name_descriptor_h__ -#define __dvb_descriptor_bouquet_name_descriptor_h__ - -#include "descriptor.h" - -class BouquetNameDescriptor : public Descriptor -{ - protected: - std::string bouquetName; - - public: - BouquetNameDescriptor(const uint8_t * const buffer); - ~BouquetNameDescriptor(void); - - std::string getBouquetName(void) const; -}; - -#endif /* __dvb_descriptor_bouquet_name_descriptor_h__ */ diff --git a/lib/dvb_si/ca_descriptor.cpp b/lib/dvb_si/ca_descriptor.cpp deleted file mode 100644 index 019855db..00000000 --- a/lib/dvb_si/ca_descriptor.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* - * $Id: ca_descriptor.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -CaDescriptor::CaDescriptor(const uint8_t * const buffer) : Descriptor(buffer) -{ - caSystemId = (buffer[2] << 8) | buffer[3]; - reserved = buffer[4] >> 5; - caPid = ((buffer[4] & 0x1F) << 8) | buffer[5]; - - if (descriptorLength < 4) - return; - for (uint16_t i = 0; i < descriptorLength - 4; ++i) - privateDataBytes.push_back(buffer[i + 6]); -} - -uint16_t CaDescriptor::getCaSystemId(void) const -{ - return caSystemId; -} - -uint16_t CaDescriptor::getCaPid(void) const -{ - return caPid; -} - -const PrivateDataByteVector *CaDescriptor::getPrivateDataBytes(void) const -{ - return &privateDataBytes; -} - diff --git a/lib/dvb_si/ca_descriptor.h b/lib/dvb_si/ca_descriptor.h deleted file mode 100644 index b02add95..00000000 --- a/lib/dvb_si/ca_descriptor.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * $Id: ca_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_ca_descriptor_h__ -#define __dvb_descriptor_ca_descriptor_h__ - -#include "descriptor.h" - -typedef std::vector PrivateDataByteVector; -typedef PrivateDataByteVector::iterator PrivateDataByteIterator; -typedef PrivateDataByteVector::const_iterator PrivateDataByteConstIterator; - -class CaDescriptor : public Descriptor -{ - protected: - unsigned caSystemId : 16; - unsigned reserved : 3; - unsigned caPid : 13; - PrivateDataByteVector privateDataBytes; - - public: - CaDescriptor(const uint8_t * const buffer); - - uint16_t getCaSystemId(void) const; - uint16_t getCaPid(void) const; - const PrivateDataByteVector *getPrivateDataBytes(void) const; -}; - -typedef std::vector CaDescriptorVector; -typedef CaDescriptorVector::iterator CaDescriptorIterator; -typedef CaDescriptorVector::const_iterator CaDescriptorConstIterator; - -#endif /* __dvb_descriptor_ca_descriptor_h__ */ diff --git a/lib/dvb_si/ca_identifier_descriptor.cpp b/lib/dvb_si/ca_identifier_descriptor.cpp deleted file mode 100644 index 5804c5d4..00000000 --- a/lib/dvb_si/ca_identifier_descriptor.cpp +++ /dev/null @@ -1,34 +0,0 @@ -/* - * $Id: ca_identifier_descriptor.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -CaIdentifierDescriptor::CaIdentifierDescriptor(const uint8_t * const buffer) : Descriptor(buffer) -{ - for (uint16_t i = 0; i < descriptorLength; i += 2) - caSystemIds.push_back((buffer[i + 2] << 8) | buffer[i + 3]); -} - -const CaSystemIdVector *CaIdentifierDescriptor::getCaSystemIds(void) const -{ - return &caSystemIds; -} - diff --git a/lib/dvb_si/ca_identifier_descriptor.h b/lib/dvb_si/ca_identifier_descriptor.h deleted file mode 100644 index 432d8d5a..00000000 --- a/lib/dvb_si/ca_identifier_descriptor.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * $Id: ca_identifier_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_ca_identifier_descriptor_h__ -#define __dvb_descriptor_ca_identifier_descriptor_h__ - -#include "descriptor.h" - -typedef std::vector CaSystemIdVector; -typedef CaSystemIdVector::iterator CaSystemIdIterator; -typedef CaSystemIdVector::const_iterator CaSystemIdConstIterator; - -class CaIdentifierDescriptor : public Descriptor -{ - protected: - CaSystemIdVector caSystemIds; - - public: - CaIdentifierDescriptor(const uint8_t * const buffer); - - const CaSystemIdVector *getCaSystemIds(void) const; -}; - -#endif /* __dvb_descriptor_ca_identifier_descriptor_h__ */ diff --git a/lib/dvb_si/ca_system_descriptor.cpp b/lib/dvb_si/ca_system_descriptor.cpp deleted file mode 100644 index acae51f0..00000000 --- a/lib/dvb_si/ca_system_descriptor.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/* - * $Id: ca_system_descriptor.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -CaSystemDescriptor::CaSystemDescriptor(const uint8_t * const buffer) : Descriptor(buffer) -{ - scramblingCode = buffer[2]; -} - -uint8_t CaSystemDescriptor::getScramblingCode(void) const -{ - return scramblingCode; -} - diff --git a/lib/dvb_si/ca_system_descriptor.h b/lib/dvb_si/ca_system_descriptor.h deleted file mode 100644 index 01491973..00000000 --- a/lib/dvb_si/ca_system_descriptor.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * $Id: ca_system_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_ca_system_descriptor_h__ -#define __dvb_descriptor_ca_system_descriptor_h__ - -#include "descriptor.h" - -class CaSystemDescriptor : public Descriptor -{ - protected: - unsigned scramblingCode : 8; - - public: - CaSystemDescriptor(const uint8_t * const buffer); - - uint8_t getScramblingCode(void) const; -}; - -#endif /* __dvb_descriptor_ca_system_descriptor_h__ */ diff --git a/lib/dvb_si/cable_delivery_system_descriptor.cpp b/lib/dvb_si/cable_delivery_system_descriptor.cpp deleted file mode 100644 index 4d07080d..00000000 --- a/lib/dvb_si/cable_delivery_system_descriptor.cpp +++ /dev/null @@ -1,80 +0,0 @@ -/* - * $Id: cable_delivery_system_descriptor.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -CableDeliverySystemDescriptor::CableDeliverySystemDescriptor(const uint8_t * const buffer) : Descriptor(buffer) -{ - frequency = - ( - ((buffer[2] >> 4) * 10000000) + - ((buffer[2] & 0x0F) * 1000000) + - ((buffer[3] >> 4) * 100000) + - ((buffer[3] & 0x0F) * 10000) + - ((buffer[4] >> 4) * 1000) + - ((buffer[4] & 0x0F) * 100) + - ((buffer[5] >> 4) * 10) + - ((buffer[5] & 0x0F) * 1) - ); - - reserved = (buffer[6] << 4) | ((buffer[7] >> 4) & 0x0F); - fecOuter = buffer[7] & 0x0F; - modulation = buffer[8]; - - symbolRate = - ( - ((buffer[9] >> 4) * 1000000) + - ((buffer[9] & 0x0F) * 100000) + - ((buffer[10] >> 4) * 10000) + - ((buffer[10] & 0x0F) * 1000) + - ((buffer[11] >> 4) * 100) + - ((buffer[11] & 0x0F) * 10) + - ((buffer[12] >> 4) * 1) - ); - - fecInner = buffer[12] & 0x0F; -} - -uint32_t CableDeliverySystemDescriptor::getFrequency(void) const -{ - return frequency; -} - -uint8_t CableDeliverySystemDescriptor::getFecOuter(void) const -{ - return fecOuter; -} - -uint8_t CableDeliverySystemDescriptor::getModulation(void) const -{ - return modulation; -} - -uint32_t CableDeliverySystemDescriptor::getSymbolRate(void) const -{ - return symbolRate; -} - -uint8_t CableDeliverySystemDescriptor::getFecInner(void) const -{ - return fecInner; -} - diff --git a/lib/dvb_si/cable_delivery_system_descriptor.h b/lib/dvb_si/cable_delivery_system_descriptor.h deleted file mode 100644 index c063222b..00000000 --- a/lib/dvb_si/cable_delivery_system_descriptor.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * $Id: cable_delivery_system_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_cable_delivery_system_descriptor_h__ -#define __dvb_descriptor_cable_delivery_system_descriptor_h__ - -#include "descriptor.h" - -class CableDeliverySystemDescriptor : public Descriptor -{ - protected: - unsigned frequency : 32; - unsigned reserved : 12; - unsigned fecOuter : 4; - unsigned modulation : 8; - unsigned symbolRate : 28; - unsigned fecInner : 4; - - public: - CableDeliverySystemDescriptor(const uint8_t * const buffer); - - uint32_t getFrequency(void) const; - uint8_t getFecOuter(void) const; - uint8_t getModulation(void) const; - uint32_t getSymbolRate(void) const; - uint8_t getFecInner(void) const; -}; - -#endif /* __dvb_descriptor_cable_delivery_system_descriptor_h__ */ diff --git a/lib/dvb_si/camt.cpp b/lib/dvb_si/camt.cpp deleted file mode 100644 index 7383a215..00000000 --- a/lib/dvb_si/camt.cpp +++ /dev/null @@ -1,29 +0,0 @@ -/* - * $Id: camt.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -ConditionalAccessMessageTable::ConditionalAccessMessageTable(const uint8_t * const buffer) : ShortTable(buffer) -{ - for (uint16_t i = 8; i < sectionLength - 1; ++i) - caDataByte.push_back(buffer[i]); -} - diff --git a/lib/dvb_si/camt.h b/lib/dvb_si/camt.h deleted file mode 100644 index e01b8061..00000000 --- a/lib/dvb_si/camt.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * $Id: camt.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_table_camt_h__ -#define __dvb_table_camt_h__ - -#include "short_table.h" - -class ConditionalAccessMessageTable : public ShortTable -{ - protected: - std::vector caDataByte; - - public: - ConditionalAccessMessageTable(const uint8_t * const buffer); - - static const uint16_t LENGTH = 256; - static const enum TableId TID = TID_CAMT_ECM_0; -}; - -typedef std::vector ConditionalAccessMessageTableVector; -typedef ConditionalAccessMessageTableVector::iterator ConditionalAccessMessageTableIterator; -typedef ConditionalAccessMessageTableVector::const_iterator ConditionalAccessMessageTableConstIterator; - -#endif /* __dvb_table_camt_h__ */ diff --git a/lib/dvb_si/capmt.cpp b/lib/dvb_si/capmt.cpp deleted file mode 100644 index c5a6ab9e..00000000 --- a/lib/dvb_si/capmt.cpp +++ /dev/null @@ -1,124 +0,0 @@ -/* - * $Id: capmt.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include -#include - -CaLengthField::CaLengthField(const uint64_t length) -{ - if (length < 0x80) { - sizeIndicator = 0; - lengthValue = length; - } - - else { - uint64_t mask = 0xFF; - - sizeIndicator = 1; - lengthFieldSize = 1; - - while ((length & mask) != length) { - lengthFieldSize++; - mask = ((uint64_t)(mask << 8)) | ((uint64_t)0xFFULL); - } - - for (uint8_t i = lengthFieldSize; i > 0; i--) - lengthValueByte.push_back((length >> ((i - 1) << 3)) & 0xFF); - } -} - -CaElementaryStreamInfo::CaElementaryStreamInfo(const ElementaryStreamInfo * const info, const uint8_t cmdId) -{ - streamType = info->streamType; - reserved1 = info->reserved1; - elementaryPid = info->elementaryPid; - reserved2 = info->reserved2; - esInfoLength = 0; - - for (DescriptorConstIterator i = info->getDescriptors()->begin(); i != info->getDescriptors()->end(); ++i) - if ((*i)->getTag() == CA_DESCRIPTOR) { - descriptors.push_back(new CaDescriptor(*(CaDescriptor *)*i)); - esInfoLength += (*i)->getLength() + 2; - } - - if (esInfoLength) { - caPmtCmdId = cmdId; - esInfoLength++; - } -} - -CaElementaryStreamInfo::~CaElementaryStreamInfo(void) -{ - for (CaDescriptorIterator i = descriptors.begin(); i != descriptors.end(); ++i) - delete *i; -} - -uint16_t CaElementaryStreamInfo::getLength(void) const -{ - return esInfoLength + 5; -} - -CaProgramMapTable::CaProgramMapTable(const ProgramMapTable * const pmt, const uint8_t listManagement, const uint8_t cmdId) -{ - uint64_t length = 6; - - caPmtTag = 0x9F80C3; - caPmtListManagement = listManagement; - - programNumber = pmt->tableIdExtension; - reserved1 = pmt->reserved3; - versionNumber = pmt->versionNumber; - currentNextIndicator = pmt->currentNextIndicator; - reserved2 = pmt->reserved5; - programInfoLength = 0; - - for (DescriptorConstIterator i = pmt->getDescriptors()->begin(); i != pmt->getDescriptors()->end(); ++i) - if ((*i)->getTag() == CA_DESCRIPTOR) { - descriptors.push_back(new CaDescriptor(*(CaDescriptor *)*i)); - programInfoLength += (*i)->getLength() + 2; - } - - if (programInfoLength) { - caPmtCmdId = cmdId; - programInfoLength++; - length += programInfoLength; - } - - for (ElementaryStreamInfoConstIterator i = pmt->esInfo.begin(); i != pmt->esInfo.end(); ++i) { - CaElementaryStreamInfo *info = new CaElementaryStreamInfo(*i, cmdId); - esInfo.push_back(info); - length += info->getLength(); - } - - lengthField = new CaLengthField(length); -} - -CaProgramMapTable::~CaProgramMapTable(void) -{ - for (CaDescriptorIterator i = descriptors.begin(); i != descriptors.end(); ++i) - delete *i; - - for (CaElementaryStreamInfoIterator i = esInfo.begin(); i != esInfo.end(); ++i) - delete *i; - - delete lengthField; -} - diff --git a/lib/dvb_si/capmt.h b/lib/dvb_si/capmt.h deleted file mode 100644 index 6d8dc43d..00000000 --- a/lib/dvb_si/capmt.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - * $Id: capmt.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_table_capmt_h__ -#define __dvb_table_capmt_h__ - -#include -#include "pmt.h" - -class CaLengthField -{ - protected: - unsigned sizeIndicator : 1; - unsigned lengthValue : 7; - unsigned lengthFieldSize : 7; - std::vector lengthValueByte; - - public: - CaLengthField(const uint64_t length); -}; - -class CaElementaryStreamInfo -{ - protected: - unsigned streamType : 8; - unsigned reserved1 : 3; - unsigned elementaryPid : 13; - unsigned reserved2 : 4; - unsigned esInfoLength : 12; - unsigned caPmtCmdId : 8; - CaDescriptorVector descriptors; - - public: - CaElementaryStreamInfo(const ElementaryStreamInfo * const info, const uint8_t cmdId); - ~CaElementaryStreamInfo(void); - - uint16_t getLength(void) const; -}; - -typedef std::vector CaElementaryStreamInfoVector; -typedef CaElementaryStreamInfoVector::iterator CaElementaryStreamInfoIterator; -typedef CaElementaryStreamInfoVector::const_iterator CaElementaryStreamInfoConstIterator; - -class CaProgramMapTable -{ - protected: - unsigned caPmtTag : 24; - CaLengthField *lengthField; - unsigned caPmtListManagement : 8; - unsigned programNumber : 16; - unsigned reserved1 : 2; - unsigned versionNumber : 5; - unsigned currentNextIndicator : 1; - unsigned reserved2 : 4; - unsigned programInfoLength : 12; - unsigned caPmtCmdId : 8; - CaDescriptorVector descriptors; - CaElementaryStreamInfoVector esInfo; - - public: - CaProgramMapTable(const ProgramMapTable * const pmt, const uint8_t listManagement, const uint8_t cmdId); - ~CaProgramMapTable(void); -}; - -typedef std::vector CaProgramMapTableVector; -typedef CaProgramMapTableVector::iterator CaProgramMapTableIterator; -typedef CaProgramMapTableVector::const_iterator CaProgramMapTableConstIterator; - -#endif /* __dvb_table_capmt_h__ */ diff --git a/lib/dvb_si/cat.cpp b/lib/dvb_si/cat.cpp deleted file mode 100644 index de692301..00000000 --- a/lib/dvb_si/cat.cpp +++ /dev/null @@ -1,29 +0,0 @@ -/* - * $Id: cat.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -ConditionalAccessTable::ConditionalAccessTable(const uint8_t * const buffer) : LongCrcTable(buffer) -{ - for (uint16_t i = 8; i < sectionLength - 1; i += buffer[i + 1] + 2) - descriptor(&buffer[i]); -} - diff --git a/lib/dvb_si/cat.h b/lib/dvb_si/cat.h deleted file mode 100644 index 3c3e3cdc..00000000 --- a/lib/dvb_si/cat.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * $Id: cat.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_table_cat_h__ -#define __dvb_table_cat_h__ - -#include -#include "long_crc_table.h" - -class ConditionalAccessTable : public LongCrcTable, public DescriptorContainer -{ - public: - ConditionalAccessTable(const uint8_t * const buffer); - - static const enum PacketId PID = PID_CAT; - static const enum TableId TID = TID_CAT; - static const uint32_t TIMEOUT = 200; -}; - -typedef std::vector ConditionalAccessTableVector; -typedef ConditionalAccessTableVector::iterator ConditionalAccessTableIterator; -typedef ConditionalAccessTableVector::const_iterator ConditionalAccessTableConstIterator; - -#endif /* __dvb_table_cat_h__ */ diff --git a/lib/dvb_si/cell_frequency_link_descriptor.cpp b/lib/dvb_si/cell_frequency_link_descriptor.cpp deleted file mode 100644 index f4c44510..00000000 --- a/lib/dvb_si/cell_frequency_link_descriptor.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/* - * $Id: cell_frequency_link_descriptor.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -SubcellInfo::SubcellInfo(const uint8_t * const buffer) -{ - cellIdExtenstion = buffer[0]; - transposerFrequency = (buffer[1] << 24) | (buffer[2] << 16) | (buffer[3] << 8) | buffer[4]; -} - -uint8_t SubcellInfo::getCellIdExtension(void) const -{ - return cellIdExtenstion; -} - -uint32_t SubcellInfo::getTransposerFrequency(void) const -{ - return transposerFrequency; -} - -CellFrequencyLink::CellFrequencyLink(const uint8_t * const buffer) -{ - cellId = (buffer[0] << 8) | buffer[1]; - frequency = (buffer[2] << 24) | (buffer[3] << 16) | (buffer[4] << 8) | buffer[5]; - subcellInfoLoopLength = buffer[6]; - - for (uint16_t i = 0; i < subcellInfoLoopLength; i += 5) - subcells.push_back(new SubcellInfo(&buffer[i + 7])); -} - -CellFrequencyLink::~CellFrequencyLink(void) -{ - for (SubcellInfoIterator i = subcells.begin(); i != subcells.end(); ++i) - delete *i; -} - -uint16_t CellFrequencyLink::getCellId(void) const -{ - return cellId; -} - -uint32_t CellFrequencyLink::getFrequency(void) const -{ - return frequency; -} - -const SubcellInfoVector *CellFrequencyLink::getSubcells(void) const -{ - return &subcells; -} - -CellFrequencyLinkDescriptor::CellFrequencyLinkDescriptor(const uint8_t * const buffer) : Descriptor(buffer) -{ - for (uint16_t i = 0; i < descriptorLength; i += buffer[i + 10] + 6) - cellFrequencyLinks.push_back(new CellFrequencyLink(&buffer[i + 2])); -} - -CellFrequencyLinkDescriptor::~CellFrequencyLinkDescriptor(void) -{ - for (CellFrequencyLinkIterator i = cellFrequencyLinks.begin(); i != cellFrequencyLinks.end(); ++i) - delete *i; -} - -const CellFrequencyLinkVector *CellFrequencyLinkDescriptor::getCellFrequencyLinks(void) const -{ - return &cellFrequencyLinks; -} - diff --git a/lib/dvb_si/cell_frequency_link_descriptor.h b/lib/dvb_si/cell_frequency_link_descriptor.h deleted file mode 100644 index 29395ebc..00000000 --- a/lib/dvb_si/cell_frequency_link_descriptor.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * $Id: cell_frequency_link_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_cell_frequency_link_descriptor_h__ -#define __dvb_descriptor_cell_frequency_link_descriptor_h__ - -#include "descriptor.h" - -class SubcellInfo -{ - protected: - unsigned cellIdExtenstion : 8; - unsigned transposerFrequency : 32; - - public: - SubcellInfo(const uint8_t * const buffer); - - uint8_t getCellIdExtension(void) const; - uint32_t getTransposerFrequency(void) const; -}; - -typedef std::vector SubcellInfoVector; -typedef SubcellInfoVector::iterator SubcellInfoIterator; -typedef SubcellInfoVector::const_iterator SubcellInfoConstIterator; - -class CellFrequencyLink -{ - protected: - unsigned cellId : 16; - unsigned frequency : 32; - unsigned subcellInfoLoopLength : 8; - SubcellInfoVector subcells; - - public: - CellFrequencyLink(const uint8_t * const buffer); - ~CellFrequencyLink(void); - - uint16_t getCellId(void) const; - uint32_t getFrequency(void) const; - const SubcellInfoVector *getSubcells(void) const; - -}; - -typedef std::vector CellFrequencyLinkVector; -typedef CellFrequencyLinkVector::iterator CellFrequencyLinkIterator; -typedef CellFrequencyLinkVector::const_iterator CellFrequencyLinkConstIterator; - -class CellFrequencyLinkDescriptor : public Descriptor -{ - protected: - CellFrequencyLinkVector cellFrequencyLinks; - - public: - CellFrequencyLinkDescriptor(const uint8_t * const buffer); - ~CellFrequencyLinkDescriptor(void); - - const CellFrequencyLinkVector *getCellFrequencyLinks(void) const; -}; - -#endif /* __dvb_descriptor_cell_frequency_link_descriptor_h__ */ diff --git a/lib/dvb_si/cell_list_descriptor.cpp b/lib/dvb_si/cell_list_descriptor.cpp deleted file mode 100644 index c8588aeb..00000000 --- a/lib/dvb_si/cell_list_descriptor.cpp +++ /dev/null @@ -1,124 +0,0 @@ -/* - * $Id: cell_list_descriptor.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - - -#include - -Subcell::Subcell(const uint8_t * const buffer) -{ - cellIdExtension = buffer[0]; - subcellLatitude = (buffer[1] << 8) | buffer[2]; - subcellLongitude = (buffer[3] << 8) | buffer[4]; - subcellExtendOfLatitude = (buffer[5] << 4) | ((buffer[6] >> 4) & 0x0f); - subcellExtendOfLongitude = ((buffer[6] & 0x0f) << 8) | buffer[7]; -} - -uint8_t Subcell::getCellIdExtension(void) const -{ - return cellIdExtension; -} - -uint16_t Subcell::getSubcellLatitude(void) const -{ - return subcellLatitude; -} - -uint16_t Subcell::getSubcellLongtitude(void) const -{ - return subcellLongitude; -} - -uint16_t Subcell::getSubcellExtendOfLatitude(void) const -{ - return subcellExtendOfLatitude; -} - -uint16_t Subcell::getSubcellExtendOfLongtitude(void) const -{ - return subcellExtendOfLongitude; -} - -Cell::Cell(const uint8_t * const buffer) -{ - cellId = (buffer[0] << 8) | buffer[1]; - cellLatitude = (buffer[2] << 8) | buffer[3]; - cellLongtitude = (buffer[4] << 8) | buffer[5]; - cellExtendOfLatitude = (buffer[6] << 4) | ((buffer[7] >> 4) & 0x0f); - cellExtendOfLongtitude = ((buffer[7] & 0x0f) << 8) | buffer[8]; - subcellInfoLoopLength = buffer[9]; - - for (uint16_t i = 0; i < subcellInfoLoopLength; i += 8) - subcells.push_back(new Subcell(&buffer[i + 10])); -} - -Cell::~Cell(void) -{ - for (SubcellIterator i = subcells.begin(); i != subcells.end(); ++i) - delete *i; -} - -uint16_t Cell::getCellId(void) const -{ - return cellId; -} - -uint16_t Cell::getCellLatitude(void) const -{ - return cellLatitude; -} - -uint16_t Cell::getCellLongtitude(void) const -{ - return cellLongtitude; -} - -uint16_t Cell::getCellExtendOfLatitude(void) const -{ - return cellExtendOfLatitude; -} - -uint16_t Cell::getCellExtendOfLongtitude(void) const -{ - return cellExtendOfLongtitude; -} - -const SubcellVector *Cell::getSubcells(void) const -{ - return &subcells; -} - -CellListDescriptor::CellListDescriptor(const uint8_t * const buffer) : Descriptor(buffer) -{ - for (uint16_t i = 0; i < descriptorLength; i += buffer[i + 11] + 10) - cells.push_back(new Cell(&buffer[i + 2])); -} - -CellListDescriptor::~CellListDescriptor(void) -{ - for (CellIterator i = cells.begin(); i != cells.end(); ++i) - delete *i; -} - -const CellVector *CellListDescriptor::getCells(void) const -{ - return &cells; -} - diff --git a/lib/dvb_si/cell_list_descriptor.h b/lib/dvb_si/cell_list_descriptor.h deleted file mode 100644 index cfe93d98..00000000 --- a/lib/dvb_si/cell_list_descriptor.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * $Id: cell_list_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_cell_list_descriptor_h__ -#define __dvb_descriptor_cell_list_descriptor_h__ - -#include "descriptor.h" - -class Subcell -{ - protected: - unsigned cellIdExtension : 8; - unsigned subcellLatitude : 16; - unsigned subcellLongitude : 16; - unsigned subcellExtendOfLatitude : 12; - unsigned subcellExtendOfLongitude : 12; - - public: - Subcell(const uint8_t * const buffer); - - uint8_t getCellIdExtension(void) const; - uint16_t getSubcellLatitude(void) const; - uint16_t getSubcellLongtitude(void) const; - uint16_t getSubcellExtendOfLatitude(void) const; - uint16_t getSubcellExtendOfLongtitude(void) const; -}; - -typedef std::vector SubcellVector; -typedef SubcellVector::iterator SubcellIterator; -typedef SubcellVector::const_iterator SubcellConstIterator; - -class Cell -{ - protected: - unsigned cellId : 16; - unsigned cellLatitude : 16; - unsigned cellLongtitude : 16; - unsigned cellExtendOfLatitude : 12; - unsigned cellExtendOfLongtitude : 12; - unsigned subcellInfoLoopLength : 8; - SubcellVector subcells; - - public: - Cell(const uint8_t * const buffer); - ~Cell(void); - - uint16_t getCellId(void) const; - uint16_t getCellLatitude(void) const; - uint16_t getCellLongtitude(void) const; - uint16_t getCellExtendOfLatitude(void) const; - uint16_t getCellExtendOfLongtitude(void) const; - const SubcellVector *getSubcells(void) const; -}; - -typedef std::vector CellVector; -typedef CellVector::iterator CellIterator; -typedef CellVector::const_iterator CellConstIterator; - -class CellListDescriptor : public Descriptor -{ - protected: - CellVector cells; - - public: - CellListDescriptor(const uint8_t * const buffer); - ~CellListDescriptor(void); - - const CellVector *getCells(void) const; -}; - -#endif /* __dvb_descriptor_cell_list_descriptor_h__ */ diff --git a/lib/dvb_si/component_descriptor.cpp b/lib/dvb_si/component_descriptor.cpp deleted file mode 100644 index 8b043e13..00000000 --- a/lib/dvb_si/component_descriptor.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/* - * $Id: component_descriptor.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -ComponentDescriptor::ComponentDescriptor(const uint8_t * const buffer) : Descriptor(buffer) -{ - reserved = (buffer[2] >> 4) & 0x0f; - streamContent = buffer[2] & 0x0f; - componentType = buffer[3]; - componentTag = buffer[4]; - iso639LanguageCode.assign((char *) &buffer[5], 3); - if (descriptorLength < 6) - return; - text.assign((char *) &buffer[8], descriptorLength - 6); -} - -uint8_t ComponentDescriptor::getStreamContent(void) const -{ - return streamContent; -} - -uint8_t ComponentDescriptor::getComponentType(void) const -{ - return componentType; -} - -uint8_t ComponentDescriptor::getComponentTag(void) const -{ - return componentTag; -} - -std::string ComponentDescriptor::getIso639LanguageCode(void) const -{ - return iso639LanguageCode; -} - -std::string ComponentDescriptor::getText(void) const -{ - return text; -} - diff --git a/lib/dvb_si/component_descriptor.h b/lib/dvb_si/component_descriptor.h deleted file mode 100644 index c910ad4d..00000000 --- a/lib/dvb_si/component_descriptor.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * $Id: component_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_component_descriptor_h__ -#define __dvb_descriptor_component_descriptor_h__ - -#include "descriptor.h" - -class ComponentDescriptor : public Descriptor -{ - protected: - unsigned reserved : 4; - unsigned streamContent : 4; - unsigned componentType : 8; - unsigned componentTag : 8; - std::string iso639LanguageCode; - std::string text; - - public: - ComponentDescriptor(const uint8_t * const buffer); - - uint8_t getStreamContent(void) const; - uint8_t getComponentType(void) const; - uint8_t getComponentTag(void) const; - std::string getIso639LanguageCode(void) const; - std::string getText(void) const; -}; - -#endif /* __dvb_descriptor_component_descriptor_h__ */ diff --git a/lib/dvb_si/container.cpp b/lib/dvb_si/container.cpp deleted file mode 100644 index 1c14c2f3..00000000 --- a/lib/dvb_si/container.cpp +++ /dev/null @@ -1,289 +0,0 @@ -/* - * $Id: container.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -DescriptorContainer::~DescriptorContainer(void) -{ - for (DescriptorIterator i = descriptorVector.begin(); i != descriptorVector.end(); ++i) - delete *i; -} - -void DescriptorContainer::descriptor(const uint8_t * const buffer) -{ - switch (buffer[0]) { - case VIDEO_STREAM_DESCRIPTOR: - descriptorVector.push_back(new VideoStreamDescriptor(buffer)); - break; - - case AUDIO_STREAM_DESCRIPTOR: - descriptorVector.push_back(new AudioStreamDescriptor(buffer)); - break; - - case TARGET_BACKGROUND_GRID_DESCRIPTOR: - descriptorVector.push_back(new TargetBackgroundGridDescriptor(buffer)); - break; - - case VIDEO_WINDOW_DESCRIPTOR: - descriptorVector.push_back(new VideoWindowDescriptor(buffer)); - break; - - case CA_DESCRIPTOR: - descriptorVector.push_back(new CaDescriptor(buffer)); - break; - - case ISO_639_LANGUAGE_DESCRIPTOR: - descriptorVector.push_back(new Iso639LanguageDescriptor(buffer)); - break; - - case NETWORK_NAME_DESCRIPTOR: - descriptorVector.push_back(new NetworkNameDescriptor(buffer)); - break; - - case SERVICE_LIST_DESCRIPTOR: - descriptorVector.push_back(new ServiceListDescriptor(buffer)); - break; - - case STUFFING_DESCRIPTOR: - descriptorVector.push_back(new StuffingDescriptor(buffer)); - break; - - case SATELLITE_DELIVERY_SYSTEM_DESCRIPTOR: - descriptorVector.push_back(new SatelliteDeliverySystemDescriptor(buffer)); - break; - - case CABLE_DELIVERY_SYSTEM_DESCRIPTOR: - descriptorVector.push_back(new CableDeliverySystemDescriptor(buffer)); - break; - - case VBI_DATA_DESCRIPTOR: - descriptorVector.push_back(new VbiDataDescriptor(buffer)); - break; - - case VBI_TELETEXT_DESCRIPTOR: - descriptorVector.push_back(new VbiTeletextDescriptor(buffer)); - break; - - case BOUQUET_NAME_DESCRIPTOR: - descriptorVector.push_back(new BouquetNameDescriptor(buffer)); - break; - - case SERVICE_DESCRIPTOR: - descriptorVector.push_back(new ServiceDescriptor(buffer)); - break; - - case COUNTRY_AVAILABILITY_DESCRIPTOR: - descriptorVector.push_back(new CountryAvailabilityDescriptor(buffer)); - break; - - case LINKAGE_DESCRIPTOR: - descriptorVector.push_back(new LinkageDescriptor(buffer)); - break; - - case NVOD_REFERENCE_DESCRIPTOR: - descriptorVector.push_back(new NvodReferenceDescriptor(buffer)); - break; - - case TIME_SHIFTED_SERVICE_DESCRIPTOR: - descriptorVector.push_back(new TimeShiftedServiceDescriptor(buffer)); - break; - - case SHORT_EVENT_DESCRIPTOR: - descriptorVector.push_back(new ShortEventDescriptor(buffer)); - break; - - case EXTENDED_EVENT_DESCRIPTOR: - descriptorVector.push_back(new ExtendedEventDescriptor(buffer)); - break; - - case COMPONENT_DESCRIPTOR: - descriptorVector.push_back(new ComponentDescriptor(buffer)); - break; - - case MOSAIC_DESCRIPTOR: - descriptorVector.push_back(new MosaicDescriptor(buffer)); - break; - - case STREAM_IDENTIFIER_DESCRIPTOR: - descriptorVector.push_back(new StreamIdentifierDescriptor(buffer)); - break; - - case CA_IDENTIFIER_DESCRIPTOR: - descriptorVector.push_back(new CaIdentifierDescriptor(buffer)); - break; - - case CONTENT_DESCRIPTOR: - descriptorVector.push_back(new ContentDescriptor(buffer)); - break; - - case PARENTAL_RATING_DESCRIPTOR: - descriptorVector.push_back(new ParentalRatingDescriptor(buffer)); - break; - - case TELETEXT_DESCRIPTOR: - descriptorVector.push_back(new TeletextDescriptor(buffer)); - break; - - case TELEPHONE_DESCRIPTOR: - descriptorVector.push_back(new TelephoneDescriptor(buffer)); - break; - - case LOCAL_TIME_OFFSET_DESCRIPTOR: - descriptorVector.push_back(new LocalTimeOffsetDescriptor(buffer)); - break; - - case SUBTITLING_DESCRIPTOR: - descriptorVector.push_back(new SubtitlingDescriptor(buffer)); - break; - - case TERRESTRIAL_DELIVERY_SYSTEM_DESCRIPTOR: - descriptorVector.push_back(new TerrestrialDeliverySystemDescriptor(buffer)); - break; - - case MULTILINGUAL_NETWORK_NAME_DESCRIPTOR: - descriptorVector.push_back(new MultilingualNetworkNameDescriptor(buffer)); - break; - - case MULTILINGUAL_BOUQUET_NAME_DESCRIPTOR: - descriptorVector.push_back(new MultilingualBouquetNameDescriptor(buffer)); - break; - - case MULTILINGUAL_SERVICE_NAME_DESCRIPTOR: - descriptorVector.push_back(new MultilingualServiceNameDescriptor(buffer)); - break; - - case MULTILINGUAL_COMPONENT_DESCRIPTOR: - descriptorVector.push_back(new MultilingualComponentDescriptor(buffer)); - break; - - case PRIVATE_DATA_SPECIFIER_DESCRIPTOR: - descriptorVector.push_back(new PrivateDataSpecifierDescriptor(buffer)); - break; - - case SERVICE_MOVE_DESCRIPTOR: - descriptorVector.push_back(new ServiceMoveDescriptor(buffer)); - break; - - case FREQUENCY_LIST_DESCRIPTOR: - descriptorVector.push_back(new FrequencyListDescriptor(buffer)); - break; - - case DATA_BROADCAST_DESCRIPTOR: - descriptorVector.push_back(new DataBroadcastDescriptor(buffer)); - break; - - case CA_SYSTEM_DESCRIPTOR: - descriptorVector.push_back(new CaSystemDescriptor(buffer)); - break; - - case DATA_BROADCAST_ID_DESCRIPTOR: - descriptorVector.push_back(new DataBroadcastIdDescriptor(buffer)); - break; - - case PDC_DESCRIPTOR: - descriptorVector.push_back(new PdcDescriptor(buffer)); - break; - - case AC3_DESCRIPTOR: - descriptorVector.push_back(new Ac3Descriptor(buffer)); - break; - - case ANCILLARY_DATA_DESCRIPTOR: - descriptorVector.push_back(new AncillaryDataDescriptor(buffer)); - break; - - case CELL_LIST_DESCRIPTOR: - descriptorVector.push_back(new CellListDescriptor(buffer)); - break; - - case CELL_FREQUENCY_LINK_DESCRIPTOR: - descriptorVector.push_back(new CellFrequencyLinkDescriptor(buffer)); - break; - - case ANNOUNCEMENT_SUPPORT_DESCRIPTOR: - descriptorVector.push_back(new AnnouncementSupportDescriptor(buffer)); - break; - - case APPLICATION_SIGNALLING_DESCRIPTOR: - descriptorVector.push_back(new ApplicationSignallingDescriptor(buffer)); - break; - - default: - descriptorVector.push_back(new Descriptor(buffer)); - break; - } -} - -const DescriptorVector *DescriptorContainer::getDescriptors(void) const -{ - return &descriptorVector; -} - diff --git a/lib/dvb_si/container.h b/lib/dvb_si/container.h deleted file mode 100644 index 9d1d5e3a..00000000 --- a/lib/dvb_si/container.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * $Id: container.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_container_h__ -#define __dvb_descriptor_container_h__ - -#include "descriptor.h" - -class DescriptorContainer -{ - protected: - void descriptor(const uint8_t * const buffer); - DescriptorVector descriptorVector; - - public: - ~DescriptorContainer(void); - - const DescriptorVector *getDescriptors(void) const; -}; - -#endif /* __dvb_descriptor_container_h__ */ diff --git a/lib/dvb_si/content_descriptor.cpp b/lib/dvb_si/content_descriptor.cpp deleted file mode 100644 index b8996a4c..00000000 --- a/lib/dvb_si/content_descriptor.cpp +++ /dev/null @@ -1,68 +0,0 @@ -/* - * $Id: content_descriptor.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -ContentClassification::ContentClassification(const uint8_t * const buffer) -{ - contentNibbleLevel1 = (buffer[0] >> 4) & 0x0f; - contentNibbleLevel2 = buffer[0] & 0x0f; - userNibble1 = (buffer[1] >> 4) & 0x0f; - userNibble2 = buffer[1] & 0x0f; -} - -uint8_t ContentClassification::getContentNibbleLevel1(void) const -{ - return contentNibbleLevel1; -} - -uint8_t ContentClassification::getContentNibbleLevel2(void) const -{ - return contentNibbleLevel2; -} - -uint8_t ContentClassification::getUserNibble1(void) const -{ - return userNibble1; -} - -uint8_t ContentClassification::getUserNibble2(void) const -{ - return userNibble2; -} - -ContentDescriptor::ContentDescriptor(const uint8_t * const buffer) : Descriptor(buffer) -{ - for (uint16_t i = 0; i < descriptorLength; i += 2) - classifications.push_back(new ContentClassification(&buffer[i + 2])); -} - -ContentDescriptor::~ContentDescriptor(void) -{ - for (ContentClassificationVector::iterator i = classifications.begin(); i != classifications.end(); ++i) - delete *i; -} - -const ContentClassificationVector *ContentDescriptor::getClassifications(void) const -{ - return &classifications; -} - diff --git a/lib/dvb_si/content_descriptor.h b/lib/dvb_si/content_descriptor.h deleted file mode 100644 index 31f4e718..00000000 --- a/lib/dvb_si/content_descriptor.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * $Id: content_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_content_descriptor_h__ -#define __dvb_descriptor_content_descriptor_h__ - -#include "descriptor.h" - -class ContentClassification -{ - protected: - unsigned contentNibbleLevel1 : 4; - unsigned contentNibbleLevel2 : 4; - unsigned userNibble1 : 4; - unsigned userNibble2 : 4; - - public: - ContentClassification(const uint8_t * const buffer); - - uint8_t getContentNibbleLevel1(void) const; - uint8_t getContentNibbleLevel2(void) const; - uint8_t getUserNibble1(void) const; - uint8_t getUserNibble2(void) const; -}; - -typedef std::vector ContentClassificationVector; -typedef ContentClassificationVector::iterator ContentClassificationIterator; -typedef ContentClassificationVector::const_iterator ContentClassificationConstIterator; - -class ContentDescriptor : public Descriptor -{ - protected: - ContentClassificationVector classifications; - - public: - ContentDescriptor(const uint8_t * const buffer); - ~ContentDescriptor(void); - - const ContentClassificationVector *getClassifications(void) const; -}; - -#endif /* __dvb_descriptor_content_descriptor_h__ */ diff --git a/lib/dvb_si/copyright_descriptor.h b/lib/dvb_si/copyright_descriptor.h deleted file mode 100644 index 89d0c283..00000000 --- a/lib/dvb_si/copyright_descriptor.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * $Id: copyright_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_copyright_descriptor_h__ -#define __dvb_descriptor_copyright_descriptor_h__ - -#include "descriptor.h" - -typedef std::vector AdditionalCopyrightInfoVector; -typedef AdditionalCopyrightInfoVector::iterator AdditionalCopyrightInfoIterator; -typedef AdditionalCopyrightInfoVector::const_iterator AdditionalCopyrightInfoConstIterator; - -class CopyrightDescriptor : public Descriptor -{ - protected: - unsigned copyrightIdentifier : 32; - AdditionalCopyrightInfoVector additionalCopyrightInfo; - - public: - CopyrightDescriptor(const uint8_t * const buffer); - - uint32_t getCopyrightIdentifier(void) const; - const AdditionalCopyrightInfoVector *getAdditionalCopyrightInfo(void) const; -}; - -#endif /* __dvb_descriptor_copyright_descriptor_h__ */ diff --git a/lib/dvb_si/country_availability_descriptor.cpp b/lib/dvb_si/country_availability_descriptor.cpp deleted file mode 100644 index 7aa37ff9..00000000 --- a/lib/dvb_si/country_availability_descriptor.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/* - * $Id: country_availability_descriptor.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -CountryAvailabilityDescriptor::CountryAvailabilityDescriptor(const uint8_t * const buffer) : Descriptor(buffer) -{ - std::string countryCode; - countryAvailabilityFlag = (buffer[2] >> 7) & 0x01; - - if (descriptorLength < 1) - return; - - for (uint16_t i = 0; i < descriptorLength - 1; i += 3) { - countryCode.assign((char *)&buffer[i + 3], 3); - countryCodes.push_back(countryCode); - } -} - -uint8_t CountryAvailabilityDescriptor::getCountryAvailabilityFlag(void) const -{ - return countryAvailabilityFlag; -} - -const CountryCodeVector *CountryAvailabilityDescriptor::getCountryCodes(void) const -{ - return &countryCodes; -} - diff --git a/lib/dvb_si/country_availability_descriptor.h b/lib/dvb_si/country_availability_descriptor.h deleted file mode 100644 index baa0b845..00000000 --- a/lib/dvb_si/country_availability_descriptor.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * $Id: country_availability_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_country_availability_descriptor_h__ -#define __dvb_descriptor_country_availability_descriptor_h__ - -#include "descriptor.h" - -typedef std::vector CountryCodeVector; -typedef CountryCodeVector::iterator CountryCodeIterator; -typedef CountryCodeVector::const_iterator CountryCodeConstIterator; - -class CountryAvailabilityDescriptor : public Descriptor -{ - protected: - unsigned countryAvailabilityFlag : 1; - unsigned reserved : 7; - CountryCodeVector countryCodes; - - public: - CountryAvailabilityDescriptor(const uint8_t * const buffer); - - uint8_t getCountryAvailabilityFlag(void) const; - const CountryCodeVector *getCountryCodes(void) const; -}; - -#endif /* __dvb_descriptor_country_availability_descriptor_h__ */ diff --git a/lib/dvb_si/data_broadcast_descriptor.cpp b/lib/dvb_si/data_broadcast_descriptor.cpp deleted file mode 100644 index b5f8b2aa..00000000 --- a/lib/dvb_si/data_broadcast_descriptor.cpp +++ /dev/null @@ -1,62 +0,0 @@ -/* - * $Id: data_broadcast_descriptor.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -DataBroadcastDescriptor::DataBroadcastDescriptor(const uint8_t * const buffer) : Descriptor(buffer) -{ - dataBroadcastId = (buffer[2] << 8) | buffer[3]; - componentTag = buffer[3]; - selectorLength = buffer[4]; - - for (uint16_t i = 0; i < selectorLength; ++i) - selectorBytes.push_back(buffer[i + 5]); - - iso639LanguageCode.assign((char *)&buffer[selectorLength + 5], 3); - textLength = buffer[selectorLength + 8]; - text.assign((char *)&buffer[selectorLength + 9], textLength); -} - -uint16_t DataBroadcastDescriptor::getDataBroadcastId(void) const -{ - return dataBroadcastId; -} - -uint8_t DataBroadcastDescriptor::getComponentTag(void) const -{ - return componentTag; -} - -const selectorByteVector *DataBroadcastDescriptor::getSelectorBytes(void) const -{ - return &selectorBytes; -} - -std::string DataBroadcastDescriptor::getIso639LanguageCode(void) const -{ - return iso639LanguageCode; -} - -std::string DataBroadcastDescriptor::getText(void) const -{ - return text; -} - diff --git a/lib/dvb_si/data_broadcast_descriptor.h b/lib/dvb_si/data_broadcast_descriptor.h deleted file mode 100644 index aa5bb5d2..00000000 --- a/lib/dvb_si/data_broadcast_descriptor.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * $Id: data_broadcast_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_data_broadcast_descriptor_h__ -#define __dvb_descriptor_data_broadcast_descriptor_h__ - -#include "descriptor.h" - -typedef std::vector selectorByteVector; -typedef selectorByteVector::iterator selectorByteIterator; -typedef selectorByteVector::const_iterator selectorByteConstIterator; - -class DataBroadcastDescriptor : public Descriptor -{ - protected: - unsigned dataBroadcastId : 16; - unsigned componentTag : 8; - unsigned selectorLength : 8; - selectorByteVector selectorBytes; - std::string iso639LanguageCode; - unsigned textLength : 8; - std::string text; - - public: - DataBroadcastDescriptor(const uint8_t * const buffer); - - uint16_t getDataBroadcastId(void) const; - uint8_t getComponentTag(void) const; - const selectorByteVector *getSelectorBytes(void) const; - std::string getIso639LanguageCode(void) const; - std::string getText(void) const; -}; - -#endif /* __dvb_descriptor_data_broadcast_descriptor_h__ */ diff --git a/lib/dvb_si/data_broadcast_id_descriptor.cpp b/lib/dvb_si/data_broadcast_id_descriptor.cpp deleted file mode 100644 index 2e058c4a..00000000 --- a/lib/dvb_si/data_broadcast_id_descriptor.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* - * $Id: data_broadcast_id_descriptor.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -DataBroadcastIdDescriptor::DataBroadcastIdDescriptor(const uint8_t * const buffer) : Descriptor(buffer) -{ - if (descriptorLength < 2) - return; - - dataBroadcastId = (buffer[2] << 8) | buffer[3]; - - for (uint16_t i = 0; i < descriptorLength - 2; ++i) - idSelectorBytes.push_back(buffer[i + 4]); -} - -uint16_t DataBroadcastIdDescriptor::getDataBroadcastId(void) const -{ - return dataBroadcastId; -} - -const IdSelectorByteVector *DataBroadcastIdDescriptor::getIdSelectorBytes(void) const -{ - return &idSelectorBytes; -} - diff --git a/lib/dvb_si/data_broadcast_id_descriptor.h b/lib/dvb_si/data_broadcast_id_descriptor.h deleted file mode 100644 index a933c6ee..00000000 --- a/lib/dvb_si/data_broadcast_id_descriptor.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * $Id: data_broadcast_id_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_data_broadcast_id_descriptor_h__ -#define __dvb_descriptor_data_broadcast_id_descriptor_h__ - -#include "descriptor.h" - -typedef std::vector IdSelectorByteVector; -typedef IdSelectorByteVector::iterator IdSelectorByteIterator; -typedef IdSelectorByteVector::const_iterator IdSelectorByteConstIterator; - -class DataBroadcastIdDescriptor : public Descriptor -{ - protected: - unsigned dataBroadcastId : 16; - IdSelectorByteVector idSelectorBytes; - - public: - DataBroadcastIdDescriptor(const uint8_t * const buffer); - - uint16_t getDataBroadcastId(void) const; - const IdSelectorByteVector *getIdSelectorBytes(void) const; -}; - -#endif /* __dvb_descriptor_data_broadcast_id_descriptor_h__ */ diff --git a/lib/dvb_si/data_stream_alignment_descriptor.h b/lib/dvb_si/data_stream_alignment_descriptor.h deleted file mode 100644 index 988cb6dc..00000000 --- a/lib/dvb_si/data_stream_alignment_descriptor.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * $Id: data_stream_alignment_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_data_stream_alignment_descriptor_h__ -#define __dvb_descriptor_data_stream_alignment_descriptor_h__ - -#include "descriptor.h" - -class DataStreamAlignmentDescriptor : public Descriptor -{ - protected: - unsigned alignmentType : 8; - - private: - DataStreamAlignmentDescriptor(const uint8_t * const buffer); - - uint8_t getAlignmentType(void) const; -}; - -#endif /* __dvb_descriptor_data_stream_alignment_descriptor_h__ */ diff --git a/lib/dvb_si/descriptor.cpp b/lib/dvb_si/descriptor.cpp deleted file mode 100644 index f81ed9a1..00000000 --- a/lib/dvb_si/descriptor.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/* - * $Id: descriptor.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -Descriptor::Descriptor(const uint8_t * const buffer) -{ - descriptorTag = buffer[0]; - descriptorLength = buffer[1]; -} - -uint8_t Descriptor::getTag(void) const -{ - return descriptorTag; -} - -uint8_t Descriptor::getLength(void) const -{ - return descriptorLength; -} - diff --git a/lib/dvb_si/descriptor.h b/lib/dvb_si/descriptor.h deleted file mode 100644 index 3572cce6..00000000 --- a/lib/dvb_si/descriptor.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * $Id: descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_descriptor_h__ -#define __dvb_descriptor_descriptor_h__ - -#include -#include -#include - -class Descriptor -{ - protected: - unsigned descriptorTag : 8; - unsigned descriptorLength : 8; - - public: - Descriptor(const uint8_t * const buffer); - - uint8_t getTag(void) const; - uint8_t getLength(void) const; -}; - -typedef std::vector DescriptorVector; -typedef DescriptorVector::iterator DescriptorIterator; -typedef DescriptorVector::const_iterator DescriptorConstIterator; - -#endif /* __dvb_descriptor_descriptor_h__ */ diff --git a/lib/dvb_si/descriptor_tag.h b/lib/dvb_si/descriptor_tag.h deleted file mode 100644 index c3f83272..00000000 --- a/lib/dvb_si/descriptor_tag.h +++ /dev/null @@ -1,127 +0,0 @@ -/* - * $Id: descriptor_tag.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_id_descriptor_tag_h__ -#define __dvb_id_descriptor_tag_h__ - -enum DescriptorTag { - /* 0x00 - 0x3F: ITU-T Rec. H.222.0 | ISO/IEC 13818-1 */ - VIDEO_STREAM_DESCRIPTOR = 0x02, - AUDIO_STREAM_DESCRIPTOR = 0x03, - HIERARCHY_DESCRIPTOR = 0x04, - REGISTRATION_DESCRIPTOR = 0x05, - DATA_STREAM_ALIGNMENT_DESCRIPTOR = 0x06, - TARGET_BACKGROUND_GRID_DESCRIPTOR = 0x07, - VIDEO_WINDOW_DESCRIPTOR = 0x08, - CA_DESCRIPTOR = 0x09, - ISO_639_LANGUAGE_DESCRIPTOR = 0x0A, - SYSTEM_CLOCK_DESCRIPTOR = 0x0B, - MULTIPLEX_BUFFER_UTILIZATION_DESCRIPTOR = 0x0C, - COPYRIGHT_DESCRIPTOR = 0x0D, - MAXIMUM_BITRATE_DESCRIPTOR = 0x0E, - PRIVATE_DATA_INDICATOR_DESCRIPTOR = 0x0F, - SMOOTHING_BUFFER_DESCRIPTOR = 0x10, - STD_DESCRIPTOR = 0x11, - IBP_DESCRIPTOR = 0x12, - CAROUSEL_IDENTIFIER_DESCRIPTOR = 0x13, - /* 0x40 - 0x7F: ETSI EN 300 468 V1.5.1 (2003-01) */ - NETWORK_NAME_DESCRIPTOR = 0x40, - SERVICE_LIST_DESCRIPTOR = 0x41, - STUFFING_DESCRIPTOR = 0x42, - SATELLITE_DELIVERY_SYSTEM_DESCRIPTOR = 0x43, - CABLE_DELIVERY_SYSTEM_DESCRIPTOR = 0x44, - VBI_DATA_DESCRIPTOR = 0x45, - VBI_TELETEXT_DESCRIPTOR = 0x46, - BOUQUET_NAME_DESCRIPTOR = 0x47, - SERVICE_DESCRIPTOR = 0x48, - COUNTRY_AVAILABILITY_DESCRIPTOR = 0x49, - LINKAGE_DESCRIPTOR = 0x4A, - NVOD_REFERENCE_DESCRIPTOR = 0x4B, - TIME_SHIFTED_SERVICE_DESCRIPTOR = 0x4C, - SHORT_EVENT_DESCRIPTOR = 0x4D, - EXTENDED_EVENT_DESCRIPTOR = 0x4E, - TIME_SHIFTED_EVENT_DESCRIPTOR = 0x4F, - COMPONENT_DESCRIPTOR = 0x50, - MOSAIC_DESCRIPTOR = 0x51, - STREAM_IDENTIFIER_DESCRIPTOR = 0x52, - CA_IDENTIFIER_DESCRIPTOR = 0x53, - CONTENT_DESCRIPTOR = 0x54, - PARENTAL_RATING_DESCRIPTOR = 0x55, - TELETEXT_DESCRIPTOR = 0x56, - TELEPHONE_DESCRIPTOR = 0x57, - LOCAL_TIME_OFFSET_DESCRIPTOR = 0x58, - SUBTITLING_DESCRIPTOR = 0x59, - TERRESTRIAL_DELIVERY_SYSTEM_DESCRIPTOR = 0x5A, - MULTILINGUAL_NETWORK_NAME_DESCRIPTOR = 0x5B, - MULTILINGUAL_BOUQUET_NAME_DESCRIPTOR = 0x5C, - MULTILINGUAL_SERVICE_NAME_DESCRIPTOR = 0x5D, - MULTILINGUAL_COMPONENT_DESCRIPTOR = 0x5E, - PRIVATE_DATA_SPECIFIER_DESCRIPTOR = 0x5F, - SERVICE_MOVE_DESCRIPTOR = 0x60, - SHORT_SMOOTHING_BUFFER_DESCRIPTOR = 0x61, - FREQUENCY_LIST_DESCRIPTOR = 0x62, - PARTIAL_TRANSPORT_STREAM_DESCRIPTOR = 0x63, - DATA_BROADCAST_DESCRIPTOR = 0x64, - CA_SYSTEM_DESCRIPTOR = 0x65, - DATA_BROADCAST_ID_DESCRIPTOR = 0x66, - TRANSPORT_STREAM_DESCRIPTOR = 0x67, - DSNG_DESCRIPTOR = 0x68, - PDC_DESCRIPTOR = 0x69, - AC3_DESCRIPTOR = 0x6A, - ANCILLARY_DATA_DESCRIPTOR = 0x6B, - CELL_LIST_DESCRIPTOR = 0x6C, - CELL_FREQUENCY_LINK_DESCRIPTOR = 0x6D, - ANNOUNCEMENT_SUPPORT_DESCRIPTOR = 0x6E, - APPLICATION_SIGNALLING_DESCRIPTOR = 0x6F, - ADAPTATION_FIELD_DATA_DESCRIPTOR = 0x70, - SERVICE_IDENTIFIER_DESCRIPTOR = 0x71, - SERVICE_AVAILABILITY_DESCRIPTOR = 0x72, - /* 0x80 - 0xFE: user defined */ - VIASAT_LOGIC_CHANNEL_DESCRIPTOR = 0x82, - NORDIG_LOGIC_CHANNEL_DESCRIPTOR = 0x83, - EACEM_LOGIC_CHANNEL_DESCRIPTOR = 0x83, - EACEM_PREFERRED_NAME_LIST_DESCRIPTOR = 0x84, - EACEM_PREFERRED_NAME_IDENTIFIER_DESCRIPTOR = 0x85, - EACEM_STREAM_IDENTIFIER_DESCRIPTOR = 0x86, - SENDA_CHANNEL_LIST_DESCRIPTOR = 0xF1, - /* 0xFF: Forbidden */ - FORBIDDEN_DESCRIPTOR = 0xFF -}; - -enum MhpDescriptorTag { - /* ETSI TS 101 812 V1.2.1 (2002-06) */ - APPLICATION_DESCRIPTOR = 0x00, - APPLICATION_NAME_DESCRIPTOR = 0x01, - TRANSPORT_PROTOCOL_DESCRIPTOR = 0x02, - DVB_J_APPLICATION_DESCRIPTOR = 0x03, - DVB_J_APPLICATION_LOCATION_DESCRIPTOR = 0x04, - EXTERNAL_APPLICATION_AUTHORISATION_DESCRIPTOR = 0x05, - ROUTING_DESCRIPTOR_IP4 = 0x06, - ROUTING_DESCRIPTOR_IP6 = 0x07, - DVB_HTML_APPLICATION_DESCRIPTOR = 0x08, - DVB_HTML_APPLICATION_LOCATION_DESCRIPTOR = 0x09, - DVB_HTML_APPLICATION_BOUNDARY_DESCRIPTOR = 0x0A, - APPLICATION_ICONS_DESCRIPTOR = 0x0B, - PREFETCH_DESCRIPTOR = 0x0C, - DII_LOCATION_DESCRIPTOR = 0x0D, -}; - -#endif /* __dvb_id_descriptor_tag_h__ */ diff --git a/lib/dvb_si/dsng_descriptor.h b/lib/dvb_si/dsng_descriptor.h deleted file mode 100644 index f12d554a..00000000 --- a/lib/dvb_si/dsng_descriptor.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * $Id: dsng_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_dsng_descriptor_h__ -#define __dvb_descriptor_dsng_descriptor_h__ - -#include "descriptor.h" - -typedef std::vector ByteVector; -typedef ByteVector::iterator ByteIterator; -typedef ByteVector::const_iterator ByteConstIterator; - -class DsngDescriptor : public Descriptor -{ - protected: - ByteVector bytes; - - public: - DsngDescriptor(const uint8_t * const buffer); - - const ByteVector *getBytes(void) const; -}; - -#endif /* __dvb_descriptor_dsng_descriptor_h__ */ diff --git a/lib/dvb_si/eit.cpp b/lib/dvb_si/eit.cpp deleted file mode 100644 index cf7c02b4..00000000 --- a/lib/dvb_si/eit.cpp +++ /dev/null @@ -1,109 +0,0 @@ -/* - * $Id: eit.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -Event::Event(const uint8_t * const buffer) -{ - eventId = (buffer[0] << 8) | buffer[1]; - startTimeMjd = (buffer[2] << 8) | buffer[3]; - startTimeBcd = (buffer[4] << 16) | (buffer[5] << 8) | buffer[6]; - duration = (buffer[7] << 16) | (buffer[8] << 8) | buffer[9]; - runningStatus = (buffer[10] >> 5) & 0x07; - freeCaMode = (buffer[10] >> 4) & 0x01; - descriptorsLoopLength = ((buffer[10] & 0x0f) << 8) | buffer[11]; - - for (uint16_t i = 12; i < descriptorsLoopLength + 12; i += buffer[i + 1] + 2) - descriptor(&buffer[i]); -} - -uint16_t Event::getEventId(void) const -{ - return eventId; -} - -uint16_t Event::getStartTimeMjd(void) const -{ - return startTimeMjd; -} - -uint32_t Event::getStartTimeBcd(void) const -{ - return startTimeBcd; -} - -uint32_t Event::getDuration(void) const -{ - return duration; -} - -uint8_t Event::getRunningStatus(void) const -{ - return runningStatus; -} - -uint8_t Event::getFreeCaMode(void) const -{ - return freeCaMode; -} - -EventInformationTable::EventInformationTable(const uint8_t * const buffer) : LongCrcTable(buffer) -{ - transportStreamId = (buffer[8] << 8) | buffer[9]; - originalNetworkId = (buffer[10] << 8) | buffer[11]; - segmentLastSectionNumber = buffer[12]; - lastTableId = buffer[13]; - - for (uint16_t i = 14; i < sectionLength - 1; i += (((buffer[i + 10] & 0x0f) << 8) | buffer[i + 11]) + 12) - events.push_back(new Event(&buffer[i])); -} - -EventInformationTable::~EventInformationTable(void) -{ - for (EventIterator i = events.begin(); i != events.end(); ++i) - delete *i; -} - -uint16_t EventInformationTable::getTransportStreamId(void) const -{ - return transportStreamId; -} - -uint16_t EventInformationTable::getOriginalNetworkId(void) const -{ - return originalNetworkId; -} - -uint8_t EventInformationTable::getLastSectionNumber(void) const -{ - return lastSectionNumber; -} - -uint8_t EventInformationTable::getLastTableId(void) const -{ - return lastTableId; -} - -const EventVector *EventInformationTable::getEvents(void) const -{ - return &events; -} - diff --git a/lib/dvb_si/eit.h b/lib/dvb_si/eit.h deleted file mode 100644 index 1b278ca3..00000000 --- a/lib/dvb_si/eit.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - * $Id: eit.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_table_eit_h__ -#define __dvb_table_eit_h__ - -#include -#include "long_crc_table.h" - -class Event : public DescriptorContainer -{ - protected: - unsigned eventId : 16; - unsigned startTimeMjd : 16; - unsigned startTimeBcd : 24; - unsigned duration : 24; - unsigned runningStatus : 3; - unsigned freeCaMode : 1; - unsigned descriptorsLoopLength : 12; - - public: - Event(const uint8_t * const buffer); - - uint16_t getEventId(void) const; - uint16_t getStartTimeMjd(void) const; - uint32_t getStartTimeBcd(void) const; - uint32_t getDuration(void) const; - uint8_t getRunningStatus(void) const; - uint8_t getFreeCaMode(void) const; -}; - -typedef std::vector EventVector; -typedef EventVector::iterator EventIterator; -typedef EventVector::const_iterator EventConstIterator; - -class EventInformationTable : public LongCrcTable -{ - protected: - unsigned transportStreamId : 16; - unsigned originalNetworkId : 16; - unsigned segmentLastSectionNumber : 8; - unsigned lastTableId : 8; - EventVector events; - - public: - EventInformationTable(const uint8_t * const buffer); - ~EventInformationTable(void); - - static const uint16_t LENGTH = 4096; - static const enum PacketId PID = PID_EIT; - static const enum TableId TID = TID_EIT_ACTUAL; - static const uint32_t TIMEOUT = 3000; - - uint16_t getTransportStreamId(void) const; - uint16_t getOriginalNetworkId(void) const; - uint8_t getLastSectionNumber(void) const; - uint8_t getLastTableId(void) const; - const EventVector *getEvents(void) const; -}; - -typedef std::vector EventInformationTableVector; -typedef EventInformationTableVector::iterator EventInformationTableIterator; -typedef EventInformationTableVector::const_iterator EventInformationTableConstIterator; - -#endif /* __dvb_table_eit_h__ */ diff --git a/lib/dvb_si/element_descriptor.h b/lib/dvb_si/element_descriptor.h deleted file mode 100644 index 3587569e..00000000 --- a/lib/dvb_si/element_descriptor.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * $Id: element_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_element_descriptor_h__ -#define __dvb_descriptor_element_descriptor_h__ - -#include "descriptor.h" - -/* 0x92 */ -class ElementDescriptor : public Descriptor -{ - public: - ElementDescriptor(const uint8_t * const buffer); -}; - -#endif /* __dvb_descriptor_element_descriptor_h__ */ diff --git a/lib/dvb_si/extended_event_descriptor.cpp b/lib/dvb_si/extended_event_descriptor.cpp deleted file mode 100644 index 11b639ad..00000000 --- a/lib/dvb_si/extended_event_descriptor.cpp +++ /dev/null @@ -1,90 +0,0 @@ -/* - * $Id: extended_event_descriptor.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -ExtendedEvent::ExtendedEvent(const uint8_t * const buffer) -{ - itemDescriptionLength = buffer[0]; - itemDescription.assign((char *)&buffer[1], itemDescriptionLength); - itemLength = buffer[itemDescriptionLength + 1]; - item.assign((char *)&buffer[itemDescriptionLength + 2], itemLength); -} - -std::string ExtendedEvent::getItemDescription(void) const -{ - return itemDescription; -} - -std::string ExtendedEvent::getItem(void) const -{ - return item; -} - -ExtendedEventDescriptor::ExtendedEventDescriptor(const uint8_t * const buffer) : Descriptor(buffer) -{ - descriptorNumber = (buffer[2] >> 4) & 0x0f; - lastDescriptorNumber = buffer[2] & 0x0f; - iso639LanguageCode.assign((char *)&buffer[3], 3); - lengthOfItems = buffer[6]; - - ExtendedEvent *e; - - for (uint16_t i = 0; i < lengthOfItems; i += e->itemDescriptionLength + e->itemLength + 2) { - e = new ExtendedEvent(&buffer[i + 7]); - items.push_back(e); - } - - textLength = buffer[lengthOfItems + 7]; - text.assign((char *)&buffer[lengthOfItems + 8], textLength); -} - -ExtendedEventDescriptor::~ExtendedEventDescriptor(void) -{ - for (ExtendedEventIterator i = items.begin(); i != items.end(); ++i) - delete *i; -} - -uint8_t ExtendedEventDescriptor::getDescriptorNumber(void) const -{ - return descriptorNumber; -} - -uint8_t ExtendedEventDescriptor::getLastDescriptorNumber(void) const -{ - return lastDescriptorNumber; -} - -std::string ExtendedEventDescriptor::getIso639LanguageCode(void) const -{ - return iso639LanguageCode; -} - -const ExtendedEventVector *ExtendedEventDescriptor::getItems(void) const -{ - return &items; -} - -std::string ExtendedEventDescriptor::getText(void) const -{ - return text; -} - diff --git a/lib/dvb_si/extended_event_descriptor.h b/lib/dvb_si/extended_event_descriptor.h deleted file mode 100644 index 9b170d07..00000000 --- a/lib/dvb_si/extended_event_descriptor.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * $Id: extended_event_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_extended_event_descriptor_h__ -#define __dvb_descriptor_extended_event_descriptor_h__ - -#include "descriptor.h" - -class ExtendedEvent -{ - protected: - unsigned itemDescriptionLength : 8; - std::string itemDescription; - unsigned itemLength : 8; - std::string item; - - public: - ExtendedEvent(const uint8_t * const buffer); - - std::string getItemDescription(void) const; - std::string getItem(void) const; - - friend class ExtendedEventDescriptor; -}; - -typedef std::vector ExtendedEventVector; -typedef ExtendedEventVector::iterator ExtendedEventIterator; -typedef ExtendedEventVector::const_iterator ExtendedEventConstIterator; - -class ExtendedEventDescriptor : public Descriptor -{ - protected: - unsigned descriptorNumber : 4; - unsigned lastDescriptorNumber : 4; - std::string iso639LanguageCode; - unsigned lengthOfItems : 8; - ExtendedEventVector items; - unsigned textLength : 8; - std::string text; - - public: - ExtendedEventDescriptor(const uint8_t * const buffer); - ~ExtendedEventDescriptor(void); - - uint8_t getDescriptorNumber(void) const; - uint8_t getLastDescriptorNumber(void) const; - std::string getIso639LanguageCode(void) const; - const ExtendedEventVector *getItems(void) const; - std::string getText(void) const; -}; - -#endif /* __dvb_descriptor_extended_event_descriptor_h__ */ diff --git a/lib/dvb_si/frequency_list_descriptor.cpp b/lib/dvb_si/frequency_list_descriptor.cpp deleted file mode 100644 index fe6ea32e..00000000 --- a/lib/dvb_si/frequency_list_descriptor.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* - * $Id: frequency_list_descriptor.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -FrequencyListDescriptor::FrequencyListDescriptor(const uint8_t * const buffer) : Descriptor(buffer) -{ - if (descriptorLength < 1) - return; - reserved = (buffer[2] >> 2) & 0x3f; - codingType = buffer[2] & 0x03; - - for (uint16_t i = 0; i < descriptorLength - 1; i += 4) - centreFrequencies.push_back((buffer[i + 3] << 24) | (buffer[i + 4] << 16) | (buffer[i + 5] << 8) | buffer[i + 6]); -} - -uint8_t FrequencyListDescriptor::getCodingType(void) const -{ - return codingType; -} - -const CentreFrequencyVector *FrequencyListDescriptor::getCentreFrequencies(void) const -{ - return ¢reFrequencies; -} - diff --git a/lib/dvb_si/frequency_list_descriptor.h b/lib/dvb_si/frequency_list_descriptor.h deleted file mode 100644 index 83fdf925..00000000 --- a/lib/dvb_si/frequency_list_descriptor.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * $Id: frequency_list_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_frequency_list_descriptor_h__ -#define __dvb_descriptor_frequency_list_descriptor_h__ - -#include "descriptor.h" - -typedef std::vector CentreFrequencyVector; -typedef CentreFrequencyVector::iterator CentreFrequencyIterator; -typedef CentreFrequencyVector::const_iterator CentreFrequencyConstIterator; - -class FrequencyListDescriptor : public Descriptor -{ - protected: - unsigned reserved : 6; - unsigned codingType : 2; - CentreFrequencyVector centreFrequencies; - - public: - FrequencyListDescriptor(const uint8_t * const buffer); - - uint8_t getCodingType(void) const; - const CentreFrequencyVector *getCentreFrequencies(void) const; -}; - -#endif /* __dvb_descriptor_frequency_list_descriptor_h__ */ diff --git a/lib/dvb_si/group_descriptor.h b/lib/dvb_si/group_descriptor.h deleted file mode 100644 index fd3292d3..00000000 --- a/lib/dvb_si/group_descriptor.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * $Id: group_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_group_descriptor_h__ -#define __dvb_descriptor_group_descriptor_h__ - -#include "descriptor.h" - -/* 0x91 */ -class GroupDescriptor : public Descriptor -{ - public: - GroupDescriptor(const uint8_t * const buffer); -}; - -#endif /* __dvb_descriptor_group_descriptor_h__ */ diff --git a/lib/dvb_si/hierarchy_descriptor.h b/lib/dvb_si/hierarchy_descriptor.h deleted file mode 100644 index 3c990fc1..00000000 --- a/lib/dvb_si/hierarchy_descriptor.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * $Id: hierarchy_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_hierarchy_descriptor_h__ -#define __dvb_descriptor_hierarchy_descriptor_h__ - -#include "descriptor.h" - -class HierarchyDescriptor : public Descriptor -{ - protected: - unsigned reserved : 4; - unsigned hierarchyType : 4; - unsigned reserved2 : 2; - unsigned hierarchyLayerIndex : 6; - unsigned reserved3 : 2; - unsigned hierarchyEmbeddedLayerIndex : 6; - unsigned reserved4 : 2; - unsigned hierarchyChannel : 6; - - private: - HierarchyDescriptor(const uint8_t * const buffer); - - uint8_t getHierarchyType(void) const; - uint8_t getHierarchyLayerIndex(void) const; - uint8_t getHierarchyEmbeddedLayerIndex(void) const; - uint8_t getHierarchyChannel(void) const; -}; - -#endif /* __dvb_descriptor_hierarchy_descriptor_h__ */ diff --git a/lib/dvb_si/ibp_descriptor.h b/lib/dvb_si/ibp_descriptor.h deleted file mode 100644 index d601fe42..00000000 --- a/lib/dvb_si/ibp_descriptor.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * $Id: ibp_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_ibp_descriptor_h__ -#define __dvb_descriptor_ibp_descriptor_h__ - -#include "descriptor.h" - -class IbpDescriptor : public Descriptor -{ - protected: - unsigned closedGopFlag : 1; - unsigned identicalGopFlag : 1; - unsigned maxGopLength : 14; - - public: - IbpDescriptor(const uint8_t * const buffer); - - uint8_t getClosedGopFlag(void) const; - uint8_t getIdenticalGopFlag(void) const; - uint16_t getMaxGopLength(void) const; -}; - -#endif /* __dvb_descriptor_ibp_descriptor_h__ */ diff --git a/lib/dvb_si/ippv_booking_descriptor.h b/lib/dvb_si/ippv_booking_descriptor.h deleted file mode 100644 index 950bb452..00000000 --- a/lib/dvb_si/ippv_booking_descriptor.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * $Id: ippv_booking_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_ippv_booking_descriptor_h__ -#define __dvb_descriptor_ippv_booking_descriptor_h__ - -#include "descriptor.h" - -/* 0x81 */ -class IppvBookingDescriptor : public Descriptor -{ - public: - IppvBookingDescriptor(const uint8_t * const buffer); -}; - -#endif /* __dvb_descriptor_ippv_booking_descriptor_h__ */ diff --git a/lib/dvb_si/ippv_descriptor.h b/lib/dvb_si/ippv_descriptor.h deleted file mode 100644 index 967c9b59..00000000 --- a/lib/dvb_si/ippv_descriptor.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * $Id: ippv_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_ippv_descriptor_h__ -#define __dvb_descriptor_ippv_descriptor_h__ - -#include "descriptor.h" - -/* 0xF0 */ -class CurrencyEntry -{ - public: - CurrencyEntry(const uint8_t * const buffer); -}; - -class CountryEntry -{ - protected: - unsigned country : 24; - unsigned unknown : 5; - unsigned currencyAndCostDetail : 3; - // if (currencyAndCostDetail & 1) - unsigned bcdCost : 32; - unsigned length : 8; - std::vector currency; - - public: - CountryEntry(const uint8_t * const buffer); -}; - -class IppvDescriptor : public Descriptor -{ - protected: - unsigned unknown1 : 16; - unsigned unknown2 : 16; - unsigned unknown3 : 16; - unsigned IppvEventId : 16; - std::vector country; - - private: - IppvDescriptor(const uint8_t * const buffer); -}; - -#endif /* __dvb_descriptor_ippv_descriptor_h__ */ diff --git a/lib/dvb_si/iso639_language_descriptor.cpp b/lib/dvb_si/iso639_language_descriptor.cpp deleted file mode 100644 index 26ca1e0f..00000000 --- a/lib/dvb_si/iso639_language_descriptor.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* - * $Id: iso639_language_descriptor.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -Iso639Language::Iso639Language(const uint8_t * const buffer) -{ - iso639LanguageCode.assign((char *)&buffer[0], 3); - audioType = buffer[3]; -} - -std::string Iso639Language::getIso639LanguageCode(void) const -{ - return iso639LanguageCode; -} - -uint8_t Iso639Language::getAudioType(void) const -{ - return audioType; -} - -Iso639LanguageDescriptor::Iso639LanguageDescriptor(const uint8_t * const buffer) : Descriptor(buffer) -{ - for (uint16_t i = 0; i < descriptorLength; i += 4) - iso639Languages.push_back(new Iso639Language(&buffer[i + 2])); -} - -Iso639LanguageDescriptor::~Iso639LanguageDescriptor(void) -{ - for (Iso639LanguageIterator i = iso639Languages.begin(); i != iso639Languages.end(); ++i) - delete *i; -} - -const Iso639LanguageVector *Iso639LanguageDescriptor::getIso639Languages(void) const -{ - return &iso639Languages; -} - diff --git a/lib/dvb_si/iso639_language_descriptor.h b/lib/dvb_si/iso639_language_descriptor.h deleted file mode 100644 index 89836397..00000000 --- a/lib/dvb_si/iso639_language_descriptor.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * $Id: iso639_language_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_iso639_language_descriptor_h__ -#define __dvb_descriptor_iso639_language_descriptor_h__ - -#include "descriptor.h" - -class Iso639Language -{ - protected: - std::string iso639LanguageCode; - unsigned audioType : 8; - - public: - Iso639Language(const uint8_t * const buffer); - - std::string getIso639LanguageCode(void) const; - uint8_t getAudioType(void) const; -}; - -typedef std::vector Iso639LanguageVector; -typedef Iso639LanguageVector::iterator Iso639LanguageIterator; -typedef Iso639LanguageVector::const_iterator Iso639LanguageConstIterator; - -class Iso639LanguageDescriptor : public Descriptor -{ - protected: - Iso639LanguageVector iso639Languages; - - public: - Iso639LanguageDescriptor(const uint8_t * const buffer); - ~Iso639LanguageDescriptor(void); - - const Iso639LanguageVector *getIso639Languages(void) const; -}; - -#endif /* __dvb_descriptor_iso639_language_descriptor_h__ */ diff --git a/lib/dvb_si/linkage_descriptor.cpp b/lib/dvb_si/linkage_descriptor.cpp deleted file mode 100644 index 77b991e1..00000000 --- a/lib/dvb_si/linkage_descriptor.cpp +++ /dev/null @@ -1,107 +0,0 @@ -/* - * $Id: linkage_descriptor.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -LinkageDescriptor::LinkageDescriptor(const uint8_t * const buffer) : Descriptor(buffer) -{ - transportStreamId = (buffer[2] << 8) | buffer[3]; - originalNetworkId = (buffer[4] << 8) | buffer[5]; - serviceId = (buffer[6] << 8) | buffer[7]; - linkageType = buffer[8]; - - if (linkageType != 0x08) - { - if (descriptorLength < 7) - return; - - for (uint16_t i = 0; i < descriptorLength - 7; ++i) - privateDataBytes.push_back(buffer[i + 9]); - } - - else { - handOverType = (buffer[9] >> 4) & 0x0f; - reserved = (buffer[9] >> 1) & 0x07; - originType = buffer[9] & 0x01; - - uint8_t offset = 0; - - if ((handOverType >= 0x01) && (handOverType <= 0x03)) { - networkId = (buffer[10] << 8) | buffer[11]; - offset += 2; - } - - if (originType == 0x00) { - initialServiceId = (buffer[offset + 10] << 8) | buffer[offset + 11]; - offset += 2; - } - - if (descriptorLength >= (unsigned)(offset+8)) - for (uint16_t i = 0; i < descriptorLength - (offset + 8); ++i) - privateDataBytes.push_back(buffer[i + offset + 10]); - } -} - -uint16_t LinkageDescriptor::getTransportStreamId(void) const -{ - return transportStreamId; -} - -uint16_t LinkageDescriptor::getOriginalNetworkId(void) const -{ - return originalNetworkId; -} - -uint16_t LinkageDescriptor::getServiceId(void) const -{ - return serviceId; -} - -uint8_t LinkageDescriptor::getLinkageType(void) const -{ - return linkageType; -} - -const PrivateDataByteVector *LinkageDescriptor::getPrivateDataBytes(void) const -{ - return &privateDataBytes; -} - -uint8_t LinkageDescriptor::getHandOverType(void) const -{ - return handOverType; -} - -uint8_t LinkageDescriptor::getOriginType(void) const -{ - return originType; -} - -uint16_t LinkageDescriptor::getNetworkId(void) const -{ - return networkId; -} - -uint16_t LinkageDescriptor::getInitialServiceId(void) const -{ - return initialServiceId; -} - diff --git a/lib/dvb_si/linkage_descriptor.h b/lib/dvb_si/linkage_descriptor.h deleted file mode 100644 index cfecf50c..00000000 --- a/lib/dvb_si/linkage_descriptor.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * $Id: linkage_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_linkage_descriptor_h__ -#define __dvb_descriptor_linkage_descriptor_h__ - -#include "descriptor.h" - -typedef std::vector PrivateDataByteVector; -typedef PrivateDataByteVector::iterator PrivateDataByteIterator; -typedef PrivateDataByteVector::const_iterator PrivateDataByteConstIterator; - -class LinkageDescriptor : public Descriptor -{ - protected: - unsigned transportStreamId : 16; - unsigned originalNetworkId : 16; - unsigned serviceId : 16; - unsigned linkageType : 8; - PrivateDataByteVector privateDataBytes; - unsigned handOverType : 4; - unsigned reserved : 3; - unsigned originType : 1; - unsigned networkId : 16; - unsigned initialServiceId : 16; - - public: - LinkageDescriptor(const uint8_t * const buffer); - - uint16_t getTransportStreamId(void) const; - uint16_t getOriginalNetworkId(void) const; - uint16_t getServiceId(void) const; - uint8_t getLinkageType(void) const; - const PrivateDataByteVector *getPrivateDataBytes(void) const; - uint8_t getHandOverType(void) const; - uint8_t getOriginType(void) const; - uint16_t getNetworkId(void) const; - uint16_t getInitialServiceId(void) const; -}; - -#endif /* __dvb_descriptor_linkage_descriptor_h__ */ diff --git a/lib/dvb_si/local_time_offset_descriptor.cpp b/lib/dvb_si/local_time_offset_descriptor.cpp deleted file mode 100644 index 72fc53b3..00000000 --- a/lib/dvb_si/local_time_offset_descriptor.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/* - * $Id: local_time_offset_descriptor.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -LocalTimeOffset::LocalTimeOffset(const uint8_t * const buffer) -{ - countryCode.assign((char *)&buffer[0], 3); - countryRegionId = (buffer[3] >> 2) & 0x3f; - reserved = (buffer[3] >> 1) & 0x01; - localTimeOffsetPolarity = buffer[3] & 0x01; - localTimeOffset = (buffer[4] << 8) | buffer[5]; - timeOfChangeMjd = (buffer[6] << 8) | buffer[7]; - timeOfChangeBcd = (buffer[8] << 16) | (buffer[9] << 8) | buffer[10]; - nextTimeOffset = (buffer[11] << 8) | buffer[12]; -} - -std::string LocalTimeOffset::getCountryCode(void) const -{ - return countryCode; -} - -uint8_t LocalTimeOffset::getCountryRegionId(void) const -{ - return countryRegionId; -} - -uint8_t LocalTimeOffset::getLocalTimeOffsetPolarity(void) const -{ - return localTimeOffsetPolarity; -} - -uint16_t LocalTimeOffset::getLocalTimeOffset(void) const -{ - return localTimeOffset; -} - -uint16_t LocalTimeOffset::getTimeOfChangeMjd(void) const -{ - return timeOfChangeMjd; -} - -uint32_t LocalTimeOffset::getTimeOfChangeBcd(void) const -{ - return timeOfChangeBcd; -} - -uint16_t LocalTimeOffset::getNextTimeOffset(void) const -{ - return nextTimeOffset; -} - -LocalTimeOffsetDescriptor::LocalTimeOffsetDescriptor(const uint8_t * const buffer) : Descriptor(buffer) -{ - for (uint16_t i = 0; i < descriptorLength; i += 13) - localTimeOffsets.push_back(new LocalTimeOffset(&buffer[i + 2])); -} - - -LocalTimeOffsetDescriptor::~LocalTimeOffsetDescriptor(void) -{ - for (LocalTimeOffsetIterator i = localTimeOffsets.begin(); i != localTimeOffsets.end(); ++i) - delete *i; -} - -const LocalTimeOffsetVector *LocalTimeOffsetDescriptor::getLocalTimeOffsets(void) const -{ - return &localTimeOffsets; -} - diff --git a/lib/dvb_si/local_time_offset_descriptor.h b/lib/dvb_si/local_time_offset_descriptor.h deleted file mode 100644 index 85373f70..00000000 --- a/lib/dvb_si/local_time_offset_descriptor.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * $Id: local_time_offset_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_local_time_offset_descriptor_h__ -#define __dvb_descriptor_local_time_offset_descriptor_h__ - -#include "descriptor.h" - -class LocalTimeOffset -{ - protected: - std::string countryCode; - unsigned countryRegionId : 6; - unsigned reserved : 1; - unsigned localTimeOffsetPolarity : 1; - unsigned localTimeOffset : 16; - unsigned timeOfChangeMjd : 16; - unsigned timeOfChangeBcd : 24; - unsigned nextTimeOffset : 16; - - public: - LocalTimeOffset(const uint8_t * const buffer); - - std::string getCountryCode(void) const; - uint8_t getCountryRegionId(void) const; - uint8_t getLocalTimeOffsetPolarity(void) const; - uint16_t getLocalTimeOffset(void) const; - uint16_t getTimeOfChangeMjd(void) const; - uint32_t getTimeOfChangeBcd(void) const; - uint16_t getNextTimeOffset(void) const; -}; - -typedef std::vector LocalTimeOffsetVector; -typedef LocalTimeOffsetVector::iterator LocalTimeOffsetIterator; -typedef LocalTimeOffsetVector::const_iterator LocalTimeOffsetConstIterator; - -class LocalTimeOffsetDescriptor : public Descriptor -{ - protected: - LocalTimeOffsetVector localTimeOffsets; - - public: - LocalTimeOffsetDescriptor(const uint8_t * const buffer); - ~LocalTimeOffsetDescriptor(void); - - const LocalTimeOffsetVector *getLocalTimeOffsets(void) const; -}; - -#endif /* __dvb_descriptor_local_time_offset_descriptor_h__ */ diff --git a/lib/dvb_si/long_crc_table.cpp b/lib/dvb_si/long_crc_table.cpp deleted file mode 100644 index 2f916520..00000000 --- a/lib/dvb_si/long_crc_table.cpp +++ /dev/null @@ -1,36 +0,0 @@ -/* - * $Id: long_crc_table.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -LongCrcTable::LongCrcTable(const uint8_t * const buffer) : LongTable(buffer) -{ - crc32 = (buffer[sectionLength - 1] << 24) | - (buffer[sectionLength + 0] << 16) | - (buffer[sectionLength + 1] << 8) | - (buffer[sectionLength + 2]); -} - -uint32_t LongCrcTable::getCrc32(void) const -{ - return crc32; -} - diff --git a/lib/dvb_si/long_crc_table.h b/lib/dvb_si/long_crc_table.h deleted file mode 100644 index 14f4dedb..00000000 --- a/lib/dvb_si/long_crc_table.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * $Id: long_crc_table.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_table_long_crc_table_h__ -#define __dvb_table_long_crc_table_h__ - -#include "long_table.h" - -class LongCrcTable : public LongTable -{ - protected: - unsigned crc32 : 32; - - public: - LongCrcTable(const uint8_t * const buffer); - - static const uint8_t CRC32 = 1; - - uint32_t getCrc32(void) const; -}; - -typedef std::vector LongCrcTableVector; -typedef LongCrcTableVector::iterator LongCrcTableIterator; -typedef LongCrcTableVector::const_iterator LongCrcTableConstIterator; - -#endif /* __dvb_table_long_crc_table_h__ */ diff --git a/lib/dvb_si/long_table.cpp b/lib/dvb_si/long_table.cpp deleted file mode 100644 index f6bcbdf0..00000000 --- a/lib/dvb_si/long_table.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/* - * $Id: long_table.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -LongTable::LongTable(const uint8_t * const buffer) : ShortTable(buffer) -{ - tableIdExtension = (buffer[3] << 8) | buffer[4]; - reserved3 = (buffer[5] >> 6) & 0x03; - versionNumber = (buffer[5] >> 1) & 0x1F; - currentNextIndicator = buffer[5] & 0x01; - sectionNumber = buffer[6]; - lastSectionNumber = buffer[7]; -} - -uint16_t LongTable::getTableIdExtension(void) const -{ - return tableIdExtension; -} - -uint8_t LongTable::getVersionNumber(void) const -{ - return versionNumber; -} - -uint8_t LongTable::getCurrentNextIndicator(void) const -{ - return currentNextIndicator; -} - -uint8_t LongTable::getSectionNumber(void) const -{ - return sectionNumber; -} - -uint8_t LongTable::getLastSectionNumber(void) const -{ - return lastSectionNumber; -} - -bool LongTable::operator< (const LongTable &t) const -{ - return (sectionNumber < t.sectionNumber); -} - -bool LongTable::operator> (const LongTable &t) const -{ - return (sectionNumber > t.sectionNumber); -} - -bool LongTable::operator<= (const LongTable &t) const -{ - return (sectionNumber <= t.sectionNumber); -} - -bool LongTable::operator>= (const LongTable &t) const -{ - return (sectionNumber >= t.sectionNumber); -} - -bool LongTable::operator== (const LongTable &t) const -{ - return (sectionNumber == t.sectionNumber); -} - -bool LongTable::operator!= (const LongTable &t) const -{ - return (sectionNumber != t.sectionNumber); -} - diff --git a/lib/dvb_si/long_table.h b/lib/dvb_si/long_table.h deleted file mode 100644 index 31341d4c..00000000 --- a/lib/dvb_si/long_table.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * $Id: long_table.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_table_long_table_h__ -#define __dvb_table_long_table_h__ - -#include "short_table.h" - -class LongTable : public ShortTable -{ - protected: - unsigned tableIdExtension : 16; - unsigned reserved3 : 2; - unsigned versionNumber : 5; - unsigned currentNextIndicator : 1; - unsigned sectionNumber : 8; - unsigned lastSectionNumber : 8; - - public: - LongTable(const uint8_t * const buffer); - - static const uint8_t SYNTAX = 1; - - uint16_t getTableIdExtension(void) const; - uint8_t getVersionNumber(void) const; - uint8_t getCurrentNextIndicator(void) const; - uint8_t getSectionNumber(void) const; - uint8_t getLastSectionNumber(void) const; - - bool operator< (const LongTable &t) const; - bool operator> (const LongTable &t) const; - bool operator<= (const LongTable &t) const; - bool operator>= (const LongTable &t) const; - bool operator== (const LongTable &t) const; - bool operator!= (const LongTable &t) const; -}; - -typedef std::vector LongTableVector; -typedef LongTableVector::iterator LongTableIterator; -typedef LongTableVector::const_iterator LongTableConstIterator; - -#endif /* __dvb_table_long_table_h__ */ diff --git a/lib/dvb_si/maximum_bitrate_descriptor.h b/lib/dvb_si/maximum_bitrate_descriptor.h deleted file mode 100644 index 54ed29c4..00000000 --- a/lib/dvb_si/maximum_bitrate_descriptor.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * $Id: maximum_bitrate_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_maximum_bitrate_descriptor_h__ -#define __dvb_descriptor_maximum_bitrate_descriptor_h__ - -#include "descriptor.h" - -class MaximumBitrateDescriptor : public Descriptor -{ - protected: - unsigned reserved : 2; - unsigned maximumBitrate : 22; - - public: - MaximumBitrateDescriptor(const uint8_t * const buffer); - - uint32_t getMaximumBitrate(void) const; -}; - -#endif /* __dvb_descriptor_maximum_bitrate_descriptor_h__ */ diff --git a/lib/dvb_si/mosaic_descriptor.cpp b/lib/dvb_si/mosaic_descriptor.cpp deleted file mode 100644 index f13bccff..00000000 --- a/lib/dvb_si/mosaic_descriptor.cpp +++ /dev/null @@ -1,171 +0,0 @@ -/* - * $Id: mosaic_descriptor.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -ElementaryCellField::ElementaryCellField (const uint8_t * const buffer) -{ - reserved = (buffer[0] >> 6) & 0x03; - elementaryCellId = buffer[0] & 0x3F; -} - -uint8_t ElementaryCellField::getElementaryCellId(void) const -{ - return elementaryCellId; -} - -MosaicCell::MosaicCell (const uint8_t * const buffer) -{ - logicalCellId = (buffer[0] >> 2) & 0x3F; - reserved = (((buffer[0] & 0x03) << 8) | (buffer[1] & 0xF1)) >> 3; - logicalCellPresentationInfo = buffer[1] & 0x07; - elementaryCellFieldLength = buffer[2]; - - for (uint16_t i = 0; i < elementaryCellFieldLength; ++i) - elementaryCellFields.push_back(new ElementaryCellField(&buffer[i + 3])); - - cellLinkageInfo = buffer[elementaryCellFieldLength + 3]; - - switch (cellLinkageInfo) { - case 0x01: - bouquetId = (buffer[elementaryCellFieldLength + 4] << 8) | buffer[elementaryCellFieldLength + 5]; - break; - case 0x02: - case 0x03: - case 0x04: - originalNetworkId = (buffer[elementaryCellFieldLength + 4] << 8) | buffer[elementaryCellFieldLength + 5]; - transportStreamId = (buffer[elementaryCellFieldLength + 6] << 8) | buffer[elementaryCellFieldLength + 7]; - serviceId = (buffer[elementaryCellFieldLength + 8] << 8) | buffer[elementaryCellFieldLength + 9]; - break; - default: - break; - } - - if (cellLinkageInfo == 0x04) - eventId = (buffer[elementaryCellFieldLength + 10] << 8) | buffer[elementaryCellFieldLength + 11]; -} - -MosaicCell::~MosaicCell(void) -{ - for (ElementaryCellFieldIterator i = elementaryCellFields.begin(); i != elementaryCellFields.end(); ++i) - delete *i; -} - -uint8_t MosaicCell::getLogicalCellId(void) const -{ - return logicalCellId; -} - -uint8_t MosaicCell::getLogicalCellPresentationInfo(void) const -{ - return logicalCellPresentationInfo; -} - -const ElementaryCellFieldVector *MosaicCell::getElementaryCellFields(void) const -{ - return &elementaryCellFields; -} - -uint8_t MosaicCell::getCellLinkageInfo(void) const -{ - return cellLinkageInfo; -} - -uint16_t MosaicCell::getBouquetId(void) const -{ - return bouquetId; -} - -uint16_t MosaicCell::getOriginalNetworkId(void) const -{ - return originalNetworkId; -} - -uint16_t MosaicCell::getTransportStreamId(void) const -{ - return transportStreamId; -} - -uint16_t MosaicCell::getServiceId(void) const -{ - return serviceId; -} - -uint16_t MosaicCell::getEventId(void) const -{ - return eventId; -} - -MosaicDescriptor::MosaicDescriptor(const uint8_t * const buffer) : Descriptor(buffer) -{ - if (descriptorLength < 1) - return; - - mosaicEntryPoint = (buffer[2] >> 7) & 0x01; - numberOfHorizontalElementaryCells = (buffer[2] >> 4) & 0x07; - reserved = (buffer[2] >> 3) & 0x01; - numberOfVerticalElementaryCells = buffer[2] & 0x07; - - for (uint16_t i = 0; i < descriptorLength - 1; i += buffer[i + 6] + 2) { - mosaicCells.push_back(new MosaicCell(&buffer[i + 1])); - switch (buffer[i + 6 + buffer[i + 6] + 1]) { - case 0x01: - i += 2; - break; - case 0x02: - case 0x03: - i += 6; - break; - case 0x04: - i += 8; - break; - default: - break; - } - } -} - -MosaicDescriptor::~MosaicDescriptor(void) -{ - for (MosaicCellIterator i = mosaicCells.begin(); i != mosaicCells.end(); ++i) - delete *i; -} - -uint8_t MosaicDescriptor::getMosaicEntryPoint(void) const -{ - return mosaicEntryPoint; -} - -uint8_t MosaicDescriptor::getNumberOfHorizontalElementaryCells(void) const -{ - return numberOfHorizontalElementaryCells; -} - -uint8_t MosaicDescriptor::getNumberOfVerticalElementaryCells(void) const -{ - return numberOfVerticalElementaryCells; -} - -const MosaicCellVector *MosaicDescriptor::getMosaicCells(void) const -{ - return &mosaicCells; -} - diff --git a/lib/dvb_si/mosaic_descriptor.h b/lib/dvb_si/mosaic_descriptor.h deleted file mode 100644 index e9f112e6..00000000 --- a/lib/dvb_si/mosaic_descriptor.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * $Id: mosaic_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_mosaic_descriptor_h__ -#define __dvb_descriptor_mosaic_descriptor_h__ - -#include "descriptor.h" - -class ElementaryCellField -{ - protected: - unsigned reserved : 2; - unsigned elementaryCellId : 6; - - public: - ElementaryCellField(const uint8_t * const buffer); - - uint8_t getElementaryCellId(void) const; -}; - -typedef std::vector ElementaryCellFieldVector; -typedef ElementaryCellFieldVector::iterator ElementaryCellFieldIterator; -typedef ElementaryCellFieldVector::const_iterator ElementaryCellFieldConstIterator; - -class MosaicCell -{ - protected: - unsigned logicalCellId : 6; - unsigned reserved : 7; - unsigned logicalCellPresentationInfo : 3; - unsigned elementaryCellFieldLength : 8; - ElementaryCellFieldVector elementaryCellFields; - unsigned cellLinkageInfo : 8; - unsigned bouquetId : 16; - unsigned originalNetworkId : 16; - unsigned transportStreamId : 16; - unsigned serviceId : 16; - unsigned eventId : 16; - - public: - MosaicCell(const uint8_t * const buffer); - ~MosaicCell(void); - - uint8_t getLogicalCellId(void) const; - uint8_t getLogicalCellPresentationInfo(void) const; - const ElementaryCellFieldVector *getElementaryCellFields(void) const; - uint8_t getCellLinkageInfo(void) const; - uint16_t getBouquetId(void) const; - uint16_t getOriginalNetworkId(void) const; - uint16_t getTransportStreamId(void) const; - uint16_t getServiceId(void) const; - uint16_t getEventId(void) const; -}; - -typedef std::vector MosaicCellVector; -typedef MosaicCellVector::iterator MosaicCellIterator; -typedef MosaicCellVector::const_iterator MosaicCellConstIterator; - -class MosaicDescriptor : public Descriptor -{ - protected: - unsigned mosaicEntryPoint : 1; - unsigned numberOfHorizontalElementaryCells : 3; - unsigned reserved : 1; - unsigned numberOfVerticalElementaryCells : 3; - MosaicCellVector mosaicCells; - - public: - MosaicDescriptor(const uint8_t * const buffer); - ~MosaicDescriptor(void); - - uint8_t getMosaicEntryPoint(void) const; - uint8_t getNumberOfHorizontalElementaryCells(void) const; - uint8_t getNumberOfVerticalElementaryCells(void) const; - const MosaicCellVector *getMosaicCells(void) const; -}; - -#endif /* __dvb_descriptor_mosaic_descriptor_h__ */ diff --git a/lib/dvb_si/multilingual_bouquet_name_descriptor.cpp b/lib/dvb_si/multilingual_bouquet_name_descriptor.cpp deleted file mode 100644 index d628dc01..00000000 --- a/lib/dvb_si/multilingual_bouquet_name_descriptor.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/* - * $Id: multilingual_bouquet_name_descriptor.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -MultilingualBouquetName::MultilingualBouquetName(const uint8_t * const buffer) -{ - iso639LanguageCode.assign((char *)&buffer[0], 3); - bouquetNameLength = buffer[3]; - bouquetName.assign((char *)&buffer[4], bouquetNameLength); -} - -std::string MultilingualBouquetName::getIso639LanguageCode(void) const -{ - return iso639LanguageCode; -} - -std::string MultilingualBouquetName::getBouquetName(void) const -{ - return bouquetName; -} - -MultilingualBouquetNameDescriptor::MultilingualBouquetNameDescriptor(const uint8_t * const buffer) : Descriptor(buffer) -{ - for (uint16_t i = 0; i < descriptorLength; i += buffer[i + 3] + 2) - multilingualBouquetNames.push_back(new MultilingualBouquetName(&buffer[i + 2])); -} - -MultilingualBouquetNameDescriptor::~MultilingualBouquetNameDescriptor(void) -{ - for (MultilingualBouquetNameIterator i = multilingualBouquetNames.begin(); i != multilingualBouquetNames.end(); ++i) - delete *i; -} - -const MultilingualBouquetNameVector *MultilingualBouquetNameDescriptor::getMultilingualBouquetNames(void) const -{ - return &multilingualBouquetNames; -} - diff --git a/lib/dvb_si/multilingual_bouquet_name_descriptor.h b/lib/dvb_si/multilingual_bouquet_name_descriptor.h deleted file mode 100644 index 3864f74b..00000000 --- a/lib/dvb_si/multilingual_bouquet_name_descriptor.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * $Id: multilingual_bouquet_name_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_multilingual_bouquet_name_descriptor_h__ -#define __dvb_descriptor_multilingual_bouquet_name_descriptor_h__ - -#include "descriptor.h" - -class MultilingualBouquetName -{ - protected: - std::string iso639LanguageCode; - unsigned bouquetNameLength : 8; - std::string bouquetName; - - public: - MultilingualBouquetName(const uint8_t * const buffer); - - std::string getIso639LanguageCode(void) const; - std::string getBouquetName(void) const; -}; - -typedef std::vector MultilingualBouquetNameVector; -typedef MultilingualBouquetNameVector::iterator MultilingualBouquetNameIterator; -typedef MultilingualBouquetNameVector::const_iterator MultilingualBouquetNameConstIterator; - -class MultilingualBouquetNameDescriptor : public Descriptor -{ - protected: - MultilingualBouquetNameVector multilingualBouquetNames; - - public: - MultilingualBouquetNameDescriptor(const uint8_t * const buffer); - ~MultilingualBouquetNameDescriptor(void); - - const MultilingualBouquetNameVector *getMultilingualBouquetNames(void) const; -}; - -#endif /* __dvb_descriptor_multilingual_bouquet_name_descriptor_h__ */ diff --git a/lib/dvb_si/multilingual_component_descriptor.cpp b/lib/dvb_si/multilingual_component_descriptor.cpp deleted file mode 100644 index ecd49506..00000000 --- a/lib/dvb_si/multilingual_component_descriptor.cpp +++ /dev/null @@ -1,64 +0,0 @@ -/* - * $Id: multilingual_component_descriptor.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -MultilingualComponent::MultilingualComponent(const uint8_t * const buffer) -{ - iso639LanguageCode.assign((char *)&buffer[0], 3); - textDescriptionLength = buffer[3]; - text.assign((char *)&buffer[4], textDescriptionLength); -} - -std::string MultilingualComponent::getIso639LanguageCode(void) const -{ - return iso639LanguageCode; -} - -std::string MultilingualComponent::getText(void) const -{ - return text; -} - -MultilingualComponentDescriptor::MultilingualComponentDescriptor(const uint8_t * const buffer) : Descriptor(buffer) -{ - componentTag = buffer[2]; - - for (uint16_t i = 0; i < descriptorLength - 1; i += buffer[i + 4] + 2) - multilingualComponents.push_back(new MultilingualComponent(&buffer[i + 3])); -} - -MultilingualComponentDescriptor::~MultilingualComponentDescriptor(void) -{ - for (MultilingualComponentIterator i = multilingualComponents.begin(); i != multilingualComponents.end(); ++i) - delete *i; -} - -uint8_t MultilingualComponentDescriptor::getComponentTag(void) const -{ - return componentTag; -} - -const MultilingualComponentVector *MultilingualComponentDescriptor::getMultilingualComponents(void) const -{ - return &multilingualComponents; -} - diff --git a/lib/dvb_si/multilingual_component_descriptor.h b/lib/dvb_si/multilingual_component_descriptor.h deleted file mode 100644 index d7d21010..00000000 --- a/lib/dvb_si/multilingual_component_descriptor.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * $Id: multilingual_component_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_multilingual_component_descriptor_h__ -#define __dvb_descriptor_multilingual_component_descriptor_h__ - -#include "descriptor.h" - -class MultilingualComponent -{ - protected: - std::string iso639LanguageCode; - unsigned textDescriptionLength : 8; - std::string text; - - public: - MultilingualComponent(const uint8_t * const buffer); - - std::string getIso639LanguageCode(void) const; - std::string getText(void) const; -}; - -typedef std::vector MultilingualComponentVector; -typedef MultilingualComponentVector::iterator MultilingualComponentIterator; -typedef MultilingualComponentVector::const_iterator MultilingualComponentConstIterator; - -class MultilingualComponentDescriptor : public Descriptor -{ - protected: - unsigned componentTag : 8; - MultilingualComponentVector multilingualComponents; - - public: - MultilingualComponentDescriptor(const uint8_t * const buffer); - ~MultilingualComponentDescriptor(void); - - uint8_t getComponentTag(void) const; - const MultilingualComponentVector *getMultilingualComponents(void) const; -}; - -#endif /* __dvb_descriptor_multilingual_component_descriptor_h__ */ diff --git a/lib/dvb_si/multilingual_network_name_descriptor.cpp b/lib/dvb_si/multilingual_network_name_descriptor.cpp deleted file mode 100644 index 8bccc6c0..00000000 --- a/lib/dvb_si/multilingual_network_name_descriptor.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/* - * $Id: multilingual_network_name_descriptor.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -MultilingualNetworkName::MultilingualNetworkName(const uint8_t * const buffer) -{ - iso639LanguageCode.assign((char *)&buffer[0], 3); - networkNameLength = buffer[3]; - networkName.assign((char *)&buffer[4], networkNameLength); -} - -std::string MultilingualNetworkName::getIso639LanguageCode(void) const -{ - return iso639LanguageCode; -} - -std::string MultilingualNetworkName::getNetworkName(void) const -{ - return networkName; -} - -MultilingualNetworkNameDescriptor::MultilingualNetworkNameDescriptor(const uint8_t * const buffer) : Descriptor(buffer) -{ - for (uint16_t i = 0; i < descriptorLength; i += buffer[i + 5] + 4) - multilingualNetworkNames.push_back(new MultilingualNetworkName(&buffer[i + 2])); -} - -MultilingualNetworkNameDescriptor::~MultilingualNetworkNameDescriptor(void) -{ - for (MultilingualNetworkNameIterator i = multilingualNetworkNames.begin(); i != multilingualNetworkNames.end(); ++i) - delete *i; -} - -const MultilingualNetworkNameVector *MultilingualNetworkNameDescriptor::getMultilingualNetworkNames(void) const -{ - return &multilingualNetworkNames; -} - diff --git a/lib/dvb_si/multilingual_network_name_descriptor.h b/lib/dvb_si/multilingual_network_name_descriptor.h deleted file mode 100644 index b7df57b2..00000000 --- a/lib/dvb_si/multilingual_network_name_descriptor.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * $Id: multilingual_network_name_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_multilingual_network_name_descriptor_h__ -#define __dvb_descriptor_multilingual_network_name_descriptor_h__ - -#include "descriptor.h" - -class MultilingualNetworkName -{ - protected: - std::string iso639LanguageCode; - unsigned networkNameLength : 8; - std::string networkName; - - public: - MultilingualNetworkName(const uint8_t * const buffer); - - std::string getIso639LanguageCode(void) const; - std::string getNetworkName(void) const; -}; - -typedef std::vector MultilingualNetworkNameVector; -typedef MultilingualNetworkNameVector::iterator MultilingualNetworkNameIterator; -typedef MultilingualNetworkNameVector::const_iterator MultilingualNetworkNameConstIterator; - -class MultilingualNetworkNameDescriptor : public Descriptor -{ - protected: - MultilingualNetworkNameVector multilingualNetworkNames; - - public: - MultilingualNetworkNameDescriptor(const uint8_t * const buffer); - ~MultilingualNetworkNameDescriptor(void); - - const MultilingualNetworkNameVector *getMultilingualNetworkNames(void) const; -}; - -#endif /* __dvb_descriptor_multilingual_network_name_descriptor_h__ */ diff --git a/lib/dvb_si/multilingual_service_name_descriptor.cpp b/lib/dvb_si/multilingual_service_name_descriptor.cpp deleted file mode 100644 index d811aaef..00000000 --- a/lib/dvb_si/multilingual_service_name_descriptor.cpp +++ /dev/null @@ -1,68 +0,0 @@ -/* - * $Id: multilingual_service_name_descriptor.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -MultilingualServiceName::MultilingualServiceName(const uint8_t * const buffer) -{ - iso639LanguageCode.assign((char *)&buffer[0], 3); - serviceProviderNameLength = buffer[3]; - serviceProviderName.assign((char *)&buffer[4], serviceProviderNameLength); - serviceNameLength = buffer[serviceProviderNameLength + 4]; - serviceName.assign((char *)&buffer[serviceProviderNameLength + 5], serviceNameLength); -} - -std::string MultilingualServiceName::getIso639LanguageCode(void) const -{ - return iso639LanguageCode; -} - -std::string MultilingualServiceName::getServiceProviderName(void) const -{ - return serviceProviderName; -} - -std::string MultilingualServiceName::getServiceName(void) const -{ - return serviceName; -} - -MultilingualServiceNameDescriptor::MultilingualServiceNameDescriptor(const uint8_t * const buffer) : Descriptor(buffer) -{ - MultilingualServiceName *name; - - for (uint16_t i = 0; i < descriptorLength; i += name->serviceProviderNameLength + name->serviceNameLength + 5) { - name = new MultilingualServiceName(&buffer[i + 2]); - multilingualServiceNames.push_back(name); - } -} - -MultilingualServiceNameDescriptor::~MultilingualServiceNameDescriptor(void) -{ - for (MultilingualServiceNameIterator i = multilingualServiceNames.begin(); i != multilingualServiceNames.end(); ++i) - delete *i; -} - -const MultilingualServiceNameVector *MultilingualServiceNameDescriptor::getMultilingualServiceNames(void) const -{ - return &multilingualServiceNames; -} - diff --git a/lib/dvb_si/multilingual_service_name_descriptor.h b/lib/dvb_si/multilingual_service_name_descriptor.h deleted file mode 100644 index 5979b5c0..00000000 --- a/lib/dvb_si/multilingual_service_name_descriptor.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * $Id: multilingual_service_name_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_multilingual_service_name_descriptor_h__ -#define __dvb_descriptor_multilingual_service_name_descriptor_h__ - -#include "descriptor.h" - -class MultilingualServiceName -{ - protected: - std::string iso639LanguageCode; - unsigned serviceProviderNameLength : 8; - std::string serviceProviderName; - unsigned serviceNameLength : 8; - std::string serviceName; - - public: - MultilingualServiceName(const uint8_t * const buffer); - - std::string getIso639LanguageCode(void) const; - std::string getServiceProviderName(void) const; - std::string getServiceName(void) const; - - friend class MultilingualServiceNameDescriptor; -}; - -typedef std::vector MultilingualServiceNameVector; -typedef MultilingualServiceNameVector::iterator MultilingualServiceNameIterator; -typedef MultilingualServiceNameVector::const_iterator MultilingualServiceNameConstIterator; - -class MultilingualServiceNameDescriptor : public Descriptor -{ - protected: - MultilingualServiceNameVector multilingualServiceNames; - - public: - MultilingualServiceNameDescriptor(const uint8_t * const buffer); - ~MultilingualServiceNameDescriptor(void); - - const MultilingualServiceNameVector *getMultilingualServiceNames(void) const; -}; - -#endif /* __dvb_descriptor_multilingual_service_name_descriptor_h__ */ diff --git a/lib/dvb_si/multiplex_buffer_utilization_descriptor.h b/lib/dvb_si/multiplex_buffer_utilization_descriptor.h deleted file mode 100644 index dc7a160a..00000000 --- a/lib/dvb_si/multiplex_buffer_utilization_descriptor.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * $Id: multiplex_buffer_utilization_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_multiplex_buffer_utilization_descriptor_h__ -#define __dvb_descriptor_multiplex_buffer_utilization_descriptor_h__ - -#include "descriptor.h" - -class MultiplexBufferUtilizationDescriptor : public Descriptor -{ - protected: - unsigned boundValidFlag : 1; - unsigned ltwOffsetLowerBound : 15; - unsigned reserved : 1; - unsigned ltwOffsetUpperBound : 15; - - public: - MultiplexBufferUtilizationDescriptor(const uint8_t * const buffer); - - uint8_t getBoundValidFlag(void) const; - uint16_t getLtwOffsetLowerBound(void) const; - uint16_t getLtwOffsetUpperBound(void) const; -}; - -#endif /* __dvb_descriptor_multiplex_buffer_utilization_descriptor_h__ */ diff --git a/lib/dvb_si/network_name_descriptor.cpp b/lib/dvb_si/network_name_descriptor.cpp deleted file mode 100644 index 3ba38725..00000000 --- a/lib/dvb_si/network_name_descriptor.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/* - * $Id: network_name_descriptor.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -NetworkNameDescriptor::NetworkNameDescriptor(const uint8_t * const buffer) : Descriptor(buffer) -{ - networkName.assign((char *)&buffer[2], descriptorLength); -} - -std::string NetworkNameDescriptor::getNetworkName(void) const -{ - return networkName; -} - diff --git a/lib/dvb_si/network_name_descriptor.h b/lib/dvb_si/network_name_descriptor.h deleted file mode 100644 index 694e3706..00000000 --- a/lib/dvb_si/network_name_descriptor.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * $Id: network_name_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_network_name_descriptor_h__ -#define __dvb_descriptor_network_name_descriptor_h__ - -#include "descriptor.h" - -class NetworkNameDescriptor : public Descriptor -{ - protected: - std::string networkName; - - public: - NetworkNameDescriptor(const uint8_t * const buffer); - - std::string getNetworkName(void) const; -}; - -#endif /* __dvb_descriptor_network_name_descriptor_h__ */ diff --git a/lib/dvb_si/nit.cpp b/lib/dvb_si/nit.cpp deleted file mode 100644 index dcf90e3c..00000000 --- a/lib/dvb_si/nit.cpp +++ /dev/null @@ -1,70 +0,0 @@ -/* - * $Id: nit.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -TransportStreamInfo::TransportStreamInfo(const uint8_t * const buffer) -{ - transportStreamId = (buffer[0] << 8) | buffer[1]; - originalNetworkId = (buffer[2] << 8) | buffer[3]; - reserved1 = (buffer[4] >> 8) & 0x0F; - transportDescriptorsLength = ((buffer[4] & 0x0F) << 8) | buffer[5]; - - for (uint16_t i = 6; i < transportDescriptorsLength + 6; i += buffer[i + 1] + 2) - descriptor(&buffer[i]); -} - -uint16_t TransportStreamInfo::getTransportStreamId(void) const -{ - return transportStreamId; -} - -uint16_t TransportStreamInfo::getOriginalNetworkId(void) const -{ - return originalNetworkId; -} - -NetworkInformationTable::NetworkInformationTable(const uint8_t * const buffer) : LongCrcTable(buffer) -{ - reserved4 = (buffer[8] >> 5) & 0x0F; - networkDescriptorsLength = ((buffer[8] & 0x0F) << 8) | buffer[9]; - - for (uint16_t i = 10; i < networkDescriptorsLength + 10; i += buffer[i + 1] + 2) - descriptor(&buffer[i]); - - reserved5 = (buffer[networkDescriptorsLength + 10] >> 4) & 0x0F; - transportStreamLoopLength = ((buffer[networkDescriptorsLength + 10] & 0x0F) << 8) | buffer[networkDescriptorsLength + 11]; - - for (uint16_t i = networkDescriptorsLength + 12; i < sectionLength + 3 - 4; i += ((buffer[i + 4] & 0x0F) | buffer[i + 5]) + 6) - tsInfo.push_back(new TransportStreamInfo(&buffer[i])); -} - -NetworkInformationTable::~NetworkInformationTable(void) -{ - for (TransportStreamInfoIterator i = tsInfo.begin(); i != tsInfo.end(); ++i) - delete *i; -} - -const TransportStreamInfoVector *NetworkInformationTable::getTsInfo(void) const -{ - return &tsInfo; -} - diff --git a/lib/dvb_si/nit.h b/lib/dvb_si/nit.h deleted file mode 100644 index de92a34b..00000000 --- a/lib/dvb_si/nit.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * $Id: nit.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_table_nit_h__ -#define __dvb_table_nit_h__ - -#include -#include "long_crc_table.h" - -class TransportStreamInfo : public DescriptorContainer -{ - protected: - unsigned transportStreamId : 16; - unsigned originalNetworkId : 16; - unsigned reserved1 : 4; - unsigned transportDescriptorsLength : 12; - - public: - TransportStreamInfo(const uint8_t * const buffer); - - uint16_t getTransportStreamId(void) const; - uint16_t getOriginalNetworkId(void) const; -}; - -typedef std::vector TransportStreamInfoVector; -typedef TransportStreamInfoVector::iterator TransportStreamInfoIterator; -typedef TransportStreamInfoVector::const_iterator TransportStreamInfoConstIterator; - -class NetworkInformationTable : public LongCrcTable, public DescriptorContainer -{ - protected: - unsigned reserved4 : 3; - unsigned networkDescriptorsLength : 12; - unsigned reserved5 : 4; - unsigned transportStreamLoopLength : 12; - TransportStreamInfoVector tsInfo; - - public: - NetworkInformationTable(const uint8_t * const buffer); - ~NetworkInformationTable(void); - - static const enum PacketId PID = PID_NIT; - static const enum TableId TID = TID_NIT_ACTUAL; - static const uint32_t TIMEOUT = 12000; - - const TransportStreamInfoVector *getTsInfo(void) const; -}; - -typedef std::vector NetworkInformationTableVector; -typedef NetworkInformationTableVector::iterator NetworkInformationTableIterator; -typedef NetworkInformationTableVector::const_iterator NetworkInformationTableConstIterator; - -#endif /* __dvb_table_nit_h__ */ diff --git a/lib/dvb_si/nvod_reference_descriptor.cpp b/lib/dvb_si/nvod_reference_descriptor.cpp deleted file mode 100644 index d7425811..00000000 --- a/lib/dvb_si/nvod_reference_descriptor.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/* - * $Id: nvod_reference_descriptor.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - - -NvodReference::NvodReference(const uint8_t * const buffer) -{ - transportStreamId = (buffer[0] << 8) | buffer[1]; - originalNetworkId = (buffer[2] << 8) | buffer[3]; - serviceId = (buffer[4] << 8) | buffer[5]; -} - -uint16_t NvodReference::getTransportStreamId(void) const -{ - return transportStreamId; -} - -uint16_t NvodReference::getOriginalNetworkId(void) const -{ - return originalNetworkId; -} - -uint16_t NvodReference::getServiceId(void) const -{ - return serviceId; -} - -NvodReferenceDescriptor::NvodReferenceDescriptor(const uint8_t * const buffer) : Descriptor(buffer) -{ - for (uint16_t i = 0; i < descriptorLength; i += 6) - nvodReferences.push_back(new NvodReference(&buffer[i + 2])); -} - -NvodReferenceDescriptor::~NvodReferenceDescriptor(void) -{ - for (NvodReferenceIterator i = nvodReferences.begin(); i != nvodReferences.end(); ++i) - delete *i; -} - -const NvodReferenceVector *NvodReferenceDescriptor::getNvodReferences(void) const -{ - return &nvodReferences; -} - diff --git a/lib/dvb_si/nvod_reference_descriptor.h b/lib/dvb_si/nvod_reference_descriptor.h deleted file mode 100644 index 4b434c3b..00000000 --- a/lib/dvb_si/nvod_reference_descriptor.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * $Id: nvod_reference_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_nvod_reference_descriptor_h__ -#define __dvb_descriptor_nvod_reference_descriptor_h__ - -#include "descriptor.h" - -class NvodReference -{ - protected: - unsigned transportStreamId : 16; - unsigned originalNetworkId : 16; - unsigned serviceId : 16; - - public: - NvodReference(const uint8_t * const buffer); - - uint16_t getTransportStreamId(void) const; - uint16_t getOriginalNetworkId(void) const; - uint16_t getServiceId(void) const; -}; - -typedef std::vector NvodReferenceVector; -typedef NvodReferenceVector::iterator NvodReferenceIterator; -typedef NvodReferenceVector::const_iterator NvodReferenceConstIterator; - -class NvodReferenceDescriptor : public Descriptor -{ - protected: - NvodReferenceVector nvodReferences; - - public: - NvodReferenceDescriptor(const uint8_t * const buffer); - ~NvodReferenceDescriptor(void); - - const NvodReferenceVector* getNvodReferences(void) const; -}; - -#endif /* __dvb_descriptor_nvod_reference_descriptor_h__ */ diff --git a/lib/dvb_si/packet_id.h b/lib/dvb_si/packet_id.h deleted file mode 100644 index 3f18f084..00000000 --- a/lib/dvb_si/packet_id.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * $Id: packet_id.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_id_packet_id_h__ -#define __dvb_id_packet_id_h__ - -enum PacketId { - /* ETSI EN 300 468 V1.5.1 (2003-01) */ - PID_PAT = 0x0000, - PID_CAT = 0x0001, - PID_TSDT = 0x0002, - PID_NIT = 0x0010, - PID_BAT = 0x0011, - PID_SDT = 0x0011, - PID_EIT = 0x0012, - PID_RST = 0x0013, - PID_TDT = 0x0014, - PID_TOT = 0x0014, - PID_NS = 0x0015, /* network synchronization */ - PID_IS = 0x001C, /* inband signaling (SIS-12) */ - PID_M = 0x001D, /* measurement (SIS-10) */ - PID_DIT = 0x001E, - PID_SIT = 0x001F, - PID_RESERVED = 0x1FFF -}; - -#endif /* __dvb_id_packet_id_h__ */ diff --git a/lib/dvb_si/parental_rating_descriptor.cpp b/lib/dvb_si/parental_rating_descriptor.cpp deleted file mode 100644 index 39262679..00000000 --- a/lib/dvb_si/parental_rating_descriptor.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* - * $Id: parental_rating_descriptor.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -ParentalRating::ParentalRating(const uint8_t * const buffer) -{ - countryCode.assign((char *)&buffer[0], 3); - rating = buffer[3]; -} - -std::string ParentalRating::getCountryCode(void) const -{ - return countryCode; -} - -uint8_t ParentalRating::getRating(void) const -{ - return rating; -} - -ParentalRatingDescriptor::ParentalRatingDescriptor(const uint8_t * const buffer) : Descriptor(buffer) -{ - for (uint16_t i = 0; i < descriptorLength; i += 4) - parentalRatings.push_back(new ParentalRating(&buffer[i + 2])); -} - -ParentalRatingDescriptor::~ParentalRatingDescriptor(void) -{ - for (ParentalRatingIterator i = parentalRatings.begin(); i != parentalRatings.end(); ++i) - delete *i; -} - -const ParentalRatingVector *ParentalRatingDescriptor::getParentalRatings(void) const -{ - return &parentalRatings; -} - diff --git a/lib/dvb_si/parental_rating_descriptor.h b/lib/dvb_si/parental_rating_descriptor.h deleted file mode 100644 index 5528872b..00000000 --- a/lib/dvb_si/parental_rating_descriptor.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * $Id: parental_rating_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_parental_rating_descriptor_h__ -#define __dvb_descriptor_parental_rating_descriptor_h__ - -#include "descriptor.h" - -class ParentalRating -{ - protected: - std::string countryCode; - unsigned rating : 8; - - public: - ParentalRating(const uint8_t * const buffer); - - std::string getCountryCode(void) const; - uint8_t getRating(void) const; -}; - -typedef std::vector ParentalRatingVector; -typedef ParentalRatingVector::iterator ParentalRatingIterator; -typedef ParentalRatingVector::const_iterator ParentalRatingConstIterator; - -class ParentalRatingDescriptor : public Descriptor -{ - protected: - ParentalRatingVector parentalRatings; - - public: - ParentalRatingDescriptor(const uint8_t * const buffer); - ~ParentalRatingDescriptor(void); - - const ParentalRatingVector *getParentalRatings(void) const; -}; - -#endif /* __dvb_descriptor_parental_rating_descriptor_h__ */ diff --git a/lib/dvb_si/partial_transport_stream_descriptor.h b/lib/dvb_si/partial_transport_stream_descriptor.h deleted file mode 100644 index dc91226f..00000000 --- a/lib/dvb_si/partial_transport_stream_descriptor.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * $Id: partial_transport_stream_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_partial_transport_stream_descriptor_h__ -#define __dvb_descriptor_partial_transport_stream_descriptor_h__ - -#include "descriptor.h" - -class PartialTransportStreamDescriptor : public Descriptor -{ - protected: - unsigned reserved : 2; - unsigned peakRate : 22; - unsigned reserved2 : 2; - unsigned minimumOverallSmootingRate : 22; - unsigned reserved3 : 2; - unsigned maximumOverallSmoothingBuffer : 14; - - public: - PartialTransportStreamDescriptor(const uint8_t * const buffer); - - uint32_t getPeakRate(void) const; - uint32_t getMinimumOverallSmoothingRate(void) const; - uint16_t getMaximumOverallSmoothingBuffer(void) const; -}; - -#endif /* __dvb_descriptor_partial_transport_stream_descriptor_h__ */ diff --git a/lib/dvb_si/pat.cpp b/lib/dvb_si/pat.cpp deleted file mode 100644 index 498f67fb..00000000 --- a/lib/dvb_si/pat.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/* - * $Id: pat.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -NetworkAssociation::NetworkAssociation(const uint8_t * const buffer) -{ - programNumber = (buffer[0] << 8) | buffer[1]; - reserved = (buffer[2] >> 5) & 0x07; - networkPid = ((buffer[2] & 0x1F) << 8) | buffer[3]; -} - -uint16_t NetworkAssociation::getNetworkPid(void) const -{ - return networkPid; -} - -ProgramAssociation::ProgramAssociation(const uint8_t * const buffer) -{ - programNumber = (buffer[0] << 8) | buffer[1]; - reserved = (buffer[2] >> 5) & 0x07; - programMapPid = ((buffer[2] & 0x1F) << 8) | buffer[3]; -} - -uint16_t ProgramAssociation::getProgramNumber(void) const -{ - return programNumber; -} - -uint16_t ProgramAssociation::getProgramMapPid(void) const -{ - return programMapPid; -} - -ProgramAssociationTable::ProgramAssociationTable(const uint8_t * const buffer) : LongCrcTable(buffer) -{ - for (uint16_t i = 8; i < sectionLength - 1; i += 4) { - if (((buffer[i] << 8) | buffer[i + 1]) == 0) - networks.push_back(new NetworkAssociation(&buffer[i])); - else - programs.push_back(new ProgramAssociation(&buffer[i])); - } -} - -ProgramAssociationTable::~ProgramAssociationTable(void) -{ - for (NetworkAssociationIterator i = networks.begin(); i != networks.end(); ++i) - delete *i; - - for (ProgramAssociationIterator i = programs.begin(); i != programs.end(); ++i) - delete *i; -} - -const NetworkAssociationVector *ProgramAssociationTable::getNetworks(void) const -{ - return &networks; -} - -const ProgramAssociationVector *ProgramAssociationTable::getPrograms(void) const -{ - return &programs; -} - diff --git a/lib/dvb_si/pat.h b/lib/dvb_si/pat.h deleted file mode 100644 index f17586a6..00000000 --- a/lib/dvb_si/pat.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * $Id: pat.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_table_pat_h__ -#define __dvb_table_pat_h__ - -#include "long_crc_table.h" - -class NetworkAssociation -{ - protected: - unsigned programNumber : 16; - unsigned reserved : 3; - unsigned networkPid : 13; - - public: - NetworkAssociation(const uint8_t * buffer); - - uint16_t getNetworkPid(void) const; -}; - -typedef std::vector NetworkAssociationVector; -typedef NetworkAssociationVector::iterator NetworkAssociationIterator; -typedef NetworkAssociationVector::const_iterator NetworkAssociationConstIterator; - -class ProgramAssociation -{ - protected: - unsigned programNumber : 16; - unsigned reserved : 3; - unsigned programMapPid : 13; - - public: - ProgramAssociation(const uint8_t * buffer); - - uint16_t getProgramNumber(void) const; - uint16_t getProgramMapPid(void) const; -}; - -typedef std::vector ProgramAssociationVector; -typedef ProgramAssociationVector::iterator ProgramAssociationIterator; -typedef ProgramAssociationVector::const_iterator ProgramAssociationConstIterator; - -class ProgramAssociationTable : public LongCrcTable -{ - protected: - NetworkAssociationVector networks; - ProgramAssociationVector programs; - - public: - ProgramAssociationTable(const uint8_t * const buffer); - ~ProgramAssociationTable(void); - - static const enum PacketId PID = PID_PAT; - static const enum TableId TID = TID_PAT; - static const uint32_t TIMEOUT = 1200; - - const NetworkAssociationVector *getNetworks(void) const; - const ProgramAssociationVector *getPrograms(void) const; -}; - -typedef std::vector ProgramAssociationTableVector; -typedef ProgramAssociationTableVector::iterator ProgramAssociationTableIterator; -typedef ProgramAssociationTableVector::const_iterator ProgramAssociationTableConstIterator; - -#endif /* __dvb_table_pat_h__ */ diff --git a/lib/dvb_si/pdc_descriptor.cpp b/lib/dvb_si/pdc_descriptor.cpp deleted file mode 100644 index 8a8c61a7..00000000 --- a/lib/dvb_si/pdc_descriptor.cpp +++ /dev/null @@ -1,34 +0,0 @@ -/* - * $Id: pdc_descriptor.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -PdcDescriptor::PdcDescriptor(const uint8_t * const buffer) : Descriptor(buffer) -{ - reserved = (buffer[2] >> 4) & 0x0f; - programmeIdentificationLabel = ((buffer[2] & 0x0f) << 16) | buffer[3] | buffer[4]; -} - -uint32_t PdcDescriptor::getProgrammeIdentificationLabel(void) const -{ - return programmeIdentificationLabel; -} - diff --git a/lib/dvb_si/pdc_descriptor.h b/lib/dvb_si/pdc_descriptor.h deleted file mode 100644 index 0c8851b5..00000000 --- a/lib/dvb_si/pdc_descriptor.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * $Id: pdc_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_pdc_descriptor_h__ -#define __dvb_descriptor_pdc_descriptor_h__ - -#include "descriptor.h" - -class PdcDescriptor : public Descriptor -{ - protected: - unsigned reserved : 4; - unsigned programmeIdentificationLabel : 20; - - public: - PdcDescriptor(const uint8_t * const buffer); - - uint32_t getProgrammeIdentificationLabel(void) const; -}; - -#endif /* __dvb_descriptor_pcd_descriptor_h__ */ diff --git a/lib/dvb_si/pmt.cpp b/lib/dvb_si/pmt.cpp deleted file mode 100644 index 1c0da43c..00000000 --- a/lib/dvb_si/pmt.cpp +++ /dev/null @@ -1,75 +0,0 @@ -/* - * $Id: pmt.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -ElementaryStreamInfo::ElementaryStreamInfo(const uint8_t * const buffer) -{ - streamType = buffer[0]; - reserved1 = (buffer[1] >> 5) & 0x07; - elementaryPid = ((buffer[1] & 0x1F) << 8) | buffer[2]; - reserved2 = (buffer[3] >> 4) & 0x0F; - esInfoLength = ((buffer[3] & 0x0F) << 8) | buffer[4]; - - for (uint16_t i = 5; i < esInfoLength + 5; i += buffer[i + 1] + 2) - descriptor(&buffer[i]); -} - -uint8_t ElementaryStreamInfo::getType(void) const -{ - return streamType; -} - -uint16_t ElementaryStreamInfo::getPid(void) const -{ - return elementaryPid; -} - -ProgramMapTable::ProgramMapTable(const uint8_t * const buffer) : LongCrcTable(buffer) -{ - reserved4 = (buffer[8] >> 5) & 0x07; - pcrPid = ((buffer[8] & 0x1F) << 8) | buffer[9]; - reserved5 = (buffer[10] >> 4) & 0x0F; - programInfoLength = ((buffer[10] & 0x0F) << 8) | buffer[11]; - - for (uint16_t i = 12; i < programInfoLength + 12; i += buffer[i + 1] + 2) - descriptor(&buffer[i]); - - for (uint16_t i = programInfoLength + 12; i < sectionLength - 1; i += ((buffer[i + 3] & 0x0F) | buffer[i + 4]) + 5) - esInfo.push_back(new ElementaryStreamInfo(&buffer[i])); -} - -uint16_t ProgramMapTable::getPcrPid(void) const -{ - return pcrPid; -} - -const ElementaryStreamInfoVector *ProgramMapTable::getEsInfo(void) const -{ - return &esInfo; -} - -ProgramMapTable::~ProgramMapTable(void) -{ - for (ElementaryStreamInfoIterator i = esInfo.begin(); i != esInfo.end(); ++i) - delete *i; -} - diff --git a/lib/dvb_si/pmt.h b/lib/dvb_si/pmt.h deleted file mode 100644 index c82413e8..00000000 --- a/lib/dvb_si/pmt.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * $Id: pmt.h,v 1.2 2005-04-30 17:57:48 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_table_pmt_h__ -#define __dvb_table_pmt_h__ - -#include -#include "long_crc_table.h" - -class ElementaryStreamInfo : public DescriptorContainer -{ - protected: - unsigned streamType : 8; - unsigned reserved1 : 3; - unsigned elementaryPid : 13; - unsigned reserved2 : 4; - unsigned esInfoLength : 12; - - public: - ElementaryStreamInfo(const uint8_t * const buffer); - - uint8_t getType(void) const; - uint16_t getPid(void) const; - - friend class CaElementaryStreamInfo; - -}; - -typedef std::vector ElementaryStreamInfoVector; -typedef ElementaryStreamInfoVector::iterator ElementaryStreamInfoIterator; -typedef ElementaryStreamInfoVector::const_iterator ElementaryStreamInfoConstIterator; - -class ProgramMapTable : public LongCrcTable, public DescriptorContainer -{ - protected: - unsigned reserved4 : 3; - unsigned pcrPid : 13; - unsigned reserved5 : 4; - unsigned programInfoLength : 12; - ElementaryStreamInfoVector esInfo; - - public: - ProgramMapTable(const uint8_t * const buffer); - ~ProgramMapTable(void); - - static const enum TableId TID = TID_PMT; - static const uint32_t TIMEOUT = 6000; - - uint16_t getPcrPid(void) const; - const ElementaryStreamInfoVector *getEsInfo(void) const; - - friend class CaProgramMapTable; -}; - -typedef std::vector ProgramMapTableVector; -typedef ProgramMapTableVector::iterator ProgramMapTableIterator; -typedef ProgramMapTableVector::const_iterator ProgramMapTableConstIterator; - -#endif /* __dvb_table_pmt_h__ */ diff --git a/lib/dvb_si/private_data_indicator_descriptor.h b/lib/dvb_si/private_data_indicator_descriptor.h deleted file mode 100644 index 8e783cd7..00000000 --- a/lib/dvb_si/private_data_indicator_descriptor.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * $Id: private_data_indicator_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_private_data_indicator_descriptor_h__ -#define __dvb_descriptor_private_data_indicator_descriptor_h__ - -#include "descriptor.h" - -class PrivateDataIndicatorDescriptor : public Descriptor -{ - protected: - unsigned privateDataIndicator : 32; - - public: - PrivateDataIndicatorDescriptor(const uint8_t * const buffer); - - uint32_t getPrivateDataIndicator(void) const; -}; - -#endif /* __dvb_descriptor_private_data_indicator_descriptor_h__ */ diff --git a/lib/dvb_si/private_data_specifier_descriptor.cpp b/lib/dvb_si/private_data_specifier_descriptor.cpp deleted file mode 100644 index dedcb712..00000000 --- a/lib/dvb_si/private_data_specifier_descriptor.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/* - * $Id: private_data_specifier_descriptor.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -PrivateDataSpecifierDescriptor::PrivateDataSpecifierDescriptor(const uint8_t * const buffer) : Descriptor(buffer) -{ - privateDataSpecifier = (buffer[2] << 24) | (buffer[3] << 16) | (buffer[4] << 8) | buffer[5]; -} - -uint32_t PrivateDataSpecifierDescriptor::getPrivateDataSpecifier(void) const -{ - return privateDataSpecifier; -} - diff --git a/lib/dvb_si/private_data_specifier_descriptor.h b/lib/dvb_si/private_data_specifier_descriptor.h deleted file mode 100644 index 53b0fb57..00000000 --- a/lib/dvb_si/private_data_specifier_descriptor.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * $Id: private_data_specifier_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_private_data_specifier_descriptor_h__ -#define __dvb_descriptor_private_data_specifier_descriptor_h__ - -#include "descriptor.h" - -class PrivateDataSpecifierDescriptor : public Descriptor -{ - protected: - unsigned privateDataSpecifier : 32; - - public: - PrivateDataSpecifierDescriptor(const uint8_t * const buffer); - - uint32_t getPrivateDataSpecifier(void) const; -}; - -#endif /* __dvb_descriptor_private_data_specifier_descriptor_h__ */ diff --git a/lib/dvb_si/registration_descriptor.h b/lib/dvb_si/registration_descriptor.h deleted file mode 100644 index 0f766a16..00000000 --- a/lib/dvb_si/registration_descriptor.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * $Id: registration_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_registration_descriptor_h__ -#define __dvb_descriptor_registration_descriptor_h__ - -#include "descriptor.h" - -typedef std::vector AdditionalIdentificationInfoVector; -typedef AdditionalIdentificationInfoVector::iterator AdditionalIdentificationInfoIterator; -typedef AdditionalIdentificationInfoVector::const_iterator AdditionalIdentificationInfoConstIterator; - -class RegistrationDescriptor : public Descriptor -{ - protected: - unsigned formatIdentifier : 32; - AdditionalIdentificationInfoVector additionalIdentificationInfo; - - private: - RegistrationDescriptor(const uint8_t * const buffer); - - uint32_t getFormatIdentifier(void) const; - const AdditionalIdentificationInfoVector *getAdditionalIdentificationInfo(void) const; -}; - -#endif /* __dvb_descriptor_registration_descriptor_h__ */ diff --git a/lib/dvb_si/satellite_delivery_system_descriptor.cpp b/lib/dvb_si/satellite_delivery_system_descriptor.cpp deleted file mode 100644 index 32ff194b..00000000 --- a/lib/dvb_si/satellite_delivery_system_descriptor.cpp +++ /dev/null @@ -1,91 +0,0 @@ -/* - * $Id: satellite_delivery_system_descriptor.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -SatelliteDeliverySystemDescriptor::SatelliteDeliverySystemDescriptor(const uint8_t * const buffer) : Descriptor(buffer) -{ - frequency = - ( - ((buffer[2] >> 4) * 10000000) + - ((buffer[2] & 0x0F) * 1000000) + - ((buffer[3] >> 4) * 100000) + - ((buffer[3] & 0x0F) * 10000) + - ((buffer[4] >> 4) * 1000) + - ((buffer[4] & 0x0F) * 100) + - ((buffer[5] >> 4) * 10) + - ((buffer[5] & 0x0F) * 1) - ); - - orbitalPosition = (buffer[6] << 8) | buffer[7]; - westEastFlag = (buffer[8] >> 7) & 0x01; - polarization = (buffer[8] >> 5) & 0x03; - modulation = buffer[8] & 0x1F; - - symbolRate = - ( - ((buffer[9] >> 4) * 1000000) + - ((buffer[9] & 0x0F) * 100000) + - ((buffer[10] >> 4) * 10000) + - ((buffer[10] & 0x0F) * 1000) + - ((buffer[11] >> 4) * 100) + - ((buffer[11] & 0x0F) * 10) + - ((buffer[12] >> 4) * 1) - ); - - fecInner = buffer[12] & 0x0F; -} - -uint32_t SatelliteDeliverySystemDescriptor::getFrequency(void) const -{ - return frequency; -} - -uint16_t SatelliteDeliverySystemDescriptor::getOrbitalPosition(void) const -{ - return orbitalPosition; -} - -uint8_t SatelliteDeliverySystemDescriptor::getWestEastFlag(void) const -{ - return westEastFlag; -} - -uint8_t SatelliteDeliverySystemDescriptor::getPolarization(void) const -{ - return polarization; -} - -uint8_t SatelliteDeliverySystemDescriptor::getModulation(void) const -{ - return modulation; -} - -uint32_t SatelliteDeliverySystemDescriptor::getSymbolRate(void) const -{ - return symbolRate; -} - -uint8_t SatelliteDeliverySystemDescriptor::getFecInner(void) const -{ - return fecInner; -} - diff --git a/lib/dvb_si/satellite_delivery_system_descriptor.h b/lib/dvb_si/satellite_delivery_system_descriptor.h deleted file mode 100644 index b6c2a668..00000000 --- a/lib/dvb_si/satellite_delivery_system_descriptor.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * $Id: satellite_delivery_system_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_satellite_delivery_system_descriptor_h__ -#define __dvb_descriptor_satellite_delivery_system_descriptor_h__ - -#include "descriptor.h" - -class SatelliteDeliverySystemDescriptor : public Descriptor -{ - protected: - unsigned frequency : 32; - unsigned orbitalPosition : 16; - unsigned westEastFlag : 1; - unsigned polarization : 2; - unsigned modulation : 5; - unsigned symbolRate : 28; - unsigned fecInner : 4; - - public: - SatelliteDeliverySystemDescriptor(const uint8_t * const buffer); - - uint32_t getFrequency(void) const; - uint16_t getOrbitalPosition(void) const; - uint8_t getWestEastFlag(void) const; - uint8_t getPolarization(void) const; - uint8_t getModulation(void) const; - uint32_t getSymbolRate(void) const; - uint8_t getFecInner(void) const; -}; - -#endif /* __dvb_descriptor_satellite_delivery_system_descriptor_h__ */ diff --git a/lib/dvb_si/sdt.cpp b/lib/dvb_si/sdt.cpp deleted file mode 100644 index cce81039..00000000 --- a/lib/dvb_si/sdt.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/* - * $Id: sdt.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -ServiceDescription::ServiceDescription(const uint8_t * const buffer) -{ - serviceId = (buffer[0] << 8) | buffer[1]; - reserved1 = (buffer[2] >> 2) & 0x3F; - eitScheduleFlag = (buffer[2] >> 1) & 0x01; - eitPresentFollowingFlag = buffer[2] & 0x01; - runningStatus = (buffer[3] >> 5) & 0x07; - freeCaMode = (buffer[3] >> 4) & 0x01; - descriptorsLoopLength = ((buffer[3] & 0x0F) << 8) | buffer[4]; - - for (uint16_t i = 5; i < descriptorsLoopLength + 5; i += buffer[i + 1] + 2) - descriptor(&buffer[i]); -} - -uint16_t ServiceDescription::getServiceId(void) const -{ - return serviceId; -} - -uint8_t ServiceDescription::getEitScheduleFlag(void) const -{ - return eitScheduleFlag; -} - -uint8_t ServiceDescription::getEitPresentFollowingFlag(void) const -{ - return eitPresentFollowingFlag; -} - -uint8_t ServiceDescription::getRunningStatus(void) const -{ - return runningStatus; -} - -uint8_t ServiceDescription::getFreeCaMode(void) const -{ - return freeCaMode; -} - -ServiceDescriptionTable::ServiceDescriptionTable(const uint8_t * const buffer) : LongCrcTable (buffer) -{ - originalNetworkId = (buffer[8] << 8) | buffer[9]; - reserved4 = buffer[10]; - - for (uint16_t i = 11; i < sectionLength - 1; i += ((buffer[i + 3] & 0x0F) | buffer[i + 4]) + 5) - description.push_back(new ServiceDescription(&buffer[i])); -} - -ServiceDescriptionTable::~ServiceDescriptionTable(void) -{ - for (ServiceDescriptionIterator i = description.begin(); i != description.end(); ++i) - delete *i; -} - -uint16_t ServiceDescriptionTable::getOriginalNetworkId(void) const -{ - return originalNetworkId; -} - -const ServiceDescriptionVector *ServiceDescriptionTable::getDescriptions(void) const -{ - return &description; -} - diff --git a/lib/dvb_si/sdt.h b/lib/dvb_si/sdt.h deleted file mode 100644 index e1d511be..00000000 --- a/lib/dvb_si/sdt.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * $Id: sdt.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002 by Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_table_sdt_h__ -#define __dvb_table_sdt_h__ - -#include -#include "long_crc_table.h" - -class ServiceDescription : public DescriptorContainer -{ - protected: - unsigned serviceId : 16; - unsigned reserved1 : 6; - unsigned eitScheduleFlag : 1; - unsigned eitPresentFollowingFlag : 1; - unsigned runningStatus : 3; - unsigned freeCaMode : 1; - unsigned descriptorsLoopLength : 12; - - public: - ServiceDescription(const uint8_t * const buffer); - - uint16_t getServiceId(void) const; - uint8_t getEitScheduleFlag(void) const; - uint8_t getEitPresentFollowingFlag(void) const; - uint8_t getRunningStatus(void) const; - uint8_t getFreeCaMode(void) const; -}; - -typedef std::vector ServiceDescriptionVector; -typedef ServiceDescriptionVector::iterator ServiceDescriptionIterator; -typedef ServiceDescriptionVector::const_iterator ServiceDescriptionConstIterator; - -class ServiceDescriptionTable : public LongCrcTable -{ - protected: - unsigned originalNetworkId : 16; - unsigned reserved4 : 8; - ServiceDescriptionVector description; - - public: - ServiceDescriptionTable(const uint8_t * const buffer); - ~ServiceDescriptionTable(void); - - static const enum PacketId PID = PID_SDT; - static const enum TableId TID = TID_SDT_ACTUAL; - static const uint32_t TIMEOUT = 3000; - - uint16_t getOriginalNetworkId(void) const; - uint16_t getTransportStreamId(void) const { return getTableIdExtension(); } - const ServiceDescriptionVector *getDescriptions(void) const; -}; - -typedef std::vector ServiceDescriptionTableVector; -typedef ServiceDescriptionTableVector::iterator ServiceDescriptionTableIterator; -typedef ServiceDescriptionTableVector::const_iterator ServiceDescriptionTableConstIterator; - -#endif /* __dvb_table_sdt_h__ */ diff --git a/lib/dvb_si/service_descriptor.cpp b/lib/dvb_si/service_descriptor.cpp deleted file mode 100644 index a8bffc9c..00000000 --- a/lib/dvb_si/service_descriptor.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/* - * $Id: service_descriptor.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -ServiceDescriptor::ServiceDescriptor(const uint8_t * const buffer) : Descriptor(buffer) -{ - serviceType = buffer[2]; - serviceProviderNameLength = buffer[3]; - serviceProviderName.assign((char *)&buffer[4], serviceProviderNameLength); - serviceNameLength = buffer[serviceProviderNameLength + 4]; - serviceName.assign((char *)&buffer[serviceProviderNameLength + 5], serviceNameLength); -} - -uint8_t ServiceDescriptor::getServiceType(void) const -{ - return serviceType; -} - -std::string ServiceDescriptor::getServiceProviderName(void) const -{ - return serviceProviderName; -} - -std::string ServiceDescriptor::getServiceName(void) const -{ - return serviceName; -} - diff --git a/lib/dvb_si/service_descriptor.h b/lib/dvb_si/service_descriptor.h deleted file mode 100644 index 38ccc839..00000000 --- a/lib/dvb_si/service_descriptor.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * $Id: service_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_service_descriptor_h__ -#define __dvb_descriptor_service_descriptor_h__ - -#include "descriptor.h" - -class ServiceDescriptor : public Descriptor -{ - protected: - unsigned serviceType : 8; - unsigned serviceProviderNameLength : 8; - std::string serviceProviderName; - unsigned serviceNameLength : 8; - std::string serviceName; - - public: - ServiceDescriptor(const uint8_t * const buffer); - - uint8_t getServiceType(void) const; - std::string getServiceProviderName(void) const; - std::string getServiceName(void) const; -}; - -#endif /* __dvb_descriptor_service_descriptor_h__ */ diff --git a/lib/dvb_si/service_list_descriptor.cpp b/lib/dvb_si/service_list_descriptor.cpp deleted file mode 100644 index 0e595cb9..00000000 --- a/lib/dvb_si/service_list_descriptor.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* - * $Id: service_list_descriptor.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -ServiceListItem::ServiceListItem(const uint8_t * const buffer) -{ - serviceId = (buffer[0] << 8) | buffer[1]; - serviceType = buffer[2]; -} - -uint16_t ServiceListItem::getServiceId(void) const -{ - return serviceId; -} - -uint8_t ServiceListItem::getServiceType(void) const -{ - return serviceType; -} - -ServiceListDescriptor::ServiceListDescriptor(const uint8_t * const buffer) : Descriptor(buffer) -{ - for (uint16_t i = 0; i < descriptorLength; i += 3) - serviceList.push_back(new ServiceListItem(&buffer[i + 2])); -} - -ServiceListDescriptor::~ServiceListDescriptor(void) -{ - for (ServiceListItemIterator i = serviceList.begin(); i != serviceList.end(); ++i) - delete *i; -} - -const ServiceListItemVector *ServiceListDescriptor::getServiceList(void) const -{ - return &serviceList; -} - diff --git a/lib/dvb_si/service_list_descriptor.h b/lib/dvb_si/service_list_descriptor.h deleted file mode 100644 index bd9c04ff..00000000 --- a/lib/dvb_si/service_list_descriptor.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * $Id: service_list_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_service_list_descriptor_h__ -#define __dvb_descriptor_service_list_descriptor_h__ - -#include "descriptor.h" - -class ServiceListItem -{ - protected: - unsigned serviceId : 16; - unsigned serviceType : 8; - - public: - ServiceListItem(const uint8_t * const buffer); - - uint16_t getServiceId(void) const; - uint8_t getServiceType(void) const; -}; - -typedef std::vector ServiceListItemVector; -typedef ServiceListItemVector::iterator ServiceListItemIterator; -typedef ServiceListItemVector::const_iterator ServiceListItemConstIterator; - -class ServiceListDescriptor : public Descriptor -{ - protected: - ServiceListItemVector serviceList; - - public: - ServiceListDescriptor(const uint8_t * const buffer); - ~ServiceListDescriptor(void); - - const ServiceListItemVector *getServiceList(void) const; -}; - -#endif /* __dvb_descriptor_service_list_descriptor_h__ */ diff --git a/lib/dvb_si/service_move_descriptor.cpp b/lib/dvb_si/service_move_descriptor.cpp deleted file mode 100644 index 817b480a..00000000 --- a/lib/dvb_si/service_move_descriptor.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* - * $Id: service_move_descriptor.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -ServiceMoveDescriptor::ServiceMoveDescriptor(const uint8_t * const buffer) : Descriptor(buffer) -{ - newOriginalNetworkId = (buffer[2] << 8) | buffer[3]; - newTransportStreamId = (buffer[4] << 8) | buffer[5]; - newServiceId = (buffer[6] << 8) | buffer[7]; -} - -uint16_t ServiceMoveDescriptor::getNewOriginalNetworkId(void) const -{ - return newOriginalNetworkId; -} - -uint16_t ServiceMoveDescriptor::getNewTransportStreamId(void) const -{ - return newTransportStreamId; -} - -uint16_t ServiceMoveDescriptor::getNewServiceId(void) const -{ - return newServiceId; -} - diff --git a/lib/dvb_si/service_move_descriptor.h b/lib/dvb_si/service_move_descriptor.h deleted file mode 100644 index 55c10c47..00000000 --- a/lib/dvb_si/service_move_descriptor.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * $Id: service_move_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_service_move_descriptor_h__ -#define __dvb_descriptor_service_move_descriptor_h__ - -#include "descriptor.h" - -class ServiceMoveDescriptor : public Descriptor -{ - protected: - unsigned newOriginalNetworkId : 16; - unsigned newTransportStreamId : 16; - unsigned newServiceId : 16; - - public: - ServiceMoveDescriptor(const uint8_t * const buffer); - - uint16_t getNewOriginalNetworkId(void) const; - uint16_t getNewTransportStreamId(void) const; - uint16_t getNewServiceId(void) const; -}; - -#endif /* __dvb_descriptor_service_move_descriptor_h__ */ diff --git a/lib/dvb_si/service_type.h b/lib/dvb_si/service_type.h deleted file mode 100644 index 0871af41..00000000 --- a/lib/dvb_si/service_type.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * $Id: service_type.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_id_service_type_h__ -#define __dvb_id_service_type_h__ - -enum ServiceType { - /* 0x00 - 0x10: ETSI EN 300 468 V1.5.1 (2003-01) */ - ST_RESERVED = 0x00, - ST_DIGITAL_TELEVISION_SERVICE = 0x01, - ST_DIGITAL_RADIO_SOUND_SERVICE = 0x02, - ST_TELETEXT_SERVICE = 0x03, - ST_NVOD_REFERENCE_SERVICE = 0x04, - ST_NVOD_TIME_SHIFTED_SERVICE = 0x05, - ST_MOSAIC_SERVICE = 0x06, - ST_PAL_CODED_SIGNAL = 0x07, - ST_SECAM_CODED_SIGNAL = 0x08, - ST_D_D2_MAC = 0x09, - ST_FM_RADIO = 0x0A, - ST_NTSC_CODED_SIGNAL = 0x0B, - ST_DATA_BROADCAST_SERVICE = 0x0C, - ST_COMMON_INTERFACE_RESERVED = 0x0D, - ST_RCS_MAP = 0x0E, - ST_RCS_FLS = 0x0F, - ST_DVB_MHP_SERVICE = 0x10, - /* 0x11 - 0x7F: reserved for future use */ - ST_MULTIFEED = 0x69 - /* 0x80 - 0xFE: user defined */ - /* 0xFF: reserved for future use */ -}; - -#endif /* __dvb_id_service_type_h__ */ diff --git a/lib/dvb_si/short_crc_table.cpp b/lib/dvb_si/short_crc_table.cpp deleted file mode 100644 index bd626ffd..00000000 --- a/lib/dvb_si/short_crc_table.cpp +++ /dev/null @@ -1,36 +0,0 @@ -/* - * $Id: short_crc_table.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -ShortCrcTable::ShortCrcTable(const uint8_t * const buffer) : ShortTable(buffer) -{ - crc32 = (buffer[sectionLength - 1] << 24) | - (buffer[sectionLength + 0] << 16) | - (buffer[sectionLength + 1] << 8) | - (buffer[sectionLength + 2]); -} - -uint32_t ShortCrcTable::getCrc32(void) const -{ - return crc32; -} - diff --git a/lib/dvb_si/short_crc_table.h b/lib/dvb_si/short_crc_table.h deleted file mode 100644 index d9ef6fd8..00000000 --- a/lib/dvb_si/short_crc_table.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * $Id: short_crc_table.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_table_short_crc_table_h__ -#define __dvb_table_short_crc_table_h__ - -#include "short_table.h" - -class ShortCrcTable : public ShortTable -{ - protected: - unsigned crc32 : 32; - - public: - ShortCrcTable(const uint8_t * const buffer); - - static const uint8_t CRC32 = 1; - - uint32_t getCrc32(void) const; -}; - -typedef std::vector ShortCrcTableVector; -typedef ShortCrcTableVector::iterator ShortCrcTableIterator; -typedef ShortCrcTableVector::const_iterator ShortCrcTableConstIterator; - -#endif /* __dvb_table_short_crc_table_h__ */ diff --git a/lib/dvb_si/short_event_descriptor.cpp b/lib/dvb_si/short_event_descriptor.cpp deleted file mode 100644 index e5fffe89..00000000 --- a/lib/dvb_si/short_event_descriptor.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/* - * $Id: short_event_descriptor.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -ShortEventDescriptor::ShortEventDescriptor(const uint8_t * const buffer) : Descriptor(buffer) -{ - iso639LanguageCode.assign((char *)&buffer[2], 3); - eventNameLength = buffer[5]; - eventName.assign((char *)&buffer[6], eventNameLength); - textLength = buffer[6 + eventNameLength]; - text.assign((char *)&buffer[7 + eventNameLength], textLength); -} - -std::string ShortEventDescriptor::getIso639LanguageCode(void) const -{ - return iso639LanguageCode; -} - -std::string ShortEventDescriptor::getEventName(void) const -{ - return eventName; -} - -std::string ShortEventDescriptor::getText(void) const -{ - return text; -} - diff --git a/lib/dvb_si/short_event_descriptor.h b/lib/dvb_si/short_event_descriptor.h deleted file mode 100644 index e421cdea..00000000 --- a/lib/dvb_si/short_event_descriptor.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * $Id: short_event_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_short_event_descriptor_h__ -#define __dvb_descriptor_short_event_descriptor_h__ - -#include "descriptor.h" - -class ShortEventDescriptor : public Descriptor -{ - protected: - std::string iso639LanguageCode; - unsigned eventNameLength : 8; - std::string eventName; - unsigned textLength : 8; - std::string text; - - public: - ShortEventDescriptor(const uint8_t * const buffer); - - std::string getIso639LanguageCode(void) const; - std::string getEventName(void) const; - std::string getText(void) const; -}; - -#endif /* __dvb_descriptor_short_event_descriptor_h__ */ diff --git a/lib/dvb_si/short_smoothing_buffer_descriptor.h b/lib/dvb_si/short_smoothing_buffer_descriptor.h deleted file mode 100644 index 66c0802b..00000000 --- a/lib/dvb_si/short_smoothing_buffer_descriptor.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * $Id: short_smoothing_buffer_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_short_smoothing_buffer_descriptor_h__ -#define __dvb_descriptor_short_smoothing_buffer_descriptor_h__ - -#include "descriptor.h" - -class ShortSmoothingBufferDescriptor : public Descriptor -{ - protected: - unsigned sbSize : 2; - unsigned sbLeakRate : 6; - std::vector reserved; - - public: - ShortSmoothingBufferDescriptor(const uint8_t * const buffer); - - uint8_t getSbSize(void) const; - uint8_t getSbLeakRate(void) const; -}; - -#endif /* __dvb_descriptor_short_smoothing_buffer_descriptor_h__ */ diff --git a/lib/dvb_si/short_table.cpp b/lib/dvb_si/short_table.cpp deleted file mode 100644 index b162fe99..00000000 --- a/lib/dvb_si/short_table.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/* - * $Id: short_table.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -ShortTable::ShortTable(const uint8_t * const buffer) -{ - tableId = buffer[0]; - sectionSyntaxIndicator = (buffer[1] >> 7) & 0x01; - reserved1 = (buffer[1] >> 6) & 0x01; - reserved2 = (buffer[1] >> 4) & 0x03; - sectionLength = ((buffer[1] & 0x0F) << 8) | buffer[2]; -} - -uint8_t ShortTable::getTableId(void) const -{ - return tableId; -} - -uint8_t ShortTable::getSectionSyntaxIndicator(void) const -{ - return sectionSyntaxIndicator; -} - -uint16_t ShortTable::getSectionLength(void) const -{ - return sectionLength; -} - diff --git a/lib/dvb_si/short_table.h b/lib/dvb_si/short_table.h deleted file mode 100644 index 743891f8..00000000 --- a/lib/dvb_si/short_table.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * $Id: short_table.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_table_short_table_h__ -#define __dvb_table_short_table_h__ - -#include -#include -#include -#include - -class ShortTable -{ - protected: - unsigned tableId : 8; - unsigned sectionSyntaxIndicator : 1; - unsigned reserved1 : 1; - unsigned reserved2 : 2; - unsigned sectionLength : 12; - - public: - ShortTable(const uint8_t * const buffer); - - static const uint8_t CRC32 = 0; - static const uint16_t LENGTH = 1024; - static const enum PacketId PID = PID_RESERVED; - static const uint8_t SYNTAX = 0; - static const enum TableId TID = TID_RESERVED; - static const uint32_t TIMEOUT = 0; - - uint8_t getTableId(void) const; - uint8_t getSectionSyntaxIndicator(void) const; - uint16_t getSectionLength(void) const; -}; - -typedef std::vector ShortTableVector; -typedef ShortTableVector::iterator ShortTableIterator; -typedef ShortTableVector::const_iterator ShortTableConstIterator; - -#endif /* __dvb_table_short_table_h__ */ diff --git a/lib/dvb_si/smoothing_buffer_descriptor.h b/lib/dvb_si/smoothing_buffer_descriptor.h deleted file mode 100644 index 68ccdde5..00000000 --- a/lib/dvb_si/smoothing_buffer_descriptor.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * $Id: smoothing_buffer_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_smoothing_buffer_descriptor_h__ -#define __dvb_descriptor_smoothing_buffer_descriptor_h__ - -#include "descriptor.h" - -class SmoothingBufferDescriptor : public Descriptor -{ - protected: - unsigned reserved : 2; - unsigned sbLeakRate : 22; - unsigned reserved2 : 2; - unsigned sbSize : 22; - - public: - SmoothingBufferDescriptor(const uint8_t * const buffer); - - uint32_t getSbLeakRate(void) const; - uint32_t getSbSize(void) const; -}; - -#endif /* __dvb_descriptor_smoothing_buffer_descriptor_h__ */ diff --git a/lib/dvb_si/std_descriptor.h b/lib/dvb_si/std_descriptor.h deleted file mode 100644 index a216b04f..00000000 --- a/lib/dvb_si/std_descriptor.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * $Id: std_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_std_descriptor_h__ -#define __dvb_descriptor_std_descriptor_h__ - -#include "descriptor.h" - -class StdDescriptor : public Descriptor -{ - protected: - unsigned reserved : 7; - unsigned leakValidFlag : 1; - - public: - StdDescriptor(const uint8_t * const buffer); - - uint8_t getLeakValidFlag(void) const; -}; - -#endif /* __dvb_descriptor_std_descriptor_h__ */ diff --git a/lib/dvb_si/stream_identifier_descriptor.cpp b/lib/dvb_si/stream_identifier_descriptor.cpp deleted file mode 100644 index 55956997..00000000 --- a/lib/dvb_si/stream_identifier_descriptor.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/* - * $Id: stream_identifier_descriptor.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -StreamIdentifierDescriptor::StreamIdentifierDescriptor(const uint8_t * const buffer) : Descriptor(buffer) -{ - componentTag = buffer[2]; -} - -uint8_t StreamIdentifierDescriptor::getComponentTag(void) const -{ - return componentTag; -} - diff --git a/lib/dvb_si/stream_identifier_descriptor.h b/lib/dvb_si/stream_identifier_descriptor.h deleted file mode 100644 index 4a37b4e7..00000000 --- a/lib/dvb_si/stream_identifier_descriptor.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * $Id: stream_identifier_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_stream_identifier_descriptor_h__ -#define __dvb_descriptor_stream_identifier_descriptor_h__ - -#include "descriptor.h" - -class StreamIdentifierDescriptor : public Descriptor -{ - protected: - unsigned componentTag : 8; - - public: - StreamIdentifierDescriptor(const uint8_t * const buffer); - - uint8_t getComponentTag(void) const; -}; - -#endif /* __dvb_descriptor_stream_identifier_descriptor_h__ */ diff --git a/lib/dvb_si/stream_type.h b/lib/dvb_si/stream_type.h deleted file mode 100644 index d9f68dd6..00000000 --- a/lib/dvb_si/stream_type.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * $Id: stream_type.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_id_stream_type_h__ -#define __dvb_id_stream_type_h__ - -enum StreamType { - STT_RESERVED = 0x00, - STT_MPEG1_VIDEO = 0x01, - STT_MPEG2_VIDEO = 0x02, - STT_MPEG1_AUDIO = 0x03, - STT_MPEG2_AUDIO = 0x04, - STT_MPEG2_SECTIONS = 0x05, - STT_MPEG2_PES = 0x06, - STT_MHEG = 0x07, - STT_DSM_CC = 0x08, - STT_TREC_H_222_1 = 0x09, - STT_13818_6_A = 0x0A, - STT_13818_6_B = 0x0B, - STT_13818_6_C = 0x0C, - STT_13818_6_D = 0x0D, - STT_AUXILIARY = 0x0E, - STT_ADTS_AUDIO = 0x0F, - STT_MPEG4_VIDEO = 0x10, - STT_MPEG4_AUDIO = 0x11, - STT_MPEG4_PES = 0x12, - STT_MPEG4_SECTIONS = 0x13, - STT_SYNC_DOWNLOAD_PROT = 0x14 - /* 0x15 - 0x7F: ITU-T Rec. H.222.0 | ISO/IEC 13818-1 Reserved */ - /* 0x80 - 0xFF: User Private */ -}; - -#endif /* __dvb_id_stream_type_h__ */ diff --git a/lib/dvb_si/stuffing_descriptor.cpp b/lib/dvb_si/stuffing_descriptor.cpp deleted file mode 100644 index f672fbfe..00000000 --- a/lib/dvb_si/stuffing_descriptor.cpp +++ /dev/null @@ -1,29 +0,0 @@ -/* - * $Id: stuffing_descriptor.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -StuffingDescriptor::StuffingDescriptor(const uint8_t * const buffer) : Descriptor(buffer) -{ - for (uint16_t i = 0; i < descriptorLength; ++i) - stuffingByte.push_back(buffer[i + 2]); -} - diff --git a/lib/dvb_si/stuffing_descriptor.h b/lib/dvb_si/stuffing_descriptor.h deleted file mode 100644 index 31486c2f..00000000 --- a/lib/dvb_si/stuffing_descriptor.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * $Id: stuffing_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_stuffing_descriptor_h__ -#define __dvb_descriptor_stuffing_descriptor_h__ - -#include "descriptor.h" - -class StuffingDescriptor : public Descriptor -{ - protected: - std::vector stuffingByte; - - public: - StuffingDescriptor(const uint8_t * const buffer); -}; - -#endif /* __dvb_descriptor_stuffing_descriptor_h__ */ diff --git a/lib/dvb_si/subtitling_descriptor.cpp b/lib/dvb_si/subtitling_descriptor.cpp deleted file mode 100644 index c2bdfb9e..00000000 --- a/lib/dvb_si/subtitling_descriptor.cpp +++ /dev/null @@ -1,68 +0,0 @@ -/* - * $Id: subtitling_descriptor.cpp,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -Subtitling::Subtitling(const uint8_t * const buffer) -{ - iso639LanguageCode.assign((char *)&buffer[0], 3); - subtitlingType = buffer[3]; - compositionPageId = (buffer[4] << 8) | buffer[5]; - ancillaryPageId = (buffer[6] << 8) | buffer[7]; -} - -std::string Subtitling::getIso639LanguageCode(void) const -{ - return iso639LanguageCode; -} - -uint8_t Subtitling::getSubtitlingType(void) const -{ - return subtitlingType; -} - -uint16_t Subtitling::getCompositionPageId(void) const -{ - return compositionPageId; -} - -uint16_t Subtitling::getAncillaryPageId(void) const -{ - return ancillaryPageId; -} - -SubtitlingDescriptor::SubtitlingDescriptor(const uint8_t * const buffer) : Descriptor(buffer) -{ - for (uint16_t i = 0; i < descriptorLength; i += 8) - subtitlings.push_back(new Subtitling(&buffer[i + 2])); -} - -SubtitlingDescriptor::~SubtitlingDescriptor(void) -{ - for (SubtitlingIterator i = subtitlings.begin(); i != subtitlings.end(); ++i) - delete *i; -} - -const SubtitlingVector *SubtitlingDescriptor::getSubtitlings(void) const -{ - return &subtitlings; -} - diff --git a/lib/dvb_si/subtitling_descriptor.h b/lib/dvb_si/subtitling_descriptor.h deleted file mode 100644 index 5232dbdb..00000000 --- a/lib/dvb_si/subtitling_descriptor.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * $Id: subtitling_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_subtitling_descriptor_h__ -#define __dvb_descriptor_subtitling_descriptor_h__ - -#include "descriptor.h" - -class Subtitling -{ - protected: - std::string iso639LanguageCode; - unsigned subtitlingType : 8; - unsigned compositionPageId : 16; - unsigned ancillaryPageId : 16; - - public: - Subtitling(const uint8_t * const buffer); - - std::string getIso639LanguageCode(void) const; - uint8_t getSubtitlingType(void) const; - uint16_t getCompositionPageId(void) const; - uint16_t getAncillaryPageId(void) const; -}; - -typedef std::vector SubtitlingVector; -typedef SubtitlingVector::iterator SubtitlingIterator; -typedef SubtitlingVector::const_iterator SubtitlingConstIterator; - -class SubtitlingDescriptor : public Descriptor -{ - protected: - SubtitlingVector subtitlings; - - public: - SubtitlingDescriptor(const uint8_t * const buffer); - ~SubtitlingDescriptor(void); - - const SubtitlingVector *getSubtitlings(void) const; -}; - -#endif /* __dvb_descriptor_subtitling_descriptor_h__ */ diff --git a/lib/dvb_si/system_clock_descriptor.h b/lib/dvb_si/system_clock_descriptor.h deleted file mode 100644 index 2216cef5..00000000 --- a/lib/dvb_si/system_clock_descriptor.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * $Id: system_clock_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_system_clock_descriptor_h__ -#define __dvb_descriptor_system_clock_descriptor_h__ - -#include "descriptor.h" - -class SystemClockDescriptor : public Descriptor -{ - protected: - unsigned externalClockReferenceIndicator : 1; - unsigned reserved : 1; - unsigned clockAccuracyInteger : 6; - unsigned clockAccuracyExponent : 3; - unsigned reserved2 : 5; - - public: - SystemClockDescriptor(const uint8_t * const buffer); - - uint8_t getExternalClockReferenceIndicator(void) const; - uint8_t getClockAccuracyInteger(void) const; - uint8_t getClockAccuracyExponent(void) const; -}; - -#endif /* __dvb_descriptor_system_clock_descriptor_h__ */ diff --git a/lib/dvb_si/table_id.h b/lib/dvb_si/table_id.h deleted file mode 100644 index 39e005c1..00000000 --- a/lib/dvb_si/table_id.h +++ /dev/null @@ -1,123 +0,0 @@ -/* - * $Id: table_id.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_id_table_id_h__ -#define __dvb_id_table_id_h__ - -enum TableId { - /* ISO/IEC 13818-1, ITU T-REC H.222.0 */ - TID_PAT = 0x00, /* program_association_section */ - TID_CAT = 0x01, /* conditional_access_section */ - TID_PMT = 0x02, /* TS_program_map_section */ - TID_TSDT = 0x03, /* TS_description_section */ - TID_SDT = 0x04, /* ISO_IEC_14496_scene_description_section */ - TID_ODT = 0x05, /* ISO_IEC_14496_object_descriptor_section */ - - /* 0x06 - 0x09: ITU-T Rec. H.222.0 | ISO/IEC 13818-1 reserved */ - - /* 0x0A - 0x0D: ISO/IEC 13818-6 */ - TID_DSMCC_MULTIPROTOCOL = 0x0A, /* Multiprotocol */ - TID_DSMCC_MSG_HEADER = 0x0B, /* DSM-CC Messages Header (U-N) */ - TID_DSMCC_DESCR_LOOP = 0x0C, /* DSM-CC Descriptors Loop */ - TID_DSMCC_TBD = 0x0D, /* TBD */ - - /* 0x0E - 0x37: ITU-T Rec. H.222.0 | ISO/IEC 13818-1 reserved */ - - /* 0x38 - 0x3F: Defined in ISO/IEC 13818-6 */ - TID_DSMCC_DL_MESSAGE = 0x3B, /* DSM-CC Download Message */ - TID_DSMCC_DL_DATA = 0x3C, /* DSM-CC Download Data */ - TID_DSMCC_DL_EVENT = 0x3D, /* DSM-CC Download Event */ - - /* 0x40 - 0x7F: ETSI EN 300 468 V1.5.1 (2003-01) */ - TID_NIT_ACTUAL = 0x40, /* network_information_section - actual_network */ - TID_NIT_OTHER = 0x41, /* network_information_section - other_network */ - TID_SDT_ACTUAL = 0x42, /* service_description_section - actual_transport_stream */ - TID_SDT_OTHER = 0x46, /* service_description_section - other_transport_stream */ - TID_BAT = 0x4A, /* bouquet_association_section */ - TID_EIT_ACTUAL = 0x4E, /* event_information_section - actual_transport_stream, present/following */ - TID_EIT_OTHER = 0x4F, /* event_information_section - other_transport_stream, present/following */ - TID_EIT_ACTUAL_SCHED_0 = 0x50, /* event_information_section - actual_transport_stream, schedule */ - TID_EIT_ACTUAL_SCHED_1 = 0x51, /* event_information_section - actual_transport_stream, schedule */ - TID_EIT_ACTUAL_SCHED_2 = 0x52, /* event_information_section - actual_transport_stream, schedule */ - TID_EIT_ACTUAL_SCHED_3 = 0x53, /* event_information_section - actual_transport_stream, schedule */ - TID_EIT_ACTUAL_SCHED_4 = 0x54, /* event_information_section - actual_transport_stream, schedule */ - TID_EIT_ACTUAL_SCHED_5 = 0x55, /* event_information_section - actual_transport_stream, schedule */ - TID_EIT_ACTUAL_SCHED_6 = 0x56, /* event_information_section - actual_transport_stream, schedule */ - TID_EIT_ACTUAL_SCHED_7 = 0x57, /* event_information_section - actual_transport_stream, schedule */ - TID_EIT_ACTUAL_SCHED_8 = 0x58, /* event_information_section - actual_transport_stream, schedule */ - TID_EIT_ACTUAL_SCHED_9 = 0x59, /* event_information_section - actual_transport_stream, schedule */ - TID_EIT_ACTUAL_SCHED_A = 0x5A, /* event_information_section - actual_transport_stream, schedule */ - TID_EIT_ACTUAL_SCHED_B = 0x5B, /* event_information_section - actual_transport_stream, schedule */ - TID_EIT_ACTUAL_SCHED_C = 0x5C, /* event_information_section - actual_transport_stream, schedule */ - TID_EIT_ACTUAL_SCHED_D = 0x5D, /* event_information_section - actual_transport_stream, schedule */ - TID_EIT_ACTUAL_SCHED_E = 0x5E, /* event_information_section - actual_transport_stream, schedule */ - TID_EIT_ACTUAL_SCHED_F = 0x5F, /* event_information_section - actual_transport_stream, schedule */ - TID_EIT_OTHER_SCHED_0 = 0x60, /* event_information_section - other_transport_stream, schedule */ - TID_EIT_OTHER_SCHED_1 = 0x61, /* event_information_section - other_transport_stream, schedule */ - TID_EIT_OTHER_SCHED_2 = 0x62, /* event_information_section - other_transport_stream, schedule */ - TID_EIT_OTHER_SCHED_3 = 0x63, /* event_information_section - other_transport_stream, schedule */ - TID_EIT_OTHER_SCHED_4 = 0x64, /* event_information_section - other_transport_stream, schedule */ - TID_EIT_OTHER_SCHED_5 = 0x65, /* event_information_section - other_transport_stream, schedule */ - TID_EIT_OTHER_SCHED_6 = 0x66, /* event_information_section - other_transport_stream, schedule */ - TID_EIT_OTHER_SCHED_7 = 0x67, /* event_information_section - other_transport_stream, schedule */ - TID_EIT_OTHER_SCHED_8 = 0x68, /* event_information_section - other_transport_stream, schedule */ - TID_EIT_OTHER_SCHED_9 = 0x69, /* event_information_section - other_transport_stream, schedule */ - TID_EIT_OTHER_SCHED_A = 0x6A, /* event_information_section - other_transport_stream, schedule */ - TID_EIT_OTHER_SCHED_B = 0x6B, /* event_information_section - other_transport_stream, schedule */ - TID_EIT_OTHER_SCHED_C = 0x6C, /* event_information_section - other_transport_stream, schedule */ - TID_EIT_OTHER_SCHED_D = 0x6D, /* event_information_section - other_transport_stream, schedule */ - TID_EIT_OTHER_SCHED_E = 0x6E, /* event_information_section - other_transport_stream, schedule */ - TID_EIT_OTHER_SCHED_F = 0x6F, /* event_information_section - other_transport_stream, schedule */ - TID_TDT = 0x70, /* time_date_section */ - TID_RST = 0x71, /* running_status_section */ - TID_ST = 0x72, /* stuffing_section */ - TID_TOT = 0x73, /* time_offset_section */ - TID_AIT = 0x74, /* application_information_section */ - TID_DIT = 0x7E, /* discontinuity_information_section */ - TID_SIT = 0x7F, /* selection_information_section */ - - /* 0x80 - 0x8F: ETSI ETR 289 ed.1 (1996-10) */ - TID_CAMT_ECM_0 = 0x80, - TID_CAMT_ECM_1 = 0x81, - TID_CAMT_PRIVATE_0 = 0x82, - TID_CAMT_PRIVATE_1 = 0x83, - TID_CAMT_PRIVATE_2 = 0x84, - TID_CAMT_PRIVATE_3 = 0x85, - TID_CAMT_PRIVATE_4 = 0x86, - TID_CAMT_PRIVATE_5 = 0x87, - TID_CAMT_PRIVATE_6 = 0x88, - TID_CAMT_PRIVATE_7 = 0x89, - TID_CAMT_PRIVATE_8 = 0x8A, - TID_CAMT_PRIVATE_9 = 0x8B, - TID_CAMT_PRIVATE_A = 0x8C, - TID_CAMT_PRIVATE_B = 0x8D, - TID_CAMT_PRIVATE_C = 0x8E, - TID_CAMT_PRIVATE_D = 0x8F, - - /* 0x90 - 0xFE: PRIVATE */ - TID_TOC = 0x91, - TID_HIT = 0x92, - - /* 0xFF: ISO RESERVED */ - TID_RESERVED = 0xFF -}; - -#endif /* __dvb_id_table_id_h__ */ diff --git a/lib/dvb_si/target_background_grid_descriptor.cpp b/lib/dvb_si/target_background_grid_descriptor.cpp deleted file mode 100644 index 921157f1..00000000 --- a/lib/dvb_si/target_background_grid_descriptor.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* - * $Id: target_background_grid_descriptor.cpp,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -TargetBackgroundGridDescriptor::TargetBackgroundGridDescriptor(const uint8_t * const buffer) : Descriptor(buffer) -{ - horizontalSize = ((buffer[2] << 8) | (buffer[3] & 0xF3)) >> 2; - verticalSize = (((buffer[3] & 0x03) << 16) | (buffer[4] << 8) | (buffer[5] & 0xF0)) >> 4; - aspectRatioInformation = buffer[5] & 0x0F; -} - -uint16_t TargetBackgroundGridDescriptor::getHorizontalSize(void) const -{ - return horizontalSize; -} - -uint16_t TargetBackgroundGridDescriptor::getVerticalSize(void) const -{ - return verticalSize; -} - -uint8_t TargetBackgroundGridDescriptor::getAspectRatioInformation(void) const -{ - return aspectRatioInformation; -} - diff --git a/lib/dvb_si/target_background_grid_descriptor.h b/lib/dvb_si/target_background_grid_descriptor.h deleted file mode 100644 index 38ce5182..00000000 --- a/lib/dvb_si/target_background_grid_descriptor.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * $Id: target_background_grid_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_target_background_grid_descriptor_h__ -#define __dvb_descriptor_target_background_grid_descriptor_h__ - -#include "descriptor.h" - -class TargetBackgroundGridDescriptor : public Descriptor -{ - protected: - unsigned horizontalSize : 14; - unsigned verticalSize : 14; - unsigned aspectRatioInformation : 4; - - public: - TargetBackgroundGridDescriptor(const uint8_t * const buffer); - - uint16_t getHorizontalSize(void) const; - uint16_t getVerticalSize(void) const; - uint8_t getAspectRatioInformation(void) const; -}; - -#endif /* __dvb_descriptor_target_background_grid_descriptor_h__ */ diff --git a/lib/dvb_si/tdt.cpp b/lib/dvb_si/tdt.cpp deleted file mode 100644 index dcbd3e38..00000000 --- a/lib/dvb_si/tdt.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/* - * $Id: tdt.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -TimeAndDateTable::TimeAndDateTable(const uint8_t * const buffer) : ShortTable(buffer) -{ - utcTimeMjd = (buffer[3] << 8) | buffer[4]; - utcTimeBcd = (buffer[5] << 16) | (buffer[6] << 8) | buffer[7]; -} - -uint16_t TimeAndDateTable::getUtcTimeMjd(void) const -{ - return utcTimeMjd; -} - -uint32_t TimeAndDateTable::getUtcTimeBcd(void) const -{ - return utcTimeBcd; -} - diff --git a/lib/dvb_si/tdt.h b/lib/dvb_si/tdt.h deleted file mode 100644 index ef4a0ab6..00000000 --- a/lib/dvb_si/tdt.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * $Id: tdt.h,v 1.1 2003-10-17 15:36:39 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_table_tdt_h__ -#define __dvb_table_tdt_h__ - -#include "short_table.h" - -class TimeAndDateTable : public ShortTable -{ - protected: - unsigned utcTimeMjd : 16; - unsigned utcTimeBcd : 24; - - public: - TimeAndDateTable(const uint8_t * const buffer); - - static const enum PacketId PID = PID_TDT; - static const enum TableId TID = TID_TDT; - static const uint32_t TIMEOUT = 36000; - - uint16_t getUtcTimeMjd(void) const; - uint32_t getUtcTimeBcd(void) const; -}; - -typedef std::vector TimeAndDateTableVector; -typedef TimeAndDateTableVector::iterator TimeAndDateTableIterator; -typedef TimeAndDateTableVector::const_iterator TimeAndDateTableConstIterator; - -#endif /* __dvb_table_tdt_h__ */ diff --git a/lib/dvb_si/telephone_descriptor.cpp b/lib/dvb_si/telephone_descriptor.cpp deleted file mode 100644 index 38492155..00000000 --- a/lib/dvb_si/telephone_descriptor.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* - * $Id: telephone_descriptor.cpp,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -TelephoneDescriptor::TelephoneDescriptor(const uint8_t * const buffer) : Descriptor(buffer) -{ - reserved = (buffer[2] >> 6) & 0x03; - foreignAvailability = (buffer[2] >> 5) & 0x01; - connectionType = buffer[2] & 0x1f; - reserved2 = (buffer[3] >> 7) & 0x01; - countryPrefixLength = (buffer[3] >> 5) & 0x03; - internationalAreaCodeLength = (buffer[3] >> 2) & 0x07; - operatorCodeLength = buffer[3] & 0x03; - reserved3 = (buffer[4] >> 7) & 0x01; - nationalAreaCodeLength = (buffer[4] >> 4) & 0x07; - coreNumberLength = buffer[4] & 0x0f; - - uint16_t offset = 5; - countryPrefix.assign((char *)&buffer[offset], countryPrefixLength); - offset += countryPrefixLength; - internationalAreaCode.assign((char *)&buffer[offset], internationalAreaCodeLength); - offset += internationalAreaCodeLength; - operatorCode.assign((char *)&buffer[offset], operatorCodeLength); - offset += operatorCodeLength; - nationalAreaCode.assign((char *)&buffer[offset], nationalAreaCodeLength); - offset += nationalAreaCodeLength; - coreNumber.assign((char *)&buffer[offset], coreNumberLength); -} - -uint8_t TelephoneDescriptor::getForeignAvailability(void) const -{ - return foreignAvailability; -} - -uint8_t TelephoneDescriptor::getConnectionType(void) const -{ - return connectionType; -} - -std::string TelephoneDescriptor::getCountryPrefix(void) const -{ - return countryPrefix; -} - -std::string TelephoneDescriptor::getInternationalAreaCode(void) const -{ - return internationalAreaCode; -} - -std::string TelephoneDescriptor::getOperatorCode(void) const -{ - return operatorCode; -} - -std::string TelephoneDescriptor::getNationalAreaCode(void) const -{ - return nationalAreaCode; -} - -std::string TelephoneDescriptor::getCoreNumber(void) const -{ - return coreNumber; -} - diff --git a/lib/dvb_si/telephone_descriptor.h b/lib/dvb_si/telephone_descriptor.h deleted file mode 100644 index c64bc2ca..00000000 --- a/lib/dvb_si/telephone_descriptor.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * $Id: telephone_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_telephone_descriptor_h__ -#define __dvb_descriptor_telephone_descriptor_h__ - -#include "descriptor.h" - -class TelephoneDescriptor : public Descriptor -{ - protected: - unsigned reserved : 2; - unsigned foreignAvailability : 1; - unsigned connectionType : 5; - unsigned reserved2 : 1; - unsigned countryPrefixLength : 2; - unsigned internationalAreaCodeLength : 3; - unsigned operatorCodeLength : 2; - unsigned reserved3 : 1; - unsigned nationalAreaCodeLength : 3; - unsigned coreNumberLength : 4; - std::string countryPrefix; - std::string internationalAreaCode; - std::string operatorCode; - std::string nationalAreaCode; - std::string coreNumber; - - public: - TelephoneDescriptor(const uint8_t * const buffer); - - uint8_t getForeignAvailability(void) const; - uint8_t getConnectionType(void) const; - std::string getCountryPrefix(void) const; - std::string getInternationalAreaCode(void) const; - std::string getOperatorCode(void) const; - std::string getNationalAreaCode(void) const; - std::string getCoreNumber(void) const; -}; - -#endif /* __dvb_descriptor_telephone_descriptor_h__ */ diff --git a/lib/dvb_si/teletext_descriptor.cpp b/lib/dvb_si/teletext_descriptor.cpp deleted file mode 100644 index dcbb4991..00000000 --- a/lib/dvb_si/teletext_descriptor.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/* - * $Id: teletext_descriptor.cpp,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -TeletextDescriptor::TeletextDescriptor(const uint8_t * const buffer) : VbiTeletextDescriptor(buffer) -{ -} - diff --git a/lib/dvb_si/teletext_descriptor.h b/lib/dvb_si/teletext_descriptor.h deleted file mode 100644 index d95d5adb..00000000 --- a/lib/dvb_si/teletext_descriptor.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * $Id: teletext_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_teletext_descriptor_h__ -#define __dvb_descriptor_teletext_descriptor_h__ - -#include "vbi_teletext_descriptor.h" - -class TeletextDescriptor : public VbiTeletextDescriptor -{ - public: - TeletextDescriptor(const uint8_t * const buffer); -}; - -#endif /* __dvb_descriptor_teletext_descriptor_h__ */ diff --git a/lib/dvb_si/terrestrial_delivery_system_descriptor.cpp b/lib/dvb_si/terrestrial_delivery_system_descriptor.cpp deleted file mode 100644 index bddc9d7f..00000000 --- a/lib/dvb_si/terrestrial_delivery_system_descriptor.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* - * $Id: terrestrial_delivery_system_descriptor.cpp,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -TerrestrialDeliverySystemDescriptor::TerrestrialDeliverySystemDescriptor(const uint8_t * const buffer) : Descriptor(buffer) -{ - centreFrequency = (buffer[2] << 24) | (buffer[3] << 16) | (buffer[4] << 8) | buffer[5]; - bandwidth = (buffer[6] >> 5) & 0x07; - reserved = buffer[6] & 0x1f; - constellation = (buffer[7] >> 6) & 0x03; - hierarchyInformation = (buffer[7] >> 3) & 0x07; - codeRateHpStream = buffer[7] & 0x07; - codeRateLpStream = (buffer[8] >> 5) & 0x07; - guardInterval = (buffer[8] >> 3) & 0x03; - transmissionMode = (buffer[8] >> 1) & 0x03; - otherFrequencyFlag = buffer[8] & 0x01; - reserved2 = (buffer[9] << 24) | (buffer[10] << 16) | (buffer[11] << 8) | buffer[12]; -} - -uint32_t TerrestrialDeliverySystemDescriptor::getCentreFrequency(void) const -{ - return centreFrequency; -} - -uint8_t TerrestrialDeliverySystemDescriptor::getBandwidth(void) const -{ - return bandwidth; -} - -uint8_t TerrestrialDeliverySystemDescriptor::getConstellation(void) const -{ - return constellation; -} - -uint8_t TerrestrialDeliverySystemDescriptor::getHierarchyInformation(void) const -{ - return hierarchyInformation; -} - -uint8_t TerrestrialDeliverySystemDescriptor::getCodeRateHpStream(void) const -{ - return codeRateHpStream; -} - -uint8_t TerrestrialDeliverySystemDescriptor::getCodeRateLpStream(void) const -{ - return codeRateLpStream; -} - -uint8_t TerrestrialDeliverySystemDescriptor::getGuardInterval(void) const -{ - return guardInterval; -} - -uint8_t TerrestrialDeliverySystemDescriptor::getTransmissionMode(void) const -{ - return transmissionMode; -} - -uint8_t TerrestrialDeliverySystemDescriptor::getOtherFrequencyFlag(void) const -{ - return otherFrequencyFlag; -} - diff --git a/lib/dvb_si/terrestrial_delivery_system_descriptor.h b/lib/dvb_si/terrestrial_delivery_system_descriptor.h deleted file mode 100644 index 9bbe8178..00000000 --- a/lib/dvb_si/terrestrial_delivery_system_descriptor.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * $Id: terrestrial_delivery_system_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_terrestrial_delivery_system_descriptor_h__ -#define __dvb_descriptor_terrestrial_delivery_system_descriptor_h__ - -#include "descriptor.h" - -class TerrestrialDeliverySystemDescriptor : public Descriptor -{ - protected: - unsigned centreFrequency : 32; - unsigned bandwidth : 3; - unsigned reserved : 5; - unsigned constellation : 2; - unsigned hierarchyInformation : 3; - unsigned codeRateHpStream : 3; - unsigned codeRateLpStream : 3; - unsigned guardInterval : 2; - unsigned transmissionMode : 2; - unsigned otherFrequencyFlag : 1; - unsigned reserved2 : 32; - - public: - TerrestrialDeliverySystemDescriptor(const uint8_t * const buffer); - - uint32_t getCentreFrequency(void) const; - uint8_t getBandwidth(void) const; - uint8_t getConstellation(void) const; - uint8_t getHierarchyInformation(void) const; - uint8_t getCodeRateHpStream(void) const; - uint8_t getCodeRateLpStream(void) const; - uint8_t getGuardInterval(void) const; - uint8_t getTransmissionMode(void) const; - uint8_t getOtherFrequencyFlag(void) const; -}; - -#endif /* __dvb_descriptor_terrestrial_delivery_system_descriptor_h__ */ diff --git a/lib/dvb_si/time_shifted_event_descriptor.h b/lib/dvb_si/time_shifted_event_descriptor.h deleted file mode 100644 index bd9a1b66..00000000 --- a/lib/dvb_si/time_shifted_event_descriptor.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * $Id: time_shifted_event_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_time_shifted_event_descriptor_h__ -#define __dvb_descriptor_time_shifted_event_descriptor_h__ - -#include "descriptor.h" - -class TimeShiftedEventDescriptor : public Descriptor -{ - protected: - unsigned referenceServiceId : 16; - unsigned referenceEventId : 16; - - public: - TimeShiftedEventDescriptor(const uint8_t * const buffer); - - uint16_t getReferenceServiceId(void) const; - uint16_t getReferenceEventId(void) const; -}; - -#endif /* __dvb_descriptor_time_shifted_event_descriptor_h__ */ diff --git a/lib/dvb_si/time_shifted_service_descriptor.cpp b/lib/dvb_si/time_shifted_service_descriptor.cpp deleted file mode 100644 index 0d77946d..00000000 --- a/lib/dvb_si/time_shifted_service_descriptor.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/* - * $Id: time_shifted_service_descriptor.cpp,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -TimeShiftedServiceDescriptor::TimeShiftedServiceDescriptor(const uint8_t * const buffer) : Descriptor(buffer) -{ - referenceServiceId = (buffer[2] << 8) | buffer[3]; -} - -uint16_t TimeShiftedServiceDescriptor::getReferenceServiceId(void) const -{ - return referenceServiceId; -} - diff --git a/lib/dvb_si/time_shifted_service_descriptor.h b/lib/dvb_si/time_shifted_service_descriptor.h deleted file mode 100644 index 57ba72b3..00000000 --- a/lib/dvb_si/time_shifted_service_descriptor.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * $Id: time_shifted_service_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_time_shifted_service_descriptor_h__ -#define __dvb_descriptor_time_shifted_service_descriptor_h__ - -#include "descriptor.h" - -class TimeShiftedServiceDescriptor : public Descriptor -{ - protected: - unsigned referenceServiceId : 16; - - public: - TimeShiftedServiceDescriptor(const uint8_t * const buffer); - - uint16_t getReferenceServiceId(void) const; -}; - -#endif /* __dvb_descriptor_time_shifted_service_descriptor_h__ */ diff --git a/lib/dvb_si/tot.cpp b/lib/dvb_si/tot.cpp deleted file mode 100644 index 16171a53..00000000 --- a/lib/dvb_si/tot.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* - * $Id: tot.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -TimeOffsetTable::TimeOffsetTable(const uint8_t * const buffer) : ShortCrcTable(buffer) -{ - utcTimeMjd = (buffer[3] << 8) | buffer[4]; - utcTimeBcd = (buffer[5] << 16) | (buffer[6] << 8) | buffer[7]; - reserved = (buffer[8] >> 4) & 0x0f; - descriptorsLoopLength = ((buffer[8] & 0x0f) << 8) | buffer[9]; - - for (uint16_t i = 0; i < descriptorsLoopLength; i += buffer[i + 11] + 2) - descriptor(&buffer[i + 10]); -} - -uint16_t TimeOffsetTable::getUtcTimeMjd(void) const -{ - return utcTimeMjd; -} - -uint32_t TimeOffsetTable::getUtcTimeBcd(void) const -{ - return utcTimeBcd; -} - diff --git a/lib/dvb_si/tot.h b/lib/dvb_si/tot.h deleted file mode 100644 index ce434887..00000000 --- a/lib/dvb_si/tot.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * $Id: tot.h,v 1.1 2003-10-17 15:36:39 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_table_tot_h__ -#define __dvb_table_tot_h__ - -#include -#include "short_crc_table.h" - -class TimeOffsetTable : public ShortCrcTable, public DescriptorContainer -{ - protected: - unsigned utcTimeMjd : 16; - unsigned utcTimeBcd : 24; - unsigned reserved : 4; - unsigned descriptorsLoopLength : 12; - - public: - TimeOffsetTable(const uint8_t * const buffer); - - static const enum PacketId PID = PID_TOT; - static const enum TableId TID = TID_TOT; - static const uint32_t TIMEOUT = 36000; - - uint16_t getUtcTimeMjd(void) const; - uint32_t getUtcTimeBcd(void) const; -}; - -typedef std::vector TimeOffsetTableVector; -typedef TimeOffsetTableVector::iterator TimeOffsetTableIterator; -typedef TimeOffsetTableVector::const_iterator TimeOffsetTableConstIterator; - -#endif /* __dvb_table_tot_h__ */ diff --git a/lib/dvb_si/transport_stream_descriptor.h b/lib/dvb_si/transport_stream_descriptor.h deleted file mode 100644 index 0c223e2f..00000000 --- a/lib/dvb_si/transport_stream_descriptor.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * $Id: transport_stream_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_transport_stream_descriptor_h__ -#define __dvb_descriptor_transport_stream_descriptor_h__ - -#include "descriptor.h" - -class TransportStreamDescriptor : public Descriptor -{ - protected: - std::string bytes; - - public: - TransportStreamDescriptor(const uint8_t * const buffer); - - std::string getBytes(void) const; -}; - -#endif /* __dvb_descriptor_transport_stream_descriptor_h__ */ diff --git a/lib/dvb_si/url_descriptor.h b/lib/dvb_si/url_descriptor.h deleted file mode 100644 index 23db23aa..00000000 --- a/lib/dvb_si/url_descriptor.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * $Id: url_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_url_descriptor_h__ -#define __dvb_descriptor_url_descriptor_h__ - -#include "descriptor.h" - -/* 0x90 */ -class UrlDescriptor : public Descriptor -{ - public: - UrlDescriptor(const uint8_t * const buffer); -}; - -#endif /* __dvb_descriptor_url_descriptor_h__ */ diff --git a/lib/dvb_si/vbi_data_descriptor.cpp b/lib/dvb_si/vbi_data_descriptor.cpp deleted file mode 100644 index 87911555..00000000 --- a/lib/dvb_si/vbi_data_descriptor.cpp +++ /dev/null @@ -1,98 +0,0 @@ -/* - * $Id: vbi_data_descriptor.cpp,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -VbiDataLine::VbiDataLine(const uint8_t * const buffer) -{ - reserved = (buffer[0] >> 6) & 0x03; - fieldParity = (buffer[0] >> 5) & 0x01; - lineOffset = buffer[0] & 0x1F; -} - -uint8_t VbiDataLine::getFieldParity(void) const -{ - return fieldParity; -} - -uint8_t VbiDataLine::getLineOffset(void) const -{ - return lineOffset; -} - -VbiDataService::VbiDataService(const uint8_t * const buffer) -{ - uint16_t i; - - dataServiceId = buffer[0]; - dataServiceDescriptorLength = buffer[1]; - - switch (dataServiceId) { - case 0x01: - case 0x02: - case 0x04: - case 0x05: - case 0x06: - case 0x07: - for (i = 0; i < dataServiceDescriptorLength; ++i); - vbiDataLines.push_back(new VbiDataLine(&buffer[i + 2])); - break; - - default: - for (i = 0; i < dataServiceDescriptorLength; ++i) - reserved.push_back(buffer[i + 2]); - break; - } -} - -VbiDataService::~VbiDataService(void) -{ - for (VbiDataLineIterator i = vbiDataLines.begin(); i != vbiDataLines.end(); ++i) - delete *i; -} - -uint8_t VbiDataService::getDataServiceId(void) const -{ - return dataServiceId; -} - -const VbiDataLineVector *VbiDataService::getVbiDataLines(void) const -{ - return &vbiDataLines; -} - -VbiDataDescriptor::VbiDataDescriptor(const uint8_t * const buffer) : Descriptor(buffer) -{ - for (uint16_t i = 0; i < descriptorLength; i += buffer[i + 3] + 2) - vbiDataServices.push_back(new VbiDataService(&buffer[i + 2])); -} - -VbiDataDescriptor::~VbiDataDescriptor(void) -{ - for (VbiDataServiceIterator i = vbiDataServices.begin(); i != vbiDataServices.end(); ++i) - delete *i; -} - -const VbiDataServiceVector *VbiDataDescriptor::getVbiDataServices(void) const -{ - return &vbiDataServices; -} - diff --git a/lib/dvb_si/vbi_data_descriptor.h b/lib/dvb_si/vbi_data_descriptor.h deleted file mode 100644 index aa26b91c..00000000 --- a/lib/dvb_si/vbi_data_descriptor.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * $Id: vbi_data_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_vbi_data_descriptor_h__ -#define __dvb_descriptor_vbi_data_descriptor_h__ - -#include "descriptor.h" - -class VbiDataLine -{ - protected: - unsigned reserved : 2; - unsigned fieldParity : 1; - unsigned lineOffset : 5; - - public: - VbiDataLine(const uint8_t * const buffer); - - uint8_t getFieldParity(void) const; - uint8_t getLineOffset(void) const; -}; - -typedef std::vector VbiDataLineVector; -typedef VbiDataLineVector::iterator VbiDataLineIterator; -typedef VbiDataLineVector::const_iterator VbiDataLineConstIterator; - -class VbiDataService -{ - protected: - unsigned dataServiceId : 8; - unsigned dataServiceDescriptorLength : 8; - VbiDataLineVector vbiDataLines; - std::vector reserved; - - public: - VbiDataService(const uint8_t * const buffer); - ~VbiDataService(void); - - uint8_t getDataServiceId(void) const; - const VbiDataLineVector *getVbiDataLines(void) const; -}; - -typedef std::vector VbiDataServiceVector; -typedef VbiDataServiceVector::iterator VbiDataServiceIterator; -typedef VbiDataServiceVector::const_iterator VbiDataServiceConstIterator; - -class VbiDataDescriptor : public Descriptor -{ - protected: - VbiDataServiceVector vbiDataServices; - - public: - VbiDataDescriptor(const uint8_t * const buffer); - ~VbiDataDescriptor(void); - - const VbiDataServiceVector *getVbiDataServices(void) const; -}; - -#endif /* __dvb_descriptor_vbi_data_descriptor_h__ */ diff --git a/lib/dvb_si/vbi_teletext_descriptor.cpp b/lib/dvb_si/vbi_teletext_descriptor.cpp deleted file mode 100644 index bf7c0ab1..00000000 --- a/lib/dvb_si/vbi_teletext_descriptor.cpp +++ /dev/null @@ -1,68 +0,0 @@ -/* - * $Id: vbi_teletext_descriptor.cpp,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -VbiTeletext::VbiTeletext(const uint8_t * const buffer) -{ - iso639LanguageCode.assign((char *)&buffer[0], 3); - teletextType = (buffer[3] >> 3) & 0x1F; - teletextMagazineNumber = buffer[3] & 0x07; - teletextPageNumber = buffer[4]; -} - -std::string VbiTeletext::getIso639LanguageCode(void) const -{ - return iso639LanguageCode; -} - -uint8_t VbiTeletext::getTeletextType(void) const -{ - return teletextType; -} - -uint8_t VbiTeletext::getTeletextMagazineNumber(void) const -{ - return teletextMagazineNumber; -} - -uint8_t VbiTeletext::getTeletextPageNumber(void) const -{ - return teletextPageNumber; -} - -VbiTeletextDescriptor::VbiTeletextDescriptor(const uint8_t * const buffer) : Descriptor(buffer) -{ - for (uint16_t i = 0; i < descriptorLength; i += 5) - vbiTeletexts.push_back(new VbiTeletext(&buffer[i + 2])); -} - -VbiTeletextDescriptor::~VbiTeletextDescriptor(void) -{ - for (VbiTeletextIterator i = vbiTeletexts.begin(); i != vbiTeletexts.end(); ++i) - delete *i; -} - -const VbiTeletextVector *VbiTeletextDescriptor::getVbiTeletexts(void) const -{ - return &vbiTeletexts; -} - diff --git a/lib/dvb_si/vbi_teletext_descriptor.h b/lib/dvb_si/vbi_teletext_descriptor.h deleted file mode 100644 index 084d2486..00000000 --- a/lib/dvb_si/vbi_teletext_descriptor.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * $Id: vbi_teletext_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_vbi_teletext_descriptor_h__ -#define __dvb_descriptor_vbi_teletext_descriptor_h__ - -#include "descriptor.h" - -class VbiTeletext -{ - protected: - std::string iso639LanguageCode; - unsigned teletextType : 5; - unsigned teletextMagazineNumber : 3; - unsigned teletextPageNumber : 8; - - public: - VbiTeletext(const uint8_t * const buffer); - - std::string getIso639LanguageCode(void) const; - uint8_t getTeletextType(void) const; - uint8_t getTeletextMagazineNumber(void) const; - uint8_t getTeletextPageNumber(void) const; -}; - -typedef std::vector VbiTeletextVector; -typedef VbiTeletextVector::iterator VbiTeletextIterator; -typedef VbiTeletextVector::const_iterator VbiTeletextConstIterator; - -class VbiTeletextDescriptor : public Descriptor -{ - protected: - VbiTeletextVector vbiTeletexts; - - public: - VbiTeletextDescriptor(const uint8_t * const buffer); - ~VbiTeletextDescriptor(void); - - const VbiTeletextVector *getVbiTeletexts(void) const; -}; - -#endif /* __dvb_descriptor_vbi_teletext_descriptor_h__ */ diff --git a/lib/dvb_si/video_stream_descriptor.cpp b/lib/dvb_si/video_stream_descriptor.cpp deleted file mode 100644 index 103026d3..00000000 --- a/lib/dvb_si/video_stream_descriptor.cpp +++ /dev/null @@ -1,73 +0,0 @@ -/* - * $Id: video_stream_descriptor.cpp,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -VideoStreamDescriptor::VideoStreamDescriptor(const uint8_t * const buffer) : Descriptor(buffer) -{ - multipleFrameRateFlag = (buffer[2] >> 7) & 0x01; - frameRateCode = (buffer[2] >> 3) & 0x0F; - mpeg1OnlyFlag = (buffer[2] >> 2) & 0x01; - constrainedParameterFlag = (buffer[2] >> 1) & 0x01; - - if (!mpeg1OnlyFlag) { - profileAndLevelIndication = buffer[3]; - chromaFormat = (buffer[4] >> 6) & 0x03; - frameRateExtensionFlag = (buffer[4] >> 5) & 0x01; - reserved = buffer[4] & 0x1F; - } -} - -uint8_t VideoStreamDescriptor::getMultipleFrameRateFlag(void) const -{ - return multipleFrameRateFlag; -} - -uint8_t VideoStreamDescriptor::getFrameRateCode(void) const -{ - return frameRateCode; -} - -uint8_t VideoStreamDescriptor::getMpeg1OnlyFlag(void) const -{ - return mpeg1OnlyFlag; -} - -uint8_t VideoStreamDescriptor::getConstrainedParameterFlag(void) const -{ - return constrainedParameterFlag; -} - -uint8_t VideoStreamDescriptor::getProfileAndLevelIndication(void) const -{ - return profileAndLevelIndication; -} - -uint8_t VideoStreamDescriptor::getChromaFormat(void) const -{ - return chromaFormat; -} - -uint8_t VideoStreamDescriptor::getFrameRateExtensionFlag(void) const -{ - return frameRateExtensionFlag; -} - diff --git a/lib/dvb_si/video_stream_descriptor.h b/lib/dvb_si/video_stream_descriptor.h deleted file mode 100644 index 2652acc6..00000000 --- a/lib/dvb_si/video_stream_descriptor.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * $Id: video_stream_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_video_stream_descriptor_h__ -#define __dvb_descriptor_video_stream_descriptor_h__ - -#include "descriptor.h" - -class VideoStreamDescriptor : public Descriptor -{ - protected: - unsigned multipleFrameRateFlag : 1; - unsigned frameRateCode : 4; - unsigned mpeg1OnlyFlag : 1; - unsigned constrainedParameterFlag : 1; - unsigned stillPictureFlag : 1; - unsigned profileAndLevelIndication : 8; - unsigned chromaFormat : 2; - unsigned frameRateExtensionFlag : 1; - unsigned reserved : 5; - - public: - VideoStreamDescriptor(const uint8_t * const buffer); - - uint8_t getMultipleFrameRateFlag(void) const; - uint8_t getFrameRateCode(void) const; - uint8_t getMpeg1OnlyFlag(void) const; - uint8_t getConstrainedParameterFlag(void) const; - uint8_t getStillPictureFlag(void) const; - uint8_t getProfileAndLevelIndication(void) const; - uint8_t getChromaFormat(void) const; - uint8_t getFrameRateExtensionFlag(void) const; -}; - -#endif /* __dvb_descriptor_video_stream_descriptor_h__ */ diff --git a/lib/dvb_si/video_window_descriptor.cpp b/lib/dvb_si/video_window_descriptor.cpp deleted file mode 100644 index d8e7d691..00000000 --- a/lib/dvb_si/video_window_descriptor.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* - * $Id: video_window_descriptor.cpp,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#include - -VideoWindowDescriptor::VideoWindowDescriptor(const uint8_t * const buffer) : Descriptor(buffer) -{ - horizontalOffset = ((buffer[2] << 8) | (buffer[3] & 0xF3)) >> 2; - verticalOffset = (((buffer[3] & 0x03) << 16) | (buffer[4] << 8) | (buffer[5] & 0xF0)) >> 4; - windowPriority = buffer[5] & 0x0F; -} - -uint16_t VideoWindowDescriptor::getHorizontalOffset(void) const -{ - return horizontalOffset; -} - -uint16_t VideoWindowDescriptor::getVerticalOffset(void) const -{ - return verticalOffset; -} - -uint8_t VideoWindowDescriptor::getWindowPriority(void) const -{ - return windowPriority; -} - diff --git a/lib/dvb_si/video_window_descriptor.h b/lib/dvb_si/video_window_descriptor.h deleted file mode 100644 index 1558f782..00000000 --- a/lib/dvb_si/video_window_descriptor.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * $Id: video_window_descriptor.h,v 1.1 2003-10-17 15:36:38 tmbinc Exp $ - * - * (C) 2002-2003 Andreas Oberritter - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - -#ifndef __dvb_descriptor_video_window_descriptor_h__ -#define __dvb_descriptor_video_window_descriptor_h__ - -#include "descriptor.h" - -class VideoWindowDescriptor : public Descriptor -{ - protected: - unsigned horizontalOffset : 14; - unsigned verticalOffset : 14; - unsigned windowPriority : 4; - - public: - VideoWindowDescriptor(const uint8_t * const buffer); - - uint16_t getHorizontalOffset(void) const; - uint16_t getVerticalOffset(void) const; - uint8_t getWindowPriority(void) const; -}; - -#endif /* __dvb_descriptor_video_window_descriptor_h__ */ diff --git a/lib/network/serversocket.lo b/lib/network/serversocket.lo index 180ed5dc..e69de29b 100644 Binary files a/lib/network/serversocket.lo and b/lib/network/serversocket.lo differ diff --git a/lib/network/socket.lo b/lib/network/socket.lo index 912fce9e..4fbb387a 100644 Binary files a/lib/network/socket.lo and b/lib/network/socket.lo differ diff --git a/lib/service/event.cpp b/lib/service/event.cpp index 482527cc..96cc042b 100644 --- a/lib/service/event.cpp +++ b/lib/service/event.cpp @@ -1,8 +1,8 @@ #include #include -#include -#include -#include +#include +#include +#include DEFINE_REF(eServiceEvent); diff --git a/main/Makefile.am b/main/Makefile.am index 5a7d1ef7..dad2b33d 100644 --- a/main/Makefile.am +++ b/main/Makefile.am @@ -1,6 +1,5 @@ INCLUDES = \ - -I$(top_srcdir)/include \ - -I/usr/include/python2.3 + -I$(top_srcdir)/include bin_PROGRAMS = enigma2 @@ -13,7 +12,6 @@ enigma2_LDADD_WHOLE = \ $(top_builddir)/lib/components/libenigma_components.a \ $(top_builddir)/lib/driver/libenigma_driver.a \ $(top_builddir)/lib/dvb/libenigma_dvb.a \ - $(top_builddir)/lib/dvb_si/libenigma_dvb_si.a \ $(top_builddir)/lib/dvb_ci/libenigma_dvb_ci.a \ $(top_builddir)/lib/gdi/libenigma_gdi.a \ $(top_builddir)/lib/gui/libenigma_gui.a \ @@ -28,6 +26,7 @@ enigma2_LDADD = \ @MAD_LIBS@ \ @PNG_LIBS@ \ @SIGC_LIBS@ \ + @DVBSI_LIBS@ \ -ldl -lpthread -lcrypt -lresolv -lpython2.4 enigma2$(EXEEXT): $(enigma2_OBJECTS) $(enigma2_DEPENDENCIES) $(enigma2_LDADD_WHOLE) diff --git a/main/enigma-dvbtest.cpp b/main/enigma-dvbtest.cpp index 76c760c4..aa562399 100644 --- a/main/enigma-dvbtest.cpp +++ b/main/enigma-dvbtest.cpp @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include @@ -16,7 +16,7 @@ class eMain: public eApplication, public Object ePtr m_mgr; ePtr m_channel; ePtr m_demux; - eAUTable > m_table; + eAUTable > m_table; ePtr m_dvbdb; @@ -101,15 +101,15 @@ public: void tableReady(int) { /* table "fertig" (wie auch immer) */ - ePtr > ptr; + ePtr > ptr; /* erfolgreich? */ if (!m_table.getCurrent(ptr)) { /* dumpen ... */ - ProgramMapTableConstIterator i; + ProgramMapSectionConstIterator i; for (i = ptr->getSections().begin(); i != ptr->getSections().end(); ++i) { - const ProgramMapTable &pmt = **i; + const ProgramMapSection &pmt = **i; eDebug("pcr pid: %x", pmt.getPcrPid()); } eDebug("program map ..."); diff --git a/main/enigma-playlist.cpp b/main/enigma-playlist.cpp index bafefe9a..51ffe825 100644 --- a/main/enigma-playlist.cpp +++ b/main/enigma-playlist.cpp @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include diff --git a/main/enigma-scan.cpp b/main/enigma-scan.cpp index af50548e..4233c0dc 100644 --- a/main/enigma-scan.cpp +++ b/main/enigma-scan.cpp @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include