bool CMiscMenue::changeNotify(const neutrino_locale_t OptionName, void *)
{
	if (ARE_LOCALES_EQUAL(OptionName, LOCALE_MISCSETTINGS_SHUTDOWN_COUNT))
	{
		printf("[neutrino] shutdown counter changed to %d minutes\n", atoi(g_settings.shutdown_count));
	}
	else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_MISCSETTINGS_EPG_CACHE) ||
	         ARE_LOCALES_EQUAL(OptionName, LOCALE_MISCSETTINGS_EPG_EXTENDEDCACHE) ||
	         ARE_LOCALES_EQUAL(OptionName, LOCALE_MISCSETTINGS_EPG_OLD_EVENTS) ||
	         ARE_LOCALES_EQUAL(OptionName, LOCALE_MISCSETTINGS_EPG_MAX_EVENTS))
	{
		CNeutrinoApp::getInstance()->SendSectionsdConfig();
	}
#ifndef TUXTXT_CFG_STANDALONE
	else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_MISCSETTINGS_TUXTXT_CACHE))
	{
		int vtpid = g_RemoteControl->current_PIDs.PIDs.vtxtpid;

		if (g_settings.tuxtxt_cache)
		{
			tuxtxt_init();
			if (vtpid)
				tuxtxt_start(vtpid);
		}
		else
		{
			tuxtxt_stop();
			tuxtxt_close();
		}
	}
#endif
	return false;
}
Exemple #2
0
void eTuxtxtApp::freeCache()
{
	pthread_mutex_lock( &cacheChangeLock );
	if ( !uiRunning )
	{
		tuxtxt_close();
		pid = 0;
	}
	pthread_mutex_unlock( &cacheChangeLock );
}
void CVCRControl::CFileAndServerDevice::CutBackNeutrino(const t_channel_id channel_id, const int mode)
{
	if (channel_id != 0) // wenn ein channel angegeben ist
	{
		last_mode = CNeutrinoApp::getInstance()->getMode();
		if (mode != last_mode && (mode != CNeutrinoApp::getInstance()->getLastMode() ||
		    last_mode != NeutrinoMessages::mode_standby && last_mode != NeutrinoMessages::mode_scart))
		{
			CNeutrinoApp::getInstance()->handleMsg( NeutrinoMessages::CHANGEMODE , mode | NeutrinoMessages::norezap );
			// Wenn wir im Standby waren, dann brauchen wir f�rs streamen nicht aufwachen...
			if(last_mode == NeutrinoMessages::mode_standby)
				CNeutrinoApp::getInstance()->handleMsg( NeutrinoMessages::CHANGEMODE , NeutrinoMessages::mode_standby);
			else if(last_mode == NeutrinoMessages::mode_scart) // possibly switch back to SCART mode
				CNeutrinoApp::getInstance()->handleMsg( NeutrinoMessages::VCR_ON, 0 );
		}
		if(g_Zapit->getCurrentServiceID() != channel_id)	// und momentan noch nicht getuned ist
		{
			g_Zapit->zapTo_serviceID(channel_id);		// dann umschalten
		}
	}
#ifndef TUXTXT_CFG_STANDALONE
	if(g_settings.tuxtxt_cache)
	{
		tuxtxt_stop();
		tuxtxt_close();
	}
#endif
#if ENABLE_RADIOTEXT
	if (mode == NeutrinoMessages::mode_radio && g_settings.radiotext_enable && g_Radiotext != NULL)
	{
		delete g_Radiotext;
		g_Radiotext = NULL;
	}
#endif
	if(StopPlayBack && g_Zapit->isPlayBackActive())	// wenn playback gestoppt werden soll und noch l�uft
		g_Zapit->stopPlayBack();		// dann playback stoppen

	if (StopSectionsd == CNeutrinoApp::SECTIONSD_STOP)
	{
 		g_Sectionsd->setPauseScanning(true);	// sectionsd stoppen
	}
	else if (StopSectionsd == CNeutrinoApp::SECTIONSD_RESTART)
	{
		g_Sectionsd->Restart();			// sectionsd neu starten (pausiert automatisch)
		g_Sectionsd->RegisterNeutrino();
	}

	g_Zapit->setRecordMode( true );			// recordmode einschalten
}
Exemple #4
0
void eExpertSetup::tuxtxtCachingChanged(bool b)
{
	if ( b )
	{
		if (Decoder::current.tpid != -1)
			tuxtxt_stop();
		tuxtxt_close();
	}
	else
	{
		tuxtxt_init();
		if (Decoder::current.tpid != -1)
			tuxtxt_start(Decoder::current.tpid);
	}
}
void CVCRControl::CFileAndServerDevice::CutBackNeutrino(const t_channel_id channel_id, const int mode)
{
	if (channel_id != 0) // wenn ein channel angegeben ist
	{
		last_mode = CNeutrinoApp::getInstance()->getMode();
		if (mode != last_mode && (last_mode != NeutrinoMessages::mode_standby || mode != CNeutrinoApp::getInstance()->getLastMode()))
		{
			CNeutrinoApp::getInstance()->handleMsg( NeutrinoMessages::CHANGEMODE , mode | NeutrinoMessages::norezap );
			// Wenn wir im Standby waren, dann brauchen wir f�rs streamen nicht aufwachen...
			if(last_mode == NeutrinoMessages::mode_standby)
				CNeutrinoApp::getInstance()->handleMsg( NeutrinoMessages::CHANGEMODE , NeutrinoMessages::mode_standby);
		}
		// Wenn im SB dann m�ssen wir die zapit aufwecken
/*		if(last_mode == NeutrinoMessages::mode_standby)
		{
			g_Zapit->setStandby(false);
		}*/
		if(g_Zapit->getCurrentServiceID() != channel_id)	// und momentan noch nicht getuned ist
		{
			g_Zapit->zapTo_serviceID(channel_id);		// dann umschalten
		}
		if(last_mode == NeutrinoMessages::mode_standby)
		{
			sleep(1); // Wait for zapit to come alive
			g_Zapit->muteAudio(false); // god knows why this is neccessary, it wont work without
			g_Zapit->muteAudio(true);
		}
	}
#ifndef TUXTXT_CFG_STANDALONE
	if(g_settings.tuxtxt_cache)
	{
		tuxtxt_stop();
		tuxtxt_close();
	}
#endif
	if(StopPlayBack && g_Zapit->isPlayBackActive())	// wenn playback gestoppt werden soll und noch l�uft
		g_Zapit->stopPlayBack();		// dann playback stoppen

	if(StopSectionsd)				// wenn sectionsd gestoppt werden soll
#ifdef RESTART_SECTIONSD_INSTEAD_OF_STOP
		g_Sectionsd->Restart();			// sectionsd neu starten (pausiert automatisch)
#else
		g_Sectionsd->setPauseScanning(true);	// sectionsd stoppen
#endif

	g_Zapit->setRecordMode( true );					// recordmode einschalten
}
Exemple #6
0
bool CTuxtxtCacheNotifier::changeNotify(const neutrino_locale_t, void *)
{
	int vtpid=g_RemoteControl->current_PIDs.PIDs.vtxtpid;

	if (g_settings.tuxtxt_cache)
	{
		tuxtxt_init();
		if (vtpid)
			tuxtxt_start(vtpid);
	}
	else
	{
		tuxtxt_stop();
		tuxtxt_close();
	}

	return true;
}