⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mmp_show.c

📁 SAMSUNG 5009的源代码
💻 C
📖 第 1 页 / 共 5 页
字号:
	{
		//gaoping 20060407
		gpstMmp_ctrl->estSel.ewFolder_idx_tmp= cur_page;
		MmpShowDrawFilePage(cur_page);
		gpstMmp_ctrl->estSel.ewFolder_idx_tmp= MMP_NO_SELECTION;
		OSD_ChangeExplore(OSD_CTRL_EXPLORE_INFO2NORMAL, NULL, SYS_WAIT);
	}	
	if( (cur_folder_page*MMP_CTRL_PAGE_UNIT_SIZE <= open_folder) \
		&& (open_folder < (cur_folder_page+1)*MMP_CTRL_PAGE_UNIT_SIZE))
		MmpShowUpdateFolderSel(MMP_NO_SELECTION, open_folder);//gaoping 20060410

	
	if((disp_sync == MMP_DSP_BG_PLAY) && (cur_file_index/MMP_CTRL_PAGE_UNIT_SIZE == cur_page ))
	{
		MmpShowUpdateFileSel(cur_file_index);		
	}	

#if 1	

	MmpShowExploreInfo1SetRepeatIcon();
	MmpShowExploreInfo1SetModeIcon();


	//osd_state = OSD_GetState();
#if 0	// cydrain 20060406
	switch(page_type)
	{
		case MMP_AUDIO_FILE:
			MmpShowUpdatePlayInfo(MMP_REQ_AUDIO);
			break;

#if _APP_CAP_NAV_MMP_PLAY_VIDEO_FILE	// cydrain 20060406
		case MMP_VIDEO_FILE:
			MmpShowUpdatePlayInfo(MMP_REQ_VIDEO);
			break;
#endif

		case MMP_IMAGE_FILE:
		MmpShowUpdatePlayInfo(MMP_REQ_IMG);
		/* Preview */
		if(osd_state->etExp_state.etCtrl_focus == EXPLORER_SUB_FILE)	
		{
			MmpDrawImagePreview(cur_file_index, PIC_ROTATE_ANGLE_0,1);	
		}		
			break;

		default:
			break;
	}
#endif

	//osd_state = OSD_GetState();		
	/* Set the previous highlight */
	switch (osd_state->etExp_state.etCtrl_focus)
	{
		case EXPLORER_SUB_FOLDER:
			folder_cursor = GetMmpFolderCursor();
			MmpShowUpdateFolderCursor(MMP_NO_SELECTION, folder_cursor);
			break;

		case EXPLORER_SUB_FILE:
			if((cursor_file/MMP_CTRL_PAGE_UNIT_SIZE == cur_page ) && (cursor_file != MMP_NO_SELECTION))
				MmpShowUpdateFileCursor(MMP_NO_SELECTION, cursor_file);
			if(page_type == MMP_IMAGE_FILE)	// cydrain 20060406
				MmpDrawImagePreview(cur_file_index, PIC_ROTATE_ANGLE_0,1);
			break;

		case EXPLORER_SUB_TYPE_SELECT:
			MmpShowUpdateTypeSelect(MMP_NO_SELECTION, GetMmpFileTypeCursor());
			break;	
	}
#endif
	//gaoping 20060403
	MmpShowNoticeExploreKeeping();
	//MmpShowUpdateFolderInfo(cur_folder_index, total_folder);	// cydrain 20060406
	//MmpShowUpdateFileInfo(cur_file_index, total_file);
	//gaoping 20060403
	if(GetMmpFileType() == MMP_IMAGE_FILE)
	{
		BYTE2 cur_file_index, cur_folder_index;

		cur_file_index = GetMmpFileCursor();
		cur_folder_index = GetMmpFolderOpen(); 

		/* Preview */
		MmpDrawImagePreview(cur_file_index, PIC_ROTATE_ANGLE_0,1);	
		MmpContinueLoop();
	}
}

