mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
Merge branch 'dvbsi++' of c00lstreamtech.de:cst-private-neutrino into includecleanup
This commit is contained in:
@@ -41,6 +41,7 @@
|
||||
|
||||
#include <driver/encoding.h>
|
||||
#include <driver/record.h>
|
||||
#include <driver/abstime.h>
|
||||
#include "libdvbsub/dvbsub.h"
|
||||
#include "libtuxtxt/teletext.h"
|
||||
|
||||
@@ -49,6 +50,8 @@
|
||||
#include <zapit/zapit.h>
|
||||
#include <zapit/getservices.h>
|
||||
|
||||
#define ZAP_GUARD_TIME 2000 // ms
|
||||
|
||||
extern CBouquetManager *g_bouquetManager;
|
||||
|
||||
extern uint32_t scrambled_timer;
|
||||
@@ -121,9 +124,9 @@ int CRemoteControl::handleMsg(const neutrino_msg_t msg, neutrino_msg_data_t data
|
||||
if ((*(t_channel_id *)data) != current_channel_id) {
|
||||
g_InfoViewer->chanready = 0;
|
||||
g_Zapit->zapTo_serviceID_NOWAIT(current_channel_id );
|
||||
g_Sectionsd->setServiceChanged(current_channel_id &0xFFFFFFFFFFFFULL, false);
|
||||
//g_Sectionsd->setServiceChanged(current_channel_id, false);
|
||||
|
||||
zap_completion_timeout = getcurrenttime() + 2 * (int64_t) 1000000;
|
||||
zap_completion_timeout = time_monotonic_ms() + ZAP_GUARD_TIME;
|
||||
|
||||
return messages_return::handled;
|
||||
}
|
||||
@@ -168,7 +171,7 @@ int CRemoteControl::handleMsg(const neutrino_msg_t msg, neutrino_msg_data_t data
|
||||
director_mode = 0;
|
||||
needs_nvods = (msg == NeutrinoMessages:: EVT_ZAP_ISNVOD);
|
||||
|
||||
g_Sectionsd->setServiceChanged( current_channel_id&0xFFFFFFFFFFFFULL, true );
|
||||
//g_Sectionsd->setServiceChanged( current_channel_id, true );
|
||||
CNeutrinoApp::getInstance()->channelList->adjustToChannelID(current_channel_id);
|
||||
if ( g_InfoViewer->is_visible )
|
||||
g_RCInput->postMsg( NeutrinoMessages::SHOW_INFOBAR , 0 );
|
||||
@@ -321,11 +324,11 @@ int CRemoteControl::handleMsg(const neutrino_msg_t msg, neutrino_msg_data_t data
|
||||
{
|
||||
getNVODs();
|
||||
if (subChannels.empty())
|
||||
g_Sectionsd->setServiceChanged( current_channel_id&0xFFFFFFFFFFFFULL, true );
|
||||
g_Sectionsd->setServiceChanged( current_channel_id, true );
|
||||
}
|
||||
else
|
||||
// EVENT anfordern!
|
||||
g_Sectionsd->setServiceChanged( current_channel_id&0xFFFFFFFFFFFFULL, true );
|
||||
g_Sectionsd->setServiceChanged( current_channel_id, true );
|
||||
|
||||
}
|
||||
return messages_return::handled;
|
||||
@@ -340,6 +343,15 @@ int CRemoteControl::handleMsg(const neutrino_msg_t msg, neutrino_msg_data_t data
|
||||
|
||||
return messages_return::handled;
|
||||
}
|
||||
else if (msg == NeutrinoMessages::EVT_TUNE_COMPLETE) {
|
||||
t_channel_id chid = *(t_channel_id *)data;
|
||||
printf("CRemoteControl::handleMsg: EVT_TUNE_COMPLETE (%016llx)\n", chid);
|
||||
if(chid)
|
||||
g_Sectionsd->setServiceChanged( chid, true );
|
||||
else
|
||||
g_Sectionsd->setServiceChanged( current_channel_id, true );
|
||||
return messages_return::handled;
|
||||
}
|
||||
//else if (msg == NeutrinoMessages::EVT_ZAP_FAILED || msg == NeutrinoMessages::EVT_ZAP_SUB_FAILED)
|
||||
//return messages_return::handled;
|
||||
else
|
||||
@@ -361,12 +373,12 @@ void CRemoteControl::getSubChannels()
|
||||
//printf("CRemoteControl::getSubChannels linkedServices.size %d\n", linkedServices.size());
|
||||
for (unsigned int i=0; i< linkedServices.size(); i++)
|
||||
{
|
||||
//printf("CRemoteControl::getSubChannels %s\n", linkedServices[i].name.c_str());
|
||||
subChannels.push_back(CSubService(
|
||||
linkedServices[i].originalNetworkId,
|
||||
linkedServices[i].serviceId,
|
||||
linkedServices[i].transportStreamId,
|
||||
linkedServices[i].name));
|
||||
//printf("CRemoteControl::getSubChannels %s: %016llx\n", linkedServices[i].name.c_str(), subChannels[i].getChannelID());
|
||||
if ((subChannels[i].getChannelID()&0xFFFFFFFFFFFFULL) == (current_channel_id&0xFFFFFFFFFFFFULL))
|
||||
selected_subchannel = i;
|
||||
}
|
||||
@@ -606,7 +618,7 @@ const std::string & CRemoteControl::setSubChannel(const int numSub, const bool f
|
||||
|
||||
g_Zapit->zapTo_subServiceID_NOWAIT( current_sub_channel_id );
|
||||
// Houdini: to restart reading the private EPG when switching to a new option
|
||||
g_Sectionsd->setServiceChanged( current_sub_channel_id , true );
|
||||
//g_Sectionsd->setServiceChanged( current_sub_channel_id , true );
|
||||
|
||||
return subChannels[numSub].subservice_name;
|
||||
}
|
||||
@@ -650,7 +662,6 @@ const std::string & CRemoteControl::subChannelDown(void)
|
||||
}
|
||||
}
|
||||
|
||||
void stopAutoRecord();
|
||||
void CRemoteControl::zapTo_ChannelID(const t_channel_id channel_id, const std::string & channame, const bool start_video) // UTF-8
|
||||
{
|
||||
current_channel_id = channel_id;
|
||||
@@ -675,7 +686,7 @@ void CRemoteControl::zapTo_ChannelID(const t_channel_id channel_id, const std::s
|
||||
needs_nvods = false;
|
||||
director_mode = 0;
|
||||
|
||||
uint64_t now = getcurrenttime();
|
||||
uint64_t now = time_monotonic_ms();
|
||||
if ( zap_completion_timeout < now )
|
||||
{
|
||||
g_InfoViewer->chanready = 0;
|
||||
@@ -686,9 +697,9 @@ void CRemoteControl::zapTo_ChannelID(const t_channel_id channel_id, const std::s
|
||||
//dvbsub_pause(true);
|
||||
CZapit::getInstance()->Abort();
|
||||
g_Zapit->zapTo_serviceID_NOWAIT(channel_id);
|
||||
g_Sectionsd->setServiceChanged( current_channel_id&0xFFFFFFFFFFFFULL, false );
|
||||
//g_Sectionsd->setServiceChanged( current_channel_id, false );
|
||||
|
||||
zap_completion_timeout = now + 2 * (int64_t) 1000000;
|
||||
zap_completion_timeout = now + ZAP_GUARD_TIME;
|
||||
g_RCInput->killTimer( current_programm_timer );
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user