⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 key_handler_mmp.c

📁 SAMSUNG 5009的源代码
💻 C
📖 第 1 页 / 共 5 页
字号:
*     OUT       
*     I/O       
* Return			:  
*					
* By				: Weilifeng
* Description		:  
* Revision		:  
******************************************************************************
*/
VOID MmpGuiVideo3D(UCHAR param)
{
#if _APP_CAP_OSD_3D//clina 060414
	Gui3DId(param);
#endif
}

#endif	//(weilf)20060111

/******************************************************************************
* Function name  	: MmpGuiPause 
* Arguments      	:  
*     IN        
*					VOID
*     OUT       
*     I/O       
* Return         	:  STATIC VOID
*					
* By             		: Liu renliang
* Description    	: 
* Revision       	:  
******************************************************************************
*/
STATIC VOID MmpGuiPause(VOID)
{
	SetMainState_t main_state; 	
	
	main_state = GetMainState();

	switch (main_state)
	{
		case MAIN_PLAY:
			if(IsBgPlay() && Getdecodestate())	// cydrain 20060904
				UiCmdGeneral(UOP_PAUSE);			
			else
				MmpShowNotAvail();
			break;

		case MAIN_PAUSE:
			if(IsBgPlay())
				UiCmdGeneral(UOP_MMP_RESUME_PLAY);
			break;					

		case MAIN_FF:					
		case MAIN_FR:					
			//gaoping 20060216 problem 2591
			// fix bug, FF->PAUSE->FF, the speed followed with the pre FF.
			//SetScanControlState(PM_SPEED_X1, PM_DIR_FORWARD);	// cydrain 20060123
			if(Getdecodestate())	// cydrain 20060901
				UiCmdGeneral(UOP_PAUSE);	
			else
				MmpShowNotAvail();
			break;						

		/*if not play status return*/
		default:
			MmpShowNotAvail();
 
	}
	
}

/******************************************************************************
* Function name  	: MmpGuiScan 
* Arguments      	:  
*     IN        
*					UCHAR data, UCHAR param 
*     OUT       
*     I/O       
* Return         	:  STATIC VOID
*					
* By             		: Kim Do Yeon
* Description    	: 
* Revision       	:  
******************************************************************************
*/
STATIC VOID MmpGuiScan( UCHAR data )
{
	ScanCtrl_t	scan;
	UCHAR		speed;
	UCHAR		direction;
	SH_PAR_StreamInfo_st	*pHandle;


#if _APP_CAP_NAV_MMP_PLAY_VIDEO_FILE
	//gaoping 20060207 
	if((GetMmpFileType() == MMP_IMAGE_FILE)) 
#else
	if(GetMmpFileType() != MMP_AUDIO_FILE)
#endif

	{
		MmpShowNotAvail();
		return;
	}
	if((GetMmpFileType() == MMP_VIDEO_FILE) 
		&& (!MmnCheckMpgFiles(gpstMmp_ctrl->epstBg_play->etPlay_fid)))
	{
	pHandle = iPAR_GetStreamInfo();
		
#if !_APP_CAP_FUNC_MMP_TRICK_PLAY_WITHOUT_IDX //move from mmphandlevideo azureming@060721
	//gaoping 20060125 when index parsing error ,can not press ff fr or search key
	if( (! pHandle->avi.idx_valid 
#if _API_CAP_SUP_PAR_AVI2_INDEX	
		&& (GetAVI2IndexFlag()==FALSE) 
#endif
		) || GetFlagNotSupportAVIVideo() == TRUE) //fae disc3. mpeg4_standard.avi, azureming@060601
	{
		if (data==RC_KEY_FF || data==RC_KEY_FR )
		{
			MmpShowNotAvail();
			return;
		}
	}
#endif
	}


#if _APP_CAP_FUNC_MMP_TRICK_PLAY_WITHOUT_IDX
		
	if(MmnCheckMpgFiles(gpstMmp_ctrl->epstBg_play->etPlay_fid) == FALSE && 
		pHandle->avi.idx_valid == FALSE)
	{
		if(data == RC_KEY_FR)
		{
			MmpPlayWithoutParsing();
			return;
		}
	}
	
#endif


#if !_APP_CAP_FUNC_RPTAB_KEEP_IN_TRICK/*BY QQ 060310 keep the repeat AB status when in FF & FB*/
	MmpClearRepeatAB();
#endif/*_MTK_STYLE*/
	GetScanControlState( &scan );
	
	speed = scan.speed;
	direction = scan.direction;
	
	/* Change direction */
	if(data==RC_KEY_FF)
	{
		if( direction == PM_DIR_BACKWARD )
		{
			speed = PM_SPEED_X1;
			direction = PM_DIR_FORWARD;
		}
	}
	else
	{
		if( direction == PM_DIR_FORWARD )
		{
			speed = PM_SPEED_X1;
			direction = PM_DIR_BACKWARD;

#if _APP_CAP_OSD_SUBTITLE_CONCURRENT_DISPLAY	// cydrain 20060602
			if(GetMmpFileType()==MMP_VIDEO_FILE)
				MmpClearDivxSubtitle();
#endif
		}
	}

	/*
	 * This command comes from Fast Forward Button action 
	 */
	switch( speed )
	{
		case PM_SPEED_X2:
		case PM_SPEED_X4:
		case PM_SPEED_X8:
		case PM_SPEED_X16:
			speed =speed+1;
			break;
		case PM_SPEED_X32:
#if _APP_CAP_FUNC_CIRCULAR_SPEED_CONTROL
			direction = PM_DIR_FORWARD;
			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 speed up");
#endif
			MmpShowNotAvail();
			return;
#endif
		default:
			speed = PM_SPEED_X2;
			break;
	}

	SetTempValueSetFlag( FALSE );
	InitTempValueState();

	if ( direction == PM_DIR_FORWARD )
		UiScanForward( UOP_MMP_FORWARD_SCAN, speed );
	else
		UiScanBackward(UOP_MMP_BACKWARD_SCAN, speed);	
}



