INT32 UIFlowWndPlay_OnKeyEnter(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray) { static BOOL bFirstEnter = TRUE; switch(g_PlbData.State) { case PLB_ST_FULL: if(UIPlay_GetData(PLAY_CURRMODE)==PLAYMODE_AVI) { if(bFirstEnter) { g_uiUIFlowWndPlayCurrentVolume = GetAudioVolume(); bFirstEnter = FALSE; } KeyScan_EnableAutoPoweroff(FALSE); KeyScan_EnableUSBDet(FALSE); KeyScan_EnableKeyTone(FALSE); Ux_SendEvent(&UIPlayObjCtrl,NVTEVT_AUD_VOLUME,1,g_uiUIFlowWndPlayCurrentVolume); Ux_SendEvent(&UIPlayObjCtrl,NVTEVT_MOVPLAY,1,UIFlowMoviePlayCBFunc); g_PlbData.State = PLB_ST_PLAY_MOV; FlowPB_IconDrawMovPlay(TRUE); if (KeyScan_IsHDMIPlugIn()==FALSE) { FlowPB_IconDrawMovPlayVolumn(g_uiUIFlowWndPlayCurrentVolume); } FlowPB_IconDrawMovSpeed(0); } break; case PLB_ST_PLAY_MOV: case PLB_ST_FWD_MOV: case PLB_ST_BWD_MOV: if(UIPlay_GetData(PLAY_CURRMODE)==PLAYMODE_AVI) { Ux_SendEvent(&UIPlayObjCtrl,NVTEVT_MOVPAUSE,0); g_PlbData.State = PLB_ST_PAUSE_MOV; KeyScan_EnableAutoPoweroff(TRUE); KeyScan_EnableUSBDet(TRUE); KeyScan_EnableKeyTone(SysGetFlag(FL_BEEP)); FlowPB_IconDrawMovPlay(TRUE); FlowPB_IconDrawMovSpeed(0); } break; case PLB_ST_PAUSE_MOV: if(UIPlay_GetData(PLAY_CURRMODE)==PLAYMODE_AVI) { KeyScan_EnableAutoPoweroff(FALSE); KeyScan_EnableUSBDet(FALSE); KeyScan_EnableKeyTone(FALSE); Ux_SendEvent(&UIPlayObjCtrl,NVTEVT_MOVRESUME,0); g_PlbData.State = PLB_ST_PLAY_MOV; FlowPB_IconDrawMovPlay(TRUE); FlowPB_IconDrawMovSpeed(0); } break; } return NVTEVT_CONSUME; }
void FlowPB_UpdateIcons(BOOL bShow) { if (bShow == FALSE) { FlowPB_IconDrawDSCMode(FALSE); FlowPB_IconDrawFlash(FALSE); FlowPB_IconDrawEVIcon(FALSE); FlowPB_IconDrawDCFFileID(FALSE); FlowPB_IconDrawImageSize(FALSE); FlowPB_IconDrawWB(FALSE); FlowPB_IconDrawImageQuality(FALSE); FlowPB_IconDrawSharpness(FALSE); FlowPB_IconDrawStorage(FALSE); FlowPB_IconDrawBattery(FALSE); FlowPB_IconDrawHistogram(FALSE); FlowPB_IconDrawFileLock(FALSE); FlowPB_IconDrawDate(FALSE); FlowPB_IconDrawPrint(FALSE); FlowPB_IconHideMovPlayVolumn(); FlowPB_IconDrawTime(FALSE); FlowPB_IconDrawMovPlay(FALSE); FlowPB_IconDrawMovStop(FALSE); FlowPB_IconDrawMovPlayTime(FALSE); FlowPB_IconHideMovSpeed(&UIFlowWndPlay_StaticTXT_SpeedCtrl); } else { FlowPB_IconDrawDSCMode(TRUE); FlowPB_IconDrawFlash(FALSE); FlowPB_IconDrawEVIcon(FALSE); FlowPB_IconDrawDCFFileID(TRUE); FlowPB_IconDrawImageSize(TRUE); FlowPB_IconDrawWB(FALSE); FlowPB_IconDrawImageQuality(FALSE); FlowPB_IconDrawSharpness(FALSE); FlowPB_IconDrawStorage(FALSE); FlowPB_IconDrawBattery(TRUE); FlowPB_IconDrawHistogram(FALSE); FlowPB_IconDrawFileLock(TRUE); FlowPB_IconDrawPrint(TRUE); FlowPB_IconHideMovPlayVolumn(); FlowPB_IconHideMovSpeed(&UIFlowWndPlay_StaticTXT_SpeedCtrl); FlowPB_IconDrawDate(FALSE); FlowPB_IconDrawTime(FALSE); FlowPB_IconDrawMovPlayTime(FALSE); if (AppPlay_GetData(PLAY_CURRMODE) == PLAYMODE_PRIMARY) { FlowPB_IconDrawMovPlay(FALSE); FlowPB_IconDrawMovStop(FALSE); FlowPB_IconDrawMovBwd(FALSE); FlowPB_IconDrawMovFwd(FALSE); FlowPB_IconDrawMovTotalTime(FALSE); } else { FlowPB_IconDrawMovPlay(TRUE); FlowPB_IconDrawMovStop(TRUE); FlowPB_IconDrawMovBwd(TRUE); FlowPB_IconDrawMovFwd(TRUE); FlowPB_IconDrawMovTotalTime(TRUE); } } }
INT32 UIFlowWndPlay_OnExeEnterKeyAct(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray) { static BOOL bFirstEnter = TRUE; switch(g_PlbData.State) { case PLB_ST_FULL: { switch(UIPlay_GetData(PLAY_CURRMODE)) { case PLAYMODE_AVI: case PLAYMODE_MOVMJPG: if (UIPlay_GetData(PLAY_PBSTATUS) == PB_STA_DONE) { if(bFirstEnter) { g_uiUIFlowWndPlayCurrentVolume = AUDIO_VOL_7;//Get_VolumeValue(Get_VolumeIndex()); bFirstEnter = FALSE; } KeyScan_EnableAutoPoweroff(FALSE); KeyScan_EnableUSBDet(FALSE); KeyScan_EnableKeyTone(FALSE); Ux_SendEvent(&UIPlayObjCtrl,NVTEVT_AUD_VOLUME,1,g_uiUIFlowWndPlayCurrentVolume); Ux_SendEvent(&UIPlayObjCtrl,NVTEVT_MOVPLAY,1,PlayFlowMoviePlayCBFunc); g_PlbData.State = PLB_ST_PLAY_MOV; FlowPB_IconDrawMovPlay(); FlowPB_IconDrawMovPlayTime(); FlowPB_IconDrawMovPlaySpeed(); //FlowPB_IconDrawMovPlayVolumn(g_uiUIFlowWndPlayCurrentVolume); } break; } break; } case PLB_ST_PLAY_MOV: case PLB_ST_FWD_MOV: case PLB_ST_BWD_MOV: { Ux_SendEvent(&UIPlayObjCtrl,NVTEVT_MOVPAUSE,0); g_PlbData.State = PLB_ST_PAUSE_MOV; KeyScan_EnableAutoPoweroff(TRUE); KeyScan_EnableUSBDet(TRUE); FlowPB_IconDrawMovPlay(); break; } case PLB_ST_PAUSE_MOV: { UINT32 uiCurrSpeedIndex = Get_PlayMovSpeedIndex(); KeyScan_EnableAutoPoweroff(FALSE); KeyScan_EnableUSBDet(FALSE); Ux_SendEvent(&UIPlayObjCtrl,NVTEVT_MOVRESUME,0); if(uiCurrSpeedIndex > PLAYMOV_SPEED_FWD_1X) { g_PlbData.State = PLB_ST_FWD_MOV; } else if(uiCurrSpeedIndex < PLAYMOV_SPEED_FWD_1X) { g_PlbData.State = PLB_ST_BWD_MOV; } else //uiCurrSpeedIndex == PLAYMOV_SPEED_FWD_1X { g_PlbData.State = PLB_ST_PLAY_MOV; } FlowPB_IconDrawMovPlay(); break; } } return NVTEVT_CONSUME; }
void FlowPB_UpdateIcons(BOOL bShow) { if (bShow == FALSE || Get_DisplayIndex() == DISPLAY_OFF) { FlowPB_IconHideDSCMode(); FlowPB_IconHideFlash(); FlowPB_IconHideEVIcon(); FlowPB_IconHideDCFFileID(); FlowPB_IconHideImageSize(); FlowPB_IconHideWB(); FlowPB_IconHideImageQuality(); FlowPB_IconHideSharpness(); FlowPB_IconHideStorage(); FlowPB_IconHideBattery(); FlowPB_IconHideHistogram(); FlowPB_IconHideFileLock(); FlowPB_IconHidePrint(); FlowPB_IconHideDate(); FlowPB_IconHideTime(); FlowPB_IconHideMovPlay(); FlowPB_IconHideMovStop(); FlowPB_IconHideMovPlayTime(); FlowPB_IconHideMovPlaySpeed(); FlowPB_IconHideMovPlayVolumn(); } else { switch(Get_DisplayIndex()) { case DISPLAY_ALL: FlowPB_IconDrawDSCMode(); FlowPB_IconDrawEVIcon(); FlowPB_IconDrawDCFFileID(); FlowPB_IconDrawImageSize(); FlowPB_IconDrawWB(); FlowPB_IconDrawStorage(); FlowPB_IconDrawBattery(); FlowPB_IconDrawHistogram(); FlowPB_IconDrawFileLock(); FlowPB_IconDrawPrint(); FlowPB_IconDrawDate(); FlowPB_IconDrawTime(); FlowPB_IconHideMovPlayTime(); FlowPB_IconHideMovPlaySpeed(); FlowPB_IconHideMovPlayVolumn(); if (UIPlay_GetData(PLAY_CURRMODE) == PLAYMODE_PRIMARY) { FlowPB_IconDrawFlash(); FlowPB_IconDrawImageQuality(); FlowPB_IconDrawSharpness(); FlowPB_IconHideMovPlay(); FlowPB_IconHideMovStop(); } else { FlowPB_IconHideFlash(); FlowPB_IconHideImageQuality(); FlowPB_IconHideSharpness(); FlowPB_IconDrawMovPlay(); FlowPB_IconDrawMovStop(); } break; case DISPLAY_NORMAL: FlowPB_IconDrawDSCMode(); FlowPB_IconHideFlash(); FlowPB_IconHideEVIcon(); FlowPB_IconDrawDCFFileID(); FlowPB_IconDrawImageSize(); FlowPB_IconHideWB(); FlowPB_IconHideImageQuality(); FlowPB_IconHideSharpness(); FlowPB_IconHideStorage(); FlowPB_IconDrawBattery(); FlowPB_IconHideHistogram(); FlowPB_IconDrawFileLock(); FlowPB_IconDrawPrint(); FlowPB_IconDrawDate(); FlowPB_IconDrawTime(); FlowPB_IconHideMovPlayTime(); FlowPB_IconHideMovPlaySpeed(); FlowPB_IconHideMovPlayVolumn(); if (UIPlay_GetData(PLAY_CURRMODE) == PLAYMODE_PRIMARY) { FlowPB_IconHideMovPlay(); FlowPB_IconHideMovStop(); FlowPB_IconHideMovBwd(); FlowPB_IconHideMovFwd(); } else { FlowPB_IconDrawMovPlay(); FlowPB_IconDrawMovStop(); FlowPB_IconDrawMovBwd(); FlowPB_IconDrawMovFwd(); } break; } } }
INT32 UIFlowWndPlay_OnKeyEnter(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray) { //#NT#2012/08/31#Calvin Chang#Porting Media Flow -begin //UINT32 uiCurindex; UINT32 uiPoolAddr; char pFilePath[FULL_FILE_PATH_LEN]; UINT32 fileType = DCF_FILE_TYPE_JPG; UINT32 uiPBFileFmt; switch(g_PlbData.State) { case PLB_ST_PLAY_MOV: case PLB_ST_FWD_MOV: case PLB_ST_BWD_MOV: Ux_SendEvent(&UIMoviePlayObjCtrl, NVTEVT_PAUSE_PLAY_MOVIE, 0); FlowPB_IconDrawMovPlay(TRUE); g_PlbData.State = PLB_ST_PAUSE_MOV; //#NT#2012/10/23#Philex Lin - begin // enable auto power off/USB detect timer // enable sound key tone flag KeyScan_EnableMisc(TRUE); //#NT#2012/10/23#Philex Lin - end break; case PLB_ST_PAUSE_MOV: //#NT#2012/10/23#Philex Lin - begin // disable auto power off/USB detect timer // disable key tone flag KeyScan_EnableMisc(FALSE); //#NT#2012/10/23#Philex Lin - end // Start to Play Ux_SendEvent(&UIMoviePlayObjCtrl, NVTEVT_PLAY_PLAY_MOVIE, 2, g_uiUIFlowWndPlayCurrenSpeed, g_uiUIFlowWndPlayCurrenDirection); FlowPB_IconDrawMovPlay(TRUE); g_PlbData.State = PLB_ST_PLAY_MOV; break; default: case PLB_ST_FULL: uiPBFileFmt = AppPlay_GetData(PLAY_FILEFMT); if (uiPBFileFmt & PBFMT_AVI || uiPBFileFmt & PBFMT_MOVMJPG || uiPBFileFmt & PBFMT_MP4) { // Open Video File if (gphUIFlowMovPlay_Filehdl) { FileSys_CloseFile(gphUIFlowMovPlay_Filehdl); gphUIFlowMovPlay_Filehdl = NULL; } if (uiPBFileFmt & PBFMT_AVI) fileType = DCF_FILE_TYPE_AVI; else if (uiPBFileFmt & PBFMT_MOVMJPG) fileType = DCF_FILE_TYPE_MOV; else if (uiPBFileFmt & PBFMT_MP4) fileType = DCF_FILE_TYPE_MOV; else { debug_msg("Wrong video file format!! \r\n"); break; } // Get Current index PB_GetParam(PBPRMID_CURR_FILEPATH, (UINT32 *)pFilePath); #if 0 uiCurindex = DCF_GetCurIndex(); DCF_GetObjPath(uiCurindex,fileType,pFilePath); #endif // Open Test Media File gphUIFlowMovPlay_Filehdl = FileSys_OpenFile(pFilePath, FST_OPEN_READ); if (!gphUIFlowMovPlay_Filehdl) { debug_msg("UIFlowWndPlay_OnKeyEnter: Can't open Video file!\r\n"); break; } //#NT#2012/10/23#Philex Lin - begin // disable auto power off/USB detect timer // disable key tone flag KeyScan_EnableMisc(FALSE); //#NT#2012/10/23#Philex Lin - end // Buffer Allocation get_blf((VP*)&(uiPoolAddr), POOL_ID_APP); rel_blf(POOL_ID_APP, (VP)uiPoolAddr); g_UIPlayMediaObj.hActMediafilehdl = gphUIFlowMovPlay_Filehdl; g_UIPlayMediaObj.CallBackFunc = Play_MovieCB; // g_UIPlayMediaObj.uiMemAddr = uiPoolAddr; g_UIPlayMediaObj.uiMemAddr = (UINT32)OS_GetMempoolAddr(POOL_ID_APP); g_UIPlayMediaObj.uiMemSize = POOL_SIZE_APP; //g_UIPlayMediaObj.iAudioType = AUDIO_OUTPUT_HP; g_UIPlayMediaObj.bDisableAudio = FALSE; UIFlowMoviePlay_SetSpeed(g_PlbData.VideoPBSpeed); g_uiUIFlowWndPlayCurrenDirection = MEDIAPLAY_DIR_FORWARD; //flush event first Ux_FlushEventByRange(NVTEVT_KEY_EVT_START,NVTEVT_KEY_EVT_END); //stop scan //SxTimer_SetFuncActive(SX_TIMER_DET_STRG_ID, FALSE); SxTimer_SetFuncActive(SX_TIMER_DET_SYSTEM_BUSY_ID, FALSE); Ux_SendEvent(&UIMoviePlayObjCtrl, NVTEVT_INIT_PLAY_MOVIE, 1, &g_UIPlayMediaObj); // Start to Play Ux_SendEvent(&UIMoviePlayObjCtrl, NVTEVT_PLAY_PLAY_MOVIE, 2, g_uiUIFlowWndPlayCurrenSpeed, g_uiUIFlowWndPlayCurrenDirection); if (KeyScan_GetPlugDev()!=PLUG_HDMI) { //FlowPB_IconDrawMovPlayVolumn(g_uiUIFlowWndPlayCurrentVolume); } FlowPB_IconDrawMovPlay(TRUE); g_PlbData.State = PLB_ST_PLAY_MOV; } break; } //#NT#2012/08/31#Calvin Chang -end return NVTEVT_CONSUME; }