コード例 #1
0
ファイル: win_chapter.c プロジェクト: alkap007/ali3606
/*****************************************************
Interface : static PRESULT chapter_list_callback(POBJECT_HEAD obj, VEVENT event, UINT32 param1, UINT32 param2);
Function  : callback of chapter list
Author    : Wu Jianwen
Date      : 2010.8.25
Input     : 
Output    : NONE
Return    : 
******************************************************/
static PRESULT chapter_list_callback(POBJECT_HEAD obj, VEVENT event, UINT32 param1, UINT32 param2)
{
	UINT16 top, cnt, pos;
	UINT8 unact;
	PRESULT ret = PROC_PASS;

	switch(event)
	{
		case EVN_PRE_DRAW:			
			top = OSD_GetListTopPoint(&g_ls_chapter);
			OSD_SetListTopPoint(&g_ls_chapter, top);
			top= OSD_GetListTopPoint(&g_ls_chapter);
			GetListChapterInfo(top);		
			break;
			
		case EVN_REQUEST_DATA:
			top = (UINT16)param2;
			GetListChapterInfo(top);
			break;
		default:
			PRINTF("do nothing \n");
	}
	
	return ret;
}
コード例 #2
0
ファイル: win_subtitle.c プロジェクト: alkap007/ali3606
long win_mp_subtitle_init_data()
{
	long			ret = -1;
	long			number;
	long			current_language_index;
	UINT16 lst_top,list_cnt;
	UINT8 sel_lang = 0xFF;

	if (!subtitle_handle)
	{
		return -1;
	}

	if(g_ext_subtitle_plugin)
		ret = g_ext_subtitle_plugin->mps_query_language(subtitle_handle, &number, &current_language_index, NULL, NULL);
	
	if (ret < 0)
	{
		return -1;
	}
	
	list_cnt =  number;
	OSD_SetListCount(&g_ls_subtitle, list_cnt);


	OSD_SetListCurPos(&g_ls_subtitle, current_language_index);
	OSD_SetListTop(&g_ls_subtitle, current_language_index);
	
	OSD_SetListVerScrollBar(&g_ls_subtitle, &g_sb_subtitle);
	
	lst_top = OSD_GetListTopPoint(&g_ls_subtitle);
	ret = win_mp_subtitle_read_page(lst_top);
	return ret;
}
コード例 #3
0
ファイル: win_subtitle.c プロジェクト: alkap007/ali3606
static PRESULT subtitle_list_callback(POBJECT_HEAD obj, VEVENT event, UINT32 param1, UINT32 param2)
{
	UINT16 top, cnt, pos;
	UINT8 unact;
	PRESULT ret = PROC_PASS;

	switch(event)
	{
		case EVN_PRE_DRAW:
//vic100507#1			
			top = OSD_GetListTopPoint(&g_ls_subtitle);
			OSD_SetListTopPoint(&g_ls_subtitle, top);
			top= OSD_GetListTopPoint(&g_ls_subtitle);
			if(system_state != SYS_STATE_USB_MP)
				win_subtitle_read_page(top);
			else
#ifdef MP_SUBTITLE_SUPPORT							
				//TODO: set display items string
				win_mp_subtitle_read_page(top);
#endif
//vic100507#1				
			break;
		case EVN_REQUEST_DATA:
			top = (UINT16)param2;
			if(system_state != SYS_STATE_USB_MP)//vic100507#1
				win_subtitle_read_page(top);
#ifdef MP_SUBTITLE_SUPPORT	//vic100507#1						
			else
				//TODO: set display items string
				win_mp_subtitle_read_page(top);
#endif
			
			break;
		default:
			PRINTF("do nothing \n");
	}
	
	return ret;
}
コード例 #4
0
ファイル: win_chapter.c プロジェクト: alkap007/ali3606
/*****************************************************
Interface : void ListChapterInfoInit();
Function  : init chapter list
Author    : Wu Jianwen
Date      : 2010.8.25
Input     : NONE
Output    : NONE
Return    : NONE
******************************************************/
void ListChapterInfoInit()
{
	UINT16 top;
	UINT32 i_TotalChapter = 0;      //the total chapter of the video
	INT32 i_DestChapter = 0;        //dest chapter num
    INT32 i_CurChapter = 1;         //current chapter num
	DEC_CHAPTER_INFO t_ChapterInfo; //save chapter info of the stream

	MEMSET(&t_ChapterInfo,0,sizeof(DEC_CHAPTER_INFO));
	t_ChapterInfo.dst_chapter = -1;
	MpgFileGetChapterInfo(&t_ChapterInfo);   //get the current chapter info 
	i_CurChapter = t_ChapterInfo.cur_chapter;   //begin with chapter
	i_TotalChapter = t_ChapterInfo.nb_chapter;

	OSD_SetListCount(&g_ls_chapter, i_TotalChapter);
	OSD_SetListCurPos(&g_ls_chapter, i_CurChapter);
	OSD_SetListTop(&g_ls_chapter, i_CurChapter);
	OSD_SetListVerScrollBar(&g_ls_chapter, &g_sb_chapter);
	
	top = OSD_GetListTopPoint(&g_ls_chapter);
	GetListChapterInfo(top);
}
コード例 #5
0
ファイル: win_subtitle.c プロジェクト: Janesak1977/ali3602
void win_subtitle_init_data()
{
	P_NODE	p_node;
	UINT16 lst_top,list_cnt;
	UINT8 sel_lang = 0xFF;
	SYSTEM_DATA* sys_data = sys_data_get();
	
	TTXEng_GetSubtLang(&ttx_sub_lang_list, &g_win_ttx_subtitle_count);
	subt_get_language(&sub_lang_list, &g_win_subtitle_count);
	
	list_cnt =  (g_win_subtitle_count + g_win_ttx_subtitle_count + 1);
	OSD_SetListCount(&g_ls_subtitle, list_cnt);
	
	if(sys_data->osd_set.subtitle_display == 0)/*subtitle off,select the last item*/
	{
		OSD_SetListCurPos(&g_ls_subtitle, (list_cnt - 1));
		if(list_cnt > SUBTITLE_ITEM_NUMBER)
			OSD_SetListTop(&g_ls_subtitle, (list_cnt - SUBTITLE_ITEM_NUMBER));
		else
			OSD_SetListTop(&g_ls_subtitle, 0);
	}
	else if(sys_data->osd_set.subtitle_lang == 0xFF)/*set_sub_lang_idx can only be set in subtitle pop-up*/
	{/*if first init,or reset*/
		sel_lang = 0xFF;
#if (SUBTITLE_ON == 1)
		sel_lang = api_ttxsub_getlang(NULL,sub_lang_list,sys_data->lang.sub_lang,g_win_subtitle_count);
		if(sel_lang != 0xFF)
		{
			sel_lang = sel_lang + g_win_ttx_subtitle_count;
		}/*subtitle language select first*/
#endif

#if (TTX_ON ==1)			
		if(sel_lang == 0xFF)
		{	
			sel_lang = api_ttxsub_getlang(ttx_sub_lang_list,NULL,sys_data->lang.sub_lang,g_win_ttx_subtitle_count);				
		}/*if can not get subt lang_idx,to get ttx_subt lang_idx*/
#endif
		if(sel_lang != 0xFF)/*If sel_lang valid,set to corresponding item highlight*/
		{
			OSD_SetListCurPoint(&g_ls_subtitle, sel_lang);
			//OSD_SetListTopPoint(&g_ls_subtitle, sel_lang);
			if(sel_lang > (SUBTITLE_ITEM_NUMBER - 1))
				OSD_SetListTop(&g_ls_subtitle, (sel_lang - SUBTITLE_ITEM_NUMBER + 1));
			else
				OSD_SetListTop(&g_ls_subtitle, 0);
		}
		else/*if sel_lang invalid,set to 0 position*/
		{
			OSD_SetListCurPoint(&g_ls_subtitle, 0);
			OSD_SetListTopPoint(&g_ls_subtitle, 0);
		}
	}
	else
	{
		OSD_SetListCurPoint(&g_ls_subtitle, sys_data->osd_set.subtitle_lang); 
	        if(sys_data->osd_set.subtitle_lang > (SUBTITLE_ITEM_NUMBER - 1))
			OSD_SetListTop(&g_ls_subtitle, (sys_data->osd_set.subtitle_lang - SUBTITLE_ITEM_NUMBER + 1));
		else
			OSD_SetListTop(&g_ls_subtitle, 0);
	}

	OSD_SetListVerScrollBar(&g_ls_subtitle, &g_sb_subtitle);
	
	lst_top = OSD_GetListTopPoint(&g_ls_subtitle);
	win_subtitle_read_page(lst_top);
}