📄 key_handler_mmp.c
字号:
}
break;
case EXPLORER_SUB_FOLDER:
if(folder_cursor == folder_limit)
MmpShowNotAvail();
else
MmpUpdateFolderCursor(folder_cursor+move);
break;
case EXPLORER_SUB_TYPE_SELECT:
#if _APP_CAP_NAV_MMP_PLAY_VIDEO_FILE
MmpChangeFileTypeSel( move );
#else /*_APP_CAP_NAV_MMP_PLAY_VIDEO_FILE */
MmpChangeFileTypeSel();
#endif /*_APP_CAP_NAV_MMP_PLAY_VIDEO_FILE */
break;
default:
break;
}/* switch */
}
/******************************************************************************
* Function name : MmpGuiExploreEnter
* Arguments :
* IN
* BYTE2 input_value
* OUT
* I/O
* Return : STATIC VOID
*
* By : Kim Do Yeon
* Description :
* Revision :
******************************************************************************
*/
STATIC VOID MmpGuiExploreEnter(BYTE2 input_value)
{
SetMainState_t main_state;
BYTE2 cursor, open_folder, play_folder, selection;
MmpFileType_et file_type;
MmpDirAct_et sub_action;
OSD_State_st *osd_state;
osd_state = OSD_GetState();
file_type = GetMmpFileType();
open_folder = GetMmpFolderOpen();
if(MmpExpAvailNum(input_value) == FALSE)
{
MmpShowNotAvail();
return;
}
#if MMP_SUPPORT_JPG_RESUME_STOP
if (gpstMmp_ctrl->etStop_mode==MMP_RESUME_STOP && (file_type == MMP_IMAGE_FILE))
{
if (osd_state->etExp_state.etCtrl_focus != EXPLORER_SUB_TYPE_SELECT)
{
SetMmpFileCursor(gpstMmp_ctrl->epstBg_play->estSel.ewFile_idx);
MmpResumeStopRecover();
}
}
#endif
switch (osd_state->etExp_state.etCtrl_focus)
{
case EXPLORER_SUB_FILE:
if(input_value != 0)
{
cursor = input_value -1;
MmpClearNumericInput();
}
else
{
cursor = GetMmpFileCursor();
}
selection = GetMmpBgPlay();
play_folder = GetMmpFolderPlay();
main_state = GetMainState();
/* Check for resume play or normal play */
#if MMP_SET_DISPLAY_ALL_TYPE
if (file_type == MMP_ALL_FILE)
#else /* MMP_SET_DISPLAY_ALL_TYPE */
if ((file_type== MMP_AUDIO_FILE)
)
#endif /* MMP_SET_DISPLAY_ALL_TYPE */
{
if(cursor == selection)
{
#if 1 //can adjust according to spec. azureming@060626
if(gpstMmp_ctrl->etStop_mode==MMP_RESUME_STOP) //when resume stop, "enter" the same as "play" azureming@060406
UiCmdGeneral(UOP_MMP_RESUME_PLAY);
else
#endif
MmpShowNotAvail();
return;
}
else
{
MmpResetAudioSet();
MmpExpSetPlay(open_folder, cursor, MMP_DIR_AUDIO_PLAY);
MmpShowNoticeString(MMP_NOTICE_PLAY, NULL);
}
}
#if _APP_CAP_NAV_MMP_PLAY_VIDEO_FILE
else if(file_type == MMP_VIDEO_FILE)
{
#if 1 //can adjust according to spec. azureming@060626
if(cursor == selection && open_folder == play_folder)
{
if(gpstMmp_ctrl->etStop_mode==MMP_RESUME_STOP )
{
if(GetFlagNotSupportAVIVideo() == FALSE)
MmpClearOsd();
UiCmdGeneral(UOP_MMP_RESUME_PLAY);
return;
}
/*pro. when playing not supported video codec. during play,
pressing enter the time osd is not proper azureming@060801*/
else if(gpstMmp_ctrl->etStop_mode == MMP_NON_STOP
&& GetFlagNotSupportAVIVideo() == TRUE)
{
MmpShowNotAvail();
return;
}
}
#endif
#if _APP_CAP_OSD_SUBTITLE_CONCURRENT_DISPLAY // cydrain 20060714
MmpClearDivxSubtitle(); // cydrain 20060531
#endif
SH_MixSetVideoEn(FALSE); //according to new spec. gaoping 20060530
//gaoping 20060112
OSD_GraphicClear();
MmpResetAudioSet();
//SH_MixSetVideoEn(FALSE); //according to new spec. azureming@060525
MmpExpSetPlay(open_folder, cursor, MMP_DIR_VIDEO_PLAY);
#if 0 //seems redundent it will be called in MmpExpSetPlay //azureming@060721
#if _APP_CAP_OSD_DIVX_LOADING_ICON //(weilf)20060124
OSD_SetIconDisplay(ICON_DIVX_LOADING, NULL, SYS_NO_WAIT);
MmpShowFileInfo(); //azureming@060530
#else
OSD_SetIconDisplay(ICON_PLAY, NULL, SYS_NO_WAIT); //(weilf)20060110
#endif
#endif
}
#endif
else if (file_type == MMP_IMAGE_FILE)
{
SetMmpFileCursor(cursor);
//UiMmpIntoImgDisplay(GetMmpFolderOpen(),cursor); //xh 20060424
MmpIntoImgDisplay(GetMmpFolderOpen(),cursor);
}
break;
case EXPLORER_SUB_FOLDER:
selection = GetMmpFolderCursor();
/* input_value 0 -> selection */
play_folder = input_value ? (input_value-1):selection;
/* Clear numeric input string */
if(input_value != 0)
MmpShowClearNoticeStr();
sub_action = MmpGetSubAct();
if(file_type == MMP_AUDIO_FILE
#if _APP_CAP_NAV_MMP_PLAY_VIDEO_FILE
|| file_type == MMP_VIDEO_FILE //maybe rectfied to set global variable gpstMmp_ctrl->etCurrentFileType
#endif
) // cydrain 20051115
{
MmpResetAudioSet();
}
MmpExpSetPlay(play_folder, 0, sub_action);
#if _APP_CAP_NAV_MMP_PLAY_VIDEO_FILE // gaoping 060126
if(GetMmpFileType()!=MMP_VIDEO_FILE)
#endif
{
SetMainState(MAIN_PLAY);
// fix bug, when playing audio, move the cursor to folder area, press resume stop,
// wait for screen saver, press a number key. It will open the new folder and play
// the first file, but the main state is still "Resume Stop".
SetMmpStopMode(MMP_NON_STOP); // cydrain 20051209
MmpShowNoticeString(MMP_NOTICE_PLAY, NULL);
}
break;
case EXPLORER_SUB_TYPE_SELECT:
/*
* If previous selection is same with new, igore this key */
if( GetMmpFileType() != gpstMmp_ui->mmp_osd_info.file_type_old )
{
UiMmpChangeMedia(gpstMmp_ui->mmp_osd_info.file_type_old);
}
#if _APP_CAP_FUNC_MMP_INTRO_PLAY
else
return;
#endif
break;
default:
break;
}/* switch */
#if _APP_CAP_FUNC_MMP_INTRO_PLAY
MmpIntroFlagSet(FALSE);
#endif
}
#ifndef _MTK_STYLE
/******************************************************************************
* Function name : MmpGuiImageInfoEnter
* Arguments :
* IN
* VOID
* OUT
* I/O
* Return : STATIC VOID
*
* By : Liu renliang
* Description :
* Revision :
******************************************************************************
*/
STATIC VOID MmpGuiImageInfoEnter(VOID)
{
MmpImgInfoSub_et img_info;
SH_RotateAngle_et rotate;
BYTE2 cursor;
UINT slide_time;
img_info = GetMmpImageInfoState();
rotate = GetMmpImageRotate();
cursor = GetMmpFileCursor();
switch ( img_info )
{
case MMP_IMG_INFO_ALBUM:
/* Reset Zoom */
SetZoomDefault();
MmpImageTimerSet(1, TIMER_DISABLE);
#if _APP_CAP_FUNC_JPG_PLAY_MODE
MmpResetImgPlayMode();
#endif
/* Draw Album OSD */
UiMmpDrawAlbum(cursor, MMP_ALBUM_FIRST_DRAW);
break;
case MMP_IMG_INFO_ROTATE:
if (rotate < PIC_ROTATE_ANGLE_270)
rotate += 1;
else
rotate = PIC_ROTATE_ANGLE_0;
#if 0//xh 20060428
SetMmpImageRotate(rotate);
OSD_ChangeExplore(OSD_CTRL_IMG_INFO_SEL, NULL, SYS_NO_WAIT);
#endif
UiMmpDrawImageFull(cursor, rotate);
#if _APP_CAP_FUNC_SLIDE_SHOW_ZOOM_ROTATE
gpstMmp_ctrl->epstImg_play->ecPlay_mode = PARAM_PB_NORMAL;
#endif /* _APP_CAP_FUNC_SLIDE_SHOW_ZOOM_ROTATE */
break;
case MMP_IMG_INFO_ZOOM:
MmpImageZoomProcess();//gaoping 20060430
break;
case MMP_IMG_INFO_SLIDE1:
slide_time = MMP_SLIDE_SHOW_TIME_1;
break;
case MMP_IMG_INFO_SLIDE2:
slide_time = MMP_SLIDE_SHOW_TIME_2;
break;
case MMP_IMG_INFO_SLIDE3:
slide_time = MMP_SLIDE_SHOW_TIME_3;
break;
}
#if !_APP_CAP_JPG_ASV //xh 20060424
/* Slide Show */
if((MMP_IMG_INFO_SLIDE1 <= img_info) && (img_info<=MMP_IMG_INFO_SLIDE3))
{
UiMmpSlideShow(cursor, slide_time);
MmpShowCursorMsgOn(ICON_PLAY);
}
#else //SSCR xuhui 061020
if((gASV_SetupMode == ASV_OFF) && (MMP_IMG_INFO_SLIDE1 <= img_info) && (img_info<=MMP_IMG_INFO_SLIDE3))
{
UiMmpSlideShow(cursor, slide_time);
MmpShowCursorMsgOn(ICON_PLAY);
}
#endif
}
#endif
/******************************************************************************
* Function name : MmpHandleExplorePlay
* Arguments :
* IN
* BYTE2 input_value
* OUT
* I/O
* Return : BOOL
*
* By : Kim Do Yeon
* Description : Play key action on Explore OSD
* Revision :
******************************************************************************
*/
BOOL MmpHandleExplorePlay(BYTE2 input_value)
{
SetMainState_t main_state;
//gaoping 20060112 redundancy
BYTE2 /*selection,*/ /*play_folder,*/ open_folder;
MmpStopMode_et stop_mode;
MmpFileType_et page_type;
MmpDirAct_et sub_act;
OSD_State_st *osd_state;
osd_state = OSD_GetState();
main_state = GetMainState();
page_type = GetMmpFileType();
stop_mode = GetMmpStopMode();
open_folder = GetMmpFolderOpen();
/* Resume play in resume stop or pause */
//gaoping 20060117 problem 197 when press pause ,then press play no use
if((input_value == 0) && (((stop_mode == MMP_RESUME_STOP) && (main_state == MAIN_STOP)) || (main_state == MAIN_PAUSE))
#if MMP_SUPPORT_JPG_RESUME_STOP
//gaoping 20060112 problem when video resume stop press play no use
&& (page_type != MMP_IMAGE_FILE)
#endif
)
{
if((page_type == MMP_VIDEO_FILE) && GetFlagNotSupportAVIVideo() == FALSE) //temp azureming@060602
{
OSD_SetIconDisplay(ICON_CLEAR, NULL, SYS_NO_WAIT ); // Qian liping 060628: bug fix 501
MmpClearOsd();//gaoping 20060112
}
UiCmdGeneral(UOP_MMP_RESUME_PLAY);
}
else /* play the current cursor */
{
if(MmpExpAvailNum(input_value) == FALSE)
return FALSE;
#if MMP_SUPPORT_JPG_RESUME_STOP
if (gpstMmp_ctrl->etStop_mode==MMP_RESUME_STOP && (page_type == MMP_IMAGE_FILE) )
{
BYTE2 file_play;
file_play=gpstMmp_ctrl->epstBg_play->estSel.ewFile_idx;
MmpResumeStopRecover();
if(input_value == 0)
{
SetMmpFileCursor(file_play);
MmpIntoImgDisplay(GetMmpFolderOpen(),file_play);//xh 20060424
}
if(input_value == 0)
return TRUE;
}
#endif
/* Decide the playing item between numeric input and cursor */
if(input_value == 0)
{
/* there is no numeric input */
if(osd_state->etExp_state.etCtrl_focus == EXPLORER_SUB_FOLDER)
input_value = GetMmpFolderCursor();
else
{
BYTE2 play_file = GetMmpBgPlay();
input_value = GetMmpFileCursor();
if(IsBgPlay() && (play_file == input_value))
{
/* Continue the current playing in repeat ab case*/
if(GetMmpRepeatMode(TRUE) == REPEAT_SUB_B) // cydrain 20060410
{
//gaoping 20060207 can use this function replace
UiRepeat( REPEAT_SUB_NONE );
return TRUE;
}
else if( (main_state == MAIN_FF)|| (main_state == MAIN_FR))
{
UiScanForward( UOP_MMP_FORWARD_SCAN, PM_SPEED_X1);
return TRUE;
}
//gaoping 20060112 problem 153
else
{
MmpShowNotAvail();
return TRUE;
}
}
}
}
else
{
input_value--; /* index 0 is the 1st */
}
if(input_value == MMP_NO_SELECTION)
input_value = 0;
#if _APP_CAP_FUNC_MMP_INTRO_PLAY
if (osd_state->etExp_state.etCtrl_focus != EXPLORER_SUB_TYPE_SELECT)
MmpIntroFlagSet(FALSE);
#endif
switch(osd_state->etExp_state.etCtrl_focus)
{
case EXPLORER_SUB_FILE:
#if MMP_SET_DISPLAY_ALL_TYPE
if (page_type == MMP_ALL_FILE)
#else /* MMP_SET_DISPLAY_ALL_TYPE */
if (page_type == MMP_AUDIO_FILE)
#endif /* MMP_SET_DISPLAY_ALL_TYPE */
{
//gaoping 20060112 redundancy code
#if 0
/* Clear repeat state */
if(GetMmpRepeatMode() != REPEAT_SUB_NONE)
{
gpstMmp_ctrl->epstBg_play->ecRepeat_state = REPEAT_SUB_NONE;
MmpShowExploreInfo1SetRepeatIcon();
}
selection = GetMmpBgPlay();
/* update the cursor */
if ((main_state == MAIN_PLAY)&&(play_folder != open_folder)&&(input_value != selection))
MmpShowUpdateFileSel(input_value);
#endif
//gaoping20060207 redundancy code
//MmpUpdateFilePage(input_value);
MmpResetAudioSet();
MmpExpSetPlay(open_folder, input_value, MMP_DIR_AUDIO_PLAY);
//Qian liping 060714: only in audio file need to send the MmpShowNoticeString()
//gaoping 051114AM in file area press play show play icon
MmpShowNoticeString(MMP_NOTICE_PLAY, NULL);
}
else if(page_type == MMP_IMAGE_FILE)
{
//gaoping 20060103
MmpImgExplorerDisplay(input_value);
}
//gaoping 20060103
#if _APP_CAP_NAV_MMP_PLAY_VIDEO_FILE
else if(page_type == MMP_VIDEO_FILE)
{
SH_MixSetVideoEn(FALSE); //according to new spec.gaoping20060530
OSD_GraphicClear();//Qian liping 060623
//gaoping 20060207 redundancy code
//MmpUpdateFilePage(input_value);
MmpResetAudioSet();
MmpExpSetPlay(open_folder, input_value, MMP_DIR_VIDEO_PLAY);
#if 0 // Qian liping 060714: bug fix 560, redundancy code, the message will been sent in MmpExpSetPlay();
#if _APP_CAP_OSD_DIVX_LOADING_ICON //(weilf)20060222
OSD_SetIconDisplay(ICON_DIVX_LOADING, NULL, SYS_NO_WAIT);
MmpShowFileInfo(); //azureming@060530
#else
OSD_SetIconDisplay(ICON_PLAY, NULL, SYS_NO_WAIT);
#endif
#endif
}
#endif
//gaoping 051114AM in file area press play show play icon
//MmpShowNoticeString(MMP_NOTICE_PLAY, NULL); // Qian liping 060714: move into audio part.
break;
case EXPLORER_SUB_FOLDER:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -