Exemplo n.º 1
0
INT32 UIMenuWndPlayback_OnOpen(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
{
    //#NT#2009/09/14#Chris Chung -begin
    INT32 item,page,total_page;

    UxMenu_SetData(&UIMenuWndPlayback_ItemCtrl, MNU_CURITM, 0);

    bUIMenuWndPlayback_ItemCtrl_rx_event = FALSE;

    for (item=0;item<UIMenuWndPlayback_Item_MAX;item++) {
        UxMenu_SetItemData(&UIMenuWndPlayback_ItemCtrl,item,MNUITM_STATUS,(STATUS_DISABLE | STATUS_NORMAL_BIT));
    }

    UxCtrl_SetShow(&UIMenuWndPlayback_LDRTipsCtrl,TRUE);
    UxCtrl_SetShow(&UIMenuWndPlayback_LUDRTipsCtrl,FALSE);
    UxCtrl_SetShow(&UIMenuWndPlayback_LUDOKTipsCtrl,FALSE);

    /* show page number */
    item = UxMenu_GetData(&UIMenuWndPlayback_ItemCtrl,MNU_CURITM);
    page = UxMenu_GetData(&UIMenuWndPlayback_ItemCtrl,MNU_PAGEITEM);
    item = (item / page) + 1;
    total_page = ((UIMenuWndPlayback_Item_MAX % page) == 0)?(UIMenuWndPlayback_Item_MAX / page):(UIMenuWndPlayback_Item_MAX / page + 1);
    snprintf((char *)BottomBar_Buf,32,"%d/%d",item,total_page);
    UxStatic_SetData(&UIMenuWndPlayback_PageNum_StaticCtrl,STATIC_VALUE,Txt_Pointer(BottomBar_Buf));

    /* Set key press/release/continue mask */
    Ux_FlushEvent();
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_PRESS, FLGKEY_KEY_MASK_DEFAULT);
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_RELEASE, FLGKEY_KEY_REL_MASK_DEFAULT);
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_CONTINUE, FLGKEY_KEY_CONT_MASK_DEFAULT);
    //#NT#2009/09/14#Chris Chung -end

    Ux_DefaultEvent(pCtrl,NVTEVT_OPEN_WINDOW,paramNum,paramArray);
    return NVTEVT_CONSUME;
}
Exemplo n.º 2
0
INT32 UIFlowWndPlay_OnOpen(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
{
    g_bUIFlowWndPlayNoImgWndOpened = FALSE;

    if (UIPlay_GetData(PLAY_FILENUM)==0)
    {
        Ux_OpenWindow(&UIFlowWndWrnMsgCtrl,2,FLOWWRNMSG_ISSUE_NO_FILE,FLOWWRNMSG_TIMER_KEEP);
        g_bUIFlowWndPlayNoImgWndOpened = TRUE;
    }
    else
    {
        g_PlbData.VideoPBSpeed=PLB_FWD_MOV_1x;
        g_PlbData.State = PLB_ST_FULL;
        FlowPB_UpdateIcons(1);
    }
    // Turn on LCD backlight if TV is un plugged
    if (GPIOMap_IsLCDBacklightOn() == FALSE &&
        KeyScan_IsTVPlugIn() == FALSE &&
        KeyScan_IsHDMIPlugIn() == FALSE)
    {
        GPIOMap_TurnOnLCDBacklight();
    }	
    // set mask key
    Ux_FlushEvent();
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_PRESS, PLAY_KEY_PRESS_MASK);
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_RELEASE, PLAY_KEY_RELEASE_MASK);
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_CONTINUE, PLAY_KEY_CONTINUE_MASK);

    Ux_DefaultEvent(pCtrl,NVTEVT_OPEN_WINDOW,paramNum,paramArray);
    return NVTEVT_CONSUME;
}
Exemplo n.º 3
0
INT32 UIMenuWndCalibration_OnOpen(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
{
    UINT32  i;
    UINT32  count = TM_ITEMS_PERPAGE;

    g_CalData.SelItem = 0;
    g_CalData.FirstItem = 0;
    g_CalData.Count = Cal_GetMaxItemNum();

    UxStatic_SetData(&UIMenuWndCalibration_TitleNameCtrl, STATIC_VALUE, Txt_Pointer(g_CalibrationTitle));
    UxCtrl_SetShow(&UIMenuWndCalibration_TitleNameCtrl, TRUE);

    if (g_CalData.Count < TM_ITEMS_PERPAGE)
    {
        count = g_CalData.Count;
        UxMenu_SetData(&UIMenuWndCalibration_ItemCtrl, MNU_TOTITM, count);
    }

    for (i = 0; i < count; i++)
    {
        sprintf(g_CalibrationItem[i], "%d. %s", i + 1, g_CalItem[i].pItemName);
        UxMenu_SetItemData(&UIMenuWndCalibration_ItemCtrl, UIMenuWndCalibration_Item_STRID_A1 + i, MNUITM_STRID, Txt_Pointer(g_CalibrationItem[i]));
    }

    /* Set key press/release/continue mask */
    Ux_FlushEvent();
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_PRESS, FLGKEY_KEY_MASK_DEFAULT);
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_RELEASE, FLGKEY_KEY_REL_MASK_DEFAULT);
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_CONTINUE, FLGKEY_KEY_CONT_MASK_DEFAULT);

    Ux_DefaultEvent(pCtrl,NVTEVT_OPEN_WINDOW,paramNum,paramArray);
    return NVTEVT_CONSUME;
}
Exemplo n.º 4
0
EVENT_END

INT32 UIFlowWndWrnMsg_OnOpen(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
{
    debug_ind(("UIFlowWndWrnMsg: OnOpen\r\n"));

    if(paramNum > 0)
    {
        g_uiWrnMsgIssue = paramArray[0];
        debug_ind(("UIFlowWndWrnMsg: Issue case = 0x%x\r\n", g_uiWrnMsgIssue));
        if(paramNum > 1)
        {
            g_uiWrnMsgExpTime = paramArray[1];
            debug_ind(("UIFlowWndWrnMsg: Exp time = 0x%x\r\n", g_uiWrnMsgExpTime));
        }
    }
    UxState_SetData(&UIFlowWndWrnMsg_StatusTXT_MsgCtrl,STATE_CURITEM,g_uiWrnMsgIssue);
    UxCtrl_SetShow(&UIFlowWndWrnMsg_StatusTXT_MsgCtrl,TRUE);

    /* Start window expiration timer */
    if(g_uiWrnMsgExpTime)
    {
        g_uiExpTimerID = KeyScan_startTimer((TIMER_ONE_SEC * g_uiWrnMsgExpTime), NVTEVT_WRNMSG_WND_EXP_TIMER, ONE_SHOT);
    }

    /* Set key press/release/continue mask */
    Ux_FlushEvent();
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_PRESS, FLGKEY_KEY_MASK_DEFAULT);
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_RELEASE, FLGKEY_KEY_REL_MASK_DEFAULT);
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_CONTINUE, FLGKEY_KEY_CONT_MASK_DEFAULT);

    Ux_DefaultEvent(pCtrl,NVTEVT_OPEN_WINDOW,paramNum,paramArray);
    return NVTEVT_CONSUME;
}
Exemplo n.º 5
0
INT32 UIFlowWndPlay_OnOpen(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
{
    //#NT#2009/10/30#Chris Chung -begin
    g_bUIFlowWndPlayNoImgWndOpened = FALSE;

    if(UIPlay_GetData(PLAY_FILENUM)==0)
    {
        UIFlowWndPlay_OpenNoImageWnd(FLOWWRNMSG_TIMER_KEEP);
        g_bUIFlowWndPlayNoImgWndOpened = TRUE;
    }
    else
    {
        /* Set key press/release/continue mask */
        Ux_FlushEvent();
	if(ACC5MinMode==TRUE){
        KeyScan_SetKeyMask(KEYSCAN_KEYMODE_PRESS, FLGKEY_KEY_MASK_NULL);
        KeyScan_SetKeyMask(KEYSCAN_KEYMODE_RELEASE, FLGKEY_KEY_MASK_NULL);
        KeyScan_SetKeyMask(KEYSCAN_KEYMODE_CONTINUE, FLGKEY_KEY_MASK_NULL);	
	}
        else{		
        KeyScan_SetKeyMask(KEYSCAN_KEYMODE_PRESS, FLGKEY_KEY_MASK_DEFAULT);
        KeyScan_SetKeyMask(KEYSCAN_KEYMODE_RELEASE, FLGKEY_KEY_REL_MASK_DEFAULT);
        KeyScan_SetKeyMask(KEYSCAN_KEYMODE_CONTINUE, FLGKEY_KEY_CONT_MASK_DEFAULT);
    	  }
        g_PlbData.State = PLB_ST_FULL;
        FlowPB_UpdateIcons(1);
    }
    KeyScan_SetDetGSPNAVIEn(TRUE);
	
    //#NT#2009/10/30#Chris Chung -end
    Ux_DefaultEvent(pCtrl,NVTEVT_OPEN_WINDOW,paramNum,paramArray);
    return NVTEVT_CONSUME;
}
Exemplo n.º 6
0
INT32 UIMenuWndMovieVideo_OnClose(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
{
    /* Reset key press/release/continue mask to default */
    Ux_FlushEvent();
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_PRESS, FLGKEY_KEY_MASK_DEFAULT);
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_RELEASE, FLGKEY_KEY_REL_MASK_DEFAULT);
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_CONTINUE, FLGKEY_KEY_CONT_MASK_DEFAULT);
    Ux_DefaultEvent(pCtrl,NVTEVT_CLOSE_WINDOW,paramNum,paramArray);
    return NVTEVT_CONSUME;
}
Exemplo n.º 7
0
INT32 UIMenuWndPhotoWB_OnClose(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
{
    Ux_SendEvent(&UIPhotoObjCtrl,NVTEVT_EXE_WB,1,g_uiWBValue); // recall WB setting
    /* Reset key press/release/continue mask to default */
    Ux_FlushEvent();
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_PRESS, FLGKEY_KEY_MASK_DEFAULT);
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_RELEASE, FLGKEY_KEY_REL_MASK_DEFAULT);
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_CONTINUE, FLGKEY_KEY_CONT_MASK_DEFAULT);
    Ux_DefaultEvent(pCtrl,NVTEVT_CLOSE_WINDOW,paramNum,paramArray);
    return NVTEVT_CONSUME;
}
Exemplo n.º 8
0
INT32 UIMenuWndPlayback_OnClose(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
{
    //#NT#2009/09/14#Chris Chung -begin
    /* Reset key press/release/continue mask to default */
    Ux_FlushEvent();
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_PRESS, FLGKEY_KEY_MASK_DEFAULT);
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_RELEASE, FLGKEY_KEY_REL_MASK_DEFAULT);
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_CONTINUE, FLGKEY_KEY_CONT_MASK_DEFAULT);
    //#NT#2009/09/14#Chris Chung -end
    Ux_DefaultEvent(pCtrl,NVTEVT_CLOSE_WINDOW,paramNum,paramArray);
    return NVTEVT_CONSUME;
}
Exemplo n.º 9
0
INT32 UIMenuWndCalibration_OnClose(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
{
    /* Reset key press/release/continue mask to default */
    Ux_FlushEvent();
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_PRESS, FLGKEY_KEY_MASK_DEFAULT);
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_RELEASE, FLGKEY_KEY_REL_MASK_DEFAULT);
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_CONTINUE, FLGKEY_KEY_CONT_MASK_DEFAULT);

    Ux_DefaultEvent(pCtrl,NVTEVT_CLOSE_WINDOW,paramNum,paramArray);
    Ux_SendEvent(&UISystemObjCtrl,NVTEVT_CHANGE_DSCMODE,1,DSCMODE_CHGTO_NEXT);
    return NVTEVT_CONSUME;
}
Exemplo n.º 10
0
EVENT_END

INT32 UIFlowWndCommon_OnOpen(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
{
    /* Set key press/release/continue mask */
    Ux_FlushEvent();
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_PRESS, FLGKEY_KEY_MASK_DEFAULT);
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_RELEASE, FLGKEY_KEY_REL_MASK_DEFAULT);
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_CONTINUE, FLGKEY_KEY_CONT_MASK_DEFAULT);

    Ux_DefaultEvent(pCtrl,NVTEVT_OPEN_WINDOW,paramNum,paramArray);
    return NVTEVT_CONSUME;
}
EVENT_END

INT32 UIMenuWndPrint_PrintDPOF_OnOpen(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
{
    /* Set key press/release/continue mask */
    Ux_FlushEvent();
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_PRESS, FLGKEY_KEY_MASK_DEFAULT);
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_RELEASE, FLGKEY_KEY_REL_MASK_DEFAULT);
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_CONTINUE, FLGKEY_KEY_CONT_MASK_DEFAULT);
    Ux_DefaultEvent(pCtrl,NVTEVT_OPEN_WINDOW,paramNum,paramArray);

    UxMenu_SetData(&UIMenuWndPrint_PrintDPOF_Menu_MenuCtrl, MNU_CURITM, 0);
    return NVTEVT_CONSUME;
}
Exemplo n.º 12
0
EVENT_END

INT32 UIMenuWndPhotoAntiSha_OnOpen(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
{
    UxMenu_SetData(&UIMenuWndPhotoAntiSha_MenuCtrl,MNU_CURITM,Get_AntiShakingIndex());
    /* Set key press/release/continue mask */
    Ux_FlushEvent();
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_PRESS, FLGKEY_KEY_MASK_DEFAULT);
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_RELEASE, FLGKEY_KEY_REL_MASK_DEFAULT);
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_CONTINUE, FLGKEY_KEY_CONT_MASK_DEFAULT);
    Ux_RedrawAllWind();
    Ux_DefaultEvent(pCtrl,NVTEVT_OPEN_WINDOW,paramNum,paramArray);
    return NVTEVT_CONSUME;
}
Exemplo n.º 13
0
EVENT_END

INT32 UIMenuWndPlayProtect_OnOpen(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
{
    //#NT#2009/09/14#Chris Chung -begin
    UxMenu_SetData(&UIMenuWndPlayProtect_MenuCtrl, MNU_CURITM, 0);

    /* Set key press/release/continue mask */
    Ux_FlushEvent();
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_PRESS, FLGKEY_KEY_MASK_DEFAULT);
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_RELEASE, FLGKEY_KEY_REL_MASK_DEFAULT);
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_CONTINUE, FLGKEY_KEY_CONT_MASK_DEFAULT);
    //#NT#2009/09/14#Chris Chung -end
    Ux_DefaultEvent(pCtrl,NVTEVT_OPEN_WINDOW,paramNum,paramArray);
    return NVTEVT_CONSUME;
}
Exemplo n.º 14
0
EVENT_END

INT32 UIMenuWndMovieWB_OnOpen(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
{
    g_uiWBValue = Get_WBIndex(); // backup WB setting
    UxMenu_SetData(&UIMenuWndMovieWB_MenuCtrl,MNU_CURITM,g_uiWBValue);
    /* Set key press/release/continue mask */
    Ux_FlushEvent();
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_PRESS, FLGKEY_KEY_MASK_DEFAULT);
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_RELEASE, FLGKEY_KEY_REL_MASK_DEFAULT);
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_CONTINUE, FLGKEY_KEY_CONT_MASK_DEFAULT);
    Ux_RedrawAllWind();
	
    Ux_DefaultEvent(pCtrl,NVTEVT_OPEN_WINDOW,paramNum,paramArray);
    return NVTEVT_CONSUME;
}
Exemplo n.º 15
0
INT32 UIFlowWndMovie_OnKeyMode(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
{
	UINT32  uiKeyAct;

    	uiKeyAct = paramArray[0];
    	switch(uiKeyAct)
    	{
    		case NVTEVT_KEY_PRESS:
    // Don't stop movie recording
    			switch(gMovData.State)
			{
				case MOV_ST_VIEW:
				case MOV_ST_VIEW|MOV_ST_ZOOM:
					// mask key while changing primary mode
					Ux_FlushEvent();
					KeyScan_SetKeyMask(KEYSCAN_KEYMODE_PRESS, FLGKEY_KEY_MASK_NULL);
					KeyScan_SetKeyMask(KEYSCAN_KEYMODE_RELEASE, FLGKEY_KEY_MASK_NULL);
					KeyScan_SetKeyMask(KEYSCAN_KEYMODE_CONTINUE, FLGKEY_KEY_MASK_NULL);
					// changing primary mode
					Ux_SendEvent(&UISystemObjCtrl,NVTEVT_CHANGE_DSCMODE,1,DSCMODE_CHGTO_NEXT);
					break;
			
				case MOV_ST_REC:
				case MOV_ST_REC|MOV_ST_ZOOM:
					Ux_SendEvent(&UIMovieObjCtrl, NVTEVT_EXE_VIDEO_AUDIO, 1, !SysGetFlag(FL_MOVIE_AUDIO));
					FlowMovie_IconDrawMovieAudio(&UIFlowWndMovie_Status_MovieAudioCtrl);	
					break;					
/*					
					if (SysGetFlag(FL_MOVIE_PARKING) == MOVIE_PARKING_ON)
					{
						SysSetFlag(FL_MOVIE_PARKING,MOVIE_PARKING_OFF);
						FlowMovie_IconDrawParking(&UIFlowWndMovie_StatusICN_ParkingCtrl);
					}
					else if (SysGetFlag(FL_MOVIE_PARKING) == MOVIE_PARKING_OFF)
					{
						SysSetFlag(FL_MOVIE_PARKING,MOVIE_PARKING_ON);
						FlowMovie_IconDrawParking(&UIFlowWndMovie_StatusICN_ParkingCtrl);
					}
*/					
			}
			break;
    	}
    	return NVTEVT_CONSUME;
}
Exemplo n.º 16
0
INT32 UIFlowWndWrnMsg_OnClose(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
{
    debug_ind(("UIFlowWndWrnMsg: OnClose\r\n"));

    /* Stop window expiration timer if exists */
    if(g_uiExpTimerID != NULL_TIMER)
    {
        KeyScan_stopTimer(&g_uiExpTimerID);
    }

    /* Reset key press/release/continue mask to default */
    Ux_FlushEvent();
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_PRESS, FLGKEY_KEY_MASK_DEFAULT);
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_RELEASE, FLGKEY_KEY_REL_MASK_DEFAULT);
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_CONTINUE, FLGKEY_KEY_CONT_MASK_DEFAULT);

    Ux_DefaultEvent(pCtrl,NVTEVT_CLOSE_WINDOW,paramNum,paramArray);
    return NVTEVT_CONSUME;
}
Exemplo n.º 17
0
//{
//    return UIFlowWndMovie_OnExeZoomIn(pCtrl, paramNum, paramArray);
//}
INT32 UIFlowWndMovie_OnKeyPlayBack(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
{

    // Don't stop movie recording
    switch(gMovData.State)
    {
      case MOV_ST_VIEW:
      case MOV_ST_VIEW|MOV_ST_ZOOM:
        // mask key while changing primary mode
        Ux_FlushEvent();
        KeyScan_SetKeyMask(KEYSCAN_KEYMODE_PRESS, FLGKEY_KEY_MASK_NULL);
        KeyScan_SetKeyMask(KEYSCAN_KEYMODE_RELEASE, FLGKEY_KEY_MASK_NULL);
        KeyScan_SetKeyMask(KEYSCAN_KEYMODE_CONTINUE, FLGKEY_KEY_MASK_NULL);
        // changing primary mode
        Ux_SendEvent(&UISystemObjCtrl,NVTEVT_FORCETO_PLAYBACK_MODE,0);
        break;
    }

    return NVTEVT_CONSUME;
}
Exemplo n.º 18
0
INT32 UIMenuWndCalibration_Item_OnKeyEnter(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
{
    static BOOL bIsFirst = TRUE;

    /* Must ignore the 1st S2 key evt, coz S2 key is also the Engineering Mode hotkey */
    if(bIsFirst)
    {
        bIsFirst = FALSE;
        return NVTEVT_CONSUME;
    }

    if(g_CalItem[g_CalData.SelItem].ItemFunction != NULL)
    {
        clr_flg(FLG_ID_KEY, 0xffffffff);
        g_CalItem[g_CalData.SelItem].ItemFunction();
    }
    Ux_FlushEvent();
    UxCtrl_SetShow(&UIMenuWndCalibrationCtrl, TRUE);
    Ux_Redraw();
    return NVTEVT_CONSUME;
}
Exemplo n.º 19
0
INT32 UIFlowWndPlay_OnClose(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
{
    /* reset original volume for key sound */
    Ux_SendEvent(&UIPlayObjCtrl,NVTEVT_AUD_VOLUME,1,Get_VolumeValue(Get_VolumeIndex()));

    KeyScan_EnableAutoPoweroff(TRUE);
    KeyScan_EnableUSBDet(TRUE);
    KeyScan_EnableKeyTone(Get_BeepValue(Get_BeepIndex()));

    //#NT#2009/09/14#Chris Chung -begin
    /* Reset key press/release/continue mask to default */
    Ux_FlushEvent();
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_PRESS, FLGKEY_KEY_MASK_DEFAULT);
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_RELEASE, FLGKEY_KEY_REL_MASK_DEFAULT);
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_CONTINUE, FLGKEY_KEY_CONT_MASK_DEFAULT);
    aud_setOutput(AUDIO_OUTPUT_SPK); //jacky lan 
	
    //#NT#2009/09/14#Chris Chung -end
    Ux_DefaultEvent(pCtrl,NVTEVT_CLOSE_WINDOW,paramNum,paramArray);
    return NVTEVT_CONSUME;
}
Exemplo n.º 20
0
INT32 UIMenuWndMovieVideo_OnOpen(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
{
    INT32 item,page,total_page;

    UxMenu_SetItemData(&UIMenuWndMovieVideo_Video_MenuCtrl,item,MNUITM_STATUS,(STATUS_DISABLE));
    UxState_SetData(&UIMenuWndMovieVideo_Title_Mode_StatusCtrl,STATE_CURITEM,UIMenuWndMovieVideo_Title_Mode_Status_STRID_VIDEO);

    UxMenu_SetData(&UIMenuWndMovieVideo_Video_MenuCtrl,MNU_CURITM,0);

    item = UxMenu_GetData(&UIMenuWndMovieVideo_Video_MenuCtrl,MNU_CURITM);
    page = UxMenu_GetData(&UIMenuWndMovieVideo_Video_MenuCtrl,MNU_PAGEITEM);
    item = (item / page) + 1;
    total_page = (UIMenuWndMovieVideo_Video_Menu_MAX / page)+(((UIMenuWndMovieVideo_Video_Menu_MAX % page) == 0)? 0:1);
    sprintf((char *)BottomBar_Buf,"%d/%d",item,total_page);
    UxStatic_SetData(&UIMenuWndMovieVideo_PageNum_StaticCtrl,STATIC_VALUE,Txt_Pointer(BottomBar_Buf));

    for(item = UIMenuWndMovieVideo_Video_Menu_STRID_RESOLUTION;item < UIMenuWndMovieVideo_Video_Menu_MAX;item++)
    {
        UxMenu_SetItemData(&UIMenuWndMovieVideo_Video_MenuCtrl,item,MNUITM_STATUS,(STATUS_DISABLE));
    }



    UxCtrl_SetShow(&UIMenuWndMovieVideo_Dir_PanelCtrl,TRUE);
    UxCtrl_SetShow(&UIMenuWndMovieVideo_Dir2_PanelCtrl,FALSE);
    UxCtrl_SetShow(&UIMenuWndMovieVideo_Dir3_PanelCtrl,FALSE);
    bUIMenuWndMovieVideo_Video_MenuCtrl_rx_event = FALSE;

    /* Set key press/release/continue mask */
    Ux_FlushEvent();
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_PRESS, FLGKEY_KEY_MASK_DEFAULT);
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_RELEASE, FLGKEY_KEY_REL_MASK_DEFAULT);
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_CONTINUE, FLGKEY_KEY_CONT_MASK_DEFAULT);

    Ux_DefaultEvent(pCtrl,NVTEVT_OPEN_WINDOW,paramNum,paramArray);
    return NVTEVT_CONSUME;
}
Exemplo n.º 21
0
INT32 UIFlowWndPlay_OnKeyPlayback(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
{

    switch(g_PlbData.State)
    {
        case PLB_ST_FULL:
            if (KeyScan_IsHDMIPlugIn()==FALSE)
            {
                Ux_FlushEvent();
                KeyScan_SetKeyMask(KEYSCAN_KEYMODE_PRESS, FLGKEY_KEY_MASK_NULL);
                KeyScan_SetKeyMask(KEYSCAN_KEYMODE_RELEASE, FLGKEY_KEY_MASK_NULL);
                KeyScan_SetKeyMask(KEYSCAN_KEYMODE_CONTINUE, FLGKEY_KEY_MASK_NULL);
                Ux_SendEvent(&UISystemObjCtrl,NVTEVT_CHANGE_DSCMODE,1,DSCMODE_CHGTO_NEXT);
            }
            break;

        case PLB_ST_PLAY_MOV:
        case PLB_ST_PAUSE_MOV:
        case PLB_ST_FWD_MOV:
        case PLB_ST_BWD_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);
            break;

    }

    return NVTEVT_CONSUME;
}
Exemplo n.º 22
0
UINT32 CalLens_FocusStepMissTest(void)
{
    UINT32 i;
    CHAR str[32];
    extern UINT32 focusHomeDiff;
    extern UINT32 zoomHomeDiff;
    UINT32 StopFunc=0,StartFunc=0;

    /************************************************************/
    debug_err(("\n\nRunning FocusMiss Test,Please wait..\r\n\n"));
    Cal_ClearOSD(_OSD_INDEX_TRANSPART);
    Cal_ShowStringWithColor("1. Run Focus Miss Test...",0,0,_OSD_INDEX_BLACK);
    Cal_ShowStringWithColor("2. Press shutter key",0,30,_OSD_INDEX_BLACK);
#if 0
    clr_flg(FLG_ID_KEY, FLGKEY_SHUTTER2);
    wai_flg(&uiFlag, FLG_ID_KEY, FLGKEY_SHUTTER2, TWF_ORW|TWF_CLR);
#else
    do {
        Delay_DelayMs(10);
    } while(DrvKey_DetNormalKey()!=FLGKEY_SHUTTER1);
#endif
    Cal_ClearOSD(_OSD_INDEX_TRANSPART);
    /*************************************************************/

    StopFunc |=UIAPP_PHOTO_AE;
    StopFunc |=UIAPP_PHOTO_AWB;
    StopFunc |=UIAPP_PHOTO_FD;
    StopFunc |=UIAPP_PHOTO_CAF;
    Ux_SendEvent(&CustomPhotoObjCtrl,NVTEVT_EXE_STOP_FUNC,2,StopFunc ,UIAPP_PHOTO_WAITIDLE);

    Input_SetKeyMask(KEY_PRESS, FLGKEY_KEY_MASK_NULL);
    Input_SetKeyMask(KEY_RELEASE, FLGKEY_KEY_MASK_NULL);
    Input_SetKeyMask(KEY_CONTINUE, FLGKEY_KEY_MASK_NULL);

    Cal_ClearOSD(_OSD_INDEX_TRANSPART);
    Cal_ShowStringWithColor("1.Running Focus Miss Test...",0,0,_OSD_INDEX_BLACK);

    Lens_Zoom_SetPPS(300);
    Lens_Focus_SetPPS(500);

    Lens_Retract(0);
    Delay_DelayMs(500);
    Lens_Init(LENS_INIT_ZOOM_PART1);
    Lens_Init(LENS_INIT_ZOOM_PART2);

    for(i=0; i<2; i++)
    {
        lensDY5001A_test();

        UILens_WaitZoomFinish();

        Delay_DelayMs(500);
    }

    Lens_Retract(1);
    Delay_DelayMs(500);
    Lens_Init(LENS_INIT_ZOOM_PART1);
    Lens_Init(LENS_INIT_ZOOM_PART2);

    StartFunc = 0;
    StartFunc |=UIAPP_PHOTO_AE;
    StartFunc |=UIAPP_PHOTO_AWB;
    Ux_SendEvent(&CustomPhotoObjCtrl,NVTEVT_EXE_START_FUNC,2,StartFunc ,UIAPP_PHOTO_NOWAITIDLE);

    snprintf(str, 32, "2. Diff Zoom(%d),Focus(%d)", zoomHomeDiff, focusHomeDiff);
    Cal_ShowStringWithColor(str,0,30,_OSD_INDEX_BLACK);
    Cal_ShowStringWithColor("3. Press menu key to leave",0,60,_OSD_INDEX_BLACK);

    //CalLens_WaitKey(FLGKEY_MENU);
    do {
        Delay_DelayMs(10);
    } while(DrvKey_DetNormalKey()!=FLGKEY_MENU);
    do {
        Delay_DelayMs(10);
    } while(DrvKey_DetNormalKey()==FLGKEY_MENU);
    Delay_DelayMs(100);
    Ux_FlushEvent();
    Input_SetKeyMask(KEY_PRESS, FLGKEY_KEY_MASK_DEFAULT);
    Input_SetKeyMask(KEY_RELEASE, FLGKEY_KEY_MASK_DEFAULT);
    Input_SetKeyMask(KEY_CONTINUE, FLGKEY_KEY_MASK_DEFAULT);

    return 0;
}
Exemplo n.º 23
0
UINT32 CalLens_LensQualityTest(void)
{
    //FLGPTN  uiFlag;
    UINT32  i;//, startIdx, endIdx, maxIdx, maxVA;
    char str1[40];
    extern UINT32 focusHomeDiff;
    extern UINT32 zoomHomeDiff;
    UINT32 focusmissstep[3]= {0};
    UINT32 zoommissstep[3]= {0};

    /************************************************************/
    debug_err(("\n\nRunning FocusMiss Test,Please wait..\r\n\n"));
    Cal_ClearOSD(_OSD_INDEX_TRANSPART);
    Cal_ShowStringWithColor("1. Please wait..",0,0,_OSD_INDEX_BLACK);
    /*************************************************************/

    Lens_Zoom_SetPPS(300);
    Lens_Focus_SetPPS(500);

    Lens_Retract(0);
    Delay_DelayMs(500);

    for(i=1; i<10000; i++) {

        Lens_Init(LENS_INIT_ZOOM_PART1);
        Lens_Init(LENS_INIT_ZOOM_PART2);
        UILens_WaitZoomFinish();

        Lens_Zoom_GoSection(Lens_Zoom_GetSection(ZOOM_MIN_SECTION));

        Lens_Focus_Goto(10);//Lens_Focus_GetPosition(FOCUS_MIN_POSITION));
        Lens_Focus_Goto(715);//Lens_Focus_GetPosition(FOCUS_MAX_POSITION));
        //Lens_Focus_GotoHome();

        Lens_Zoom_GoSection(Lens_Zoom_GetSection(ZOOM_MAX_SECTION));

        Lens_Retract(1);
        Delay_DelayMs(100);

        Cal_ClearOSD(_OSD_INDEX_TRANSPART);
        Cal_ShowStringWithColor("1. Running..",0,0,_OSD_INDEX_BLACK);
        Cal_ShowStringWithColor("2. Press menu key to leave",0,30,_OSD_INDEX_BLACK);
        snprintf(str1, 40, "3. %d times Diff Zoom(%d) Focus(%d)", i,zoomHomeDiff, focusHomeDiff);
        Cal_ShowStringWithColor(str1,0,60,_OSD_INDEX_BLACK);

        if((zoomHomeDiff<4)&&(zoomHomeDiff>0))zoommissstep[zoomHomeDiff-1] = zoomHomeDiff;
        if((focusHomeDiff<4)&&(focusHomeDiff>0))focusmissstep[focusHomeDiff-1] = focusHomeDiff;

        if((zoomHomeDiff>=4)||(focusHomeDiff>=4)) {
            Cal_ShowStringWithColor("4. Press movie key to continue",0,90,_OSD_INDEX_BLACK);
            do {
                Delay_DelayMs(10);
            } while(DrvKey_DetNormalKey()!=FLGKEY_MOVIE);
            do {
                Delay_DelayMs(10);
            } while(DrvKey_DetNormalKey()==FLGKEY_MOVIE);
            Ux_FlushEvent();
        }
        if((DrvKey_DetNormalKey() & FLGKEY_MENU))
        {
            do {
                Delay_DelayMs(10);
            } while(DrvKey_DetNormalKey()==FLGKEY_MENU);
            Ux_FlushEvent();
            break;
        }
        zoomHomeDiff = 0;
        focusHomeDiff = 0;
    }

    snprintf(str1, 40, "3. zoom  %d  %d  %d focus  %d  %d  %d", zoommissstep[0],zoommissstep[1], zoommissstep[2],focusmissstep[0],focusmissstep[1],focusmissstep[2]);
    Cal_ShowStringWithColor(str1,0,60,_OSD_INDEX_BLACK);
    Cal_ShowStringWithColor("4. Test finish!Press menu key to leave",0,90,_OSD_INDEX_BLACK);

    do {
        Delay_DelayMs(10);
    } while(DrvKey_DetNormalKey()!=FLGKEY_MENU);
    do {
        Delay_DelayMs(10);
    } while(DrvKey_DetNormalKey()==FLGKEY_MENU);
    Ux_FlushEvent();

    return 0;
}
Exemplo n.º 24
0
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;
        case PLB_ST_PLAY_MOV:
        case PLB_ST_FWD_MOV:
        case PLB_ST_BWD_MOV:
#if(_MODEL_DSC_== _MODEL_DUAL_NAZHIDA_)		
        //#NT#2012/08/31#Calvin Chang#Porting Media Flow -begin
        if(g_PlbData.VideoPBSpeed > PLB_BWD_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);
        }
            break;		
#else		
            //#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);
            }
            break;
            //#NT#2012/08/31#Calvin Chang -end
#endif            
//#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;
}
Exemplo n.º 25
0
INT32 UIFlowWndPlay_OnKeyRight(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
{
    UINT32 uiEvtKeyAct = 0;
    UINT32 uiCurrSpeedIndex = Get_PlayMovSpeedIndex();

    if(paramNum > 0)
        uiEvtKeyAct = paramArray[0];

    switch(uiEvtKeyAct)
    {
        case NVTEVT_KEY_PRESS:
            switch(g_PlbData.State)
            {
            case PLB_ST_FULL:
                Ux_FlushEvent();
                KeyScan_SetKeyMask(KEYSCAN_KEYMODE_PRESS, FLGKEY_KEY_MASK_NULL);
                Ux_SendEvent(&UIPlayObjCtrl,NVTEVT_PLAYPREV,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(uiCurrSpeedIndex < PLAYMOV_SPEED_FWD_8X)
                {
                    uiCurrSpeedIndex ++;

                    Ux_FlushEvent();
                    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_PRESS, FLGKEY_KEY_MASK_NULL);

                    if(uiCurrSpeedIndex > PLAYMOV_SPEED_FWD_1X)
                    {
                        Ux_SendEvent(&UIPlayObjCtrl,NVTEVT_MOVFWD,1,uiCurrSpeedIndex);
                        g_PlbData.State = PLB_ST_FWD_MOV;
                    }
                    else if(uiCurrSpeedIndex < PLAYMOV_SPEED_FWD_1X)
                    {
                        Ux_SendEvent(&UIPlayObjCtrl,NVTEVT_MOVBWD,1,uiCurrSpeedIndex);
                        g_PlbData.State = PLB_ST_BWD_MOV;
                    }
                    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. */
                        Ux_SendEvent(&UIPlayObjCtrl,NVTEVT_AUD_VOLUME,1,g_uiUIFlowWndPlayCurrentVolume);
                    }

                    FlowPB_IconDrawMovPlaySpeed();
                    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_PRESS, FLGKEY_KEY_MASK_DEFAULT);
                }
                break;
				
            }
            break;

        case NVTEVT_KEY_RELEASE:
            //Rsvd
            break;
    }
    return NVTEVT_CONSUME;
}
Exemplo n.º 26
0
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;
}
Exemplo n.º 27
0
UINT8 CalLens_FarFocusCalibration(void)
{
    INT16 maxIdx = 0;
    INT16 StartIdx,EndIdx;
    UINT  AF_Step;
    char str1[32];
    UINT32 maxVA;
    BOOL bFocusNG = FALSE;
    UINT32 StopFunc=0,StartFunc=0;
    UINT32 tempFrequency=0;
    UINT32 zoomSection;

    /************************************************************/
    debug_err(("\n\nPlease let camera facing ISO chart. Then press shutter key\r\n\n"));
    Cal_ClearOSD(_OSD_INDEX_TRANSPART);
    Cal_ShowStringWithColor("1. Face ISO chart (far(3m))",0,0,_OSD_INDEX_BLACK);
    Cal_ShowStringWithColor("2. Press shutter key",0,30,_OSD_INDEX_BLACK);
#if 0
    clr_flg(FLG_ID_KEY, FLGKEY_SHUTTER2);
    wai_flg(&uiFlag, FLG_ID_KEY, FLGKEY_SHUTTER2, TWF_ORW|TWF_CLR);
#else
    do {
        Delay_DelayMs(10);
    } while(DrvKey_DetNormalKey()!=FLGKEY_SHUTTER1);
#endif
    Cal_ClearOSD(_OSD_INDEX_TRANSPART);
    /*************************************************************/

    //tempFrequency = IPL_AlgGetUIInfo(IPL_SEL_FREQUENCY);
    //IPL_AlgSetUIInfo(IPL_SEL_FREQUENCY,SEL_FREQUENCY_50HZ);
#if 1
    StartFunc=0;
    StartFunc |=UIAPP_PHOTO_AE;
    Ux_SendEvent(&CustomPhotoObjCtrl,NVTEVT_EXE_START_FUNC,2,StartFunc ,UIAPP_PHOTO_NOWAITIDLE);

    AE_reset();
    IPC_WaitVD(TRUE,IPL_ID_1);
    IPC_WaitVD(TRUE,IPL_ID_1);
    IPC_WaitVD(TRUE,IPL_ID_1);
    IPC_WaitVD(TRUE,IPL_ID_1);
    IPC_WaitVD(TRUE,IPL_ID_1);
    AE_Wait_Stable(3,60);

    StopFunc |=UIAPP_PHOTO_AE;
    Ux_SendEvent(&CustomPhotoObjCtrl,NVTEVT_EXE_STOP_FUNC,2,StopFunc ,UIAPP_PHOTO_WAITIDLE);
#endif

    StopFunc |=UIAPP_PHOTO_AE;
    StopFunc |=UIAPP_PHOTO_AWB;
    StopFunc |=UIAPP_PHOTO_FD;
    StopFunc |=UIAPP_PHOTO_CAF;
    Ux_SendEvent(&CustomPhotoObjCtrl,NVTEVT_EXE_STOP_FUNC,2,StopFunc ,UIAPP_PHOTO_WAITIDLE);

    Input_SetKeyMask(KEY_PRESS, FLGKEY_KEY_MASK_NULL);
    Input_SetKeyMask(KEY_RELEASE, FLGKEY_KEY_MASK_NULL);
    Input_SetKeyMask(KEY_CONTINUE, FLGKEY_KEY_MASK_NULL);

    Lens_Zoom_SetPPS(300);
    Lens_Focus_SetPPS(500);

    Lens_Init(LENS_INIT_ZOOM_PART1);
    Lens_Init(LENS_INIT_ZOOM_PART2);

    if (gCalLens_Info.bFocusBLCal == FALSE)
    {
        gCalLens_Info.uiLensFocusBL = CalLens_FocusBLCalibration();
    }

    UILens_AFPrepare(TRUE);

    AF_Step=4;
    for(zoomSection=Lens_Zoom_GetSection(ZOOM_MIN_SECTION); zoomSection<=Lens_Zoom_GetSection(ZOOM_MAX_SECTION); zoomSection++)
    {
        //Lens_Focus_GotoHome();
        Lens_Zoom_GoSection(zoomSection);

#if 0
        StartFunc=0;
        StartFunc |=UIAPP_PHOTO_AE;
        Ux_SendEvent(&CustomPhotoObjCtrl,NVTEVT_EXE_START_FUNC,2,StartFunc ,UIAPP_PHOTO_NOWAITIDLE);
        AE_reset();
        IPC_WaitVD(TRUE,IPL_ID_1);
        IPC_WaitVD(TRUE,IPL_ID_1);
        IPC_WaitVD(TRUE,IPL_ID_1);
        IPC_WaitVD(TRUE,IPL_ID_1);
        IPC_WaitVD(TRUE,IPL_ID_1);
        AE_Wait_Stable(3,60);
        StopFunc |=UIAPP_PHOTO_AE;
        Ux_SendEvent(&CustomPhotoObjCtrl,NVTEVT_EXE_STOP_FUNC,2,StopFunc ,UIAPP_PHOTO_WAITIDLE);
#endif

        StartIdx = gCalLens_FocusRangeTable[zoomSection-1][0];
        if(StartIdx > Lens_Focus_GetPosition(FOCUS_MAX_POSITION))
        {
            StartIdx = Lens_Focus_GetPosition(FOCUS_MAX_POSITION);
        }
        Lens_Focus_Goto(StartIdx);

        if(CalLens_IsNearAdjust())
        {
            EndIdx = CalLens_GetNearCalCompensation(zoomSection, FALSE);
        }
        else
        {
            EndIdx = gCalLens_FocusRangeTable[zoomSection-1][1];
        }

        if(EndIdx < Lens_Focus_GetPosition(FOCUS_MIN_POSITION))
        {
            EndIdx = Lens_Focus_GetPosition(FOCUS_MIN_POSITION);
        }

        if(AF_Step > 4)
        {
            maxIdx = AF_SearchFullRange(StartIdx, EndIdx, AF_Step, &maxVA, AF_VA_THRESHOLD_70PERCENTAGE);
            maxIdx = AF_SearchFullRange(maxIdx+AF_Step-4, maxIdx-AF_Step+4, 4, &maxVA, AF_VA_THRESHOLD_70PERCENTAGE);
            maxIdx = AF_SearchFullRange(maxIdx+3, maxIdx-3, 1, &maxVA, AF_VA_THRESHOLD_70PERCENTAGE);
        }
        else
        {
            maxIdx = AF_SearchFullRange(StartIdx, EndIdx, 4, &maxVA, AF_VA_THRESHOLD_70PERCENTAGE);
            maxIdx = AF_SearchFullRange(maxIdx+8, maxIdx-8, 1, &maxVA, AF_VA_THRESHOLD_70PERCENTAGE);
        }
        debug_msg("^G%s: Section = %d, maxIdx = %d\r\n", __func__, Lens_Zoom_GetSection(ZOOM_CUR_SECTION), maxIdx);
        gCalLens_Info.Far_Focus[zoomSection-1] = maxIdx;

        if(zoomSection==1) {
            snprintf(str1, 32, "S  Step VA  ");
            Cal_ShowStringWithColor(str1,0,16*(zoomSection/2),_OSD_INDEX_GREEN);
            Cal_ShowStringWithColor(str1,100,16*(zoomSection/2),_OSD_INDEX_GREEN);
            Cal_ShowStringWithColor(str1,200,16*(zoomSection/2),_OSD_INDEX_GREEN);
            snprintf(str1, 32, "%02d %03d %d", zoomSection, gCalLens_Info.Far_Focus[zoomSection-1], maxVA);
        }
        else
            snprintf(str1, 32, "%02d %03d %d", zoomSection, gCalLens_Info.Far_Focus[zoomSection-1], maxVA);

        if(maxVA > CALLENS_VA_WARNING)
        {
            if(zoomSection % 3 == 1)
                Cal_ShowStringWithColor(str1,0,16+16*((zoomSection-1)/3),_OSD_INDEX_BLACK);
            else if(zoomSection % 3 == 2)
                Cal_ShowStringWithColor(str1,100,16+16*((zoomSection-1)/3),_OSD_INDEX_RED);
            else
                Cal_ShowStringWithColor(str1,200,16+16*((zoomSection-1)/3),_OSD_INDEX_BLACK);
        }
        else
        {
            if(zoomSection % 3 == 1)
                Cal_ShowStringWithColor(str1,0,16+16*((zoomSection-1)/3),_OSD_INDEX_DARKGRAY);
            else if(zoomSection % 3 == 2)
                Cal_ShowStringWithColor(str1,100,16+16*((zoomSection-1)/3),_OSD_INDEX_DARKGRAY);
            else
                Cal_ShowStringWithColor(str1,200,16+16*((zoomSection-1)/3),_OSD_INDEX_DARKGRAY);

            if(maxVA < CALLENS_VA_NG)
            {
                bFocusNG =TRUE;
                Delay_DelayMs(2000);
                break;
            }
        }
    }

    for(zoomSection=Lens_Zoom_GetSection(ZOOM_MIN_SECTION); zoomSection<=Lens_Zoom_GetSection(ZOOM_MAX_SECTION); zoomSection++)
    {
        debug_msg("^G%s: gCalLens_Info.Far_Focus[%d] = %d\r\n", __func__,zoomSection-1 , gCalLens_Info.Far_Focus[zoomSection-1]);
    }

    gCalLens_Info.bFarAdjust = TRUE;
    if(CalLens_IsNearAdjust()) {
        for(zoomSection=1; zoomSection<=Lens_Zoom_GetSection(ZOOM_MAX_SECTION); zoomSection++)
        {
            if(CalLens_GetFarFocusCalStep(zoomSection) < CalLens_GetNearFocusCalStep(zoomSection))
                bFocusNG = TRUE;

            if(bFocusNG)
                debug_msg("^RZoom=%2d FarFocusStep=%3d < NearFocusStep=%3d\r\n",zoomSection,CalLens_GetFarFocusCalStep(zoomSection),CalLens_GetNearFocusCalStep(zoomSection));
            else
                debug_msg("^GZoom=%2d FarFocusStep=%3d > NearFocusStep=%3d\r\n",zoomSection,CalLens_GetFarFocusCalStep(zoomSection),CalLens_GetNearFocusCalStep(zoomSection));
        }
    }
    if(bFocusNG)
        gCalLens_Info.bFarAdjust = FALSE;

    UILens_AFPrepare(FALSE);

    CalLens_WriteCalData();
    Input_SetKeyMask(KEY_PRESS, FLGKEY_KEY_MASK_DEFAULT);
    Input_SetKeyMask(KEY_RELEASE, FLGKEY_KEY_MASK_DEFAULT);
    Input_SetKeyMask(KEY_CONTINUE, FLGKEY_KEY_MASK_DEFAULT);

    IPL_AlgSetUIInfo(IPL_SEL_FREQUENCY,tempFrequency);

    StartFunc = 0;
    StartFunc |=UIAPP_PHOTO_AE;
    StartFunc |=UIAPP_PHOTO_AWB;
    Ux_SendEvent(&CustomPhotoObjCtrl,NVTEVT_EXE_START_FUNC,2,StartFunc ,UIAPP_PHOTO_NOWAITIDLE);

    Lens_Retract(0);
    Delay_DelayMs(1000);

    /************************************************************/
    Cal_ClearOSD(_OSD_INDEX_TRANSPART);
    if(bFocusNG)
        Cal_ShowStringWithColor("1. Adjust NG (far(3m))",0,0,_OSD_INDEX_DARKGRAY);
    else
        Cal_ShowStringWithColor("1. Adjust done (far(3m))",0,0,_OSD_INDEX_BLACK);
    Cal_ShowStringWithColor("2. Press menu key to leave",0,30,_OSD_INDEX_BLACK);
#if 0
    clr_flg(FLG_ID_KEY, FLGKEY_ENTER);
    wai_flg(&uiFlag, FLG_ID_KEY, FLGKEY_ENTER, TWF_ORW|TWF_CLR);
#else
    do {
        Delay_DelayMs(10);
    } while(DrvKey_DetNormalKey()!=FLGKEY_MENU);
    do {
        Delay_DelayMs(10);
    } while(DrvKey_DetNormalKey()==FLGKEY_MENU);
    Ux_FlushEvent();
#endif
    /*************************************************************/
    return CALLENS_STA_OK;
}
Exemplo n.º 28
0
INT32 UIFlowWndMovie_OnExeRecord(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
{
 UINT32 uiKeyAct;
 UINT32 uiState,uiSlowCard=0;

    // flush key event first
    Ux_FlushEvent();
    if(GPIOMap_DetStrgCard() == FALSE)
    {
	  gMovData.State= MOV_ST_WARNING_MENU;
        Ux_OpenWindow(&UIFlowWndWrnMsgCtrl,2,UIFlowWndWrnMsg_StatusTXT_Msg_STRID_NO_CARD,FLOWWRNMSG_TIMER_2SEC);
        return NVTEVT_CONSUME;		
    }
    // do nothing while pluging HDMI
    if (KeyScan_IsHDMIPlugIn() == TRUE)
    {
        return NVTEVT_CONSUME;
    }

    if (GPIOMap_DetStrgCard() == FALSE)
    {
        Ux_OpenWindow(&UIFlowWndWrnMsgCtrl,2,UIFlowWndWrnMsg_StatusTXT_Msg_STRID_PLEASE_INSERT_SD,FLOWWRNMSG_TIMER_2SEC);
        return NVTEVT_CONSUME;
    }

    if (paramNum>=3)
    {
        uiState = paramArray[2];
        if (paramNum>=4)
            uiSlowCard = paramArray[3];
    } else {
        uiState = 0;
    }

    uiKeyAct = paramArray[0];
     debug_err(("UIFlowWndMovie_OnExeRecord uiKeyAct: %x,uiState : %x,uiSlowCard: %x\r\n",uiKeyAct,uiState,uiSlowCard));	
	
    switch (uiKeyAct)
    {
    case NVTEVT_KEY_PRESS:
        switch (gMovData.State)
        {
        case MOV_ST_VIEW:
            if (FlowMovie_IsStorageErr() == TRUE)
            {
                gMovData.State= MOV_ST_WARNING_MENU;
                gMovData.SysTimeCount = 0;
                return NVTEVT_CONSUME;
            }
            if (FlowMovie_GetSelfTimerID() != NULL_TIMER)
            {
                FlowMovie_StopRecSelfTimer();
                return NVTEVT_CONSUME;
            }
/*			
            if (SysGetFlag(FL_MOVIE_MOTION_DET)==MOVIE_MOTIONDET_ON)
            {
                g_uiRecordIngMotionDet = TRUE;
            } else {
                g_uiRecordIngMotionDet = FALSE;
            }
*/            
            FlowMovie_StartRec();
            break;
        case MOV_ST_REC:
        case MOV_ST_REC|MOV_ST_ZOOM:
            if (FlowMovie_GetRecCurrTime() >= 1)
            {
                FlowMovie_StopRec();
				if (gbMoviFileLock)
			{
				gbMoviFileLock = FALSE;
				FilesysWaitInitFinish(FST_TIME_INFINITE);	 
				FilesysWaitCmdFinish(FST_TIME_INFINITE);           
				FilesysSetFileLock(SysGetFlag(FL_DCF_FILE_ID),SysGetFlag(FL_DCF_DIR_ID),  TRUE);
				FilesysWaitInitFinish(FST_TIME_INFINITE);	 
				FilesysWaitCmdFinish(FST_TIME_INFINITE);  
				UxCtrl_SetShow(&UIFlowWndMovie_Status_LOCKCtrl, FALSE);	
	                   // RemoveGFileToRO(SysGetFlag(FL_DCF_FILE_ID),SysGetFlag(FL_DCF_DIR_ID));
			}
                if (uiState==UIFlowWndMovie_Restart_Rec)
                {
                    //#NT#2012/9/25#Philex Lin - begin
                    // Set NR/TBR/FR parameters dynamically
                    #if (_MOVIE_SLOW_CARD_ == ENABLE)
                    if (uiSlowCard == UIFlowWndMovie_Restart_SlowCard)
                    {
                        if (FlowMovie_NeedHandleSlowCard())
                            FlowMovie_SlowCardHandling();
                    }
                    #endif
                    Ux_PostEvent(NVTEVT_KEY_SHUTTER2, 1, NVTEVT_KEY_PRESS);
                } else {
                    /*if (SysGetFlag(FL_MOVIE_MOTION_DET) == MOVIE_MOTIONDET_ON)//henry 20141209
                    {
                        if (g_uiRecordIngMotionDet == TRUE)
                        {
                            g_uiRecordIngMotionDet = FALSE;
				 SysSetFlag(FL_MOVIE_MOTION_DET,MOVIE_MOTIONDET_OFF);						
                        }
                    }*/
                }
            }
            break;
        }
        break;
    }
    Ux_DefaultEvent(pCtrl,NVTEVT_KEY_SHUTTER2,paramNum,paramArray);
    return NVTEVT_CONSUME;
}
Exemplo n.º 29
0
INT32 UIFlowWndMovie_OnOpen(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
{
    //char *filepath = "A:\\DCIM";
    //static BOOL bUI_FirstOpen = TRUE;

    Ux_FlushEvent();
    /* Init window key mask variables & set key and key released mask */
    g_uiMaskKeyPress = MOVIE_KEY_PRESS_MASK;
    g_uiMaskKeyRelease = MOVIE_KEY_RELEASE_MASK;
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_PRESS, g_uiMaskKeyPress);
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_RELEASE, g_uiMaskKeyRelease);
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_CONTINUE, g_uiMaskKeyContinue);

    FlowMovie_UpdateIcons(TRUE);
	/*
    if(bUI_FirstOpen)
	{
	FilesysDeleteByName(filepath,TRUE);
   
    bUI_FirstOpen = FALSE;
        }
*/
    if(UI_Validate_Storage(STORAGE_CHECK_ERROR, NULL) == FALSE)
    {
       Ux_OpenWindow(&UIFlowWndWrnMsgCtrl,2,UIFlowWndWrnMsg_StatusTXT_Msg_STRID_PLEASE_INSERT_SD, FLOWWRNMSG_TIMER_KEEP);
    }
	if (g_formatcard == TRUE)
	{
	        g_formatcard = FALSE;
	        if (GPIOMap_DetStrgCard() == TRUE)
		 {
		 	Ux_BackgroundPostEvent(NVTEVT_BKW_FORMATCARD);	
			TimerDelayMs(1000);
		 }
	}
    // update g_uiRecordIngMotionDet flag
    if (gUIMotionDetTimerID==TIMER_NULL)
    {
        gUIMotionDetTimerID = KeyScan_startTimer(TIMER_HALF_SEC, NVTEVT_05SEC_TIMER, TIMER_TYPE_CONTINUE);
    }

    if (g_uiDateTimerID == TIMER_NULL)
    {
        g_uiDateTimerID = KeyScan_startTimer(TIMER_ONE_SEC, NVTEVT_1SEC_TIMER, TIMER_TYPE_CONTINUE);
    }
    gStarSOSDet = TRUE;

    #if (_GPS_RECEIVER_ == ENABLE)
    GPSRec_Open(UART_BAUDRATE_115200);
    #endif
 	if (SysGetFlag(FL_MOVIE_MOTION_DET)==MOVIE_MOTIONDET_ON)//henry20150204
            {
                g_uiRecordIngMotionDet = TRUE;
            } else {
                g_uiRecordIngMotionDet = FALSE;
            }
    if(gbNeedToRecordMovie==TRUE)
    {
    	  gbNeedToRecordMovie=FALSE;
	  Ux_PostEvent(NVTEVT_KEY_SHUTTER2, 1, NVTEVT_KEY_PRESS);
    }
    Ux_DefaultEvent(pCtrl,NVTEVT_OPEN_WINDOW,paramNum,paramArray);
    return NVTEVT_CONSUME;
}
Exemplo n.º 30
0
INT32 UIFlowWndPlay_OnChildClose(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
{

    if(paramNum > 0)
    {
        //Return from thumbnail, magnify or delete mode and play current image again.
        switch(paramArray[0])
        {
        case NVTRET_THUMBNAIL:
        case NVTRET_MAGNIFY:
            Ux_SendEvent(&UIPlayObjCtrl,NVTEVT_PLAYCURR,0);
            FlowPB_UpdateIcons(1);
            break;
        case NVTRET_DELETE:
        case NVTRET_DELETEALL:
            if(UIPlay_GetData(PLAY_FILENUM)==0)
            {
                if(!g_bUIFlowWndPlayNoImgWndOpened)
                {
                    Ux_OpenWindow(&UIFlowWndWrnMsgCtrl,2,FLOWWRNMSG_ISSUE_NO_IMAGE,FLOWWRNMSG_TIMER_KEEP);
                    g_bUIFlowWndPlayNoImgWndOpened = TRUE;
                }
            }
            else
            {
                Ux_SendEvent(&UIPlayObjCtrl,NVTEVT_PLAYCURR,0);
                FlowPB_UpdateIcons(1);
            }
            break;
        case NVTRET_ENTER_MENU:
            // Reset specific menu items
            SysSetFlag(FL_PROTECT, PROTECT_ONE);
            // Set Tab menu to Playback menu
            TM_SetMenu(&gPlaybackMenu);
            // Open common item menu
            Ux_OpenWindow(&MenuCommonItemCtrl, 0);
            g_bUIFlowWndPlayNoImgWndOpened = FALSE;
            break;
        }
    }
    else
    {
        if(UIPlay_GetData(PLAY_FILENUM)==0)
        {
            if(!g_bUIFlowWndPlayNoImgWndOpened)
            {
                Ux_OpenWindow(&UIFlowWndWrnMsgCtrl,2,FLOWWRNMSG_ISSUE_NO_IMAGE,FLOWWRNMSG_TIMER_KEEP);
                g_bUIFlowWndPlayNoImgWndOpened = TRUE;
            }
        }
        else
        {
            Ux_SendEvent(&UIPlayObjCtrl,NVTEVT_PLAYCURR,0);
            FlowPB_UpdateIcons(1);
        }
    }
    g_PlbData.State = PLB_ST_FULL;

    KeyScan_EnableAutoPoweroff(TRUE);
    KeyScan_EnableUSBDet(TRUE);
    KeyScan_EnableKeyTone(SysGetFlag(FL_BEEP));

    // set mask key
    Ux_FlushEvent();
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_PRESS, PLAY_KEY_PRESS_MASK);
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_RELEASE, PLAY_KEY_RELEASE_MASK);
    KeyScan_SetKeyMask(KEYSCAN_KEYMODE_CONTINUE, PLAY_KEY_CONTINUE_MASK);

    Ux_DefaultEvent(pCtrl,NVTEVT_CHILD_CLOSE,paramNum,paramArray);
    return NVTEVT_CONSUME;
}