#if _APP_CAP_AUD_SETUP_SPEAKER
#if _APP_CAP_AUD_REVERBERATION
/******************************************************************************
* Function name  	: MmpGuiReverbration 
* Arguments      	:  
*     IN        
*					VOID
*     OUT       
*     I/O       
* Return         	:  STATIC VOID
*					
* By             		: 
* Description    	: 
* Revision       	:  New Setup R/W scheme (yanglu, 060207)
******************************************************************************
*/// Qian liping 060413
STATIC VOID MmpGuiReverbration(VOID)
{
	SetMainState_t 	main = GetMainState();
	char				str[15];
	SetupSpeaker_t	speaker;
	MmpNoticeType_et noticetype = GetMmpNoticeType();

	SetupInfoGetMenuSpeaker(&speaker);

	if( main != MAIN_PLAY || GetMmpFileType() != MMP_AUDIO_FILE)
	{
		OSD_SetIconDisplay(ICON_WARNING, NULL, SYS_NO_WAIT);
		return;
	}	
	if(noticetype == MMP_NOTICE_REVERBRATION)
	{
		speaker.reverberation ++;
		if(speaker.reverberation > REVERBERATION_CATHEDRAL)
			speaker.reverberation = REVERBERATION_NORMAL;
		SetupInfoSetMenuSpeaker(&speaker);
	}
	sprintf(str,"%s",gpReverberation_str[MENU_LANG][speaker.reverberation]);
	MmpShowNoticeString(MMP_NOTICE_REVERBRATION, str);

}
#endif/*_APP_CAP_AUD_REVERBERATION*/
#endif/*_APP_CAP_AUD_SETUP_SPEAKER*/

