Beispiel #1
0
void rtsp_buildMenu(interfaceMenu_t *pParent)
{
	int rtsp_icons[4] = { 0, 0, statusbar_f3_add, statusbar_f4_enterurl };

	createListMenu(&rtspStreamMenu, _T("MOVIE_LIST"), thumbnail_vod, rtsp_icons, pParent,
					   /* interfaceInfo.clientX, interfaceInfo.clientY,
					   interfaceInfo.clientWidth, interfaceInfo.clientHeight,*/ interfaceListMenuIconThumbnail,
					   NULL, NULL, NULL);
	interface_setCustomKeysCallback((interfaceMenu_t*)&rtspStreamMenu, rtsp_keyCallback);

	mysem_create(&rtsp_semaphore);

	memset(&stream_info, 0, sizeof(rtsp_stream_info));

#ifdef ENABLE_TEST_MODE
	{
		char desc[MENU_ENTRY_INFO_LENGTH];
		strcpy(stream_info.streamname, "a.mpg");
		strcpy(stream_info.ip, "192.168.200.1");
		stream_info.port = 554;
		stream_info.custom_url = 1;
		sprintf(desc, "%s: %s", _T("MOVIE"), "rtsp://192.168.200.1:554/a.mpg");
		interface_playControlSetup(rtsp_play_callback, CHANNEL_INFO_SET(0, CHANNEL_CUSTOM), interfacePlayControlStop|interfacePlayControlPause|interfacePlayControlRewind|interfacePlayControlFastForward|interfacePlayControlPlay|interfacePlayControlPrevious|interfacePlayControlNext, desc, thumbnail_vod);
		/*sprintf(desc, "%s: rtsp://%s:%d/%s", _T("MOVIE"), stream_info.ip, stream_info.port, stream_info.streamname);
		interface_playControlSetup(rtsp_play_callback, NULL, CHANNEL_INFO_SET(0, CHANNEL_CUSTOM), interfacePlayControlStop|interfacePlayControlPause|interfacePlayControlRewind|interfacePlayControlFastForward|interfacePlayControlPlay, desc, IMAGE_DIR "thumbnail_vod.png", 0);*/
	}
#endif // #ifdef ENABLE_TEST_MODE

	//rtsp_fillMenu();
}
Beispiel #2
0
void voip_buildMenu(interfaceMenu_t *pParent)
{
	int voip_icons[4] = { 0, 0, 0, 0 };

	createListMenu(&VoIPMenu, _T("VOIP"), thumbnail_voip, voip_icons, pParent,
		/* interfaceInfo.clientX, interfaceInfo.clientY,
		interfaceInfo.clientWidth, interfaceInfo.clientHeight,*/ interfaceListMenuIconThumbnail,
		NULL, NULL, NULL);
	interface_setCustomKeysCallback((interfaceMenu_t*)&VoIPMenu, voip_menuKeyCallback);

	createListMenu(&AccountMenu, _T("ACCOUNT"), 0, NULL, (interfaceMenu_t *)&VoIPMenu, interfaceListMenuIconThumbnail, NULL, NULL, NULL);

	voip_icons[0] = statusbar_f1_delete;
	voip_icons[1] = statusbar_f2_info;
	voip_icons[2] = statusbar_f3_edit;
	voip_icons[3] = statusbar_f4_rename;
	createListMenu(&AddressBookMenu, _T("ADDRESS_BOOK"), thumbnail_address_book, voip_icons, (interfaceMenu_t *)&VoIPMenu,
	interfaceListMenuIconThumbnail, NULL, NULL, NULL);
	interface_setCustomKeysCallback((interfaceMenu_t*)&AddressBookMenu, voip_addressBookKeyCallback);
	
	voip_icons[2] = statusbar_f3_abook;
	voip_icons[3] = 0;
	createListMenu(&MissedCallsMenu, _T("MISSED_CALLS"), thumbnail_missed_calls, voip_icons, (interfaceMenu_t *)&VoIPMenu,
	interfaceListMenuIconThumbnail, NULL, NULL, NULL);
	interface_setCustomKeysCallback((interfaceMenu_t*)&MissedCallsMenu, voip_callsKeyCallback);
	
	createListMenu(&AnsweredCallsMenu, _T("ANSWERED_CALLS"), thumbnail_answered_calls, voip_icons, (interfaceMenu_t *)&VoIPMenu,
	interfaceListMenuIconThumbnail, NULL, NULL, NULL);
	interface_setCustomKeysCallback((interfaceMenu_t*)&AnsweredCallsMenu, voip_callsKeyCallback);
	
	createListMenu(&DialedNumbersMenu, _T("DIALED_NUMBERS"), thumbnail_dialed_numbers, voip_icons, (interfaceMenu_t *)&VoIPMenu,
	interfaceListMenuIconThumbnail, NULL, NULL, NULL);
	interface_setCustomKeysCallback((interfaceMenu_t*)&DialedNumbersMenu, voip_callsKeyCallback);
}
Beispiel #3
0
void youtube_buildMenu(interfaceMenu_t* pParent)
{
	int youtube_icons[4] = { 0, 
		statusbar_f2_info,
#ifdef ENABLE_FAVORITES
		statusbar_f3_add,
#else
		0,
#endif
		0 };

	createListMenu(&YoutubeMenu, "YouTube", thumbnail_youtube, youtube_icons, pParent,
		interfaceListMenuIconThumbnail, youtube_fillMenu, youtube_exitMenu, (void*)1);
	interface_setCustomKeysCallback((interfaceMenu_t*)&YoutubeMenu, youtube_keyCallback);
	interface_setCustomDisplayCallback((interfaceMenu_t*)&YoutubeMenu, youtube_menuDisplay);

	memset( &youtubeInfo, 0, sizeof(youtubeInfo) );
}
Beispiel #4
0
void menu_buildMainMenu()
{
	char *str = NULL;
	int main_icons[4] = { 0, 0, 0,
#if (defined ENABLE_FAVORITES) && !(defined ENABLE_VIDIMAX) && !(defined ENABLE_FUSION)
		statusbar_f4_favorites
#else
		0
#endif
	};

	createListMenu(&interfaceMainMenu, str, thumbnail_logo, main_icons, NULL,
				   /* interfaceInfo.clientX, interfaceInfo.clientY,
				   interfaceInfo.clientWidth, interfaceInfo.clientHeight,*/ interfaceListMenuBigThumbnail,//interfaceListMenuIconThumbnail,
				   NULL, NULL, NULL);
	interface_setCustomKeysCallback(_M &interfaceMainMenu, menu_keyCallback);
/*
	interface_addMenuEntry(_M &interfaceMainMenu, str, 0, NULL, NULL, IMAGE_DIR "splash.png");
*/

#ifndef ENABLE_VIDIMAX
#ifdef ENABLE_DVB
	 
#ifdef HIDE_EXTRA_FUNCTIONS
	if ( offair_tunerPresent() )
#endif // #ifdef HIDE_EXTRA_FUNCTIONS
	{
		offair_buildDVBTMenu(_M &interfaceMainMenu);
		str = _T("DVB_CHANNELS");
		interface_addMenuEntry(_M &interfaceMainMenu, str, interface_menuActionShowMenu, &DVBTMenu, thumbnail_dvb);
	}
#endif // #ifdef ENABLE_DVB
#ifdef ENABLE_TELETES
	teletes_buildMenu(_M &interfaceMainMenu);
	str = _T("CAMERAS");
	interface_addMenuEntry(_M &interfaceMainMenu, str, interface_menuActionShowMenu, &teletesMediaMenu, thumbnail_tvinfo);
#endif
#ifdef ENABLE_IPTV
	rtp_buildMenu(_M &interfaceMainMenu);
	str = _T("TV_CHANNELS");

#ifdef ENABLE_FUSION
	interface_addMenuEntry(_M &interfaceMainMenu, str, fusion_askPassword_FillStreamMenu, NULL, thumbnail_multicast);
#else
	interface_addMenuEntry(_M &interfaceMainMenu, str, rtp_initStreamMenu, NULL, thumbnail_multicast);
#endif
#endif // #ifdef ENABLE_IPTV
#ifdef ENABLE_PVR
	pvr_buildPvrMenu((interfaceMenu_t *) &interfaceMainMenu);
#endif
#ifdef ENABLE_VOD
	rtsp_buildMenu(_M &interfaceMainMenu);
	str = _T("MOVIES");

#ifdef ENABLE_FUSION
	interface_addMenuEntry(_M &interfaceMainMenu, str, fusion_askPassword_FillStreamMenu, NULL, thumbnail_vod);
#else
	interface_addMenuEntry(_M &interfaceMainMenu, str, rtsp_fillStreamMenu, NULL, thumbnail_vod);
#endif

#endif // #ifdef ENABLE_VOD
#ifdef ENABLE_FAVORITES
	playlist_buildMenu(_M &interfaceMainMenu);
	str = _T("PLAYLIST");

#ifdef ENABLE_FUSION
	interface_addMenuEntry(_M &interfaceMainMenu, str, fusion_askPassword_SwitchMenu, &playlistMenu, thumbnail_favorites);
#else
	interface_addMenuEntry(_M &interfaceMainMenu, str, interface_menuActionShowMenu, &playlistMenu, thumbnail_favorites);
#endif

#endif // #ifdef ENABLE_FAVORITES

	media_buildMediaMenu(_M &interfaceMainMenu);
#ifdef ENABLE_USB
	str = _T("RECORDED");

#ifdef ENABLE_FUSION
	interface_addMenuEntry(_M &interfaceMainMenu, str, fusion_askPassword_USBBrowserMenu, SET_NUMBER(mediaVideo), thumbnail_usb);
#else
	interface_addMenuEntry(_M &interfaceMainMenu, str, media_initUSBBrowserMenu, SET_NUMBER(mediaVideo), thumbnail_usb);
#endif
#endif // #ifdef ENABLE_USB

#ifdef ENABLE_WEB_SERVICES
#ifndef ENABLE_FUSION
	{
		str = _T("WEB_SERVICES");
		interface_addMenuEntry(_M &interfaceMainMenu, str, interface_menuActionShowMenu, &WebServicesMenu, thumbnail_internet);
		createListMenu(&WebServicesMenu, _T("WEB_SERVICES"), thumbnail_internet, NULL, _M &interfaceMainMenu,
					/* interfaceInfo.clientX, interfaceInfo.clientY,
					interfaceInfo.clientWidth, interfaceInfo.clientHeight,*/ interfaceListMenuIconThumbnail,
					NULL, NULL, NULL);
#ifdef ENABLE_RUTUBE
		rutube_buildMenu(_M &WebServicesMenu);
		str = "RuTube";
		interface_addMenuEntry(_M &WebServicesMenu, str, interface_menuActionShowMenu, &RutubeCategories, thumbnail_rutube);
	
#endif // #ifdef ENABLE_RUTUBE
#ifdef ENABLE_YOUTUBE
		youtube_buildMenu(_M &WebServicesMenu);
		str = "YouTube";
		interface_addMenuEntry(_M &WebServicesMenu, str, interface_menuActionShowMenu, &YoutubeMenu, thumbnail_youtube);
#endif // #ifdef ENABLE_YOUTUBE
		
#ifdef ENABLE_REGPLAT
		regplat_buildMenu(_M &WebServicesMenu);
		str = "RegPlat";
		interface_addMenuEntry(_M &WebServicesMenu, str, interface_menuActionShowMenu, &regplatLoginMenu, thumbnail_regplat);
#endif// #ifdef ENABLE_REGPLAT

#ifdef ENABLE_SAMBA
		samba_buildMenu(_M &WebServicesMenu);
		str = _T("NETWORK_PLACES");
		interface_addMenuEntry(_M &WebServicesMenu, str, media_initSambaBrowserMenu, NULL, thumbnail_network);
		str = _T("NETWORK_BROWSING");
		interface_addMenuEntry(_M &WebServicesMenu, str, interface_menuActionShowMenu, &SambaMenu, thumbnail_workstation);
		
#endif // #ifdef ENABLE_SAMBA
#ifdef ENABLE_DLNA
		dlna_buildDLNAMenu(_M &WebServicesMenu);
		str = _T("MEDIA_SERVERS");
		interface_addMenuEntry(_M &WebServicesMenu, str, dlna_initServerBrowserMenu, NULL, thumbnail_movies);
		
#endif // #ifdef ENABLE_DLNA
#ifdef ENABLE_BROWSER		
		str = _T("INTERNET_BROWSING");
		interface_addMenuEntry(_M &WebServicesMenu, str, open_browser, NULL, thumbnail_internet);
#ifndef HIDE_EXTRA_FUNCTIONS
		if (helperFileExists(MW_CONFIG_FILE))
		{
			str = _T("MIDDLEWARE");
			interface_addMenuEntry(_M &interfaceMainMenu, str, open_browser_mw, NULL, thumbnail_elecardtv);
		}
#endif // #ifndef HIDE_EXTRA_FUNCTIONS
		
#endif // #ifdef ENABLE_BROWSER
#ifdef ENABLE_SMIL
		str = _T("RTMP");
		interface_addMenuEntry((interfaceMenu_t *)&WebServicesMenu, str, smil_enterURL, SET_NUMBER(-1), thumbnail_add_url);
#endif
	}
#endif // ifndef ENABLE_FUSION
#endif // #ifdef ENABLE_WEB_SERVICES

#ifdef ENABLE_VOIP
	voip_buildMenu(_M &interfaceMainMenu);
		//if(appControlInfo.voipInfo.status == 0)
		{
			str = _T("VOIP");
			interface_addMenuEntry(_M &interfaceMainMenu, str, voip_fillMenu, SET_NUMBER(1), thumbnail_voip);
		}
	
#endif
#ifdef SHOW_CARD_MENU
	{
		card_buildMenu(_M &interfaceMainMenu);
		str = _T("CARD");
		interface_addMenuEntry(_M &interfaceMainMenu, str, card_fillInfoMenu, SET_NUMBER(1), thumbnail_rd);
		str = _T("QUIZ");
		interface_addMenuEntry(_M &interfaceMainMenu, str, card_fillQuizMenu, &cardMenu, thumbnail_account);
	}
#endif // #ifdef SHOW_CARD_MENU
	{
		output_buildMenu(_M &interfaceMainMenu);
		str = _T("SETTINGS");

#ifdef ENABLE_FUSION
	interface_addMenuEntry(_M &interfaceMainMenu, str, fusion_askPassword_SwitchMenu, &OutputMenu, thumbnail_configure);
#else
		interface_addMenuEntry(_M &interfaceMainMenu, str, interface_menuActionShowMenu, &OutputMenu, thumbnail_configure);
#endif
	}
#else // NOT ENABLE_VIDIMAX
//#ifdef ENABLE_VIDIMAX	
	vidimax_buildCascadedMenu(_M &interfaceMainMenu);
	str = _T("Vidimax");
	interface_addMenuEntry (_M &interfaceMainMenu, str, vidimax_fillMenu, NULL, thumbnail_vidimax);
	/////////////////////////////////////////////////////////////////////////////////
#ifdef ENABLE_DVB
#ifdef HIDE_EXTRA_FUNCTIONS
		if (offair_tunerPresent())
#endif // #ifdef HIDE_EXTRA_FUNCTIONS
	{
		offair_buildDVBTMenu(_M &interfaceMainMenu);
		str = _T("DVB_CHANNELS");
		interface_addMenuEntry(_M &interfaceMainMenu, str, interface_menuActionShowMenu, &DVBTMenu, thumbnail_dvb);
	}
#endif // #ifdef ENABLE_DVB

#ifdef ENABLE_IPTV
	rtp_buildMenu(_M &interfaceMainMenu);
	str = _T("TV_CHANNELS");
	interface_addMenuEntry(_M &interfaceMainMenu, str, rtp_initStreamMenu, NULL, thumbnail_multicast);
	
#endif // #ifdef ENABLE_IPTV
#ifdef ENABLE_PVR
	pvr_buildPvrMenu((interfaceMenu_t *) &interfaceMainMenu);
#endif

#ifdef ENABLE_FAVORITES
	playlist_buildMenu(_M &interfaceMainMenu);
	str = _T("PLAYLIST");
	interface_addMenuEntry(_M &interfaceMainMenu, str, interface_menuActionShowMenu, &playlistMenu, thumbnail_favorites);
	
#endif // #ifdef ENABLE_FAVORITES

	media_buildMediaMenu(_M &interfaceMainMenu);
#ifdef ENABLE_USB
	str = _T("RECORDED");
	interface_addMenuEntry(_M &interfaceMainMenu, str, media_initUSBBrowserMenu, SET_NUMBER(mediaVideo), thumbnail_usb);
	
#endif // #ifdef ENABLE_USB

#ifdef ENABLE_WEB_SERVICES
	{
		str = _T("WEB_SERVICES");
		interface_addMenuEntry(_M &interfaceMainMenu, str, interface_menuActionShowMenu, &WebServicesMenu, thumbnail_internet);
		createListMenu(&WebServicesMenu, _T("WEB_SERVICES"), thumbnail_internet, NULL, _M &interfaceMainMenu,
					/* interfaceInfo.clientX, interfaceInfo.clientY,
					interfaceInfo.clientWidth, interfaceInfo.clientHeight,*/ interfaceListMenuIconThumbnail,
					NULL, NULL, NULL);
					
#ifdef ENABLE_RUTUBE
		rutube_buildMenu(_M &WebServicesMenu);
		str = "RuTube";
		interface_addMenuEntry(_M &WebServicesMenu, str, interface_menuActionShowMenu, &RutubeCategories, thumbnail_rutube);
	
#endif // #ifdef ENABLE_RUTUBE
#ifdef ENABLE_YOUTUBE
		youtube_buildMenu(_M &WebServicesMenu);
		str = "YouTube";
		interface_addMenuEntry(_M &WebServicesMenu, str, interface_menuActionShowMenu, &YoutubeMenu, thumbnail_youtube);
#endif // #ifdef ENABLE_YOUTUBE

#ifdef ENABLE_BROWSER		
		str = _T("INTERNET_BROWSING");
		interface_addMenuEntry(_M &WebServicesMenu, str, open_browser, NULL, thumbnail_internet);
#ifndef HIDE_EXTRA_FUNCTIONS
		if (helperFileExists(MW_CONFIG_FILE))
		{
			str = _T("MIDDLEWARE");
			interface_addMenuEntry(_M &interfaceMainMenu, str, open_browser_mw, NULL, thumbnail_elecardtv);
		}
#endif // #ifndef HIDE_EXTRA_FUNCTIONS
#endif // #ifdef ENABLE_BROWSER

#ifdef ENABLE_SAMBA
		samba_buildMenu(_M &WebServicesMenu);
		str = _T("NETWORK_PLACES");
		interface_addMenuEntry(_M &WebServicesMenu, str, media_initSambaBrowserMenu, NULL, thumbnail_network);
		str = _T("NETWORK_BROWSING");
		interface_addMenuEntry(_M &WebServicesMenu, str, interface_menuActionShowMenu, &SambaMenu, thumbnail_workstation);
		
#endif // #ifdef ENABLE_SAMBA
	}
#endif // #ifdef ENABLE_WEB_SERVICES

#ifdef ENABLE_VOIP
	voip_buildMenu(_M &interfaceMainMenu);
		//if(appControlInfo.voipInfo.status == 0)
		{
			str = _T("VOIP");
			interface_addMenuEntry(_M &interfaceMainMenu, str, voip_fillMenu, SET_NUMBER(1), thumbnail_voip);
		}
#endif
	{
		output_buildMenu(_M &interfaceMainMenu);
		str = _T("SETTINGS");
		interface_addMenuEntry(_M &interfaceMainMenu, str, interface_menuActionShowMenu, &OutputMenu, thumbnail_configure);
	}

#endif // ENABLE_VIDIMAX
	/*
	str = _T("MUSIC");
	interface_addMenuEntry(_M &interfaceMainMenu, str, interface_menuActionShowMenu, NULL, IMAGE_DIR "thumbnail_music.png");
	str = _T("PAUSED_CONTENT");
	interface_addMenuEntry(_M &interfaceMainMenu, str, interface_menuActionShowMenu, NULL, IMAGE_DIR "thumbnail_paused.png");
	str = _T("ACCOUNT");
	interface_addMenuEntry(_M &interfaceMainMenu, str, interface_menuActionShowMenu, NULL, IMAGE_DIR "thumbnail_account.png");
	*/
	switch( interface_getMenuEntryCount( _M &interfaceMainMenu ))
	{
		case 4:case 6:case 9: break;
		default:
			str = _T("SHUTDOWN");
			interface_addMenuEntry(_M &interfaceMainMenu, str, power_callback, NULL, thumbnail_power);
	}

}