mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-01 09:51:13 +02:00
add remove multiple whitespaces to descriptors,-fix scanSDT
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@826 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Branch: ni/coolstream
Commit: 39145b7a32
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2010-10-08 (Fri, 08 Oct 2010)
Origin message was:
------------------
-add remove multiple whitespaces to descriptors,-fix scanSDT
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@826 e54a6e83-5905-42d5-8d5c-058d10e6a962
------------------
This commit was generated by Migit
This commit is contained in:
@@ -399,6 +399,19 @@ bool check_blacklisted_digital_plus(const t_original_network_id onid, const t_tr
|
|||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void removeMultipleWhitespaces (std::string &str)
|
||||||
|
{
|
||||||
|
size_t pos = str.find(" ");
|
||||||
|
if(pos != std::string::npos ){
|
||||||
|
std::string temp;
|
||||||
|
for ( unsigned short i = 0 ; i < str.length(); i++)
|
||||||
|
if (!(str[i] == ' ' && str[i+1] == ' '))
|
||||||
|
temp += str[i];
|
||||||
|
str = temp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool check_blacklisted(std::string& providerName)
|
bool check_blacklisted(std::string& providerName)
|
||||||
{
|
{
|
||||||
bool in_blacklist = false;
|
bool in_blacklist = false;
|
||||||
@@ -600,7 +613,8 @@ void service_descriptor(const unsigned char * const buffer, const t_service_id s
|
|||||||
providerName=lastProviderName;
|
providerName=lastProviderName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
removeMultipleWhitespaces( providerName );
|
||||||
// remove space at ende providerName
|
// remove space at ende providerName
|
||||||
if(!providerName.empty()){
|
if(!providerName.empty()){
|
||||||
i = 1;
|
i = 1;
|
||||||
@@ -615,7 +629,6 @@ void service_descriptor(const unsigned char * const buffer, const t_service_id s
|
|||||||
const char *unknown_provider_name = "Unknown Provider";
|
const char *unknown_provider_name = "Unknown Provider";
|
||||||
providerName = CDVBString(unknown_provider_name, strlen(unknown_provider_name)).getContent();
|
providerName = CDVBString(unknown_provider_name, strlen(unknown_provider_name)).getContent();
|
||||||
}
|
}
|
||||||
|
|
||||||
lastProviderName = providerName;
|
lastProviderName = providerName;
|
||||||
eventServer->sendEvent(CZapitClient::EVT_SCAN_PROVIDER, CEventServer::INITID_ZAPIT, (void *) lastProviderName.c_str(), lastProviderName.length() + 1);
|
eventServer->sendEvent(CZapitClient::EVT_SCAN_PROVIDER, CEventServer::INITID_ZAPIT, (void *) lastProviderName.c_str(), lastProviderName.length() + 1);
|
||||||
|
|
||||||
|
@@ -2217,7 +2217,6 @@ int zapit_main_thread(void *data)
|
|||||||
|
|
||||||
eventServer = new CEventServer;
|
eventServer = new CEventServer;
|
||||||
|
|
||||||
pthread_create (&tsdt, NULL, sdt_thread, (void *) NULL);
|
|
||||||
tallchans_iterator cit;
|
tallchans_iterator cit;
|
||||||
cit = allchans.find(live_channel_id);
|
cit = allchans.find(live_channel_id);
|
||||||
if(cit != allchans.end())
|
if(cit != allchans.end())
|
||||||
@@ -2229,6 +2228,7 @@ int zapit_main_thread(void *data)
|
|||||||
firstzap = false;
|
firstzap = false;
|
||||||
stime = time(0);
|
stime = time(0);
|
||||||
//time_t curtime;
|
//time_t curtime;
|
||||||
|
pthread_create (&tsdt, NULL, sdt_thread, (void *) NULL);
|
||||||
while (zapit_server.run(zapit_parse_command, CZapitMessages::ACTVERSION, true)) {
|
while (zapit_server.run(zapit_parse_command, CZapitMessages::ACTVERSION, true)) {
|
||||||
if (pmt_update_fd != -1) {
|
if (pmt_update_fd != -1) {
|
||||||
unsigned char buf[4096];
|
unsigned char buf[4096];
|
||||||
|
Reference in New Issue
Block a user