#if _APP_CAP_AUD_KARAOKE
/******************************************************************************
* Function name  	: MmpGuiKaraoke 
* Arguments      	:  
*     IN        
*					VOID
*     OUT       
*     I/O       
* Return         	:  VOID
*					
* By             		: 
* Description    	: 
* Revision       	:  New Setup R/W scheme (yanglu, 060207) 
******************************************************************************
*/// Qian liping 060413
VOID MmpGuiKaraoke(VOID)
{
	MmpNoticeType_et noticetype;
	SetupKaraoke_t karaoke;
	S5H_Lrstereo_et 	lrstereo;
	char tempstring[32];
#if _APP_CAP_AUD_FUNCTION_KEY
	OSD_State_st *osd_state;
#endif 
	/*gaoping 20060522 problem 340 in jpg mode karaoke should abandon*/
	if (GetMmpFileType()==MMP_IMAGE_FILE)
	{
		MmpShowNotAvail();
		return;
	}
	noticetype = GetMmpNoticeType();
	SetupInfoGetMenuKaraoke(&karaoke);

	if(noticetype == MMP_NOTICE_KARA)
	{
		karaoke.mic_setup = karaoke.mic_setup ? TOGGLE_OFF: TOGGLE_ON;
		if(karaoke.mic_setup == TOGGLE_OFF)
		{
			GetLrstereoState(&lrstereo);
			if( lrstereo > LRSTEREO_RIGHT)
			{
				lrstereo = LRSTEREO_STEREO;
				SetLrstereoState(lrstereo);	
				SysSleep(150,0);
			}
#if _APP_CAP_AUD_FUNCTION_KEY		
			osd_state = OSD_GetState();
			if(osd_state->etVolume_type < VOL_TYPE_KEY)
			{
				SetDisplayVolOsdTypeState(VOL_TYPE_KEY);
			}
			if(osd_state->etCur_icon == ICON_VOLUME)
			{
				OSD_SetIconDisplay(ICON_VOLUME, NULL, SYS_NO_WAIT);
			}
#endif/*_APP_CAP_AUD_FUNCTION_KEY*/	
			if(gpstMmp_ui->mmp_audio > LRSTEREO_RIGHT)
			{
				gpstMmp_ui->mmp_audio = LRSTEREO_STEREO;
				UiLrstereo(gpstMmp_ui->mmp_audio);
			}
		}
	}
	
	if(karaoke.mic_setup == TOGGLE_ON)
		strcpy(tempstring, "Kara~ auto"); 
	else
		strcpy(tempstring, "Kara~ off");

	MmpShowNoticeString(MMP_NOTICE_KARA, tempstring);
	
	SetupInfoSetMenuKaraoke(&karaoke);
}

#endif /* _APP_CAP_AUD_KARAOKE */

#if _APP_CAP_OSD_3D
#if _APP_CAP_AUD_SETUP_SPEAKER
/******************************************************************************
* Function name  	: MmpGui3D 
* Arguments      	:  
*     IN        
*					VOID
*     OUT       
*     I/O       
* Return         	:  STATIC VOID
*					
* By             		: Liu renliang
* Description    	: 
* Revision       	:   Qian liping 060605
******************************************************************************
*/
STATIC VOID MmpGui3D(VOID)
{
	SetupSpeaker_t	speaker;
	SetMainState_t main = GetMainState();
	MmpNoticeType_et noticetype = GetMmpNoticeType();	
	char 			str[15];

	if( main != MAIN_PLAY || GetMmpFileType() != MMP_AUDIO_FILE)
	{
		MmpShowNotAvail();
		return;
	}	

	if(noticetype == MMP_NOTICE_3D)
		MmpGui3DEffectSetting();
	
#if !_APP_CAP_AUD_SUB_3D_SEPERATED
	SetupInfoGetMenuSpeaker(&speaker);
	strcpy(str,gEqual_str[MENU_LANG][speaker.equalizer]);
#else/*_APP_CAP_AUD_SUB_3D_SEPERATED*/
	sprintf( (char *)str ,"%s  %s" , "3D", gToggle_mode[MENU_LANG][SH_AUD_Get3d()]);
#endif/*_APP_CAP_AUD_SUB_3D_SEPERATED*/

	MmpShowNoticeString(MMP_NOTICE_3D, str);
}
#else/*_APP_CAP_AUD_SETUP_SPEAKER*/
/******************************************************************************
* Function name  	: MmpGui3D 
* Arguments      	:  
*     IN        
*					VOID
*     OUT       
*     I/O       
* Return         	:  STATIC VOID
*					
* By             		: Liu renliang
* Description    	: 
* Revision       	:  
******************************************************************************
*/
STATIC VOID MmpGui3D(VOID)
{
	char		str[15];

	if( GetMainState()!= MAIN_PLAY || GetMmpFileType() != MMP_AUDIO_FILE)
	{
		MmpShowNotAvail();
		return;
	}	

	if(	GetMmpNoticeType()==MMP_NOTICE_3D )
		MmpGui3DEffectSetting();
	
	sprintf( (char *)str ,"%s  %s" , "3D", gToggle_mode[MENU_LANG][SH_AUD_Get3d()]);
	MmpShowNoticeString(MMP_NOTICE_3D, (char *)str);
}
#endif /*_APP_CAP_AUD_SETUP_SPEAKER*/
#endif /*_APP_CAP_OSD_3D*/
#if _APP_CAP_OSD_EXT_SUB_FILE_SELCTION
/******************************************************************************
 * Function name	: MmpGuiHandleKeysInExtSubtitle 
 * Arguments		:  
 *     IN			UCHAR data 
 *			
 *     OUT       
 *     I/O       
 * Return			:  BOOL
 *				
 * By				:  Qian liping 060719
 * Description		: 
 * Revision		:  
 ******************************************************************************
 */ 
BOOL MmpGuiHandleKeysInExtSubtitle( UCHAR data )
{
	OsdCtrl_st ctrl;
	BYTE1	cur_pos,new_pos, total_file;
	BOOL	page_update=0;
	
	cur_pos= gOSD_state.ecDivxtfile_pos;
	GetMmpExtSubtitleFileTotalNumber(&total_file);
	
	switch(data)
	{
		case RC_KEY_UP:
		case RC_KEY_DOWN:
			new_pos = GuiSelFuc[data-RC_KEY_UP](cur_pos, 0, total_file);
			if(( cur_pos/DIVX_CTRL_PAGE_UNIT_SIZE )!=(new_pos/DIVX_CTRL_PAGE_UNIT_SIZE ))
				page_update =1;
			
			gOSD_state.ecDivxtfile_pos = new_pos;
			
			ctrl.p.toggle = page_update ;
			OSD_ChangeDisplay(OSD_CTRL_EXT_SUB_FILE_SEL, &ctrl, SYS_NO_WAIT);
			break;
			

		case RC_KEY_SUBTITLE:
		case RC_KEY_ENTER:
#if _APP_CAP_FUNC_MMP_FIXED_SUB_SCHEME //azureming@060719
			MmpPlayWithSeletedSub(cur_pos);
			break;
#endif

		default:
			OsdNotAvailOn();
			break;
	}

	return TRUE;
}
#endif
/******************************************************************************
* Function name  	: MmpGuiReturnFromSetupPgm 
* Arguments      	:  
*     IN        
*					VOID
*     OUT       
*     I/O       
* Return         	:  VOID
*					
* By             		: Liu renliang
* Description    	: 
* Revision       	:  
******************************************************************************
*/
VOID MmpGuiReturnFromSetupPgm(VOID)
{
	OSD_MainType_et dsp_old;	
	BYTE2 	cursor;			
	if (GetMmpFileType() == MMP_IMAGE_FILE )
		dsp_old = gpstMmp_ctrl->estSetup_state_prev.dsp_prev;
	else
#if _MMP_SUPPORT_RESUME_STOP
#if _APP_CAP_NAV_MMP_PLAY_VIDEO_FILE
	//gaoping 20060410
	if ( GetMmpFileType() == MMP_VIDEO_FILE && 
		((gpstMmp_ctrl->estSetup_state_prev.state_prev==MAIN_PAUSE)\
			||(gpstMmp_ctrl->estSetup_state_prev.state_prev==MAIN_PLAY) 
			|| (gpstMmp_ctrl->estSetup_state_prev.state_prev==MAIN_STEP)) 
		&& GetFlagNotSupportAVIVideo() == FALSE) //temp azureming@060602
		{
			dsp_old =DISPLAY_OFF;
			if(SH_PAR_GetExSubtitleMode())	 // Qian liping 060627: redraw the external subtitle.
				gMmpSubtitleShown_flag = FALSE ;
		}
	else
#endif
#endif
		dsp_old = DISP

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -