static INT32 UIFlowWndPlay_OnExeUpKeyAct(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray) { switch(g_PlbData.State) { case PLB_ST_FULL: if (AppPlay_GetData(PLAY_CURRMODE) == PLAYMODE_PRIMARY && AppPlay_GetData(PLAY_PBSTATUS) == PB_STA_DONE) { Ux_OpenWindow((VControl *)(&UIFlowWndPlayMagnifyCtrl), 0); } break; case PLB_ST_PLAY_MOV: if (g_uiUIFlowWndPlayCurrentVolume < AUDIO_VOL_7) { // Start to Play g_uiUIFlowWndPlayCurrentVolume++; Ux_SendEvent(&CustomMovieObjCtrl,NVTEVT_EXE_MOVIEAUDPLAYVOLUME,1,g_uiUIFlowWndPlayCurrentVolume); //Ux_SendEvent(&UIMoviePlayObjCtrl, // NVTEVT_PLAY_PLAY_MOVIE, // 2, // g_uiUIFlowWndPlayCurrenSpeed, // g_uiUIFlowWndPlayCurrenDirection); FlowPB_IconDrawMovPlayVolumn(g_uiUIFlowWndPlayCurrentVolume); } break; } return NVTEVT_CONSUME; }
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; }
EVENT_END static INT32 UIFlowWndPlay_OnExeUpKeyAct(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray) { switch(g_PlbData.State) { case PLB_ST_FULL: if (UIPlay_GetData(PLAY_CURRMODE) == PLAYMODE_PRIMARY && UIPlay_GetData(PLAY_PBSTATUS) == PB_STA_DONE) { Ux_OpenWindow((VControl *)(&UIFlowWndPlayMagnifyCtrl), 0); } else if(UIPlay_GetData(PLAY_CURRMODE) == PLAYMODE_AVI) { KeyScan_SetKeyMask(KEYSCAN_KEYMODE_PRESS, FLGKEY_KEY_MASK_NULL); Ux_SendEvent(&UIPlayObjCtrl,NVTEVT_PLAYNEXT,0); FlowPB_UpdateIcons(1); KeyScan_SetKeyMask(KEYSCAN_KEYMODE_PRESS, FLGKEY_KEY_MASK_DEFAULT); } break; case PLB_ST_PLAY_MOV: if(!KeyScan_IsHDMIPlugIn()) //Not allow volume change when HDMI plugged in { if(g_uiUIFlowWndPlayCurrentVolume < AUDIO_VOL_7) { g_uiUIFlowWndPlayCurrentVolume++; Ux_SendEvent(&UIPlayObjCtrl,NVTEVT_AUD_VOLUME,1,g_uiUIFlowWndPlayCurrentVolume); FlowPB_IconDrawMovPlayVolumn(g_uiUIFlowWndPlayCurrentVolume); } } break; case PLB_ST_PAUSE_MOV: Ux_SendEvent(&UIPlayObjCtrl,NVTEVT_MOVSTOP,0); g_PlbData.State = PLB_ST_FULL; g_PlbData.VideoPBSpeed = PLB_FWD_MOV_1x; hdmitx_setAudMute(FALSE); KeyScan_EnableAutoPoweroff(TRUE); KeyScan_EnableUSBDet(TRUE); KeyScan_EnableKeyTone(SysGetFlag(FL_BEEP)); // KeyScan_EnableKeyTone(GetSysF(Get_BeepIndex())); FlowPB_UpdateIcons(1); /* reset original volume for key sound */ Ux_SendEvent(&UIPlayObjCtrl,NVTEVT_AUD_VOLUME,1,g_uiUIFlowWndPlayCurrentVolume); KeyScan_SetKeyMask(KEYSCAN_KEYMODE_PRESS, FLGKEY_KEY_MASK_NULL); Ux_SendEvent(&UIPlayObjCtrl,NVTEVT_PLAYNEXT,0); FlowPB_UpdateIcons(1); KeyScan_SetKeyMask(KEYSCAN_KEYMODE_PRESS, FLGKEY_KEY_MASK_DEFAULT); break; } return NVTEVT_CONSUME; }
static INT32 UIFlowWndPlay_OnExeDownKeyAct(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray) { UINT32 uiActKey; if (paramNum >= 1) uiActKey = paramArray[0]; switch (uiActKey) { case NVTEVT_KEY_PRESS: switch(g_PlbData.State) { case PLB_ST_FULL: Ux_OpenWindow((VControl *)(&UIFlowWndPlayThumbCtrl), 0); break; case PLB_ST_PLAY_MOV: if(!KeyScan_IsHDMIPlugIn()) //Not allow volume change when HDMI plugged in { if(g_uiUIFlowWndPlayCurrentVolume > AUDIO_VOL_MUTE) { g_uiUIFlowWndPlayCurrentVolume--; Ux_SendEvent(&UIPlayObjCtrl,NVTEVT_AUD_VOLUME,1,g_uiUIFlowWndPlayCurrentVolume); FlowPB_IconDrawMovPlayVolumn(g_uiUIFlowWndPlayCurrentVolume); } } break; case PLB_ST_PAUSE_MOV: Ux_SendEvent(&UIPlayObjCtrl,NVTEVT_MOVSTOP,0); g_PlbData.State = PLB_ST_FULL; g_PlbData.VideoPBSpeed = PLB_FWD_MOV_1x; hdmitx_setAudMute(FALSE); KeyScan_EnableAutoPoweroff(TRUE); KeyScan_EnableUSBDet(TRUE); KeyScan_EnableKeyTone(SysGetFlag(FL_BEEP)); // KeyScan_EnableKeyTone(GetSysF(Get_BeepIndex())); FlowPB_UpdateIcons(1); /* reset original volume for key sound */ Ux_SendEvent(&UIPlayObjCtrl,NVTEVT_AUD_VOLUME,1,g_uiUIFlowWndPlayCurrentVolume); Ux_OpenWindow((VControl *)(&UIFlowWndPlayThumbCtrl), 0); break; } break; } return NVTEVT_CONSUME; }
static INT32 UIFlowWndPlay_OnExeDownKeyAct(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray) { UINT32 uiActKey; if (paramNum >= 1) uiActKey = paramArray[0]; else { debug_msg("error parameter!!\r\n"); return NVTEVT_CONSUME; } switch (uiActKey) { case NVTEVT_KEY_PRESS: switch(g_PlbData.State) { case PLB_ST_FULL: Ux_OpenWindow((VControl *)(&UIFlowWndPlayThumbCtrl), 0); break; case PLB_ST_PLAY_MOV: if (g_uiUIFlowWndPlayCurrentVolume > AUDIO_VOL_MUTE) { // Start to Play g_uiUIFlowWndPlayCurrentVolume--; Ux_SendEvent(&CustomMovieObjCtrl,NVTEVT_EXE_MOVIEAUDPLAYVOLUME,1,g_uiUIFlowWndPlayCurrentVolume); //Ux_SendEvent(&UIMoviePlayObjCtrl, // NVTEVT_PLAY_PLAY_MOVIE, // 2, // g_uiUIFlowWndPlayCurrenSpeed, // g_uiUIFlowWndPlayCurrenDirection); FlowPB_IconDrawMovPlayVolumn(g_uiUIFlowWndPlayCurrentVolume); } break; } break; } return NVTEVT_CONSUME; }
INT32 UIFlowWndPlay_OnKeyRight(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray) { UINT32 uiActKey; if (paramNum >= 1) uiActKey = paramArray[0]; switch (uiActKey) { case NVTEVT_KEY_PRESS: switch(g_PlbData.State) { case PLB_ST_FULL: KeyScan_SetKeyMask(KEYSCAN_KEYMODE_PRESS, FLGKEY_KEY_MASK_NULL); Ux_SendEvent(&UIPlayObjCtrl,NVTEVT_PLAYNEXT,0); FlowPB_UpdateIcons(1); KeyScan_SetKeyMask(KEYSCAN_KEYMODE_PRESS, FLGKEY_KEY_MASK_DEFAULT); break; case PLB_ST_PLAY_MOV: case PLB_ST_FWD_MOV: case PLB_ST_BWD_MOV: #if 0 if(!KeyScan_IsHDMIPlugIn()) //Not allow volume change when HDMI plugged in { //debug_err(("henry--------------down\r\n")); if(g_uiUIFlowWndPlayCurrentVolume > AUDIO_VOL_MUTE) { g_uiUIFlowWndPlayCurrentVolume--; Ux_SendEvent(&UIPlayObjCtrl,NVTEVT_AUD_VOLUME,1,g_uiUIFlowWndPlayCurrentVolume); FlowPB_IconDrawMovPlayVolumn(g_uiUIFlowWndPlayCurrentVolume); } } #endif //if (KeyScan_IsHDMIPlugIn()==FALSE) { if(g_PlbData.VideoPBSpeed < PLB_FWD_MOV_8x) { g_PlbData.VideoPBSpeed ++; Ux_FlushEvent(); KeyScan_SetKeyMask(KEYSCAN_KEYMODE_PRESS, FLGKEY_KEY_MASK_NULL); if(g_PlbData.VideoPBSpeed > PLB_FWD_MOV_1x) { Ux_SendEvent(&UIPlayObjCtrl,NVTEVT_MOVFWD,1,g_PlbData.VideoPBSpeed); g_PlbData.State = PLB_ST_FWD_MOV; // set mute in FWD playing hdmitx_setAudMute(TRUE); } else if(g_PlbData.VideoPBSpeed < PLB_FWD_MOV_1x) { Ux_SendEvent(&UIPlayObjCtrl,NVTEVT_MOVBWD,1,g_PlbData.VideoPBSpeed); g_PlbData.State = PLB_ST_BWD_MOV; // set mute in BWD playing hdmitx_setAudMute(TRUE); } else //uiCurrSpeedIndex == PLAYMOV_SPEED_FWD_1X { Ux_SendEvent(&UIPlayObjCtrl,NVTEVT_MOVFWDSTOP,0); g_PlbData.State = PLB_ST_PLAY_MOV; hdmitx_setAudMute(FALSE); Ux_SendEvent(&UIPlayObjCtrl,NVTEVT_AUD_VOLUME,1,g_uiUIFlowWndPlayCurrentVolume); } FlowPB_IconDrawMovSpeed(); KeyScan_SetKeyMask(KEYSCAN_KEYMODE_PRESS, FLGKEY_KEY_MASK_DEFAULT); } //} break; } break; } return NVTEVT_CONSUME; }
INT32 UIFlowWndPlay_OnKeyRight(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray) { switch(g_PlbData.State) { case PLB_ST_FULL: Input_SetKeyMask(KEY_PRESS, FLGKEY_KEY_MASK_NULL); Ux_SendEvent(&UIPlayObjCtrl,NVTEVT_PLAYSINGLE, 2, PB_SINGLE_NEXT, 1); FlowPB_UpdateIcons(1); UIFlowWndPlay_CheckStatus(); Input_SetKeyMask(KEY_PRESS, FLGKEY_KEY_MASK_DEFAULT); break; #if (_MODEL_DSC_ == _MODEL_DUAL_V6_) case PLB_ST_PLAY_MOV: if (g_uiUIFlowWndPlayCurrentVolume > AUDIO_VOL_MUTE) { // Start to Play g_uiUIFlowWndPlayCurrentVolume--; Ux_SendEvent(&CustomMovieObjCtrl,NVTEVT_EXE_MOVIEAUDPLAYVOLUME,1,g_uiUIFlowWndPlayCurrentVolume); //Ux_SendEvent(&UIMoviePlayObjCtrl, // NVTEVT_PLAY_PLAY_MOVIE, // 2, // g_uiUIFlowWndPlayCurrenSpeed, // g_uiUIFlowWndPlayCurrenDirection); FlowPB_IconDrawMovPlayVolumn(g_uiUIFlowWndPlayCurrentVolume); } #else case PLB_ST_PLAY_MOV: case PLB_ST_FWD_MOV: case PLB_ST_BWD_MOV: //#NT#2012/08/31#Calvin Chang#Porting Media Flow -begin if(g_PlbData.VideoPBSpeed < PLB_FWD_MOV_8x) { g_PlbData.VideoPBSpeed ++; Ux_FlushEventByRange(NVTEVT_KEY_EVT_START,NVTEVT_KEY_EVT_END); Input_SetKeyMask(KEY_PRESS, FLGKEY_KEY_MASK_NULL); if(g_PlbData.VideoPBSpeed > PLB_FWD_MOV_1x) { g_PlbData.State = PLB_ST_FWD_MOV; UIFlowMoviePlay_SetSpeed(g_PlbData.VideoPBSpeed); g_uiUIFlowWndPlayCurrenDirection = MEDIAPLAY_DIR_FORWARD; // Play Ux_SendEvent(&UIMoviePlayObjCtrl, NVTEVT_PLAY_PLAY_MOVIE, 2, g_uiUIFlowWndPlayCurrenSpeed, g_uiUIFlowWndPlayCurrenDirection); } else if(g_PlbData.VideoPBSpeed < PLB_FWD_MOV_1x) { g_PlbData.State = PLB_ST_BWD_MOV; UIFlowMoviePlay_SetSpeed(g_PlbData.VideoPBSpeed); g_uiUIFlowWndPlayCurrenDirection = MEDIAPLAY_DIR_BACKWARD; // Play Ux_SendEvent(&UIMoviePlayObjCtrl, NVTEVT_PLAY_PLAY_MOVIE, 2, g_uiUIFlowWndPlayCurrenSpeed, g_uiUIFlowWndPlayCurrenDirection); } else //uiCurrSpeedIndex == PLAYMOV_SPEED_FWD_1X { g_PlbData.State = PLB_ST_PLAY_MOV; UIFlowMoviePlay_SetSpeed(g_PlbData.VideoPBSpeed); g_uiUIFlowWndPlayCurrenDirection = MEDIAPLAY_DIR_FORWARD; // Play Ux_SendEvent(&UIMoviePlayObjCtrl, NVTEVT_PLAY_PLAY_MOVIE, 2, g_uiUIFlowWndPlayCurrenSpeed, g_uiUIFlowWndPlayCurrenDirection); } FlowPB_IconDrawMovSpeed(); Input_SetKeyMask(KEY_PRESS, FLGKEY_KEY_MASK_DEFAULT); } #endif break; //#NT#2012/08/31#Calvin Chang -end //#NT#2012/7/6#Philex mark temp #if 0 if (KeyScan_IsHDMIPlugIn()==FALSE) { if(g_PlbData.VideoPBSpeed < PLB_FWD_MOV_8x) { g_PlbData.VideoPBSpeed ++; Ux_FlushEvent(); KeyScan_SetKeyMask(KEYSCAN_KEYMODE_PRESS, FLGKEY_KEY_MASK_NULL); if(g_PlbData.VideoPBSpeed > PLB_FWD_MOV_1x) { Ux_SendEvent(&UIPlayObjCtrl,NVTEVT_MOVFWD,1,g_PlbData.VideoPBSpeed); g_PlbData.State = PLB_ST_FWD_MOV; // set mute in FWD playing hdmitx_setAudMute(TRUE); } else if(g_PlbData.VideoPBSpeed < PLB_FWD_MOV_1x) { Ux_SendEvent(&UIPlayObjCtrl,NVTEVT_MOVBWD,1,g_PlbData.VideoPBSpeed); g_PlbData.State = PLB_ST_BWD_MOV; // set mute in BWD playing hdmitx_setAudMute(TRUE); } else //uiCurrSpeedIndex == PLAYMOV_SPEED_FWD_1X { Ux_SendEvent(&UIPlayObjCtrl,NVTEVT_MOVFWDSTOP,0); g_PlbData.State = PLB_ST_PLAY_MOV; /* Since Media FWD/BWD will set volume mute, we should restore current volume. */ hdmitx_setAudMute(FALSE); Ux_SendEvent(&UIPlayObjCtrl,NVTEVT_AUD_VOLUME,1,g_uiUIFlowWndPlayCurrentVolume); } FlowPB_IconDrawMovSpeed(); KeyScan_SetKeyMask(KEYSCAN_KEYMODE_PRESS, FLGKEY_KEY_MASK_DEFAULT); } } break; #endif } return NVTEVT_CONSUME; }