mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 23:42:58 +02:00
eitd: add and move viasat to extra switch
This commit is contained in:
@@ -271,8 +271,14 @@ int DMX::getSection(uint8_t *buf, const unsigned timeoutInMSeconds, int &timeout
|
|||||||
|
|
||||||
eit_extended_section_header *eit_extended_header;
|
eit_extended_section_header *eit_extended_header;
|
||||||
|
|
||||||
|
bool use_viasat_epg_pid = false;
|
||||||
|
#ifdef ENABLE_VIASATEPG
|
||||||
|
if (pID == 0x39)
|
||||||
|
use_viasat_epg_pid = true;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* filter == 0 && maks == 0 => EIT dummy filter to slow down EIT thread startup */
|
/* filter == 0 && maks == 0 => EIT dummy filter to slow down EIT thread startup */
|
||||||
if ((pID == 0x12 || pID == 0x39) && filters[filter_index].filter == 0 && filters[filter_index].mask == 0)
|
if ((pID == 0x12 || use_viasat_epg_pid) && filters[filter_index].filter == 0 && filters[filter_index].mask == 0)
|
||||||
{
|
{
|
||||||
//dprintf("dmx: dummy filter, sleeping for %d ms\n", timeoutInMSeconds);
|
//dprintf("dmx: dummy filter, sleeping for %d ms\n", timeoutInMSeconds);
|
||||||
usleep(timeoutInMSeconds * 1000);
|
usleep(timeoutInMSeconds * 1000);
|
||||||
@@ -392,7 +398,7 @@ int DMX::getSection(uint8_t *buf, const unsigned timeoutInMSeconds, int &timeout
|
|||||||
unsigned short current_tsid = 0;
|
unsigned short current_tsid = 0;
|
||||||
uint8_t segment_last_section_number = last_section_number;
|
uint8_t segment_last_section_number = last_section_number;
|
||||||
|
|
||||||
if (pID == 0x12 || pID == 0x39) {
|
if (pID == 0x12 || use_viasat_epg_pid) {
|
||||||
eit_extended_header = (eit_extended_section_header *)(buf+8);
|
eit_extended_header = (eit_extended_section_header *)(buf+8);
|
||||||
current_onid = eit_extended_header->original_network_id_hi * 256 +
|
current_onid = eit_extended_header->original_network_id_hi * 256 +
|
||||||
eit_extended_header->original_network_id_lo;
|
eit_extended_header->original_network_id_lo;
|
||||||
@@ -404,7 +410,7 @@ int DMX::getSection(uint8_t *buf, const unsigned timeoutInMSeconds, int &timeout
|
|||||||
sections_id_t s_id = create_sections_id(table_id, eh_tbl_extension_id, current_onid, current_tsid, section_number);
|
sections_id_t s_id = create_sections_id(table_id, eh_tbl_extension_id, current_onid, current_tsid, section_number);
|
||||||
|
|
||||||
bool complete = false;
|
bool complete = false;
|
||||||
if (pID == 0x12 || pID == 0x39)
|
if (pID == 0x12 || use_viasat_epg_pid)
|
||||||
complete = check_complete(s_id, section_number, last_section_number, segment_last_section_number);
|
complete = check_complete(s_id, section_number, last_section_number, segment_last_section_number);
|
||||||
|
|
||||||
/* if we are not caching the already read sections (CN-thread), check EIT version and get out */
|
/* if we are not caching the already read sections (CN-thread), check EIT version and get out */
|
||||||
@@ -647,7 +653,12 @@ int DMX::change(const int new_filter_index, const t_channel_id new_current_servi
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (sections_debug) { // friendly debug output...
|
if (sections_debug) { // friendly debug output...
|
||||||
if((pID==0x12 || pID==0x39) && filters[0].filter != 0x4e) { // Only EIT
|
bool use_viasat_epg_pid = false;
|
||||||
|
#ifdef ENABLE_VIASATEPG
|
||||||
|
if (pID == 0x39)
|
||||||
|
use_viasat_epg_pid = true;
|
||||||
|
#endif
|
||||||
|
if((pID==0x12 || use_viasat_epg_pid) && filters[0].filter != 0x4e) { // Only EIT
|
||||||
printdate_ms(stderr);
|
printdate_ms(stderr);
|
||||||
fprintf(stderr, "changeDMX [EIT]-> %d (0x%x/0x%x) %s (%ld seconds)\n",
|
fprintf(stderr, "changeDMX [EIT]-> %d (0x%x/0x%x) %s (%ld seconds)\n",
|
||||||
new_filter_index, filters[new_filter_index].filter,
|
new_filter_index, filters[new_filter_index].filter,
|
||||||
|
@@ -132,8 +132,11 @@ OpenThreads::Mutex filter_mutex;
|
|||||||
static CTimeThread threadTIME;
|
static CTimeThread threadTIME;
|
||||||
static CEitThread threadEIT;
|
static CEitThread threadEIT;
|
||||||
static CCNThread threadCN;
|
static CCNThread threadCN;
|
||||||
|
|
||||||
|
#ifdef ENABLE_VIASATEPG
|
||||||
// ViaSAT uses pid 0x39 instead of 0x12
|
// ViaSAT uses pid 0x39 instead of 0x12
|
||||||
static CEitThread threadVSEIT("viasatThread", 0x39);
|
static CEitThread threadVSEIT("viasatThread", 0x39);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef ENABLE_FREESATEPG
|
#ifdef ENABLE_FREESATEPG
|
||||||
static CFreeSatThread threadFSEIT;
|
static CFreeSatThread threadFSEIT;
|
||||||
@@ -838,7 +841,10 @@ static void wakeupAll()
|
|||||||
{
|
{
|
||||||
threadCN.change(0);
|
threadCN.change(0);
|
||||||
threadEIT.change(0);
|
threadEIT.change(0);
|
||||||
|
#ifdef ENABLE_VIASATEPG
|
||||||
threadVSEIT.change(0);
|
threadVSEIT.change(0);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef ENABLE_FREESATEPG
|
#ifdef ENABLE_FREESATEPG
|
||||||
threadFSEIT.change(0);
|
threadFSEIT.change(0);
|
||||||
#endif
|
#endif
|
||||||
@@ -961,7 +967,9 @@ static void commandserviceChanged(int connfd, char *data, const unsigned dataLen
|
|||||||
threadCN.setCurrentService(messaging_current_servicekey);
|
threadCN.setCurrentService(messaging_current_servicekey);
|
||||||
threadEIT.setDemux(cmd->dnum);
|
threadEIT.setDemux(cmd->dnum);
|
||||||
threadEIT.setCurrentService(uniqueServiceKey /*messaging_current_servicekey*/);
|
threadEIT.setCurrentService(uniqueServiceKey /*messaging_current_servicekey*/);
|
||||||
|
#ifdef ENABLE_VIASATEPG
|
||||||
threadVSEIT.setCurrentService(messaging_current_servicekey);
|
threadVSEIT.setCurrentService(messaging_current_servicekey);
|
||||||
|
#endif
|
||||||
#ifdef ENABLE_FREESATEPG
|
#ifdef ENABLE_FREESATEPG
|
||||||
threadFSEIT.setCurrentService(messaging_current_servicekey);
|
threadFSEIT.setCurrentService(messaging_current_servicekey);
|
||||||
#endif
|
#endif
|
||||||
@@ -2225,7 +2233,9 @@ printf("SIevent size: %d\n", (int)sizeof(SIevent));
|
|||||||
threadTIME.Start();
|
threadTIME.Start();
|
||||||
threadEIT.Start();
|
threadEIT.Start();
|
||||||
threadCN.Start();
|
threadCN.Start();
|
||||||
|
#ifdef ENABLE_VIASATEPG
|
||||||
threadVSEIT.Start();
|
threadVSEIT.Start();
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef ENABLE_FREESATEPG
|
#ifdef ENABLE_FREESATEPG
|
||||||
threadFSEIT.Start();
|
threadFSEIT.Start();
|
||||||
@@ -2264,7 +2274,9 @@ printf("SIevent size: %d\n", (int)sizeof(SIevent));
|
|||||||
threadEIT.StopRun();
|
threadEIT.StopRun();
|
||||||
threadCN.StopRun();
|
threadCN.StopRun();
|
||||||
threadTIME.StopRun();
|
threadTIME.StopRun();
|
||||||
|
#ifdef ENABLE_VIASATEPG
|
||||||
threadVSEIT.StopRun();
|
threadVSEIT.StopRun();
|
||||||
|
#endif
|
||||||
#ifdef ENABLE_SDT
|
#ifdef ENABLE_SDT
|
||||||
threadSDT.StopRun();
|
threadSDT.StopRun();
|
||||||
#endif
|
#endif
|
||||||
@@ -2288,9 +2300,10 @@ printf("SIevent size: %d\n", (int)sizeof(SIevent));
|
|||||||
|
|
||||||
xprintf("join CN\n");
|
xprintf("join CN\n");
|
||||||
threadCN.Stop();
|
threadCN.Stop();
|
||||||
|
#ifdef ENABLE_VIASATEPG
|
||||||
xprintf("join VSEIT\n");
|
xprintf("join VSEIT\n");
|
||||||
threadVSEIT.Stop();
|
threadVSEIT.Stop();
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef ENABLE_SDT
|
#ifdef ENABLE_SDT
|
||||||
xprintf("join SDT\n");
|
xprintf("join SDT\n");
|
||||||
|
Reference in New Issue
Block a user