/******************************************************************************
* Function name  : MmpShowReadDir
* Arguments      :  
*     IN        BYTE2 prev_open_folder, BYTE2 new_open_folder, MmpDirAct_et act_sub
*			
*     OUT       
*     I/O       
* Return         :  
*			VOID
* By             : Kim Do Yeon
* Description    :  
* Revision       :  
******************************************************************************
*/
VOID MmpShowReadDir(BYTE2 prev_open_folder, BYTE2 new_open_folder, MmpDirAct_et act_sub)
{	 
	BYTE2 total_folder, total_file, file_play, open_folder, play_folder, open_page;

	open_folder = GetMmpFolderOpen();
	play_folder = GetMmpFolderPlay();
	open_page = GetMmpFilePage();
	file_play = GetMmpBgPlay();
	
	if(FS_CAP_FILE_AUDIO(gpstMmp_ctrl->eiFile_page_type))
	{		
		total_folder = gpstMmp_ctrl->estTotal_folders.audio;		
	}	
	else if(FS_CAP_FILE_PICTURE(gpstMmp_ctrl->eiFile_page_type))
	{
		total_folder = gpstMmp_ctrl->estTotal_folders.image;	
	}	
#if _APP_CAP_NAV_MMP_PLAY_VIDEO_FILE
	else if(FS_CAP_FILE_VIDEO(gpstMmp_ctrl->eiFile_page_type))
	{
		total_folder = gpstMmp_ctrl->estTotal_folders.video;	
	}
#endif

	total_file = gpstMmp_ctrl->estSel.ewTotal_files;

	MmpShowUpdateFolderSel(prev_open_folder, new_open_folder);
	SetMmpFolderSel(new_open_folder);
#if 0 
	if((act_sub == MMP_DIR_AUDIO_PLAY) || (act_sub == MMP_DIR_IMG_PREVIEW) 
		
#if _APP_CAP_NAV_MMP_PLAY_VIDEO_FILE
	|| (act_sub == MMP_DIR_NONE)
#endif
		)
#endif
	if (OSD_GetState()->etExp_state.etCtrl_focus !=EXPLORER_SUB_FOLDER)
	{
		SetMmpFolderCursor(MMP_NO_SELECTION);
	}

	MmpShowDrawFilePage(open_page);

	if((gpstMmp_ctrl->estSel.ewFile_idx != MMP_NO_SELECTION) 
		&& (open_page == (gpstMmp_ctrl->estSel.ewFile_idx/MMP_CTRL_PAGE_UNIT_SIZE))) 
	{
		if((file_play != MMP_NO_SELECTION) &&(open_folder ==play_folder) 
			&&(open_page == file_play/MMP_CTRL_PAGE_UNIT_SIZE)) 
		{
			MmpShowUpdateFileSel(file_play);			
		}	

		MmpShowUpdateFileCursor(gpstMmp_ctrl->estSel.ewFile_idx_tmp, gpstMmp_ctrl->estSel.ewFile_idx);	
		SetMmpFileCursor(gpstMmp_ctrl->estSel.ewFile_idx);			
	}	

}

/******************************************************************************
* Function name  : MmpShowListDir
* Arguments      :  
*     IN        VOID
*			
*     OUT       
*     I/O       
* Return         :  
*			VOID
* By             : Kim Do Yeon
* Description    :  
* Revision       :  
******************************************************************************
*/
VOID MmpShowListDir(VOID)
{
	BYTE2 cur_page, total;
#if _APP_CAP_FUNC_MMP_POWER_RESUME					
	BYTE2 folder_index,folder_page;
#endif/*_APP_CAP_FUNC_MMP_POWER_RESUME					*/
	OSD_State_st *osd_state;

	osd_state = OSD_GetState();
	MmpShowUpdateTypeSelect(MMP_NOT_KNOWN, MMP_NOT_KNOWN);	
	
	/* In case of no audio back ground play 
	 *
	 *	05.06.22 Condition added for jpg only disc [TJ]
	 */
#if _APP_CAP_FUNC_MMP_POWER_RESUME					
#if _SHOW_FILE_FOLDER_TOGETHER//gaoping 051104PM
	if(!IsBgPlay()&& (GetMmpFileType()==MMP_AUDIO_FILE))  
#else
	if(!IsBgPlay())  
#endif
	{
		total = GetMmpTotalFolders();	
		folder_index = GetMmpFolderOpen();
		folder_page = folder_index/MMP_CTRL_PAGE_UNIT_SIZE;
	 	MmpShowDrawFolderPage(folder_page);
		SetMmpFolderPage(folder_page);	// cydrain 20060425
		MmpShowUpdateFolderSel(MMP_NO_SELECTION, folder_index);
		SetMmpFolderSel(folder_index);
		//MmpShowUpdateFolderInfo(MMP_NO_SELECTION, total);//gaoping 20060920 problem image->audio, folder OSD have a flicker.
	}
#else/*_APP_CAP_FUNC_MMP_POWER_RESUME					*/
	if(gpstMmp_ctrl->epstBg_play == NULL || gpstMmp_ctrl->epstBg_play->epEntry_list == NULL)  
	{
		total = GetMmpTotalFolders();	
			
	 	MmpShowDrawFolderPage(0);
		SetMmpFolderPage(0);
		MmpShowUpdateFolderSel(MMP_NO_SELECTION, 0);
		SetMmpFolderSel(0);
		MmpShowUpdateFolderInfo(MMP_NO_SELECTION, total);
	}	
#endif/*_APP_CAP_FUNC_MMP_POWER_RESUME					*/
	/* In case of audio background play */
	else 
	{
		total = GetMmpTotalFolders();	//azureming@060406

		if(FS_CAP_FILE_AUDIO(gpstMmp_ctrl->eiFile_page_type))
		{
			if(gpstMmp_ctrl->estSel.ewFolder_idx == MMP_NO_SELECTION)
				cur_page = 0;
			else
				cur_page = gpstMmp_ctrl->estSel.ewFolder_idx/MMP_CTRL_PAGE_UNIT_SIZE;
			
		 	MmpShowDrawFolderPage(cur_page);
			SetMmpFolderPage(cur_page);
		}
		else if(FS_CAP_FILE_PICTURE(gpstMmp_ctrl->eiFile_page_type))
		{
			// Gaoping 20051107
			if(gpstMmp_ctrl->estSel.ewFolder_idx == MMP_NO_SELECTION)
				cur_page = 0;
			else
				cur_page = gpstMmp_ctrl->estSel.ewFolder_idx/MMP_CTRL_PAGE_UNIT_SIZE;
			
		 	MmpShowDrawFolderPage(cur_page);
			SetMmpFolderPage(cur_page);
		}
#if _APP_CAP_NAV_MMP_PLAY_VIDEO_FILE
		else if(FS_CAP_FILE_VIDEO(gpstMmp_ctrl->eiFile_page_type))
		{
		 	if(gpstMmp_ctrl->estSel.ewFolder_idx == MMP_NO_SELECTION)
				cur_page = 0;
			else
				cur_page = gpstMmp_ctrl->estSel.ewFolder_idx/MMP_CTRL_PAGE_UNIT_SIZE;
			
		 	MmpShowDrawFolderPage(cur_page);
			SetMmpFolderPage(cur_page);
		}
#endif /* _APP_CAP_NAV_MMP_PLAY_VIDEO_FILE */

	}	

	if(osd_state->etExp_state.etCtrl_focus == EXPLORER_SUB_FOLDER)
	{
		MmpShowUpdateFolderCursor(gpstMmp_ctrl->ewFolder_hi, gpstMmp_ctrl->estSel.ewFolder_idx);
		SetMmpFolderCursor(gpstMmp_ctrl->estSel.ewFolder_idx);	
	}

	MmpShowExploreInfo2UpdateFilePath(gpstMmp_ctrl->estSel.ewFolder_idx, gpstMmp_ctrl->estSel.ewFile_idx);
		
}

/******************************************************************************
 * Function name	: MmpShowFullStop 
 * Arguments		:  
 *     IN        
 *					MmpReqMode_et req_mode
 *     OUT       
 *     I/O       
 * Return			: VOID  
 *			
 * By			: Kim Do Yeon
 * Description		: Show the stop sate 
 * Revision		: 1.0  
 ******************************************************************************
 */
VOID MmpShowFullStop(MmpReqMode_et req_mode)
{	
	BYTE2 file_play, folder_play;

	file_play = GetMmpBgPlay();
	folder_play = GetMmpFolderPlay();

	if(file_play != MMP_NO_SELECTION)
	{
		MmpShowUpdateFileSel(MMP_NO_SELECTION);
		MmpShowUpdateFolderSel(folder_play, MMP_NO_SELECTION);
	}	
	
	/* Reset the repeat icon to the off state one */
	OSD_ChangeExplore(OSD_CTRL_UPDATE_REPEAT_ICON, NULL, SYS_NO_WAIT);		
	MmpShowNoticeString(MMP_NOTICE_STOP, NULL);

}

#else /* _APP_CAP_OSD_FLATTEN_EXPLORER */


/******************************************************************************
 * Function name  : MmpPgmCancealProcess (Recoder_Sol)
 * Arguments      :  
 *     IN        BYTE2 pgm_index
 *			
 *     OUT       
 *     I/O      
 * Return         :  
 *			 VOID
 * By             : Jung Ra Mi 
 * Description    :  
 * Revision       :  
 ******************************************************************************
 */
VOID  MmpShowPgmClear(BYTE2 pgm_index)
{
 
	BYTE1 max;
//	BYTE2 	tmp_index;	//<<rm.jung @ common.060209 : warning
	BYTE2	tmp_num, del_index, sel_pos, cur_pos;
//	BYTE4 	index;	//<<rm.jung @ common.060209 : warning

	sel_pos=gpstMmp_ctrl->ewPgm_sel_pos;
	cur_pos=GetMmpPgmFileCursor(); 
	
	max = gpstMmp_ctrl->ecPgm_pos-1;
	tmp_num = max -pgm_index;
	del_index= pgm_index;
	
	if (max >= pgm_index)
	{
		MmpPgmDeleteRef(pgm_index);
		if(sel_pos==del_index)	//@dh060122
		{
	//		memcpy(pre_upfolder_name [0] , temp_folder_name[del_index],MMP_PATH_FILE_LENGTH);	
			gFlag_playing_delete=TRUE;
		}		
		while(pgm_index<=30)
		{
			MmpSetPgmItem(pgm_index);
			pgm_index = pgm_index+1;
			if (pgm_index >=max)
			{
				gpstMmp_ctrl->ewPgm_list[pgm_index].file_index=0;
		//		FS_STRCPY(playlist_name[pgm_index], "FFFF");	//@dh060105
				break;
			}
		}
		gpstMmp_ctrl->ecPgm_pos--;
		
		/*
		*	About OSD : I hope to change this part  to the " MMP_SHOW" function.
		*/
//@<<<@dh051122 : DVD00004908
		if(del_index<sel_pos)
			gpstMmp_ctrl->ewPgm_sel_pos=sel_pos-1;			

		if(gpstMmp_ctrl->ecPgm_pos==0)
		{
		//	gFlag_pl_page_change=TRUE;
		//	OsdPgmDrawRightFilePage(0);
		//	OsdPgmUpdateLeftFileCurosr(GetMmpFileCursor(), GetMmpFileCursor());
			SetPgmArea(PGM_AREA_TITLE_LIST);
		//	OsdPgmUpdateHelpbar();	
			MmpUpdateFileInfo(GetMmpFileCursor());
			return;		
		}
		if(cur_pos==gpstMmp_ctrl->ecPgm_pos)
		{
		//	OsdPgmDrawRightFilePage((cur_pos-1)/MMP_PGM_CTRL_PAGE_UNIT_SIZE);
		//	OsdPgmUpdateRightFileCurosr(cur_pos-1, cur_pos-1);		
			SetMmpPgmFileCursor(cur_pos-1); 
			Playlist_Old_cursor=GetMmpPgmFileCursor(); //@dh060113
			MmpShowUpdateFileInfo(cur_pos+1, gpstMmp_ctrl->ecPgm_pos+1);			
		}
		else
		{
		//	OsdPgmDrawRightFilePage(cur_pos/MMP_PGM_CTRL_PAGE_UNIT_SIZE);
		//	OsdPgmUpdateRightFileCurosr(cur_pos, cur_pos);
			MmpShowUpdateFileInfo(cur_pos+2, gpstMmp_ctrl->ecPgm_pos+1);
		}
		
		if(GetMainState()==MAIN_PLAY) 
		{
#if 0
			if(sel_pos!=del_index)
			{
				if(gpstMmp_ctrl->ewPgm_sel_pos/MMP_PGM_CTRL_PAGE_UNIT_SIZE==gpstMmp_ctrl->ewPgm_cursor_pos/MMP_PGM_CTRL_PAGE_UNIT_SIZE)
					OsdPgmUpdateRightFileSel(gpstMmp_ctrl->ewPgm_sel_pos,gpstMmp_ctrl->ewPgm_sel_pos);		
			}
			else
			{
				gpstMmp_ctrl->ewPgm_sel_pos=GetMmpPgmFileCursor();
				OsdPgmUpdateRightFileSelClear(gpstMmp_ctrl->ewPgm_sel_pos);
			}
#endif 
		}
//@>>>@dh051122		
	}
	else
		return;
 }

