📄 key_handler_mmp.c
字号:
#if _APP_CAP_OSD_SHOW_PLAY_PAGE
if (page_type == MMP_AUDIO_FILE)
sub_act = MMP_DIR_AUDIO_PLAY;
#if _APP_CAP_NAV_MMP_PLAY_VIDEO_FILE // cydrain 20060412
else if(page_type == MMP_VIDEO_FILE)
{
sub_act = MMP_DIR_VIDEO_PLAY;
SH_MixSetVideoEn(FALSE); //according to new spec. gaoping 20060530
OSD_GraphicClear();
#if 0 //seems redundent it will be called in MmpExpSetPlay //azureming@060721
#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
else if(page_type == MMP_IMAGE_FILE)
{
sub_act = MMP_DIR_IMG_FULL;
//gaoping 20060111 when cursor in folder ,press play can not slide show
//SetMmpImageMode(PARAM_PB_SLIDE_SHOW);
//SetMmpSlideShowTime(MMP_SLIDE_SHOW_TIME_1);//xh 20060424
// [bug 2778] when full stop, then press PLAY, OSD is not reset.
SetMmpImageInfoState( MMP_IMG_INFO_START+1 ); // cydrain 20060320
}
#else /* _APP_CAP_OSD_SHOW_PLAY_PAGE */
sub_act = MMP_DIR_NONE;
#endif /* _APP_CAP_OSD_SHOW_PLAY_PAGE */
MmpResetAudioSet();
if (GetMmpFileType()!=MMP_IMAGE_FILE)
MmpExpSetPlay(input_value, 0, sub_act);
else
UiMmpIntoImgDisplay(input_value,0); //xh 20060424
MmpShowNoticeString(MMP_NOTICE_PLAY, NULL);
break;
default:
MmpShowNotAvail();
break;
}/* switch */
} /* if, stop_mode */
return TRUE;
}
#if _APP_CAP_FUNC_MMP_PAGE_UPDOWN
/******************************************************************************
* Function name : MmpGuiExploreChangePage
* Arguments :
* IN
* VOID
* OUT
* I/O
* Return : VOID
*
* By : Kim Do Yeon
* Description :
* Revision : cydrain 20060308
******************************************************************************
*/
STATIC VOID MmpGuiExploreChangePage(UCHAR data)
{
OSD_State_st* osd_state = OSD_GetState();
BOOL flag_up = FALSE, flag_down = FALSE;
BYTE2 page_num, total;
SCHAR move;
if (data == RC_KEY_PREV)
move = -1;
else if (data == RC_KEY_NEXT)
move = 1;
switch(osd_state->etExp_state.etCtrl_focus)
{
case EXPLORER_SUB_FOLDER:
page_num = GetMmpFolderPage();
total = GetMmpTotalFolders();
break;
case EXPLORER_SUB_FILE:
page_num = GetMmpFilePage();
total = GetMmpTotalFiles();
break;
default:
MmpShowNotAvail();
return;
break;
}
if(page_num > 0)
flag_up = TRUE;
if(((page_num+1)*MMP_CTRL_PAGE_UNIT_SIZE) < total)
flag_down = TRUE;
if((data == RC_KEY_PREV && flag_up) || (data == RC_KEY_NEXT && flag_down))
{
if(osd_state->etExp_state.etCtrl_focus == EXPLORER_SUB_FOLDER)
{
MmpUpdateFolderCursor((page_num+move)*MMP_CTRL_PAGE_UNIT_SIZE);
}
else if(osd_state->etExp_state.etCtrl_focus == EXPLORER_SUB_FILE)
{
MmpExpSetPlay(GetMmpFolderOpen(), (page_num+move)*MMP_CTRL_PAGE_UNIT_SIZE, MMP_DIR_NONE);
if(GetMmpFileType() == MMP_IMAGE_FILE)
UiMmpDelayedPlay((page_num+move)*MMP_CTRL_PAGE_UNIT_SIZE);
#if MMP_SUPPORT_JPG_RESUME_STOP
if (gpstMmp_ctrl->etStop_mode==MMP_RESUME_STOP && GetMmpFileType() == MMP_IMAGE_FILE) // cydrain 20060121
{
MmpResumeStopRecover();
}
#endif
}
}
else
{
MmpShowNotAvail();
}
}
#endif /* _APP_CAP_FUNC_MMP_PAGE_UPDOWN */
/******************************************************************************
* Function name : MmpGuiNext
* Arguments :
* IN
* VOID
* OUT
* I/O
* Return : STATIC BOOL
*
* By : Kim Do Yeon
* Description :
* Revision : cydrain 060301
******************************************************************************
*/
#if 1 // cydrain 20051118, make the structure symmetrical with PREV.
STATIC VOID MmpGuiNext(VOID)
{
MmpDspSync_et disp_sync = GetMmpDispSync();
//if(!MmpAudioFinalPlay()&& IsBgPlay()) // cydrain 20060112, if NEXT is enable, show NEXT icon.
// MmpShowNoticeString(MMP_NOTICE_SKIP_F, NULL);
if(disp_sync == MMP_DSP_IMG_PLAY)
{
if(!MmpJPGFinalPlay())
{
OSD_SetIconDisplay(ICON_NEXT, NULL, SYS_NO_WAIT);
#if !(MMP_KEEP_ROTATE_STATE)
//if(GetMmpImageRotate() != PIC_ROTATE_ANGLE_0) // cydrain 20060327, fix bug 2764.
{
SetMmpImageInfoState( (MmpImgInfoSub_et)MMP_IMG_INFO_START+1);
SetMmpImageRotate(PIC_ROTATE_ANGLE_0);
OSD_ChangeExplore(OSD_CTRL_IMG_INFO_SEL, NULL, SYS_NO_WAIT);
}
#endif /* !(MMP_KEEP_ROTATE_STATE) */
MmpImageTimerSet(1, TIMER_DISABLE);
MmpSetImageSlideShowMode();
}
else
{
// if present image is the last image, goto fullstop mode.
#if _APP_CAP_FUNC_FSTOP_WHEN_NEXT_THE_LAST // cydrain 20060313
//MmpImageReturn();
UiMmpImageReturn(FALSE);
UiMmpFullStop(MMP_REQ_IMG);
#else
OSD_SetIconDisplay(ICON_WARNING, NULL, SYS_NO_WAIT);//gaoping 20060429 problem 232
#endif
return;
}
UiCmdGeneral(UOP_MMP_NEXT_IMAGE);
}
else if (IsBgPlay())
{
///gaoping 20051230
#if _APP_CAP_NAV_MMP_PLAY_VIDEO_FILE
if ((GetMmpFileType()==MMP_VIDEO_FILE)&&(!MmpAudioFinalPlay()))
{
if( GetDisplayMainState() == DISPLAY_EXPLORER ) // Qian liping 060603
MmpClearOsd(); //temp azureming@060602
#if _APP_CAP_OSD_SUBTITLE_CONCURRENT_DISPLAY
MmpClearDivxSubtitle(); // cydrain 20060731
#endif
UiCmdGeneral(UOP_MMP_NEXT_VIDEO);
}
else
#endif
if ((GetMmpFileType()==MMP_AUDIO_FILE) && (!MmpAudioFinalPlay())) // cydrain 20060112, move from above.
{
UiCmdGeneral(UOP_MMP_NEXT_AUDIO);
MmpShowNoticeString(MMP_NOTICE_SKIP_F, NULL);
}
else
{
MmpShowNotAvail();
}
}
else
{
MmpShowNotAvail();
}
}
#else
STATIC BOOL MmpGuiNext(VOID)
{
MmpDspSync_et disp_sync = GetMmpDispSync();
if(disp_sync == MMP_DSP_IMG_PLAY)
{
UiCmdGeneral(UOP_MMP_NEXT_IMAGE);
}
else if (IsBgPlay())
{
UiCmdGeneral(UOP_MMP_NEXT_AUDIO);
}
else
{
MmpShowNotAvail();
return FALSE;
}
return TRUE;
}
#endif
/******************************************************************************
* Function name : MmpGuiPrev
* Arguments :
* IN
* VOID
* OUT
* I/O
* Return : STATIC BOOL
*
* By : Kim Do Yeon
* Description :
* Revision :
******************************************************************************
*/
STATIC VOID MmpGuiPrev(VOID)
{
MmpDspSync_et disp_sync = GetMmpDispSync();
//gaoping 051124PM move to MmpUopPrevAudio
#if 0
if(!MmpAudioFirstPlay()&& IsBgPlay())
MmpShowNoticeString(MMP_NOTICE_SKIP_R, NULL);
#endif
if(disp_sync == MMP_DSP_IMG_PLAY)
{
if (!MmpJPGFirstPlay())
{
OSD_SetIconDisplay(ICON_PREV, NULL, SYS_NO_WAIT);
#if !(MMP_KEEP_ROTATE_STATE)
SetMmpImageInfoState( (MmpImgInfoSub_et)MMP_IMG_INFO_START+1 );
SetMmpImageRotate(PIC_ROTATE_ANGLE_0);
// cydrain 20060327, fix bug 2764
OSD_ChangeExplore(OSD_CTRL_IMG_INFO_SEL, NULL, SYS_NO_WAIT);
#endif /* !(MMP_KEEP_ROTATE_STATE) */
MmpImageTimerSet(1, TIMER_DISABLE);
MmpSetImageSlideShowMode();
}
else
{
MmpShowNotAvail();
return;
}
UiCmdGeneral(UOP_MMP_PREV_IMAGE);
}
else if(IsBgPlay())
{
///gaoping 20051230
#if _APP_CAP_NAV_MMP_PLAY_VIDEO_FILE
//gaoping 20060214
if ((GetMmpFileType()==MMP_VIDEO_FILE))
{
if( GetDisplayMainState() == DISPLAY_EXPLORER ) // Qian liping 060603
MmpClearOsd(); //temp azureming@060602
#if _APP_CAP_OSD_SUBTITLE_CONCURRENT_DISPLAY
MmpClearDivxSubtitle(); // cydrain 20060731
#endif
UiCmdGeneral(UOP_MMP_PREV_VIDEO);
}
else
#endif
if (GetMmpFileType()==MMP_AUDIO_FILE)
UiCmdGeneral(UOP_MMP_PREV_AUDIO);
else
MmpShowNotAvail();
}
else
{
MmpShowNotAvail();
}
}
#if _APP_CAP_NAV_MMP_PLAY_VIDEO_FILE //(weilf)20060111
/*<<< to support slow forward trick play azureming@060113*/
/******************************************************************************
* Function name : MmpGuiSlow (Non_Flattern)
* Arguments :
* IN UCHAR data, UCHAR param
*
* OUT
* I/O
* Return : STATIC VOID
*
* By : Kang Sung Hwa
* Description : Divx slow control
* Revision : 1st created, December 5, 2005
******************************************************************************/
STATIC VOID MmpGuiSlow( UCHAR data, UCHAR param )
{
ScanCtrl_t scan;
UCHAR speed;
UCHAR direction;
//gaoping 20060207 no use in non flatten
#if 0//(_USE_5010) //<<< @: 5010 joe.kang : Disable file type filtering to avoid key blocking temporarily */
if(GetMmpFileType()!= MMP_VIDEO_FILE)
{
return;
}
#endif
/*
repeat_ab = GetMmpRepeatMode();
if (repeat_ab == PARAM_PB_REPEAT_A ||repeat_ab ==PARAM_PB_REPEAT_B)
{
MmpClearRepeatAB();
}
*/
MmpClearRepeatAB(); //azureming@060110
GetScanControlState( &scan );
speed = scan.speed;
direction = scan.direction;
/* Change direction */
//if(data==RC_KEY_FF) if exist slow forward key azureming@060110
if(data==RC_KEY_SLOW_FWD) //<<< KSH@5010 050907
{
//gaoping 20060121
//if( direction == PM_DIR_BACKWARD )
//if (speed <= PM_SPEED_X1)
{
//speed = PM_SPEED_X1;
direction = PM_DIR_FORWARD;
}
#if 0
else
{
MmpShowNotAvail();
return;
}
#endif
}
else
{
/* Do not support reverse slow */
MmpShowNotAvail();
return;
}
/*
* This command comes from Slow Forward Button action
*/
switch( speed )
{
//gaoping 20060207
case PM_SPEED_X1_4:
case PM_SPEED_X1_8:
case PM_SPEED_X1_16:
case PM_SPEED_X1_32:
speed =speed + 1;
break;
case PM_SPEED_X1_2:
#if _APP_CAP_FUNC_CIRCULAR_SPEED_CONTROL
direction = PM_DIR_FORWARD;
//gaoping 20060208
speed = PM_SPEED_X1;
break;
#else
/* This is maximum speed, so don't use this key */
#if MMP_SET_PRINT_ERROR
SysPrintf("\n[MMP] Cannot slow down");
#endif
return;
#endif
default:
speed = PM_SPEED_X1_32;
break;
}
//SetDisplayFlagState( FALSE ); // cydrain 20060300
InitTempValueState();
if ( direction == PM_DIR_FORWARD )
UiScanForward(UOP_MMP_FORWARD_SLOW, speed);
//UiScanForward( UOP_MMP_FORWARD_SLOW, speed );
// <<< @: 5010.joe.kang 051205: Do not use reverse slow
/*
else
UiScanBackward(UOP_MMP_BACKWARD_SCAN, speed);
*/
}
/*>>>azureming@060113*/
/******************************************************************************
* Function name : MmpGuiDivxZoom (Non_Flattern)
* Arguments :
* IN
* VOID
* OUT
* I/O
* Return :
*
* By : Weilifeng
* Description :
* Revision :
******************************************************************************
*/
VOID MmpGuiVideoZoom(void)
{
GuiZoom();
}
/******************************************************************************
* Function name : MmpGuiDivxStep (Non_Flattern)
* Arguments :
* IN
* VOID
* OUT
* I/O
* Return :
*
* By : cydrain
* Description : 20060215
* Revision :
******************************************************************************
*/
VOID MmpGuiVideoStep(void)
{
SetMainState_t main;
main = GetMainState();
if( GetMmpRepeatMode(TRUE) == REPEAT_SUB_A ) // cydrain 20060410
{
MmpShowNotAvail();
return;
}
//gaoping 20060216
//if( main == MAIN_PAUSE | main == MAIN_STEP | main == MAIN_PLAY)
{
UiCmdGeneral(UOP_MMP_STEP);
//MmpShowDivxCursorIcon(ICON_STEP);
}
#if 0
else
{
MmpShowNotAvail();
}
#endif
return;
}
/******************************************************************************
* Function name : MmpGuiDivxSlow (Non_Flattern)
* Arguments :
* IN
* VOID
* OUT
* I/O
* Return :
*
* By : Weilifeng
* Description :
* Revision :
******************************************************************************
*/
VOID MmpGuiVideoSlow(UCHAR data,UCHAR param)
{
MmpGuiSlow(data, param); //test azureming@060113
}
/******************************************************************************
* Function name : MmpGuiDivx3D (Non_Flattern)
* Arguments :
* IN
* VOID
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -