mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-02 10:21:10 +02:00
sdt: new class
This commit is contained in:
68
src/zapit/include/zapit/scansdt.h
Normal file
68
src/zapit/include/zapit/scansdt.h
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
* Neutrino-GUI - DBoxII-Project
|
||||||
|
*
|
||||||
|
* Copyright (C) 2011 CoolStream International Ltd
|
||||||
|
*
|
||||||
|
* License: GPLv2
|
||||||
|
*
|
||||||
|
* 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;
|
||||||
|
*
|
||||||
|
* 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 __zapit_scan_sdt_h__
|
||||||
|
#define __zapit_scan_sdt_h__
|
||||||
|
|
||||||
|
#include <zapit/channel.h>
|
||||||
|
#include <dmx.h>
|
||||||
|
#include <dvbsi++/service_description_section.h>
|
||||||
|
#include <dvbsi++/service_descriptor.h>
|
||||||
|
|
||||||
|
#define SDT_SECTION_SIZE 1026
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
typedef std::map<int,int> sidpmt_map_t;
|
||||||
|
typedef sidpmt_map_t::iterator sidpmt_map_iterator_t;
|
||||||
|
typedef std::pair<int,int> sidpmt_map_pair_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
class CSdt
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
int dmxnum;
|
||||||
|
bool parsed;
|
||||||
|
bool cable;
|
||||||
|
|
||||||
|
t_transport_stream_id transport_stream_id;
|
||||||
|
t_original_network_id original_network_id;
|
||||||
|
t_satellite_position satellitePosition;
|
||||||
|
freq_id_t freq_id;
|
||||||
|
|
||||||
|
ServiceDescriptionSectionList sections;
|
||||||
|
|
||||||
|
uint8_t FixServiceType(uint8_t type);
|
||||||
|
bool CheckScanType(uint8_t service_type);
|
||||||
|
CZapitChannel * CheckChannelId(t_service_id service_id);
|
||||||
|
void FixWhiteSpaces(std::string &str);
|
||||||
|
bool AddToBouquet(std::string &providerName, CZapitChannel *channel);
|
||||||
|
|
||||||
|
bool Read();
|
||||||
|
bool ParseServiceDescriptor(ServiceDescription * service, ServiceDescriptor * sd);
|
||||||
|
|
||||||
|
public:
|
||||||
|
CSdt(t_satellite_position spos, freq_id_t frq, int dnum = 0);
|
||||||
|
~CSdt();
|
||||||
|
bool Parse(t_transport_stream_id *p_tsid, t_original_network_id *p_onid);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
Reference in New Issue
Block a user