/******************************************************************************
 * Function name  : MmpShowDrawFolderPage (Non_Flattern)
 * Arguments      :  
 *     IN        
 *			BYTE2 folder_page_num
 *     OUT       
 *     I/O       
 * Return         :  
 *			VOID
 * By             : Kim Do Yeon
 * Description    :  
 * Revision       :  
 ******************************************************************************
 */
VOID MmpShowDrawFolderPage(BYTE2 folder_page_num)
{	 
	OsdCtrl_st ctrl;
#if MMP_SET_PRINT_INFO	
	SysPrintf("\n[MMP] Send OSD Message for Folder Page Draw");
#endif	
	ctrl.p.value = folder_page_num;
	OSD_ChangeExplore(OSD_CTRL_DRAW_FOLDER_PAGE, &ctrl, SYS_WAIT);
}	

/******************************************************************************
 * Function name  : MmpShowDrawFilePage (Non_Flattern)
 * Arguments      :  
 *     IN        
 *			BYTE2 file_page_num
 *     OUT       
 *     I/O       
 * Return         :  
 *			VOID
 * By             : Kim Do Yeon
 * Description    :  
 * Revision       :  
 ******************************************************************************
 */
VOID MmpShowDrawFilePage(BYTE2 file_page_num)
{	
	OsdCtrl_st ctrl;
#if MMP_SET_PRINT_INFO		
	SysPrintf("\n[MMP] Send OSD Message for File Page Draw");
#endif	
	ctrl.p.value = file_page_num;
	OSD_ChangeExplore( OSD_CTRL_DRAW_FILE_PAGE, &ctrl, SYS_WAIT );
}		

/******************************************************************************
 * Function name  	: MmpShowNoticeStringRepeatKeep (Non_Flattern)
 * Arguments      	:  
 *     IN        
 *				
 *     OUT       
 *     I/O       
 * Return         	:  
 *					VOID
 * By             		: QQ
 * Description    	:  
 * Revision       	:  050822
 *****************************************************************

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -