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

📄 keyproc.c

📁 MTK portableDVD 采用mtk1389方案的代码
💻 C
📖 第 1 页 / 共 4 页
字号:

static BOOL fgNonISOSearchKey(BOOL fgGoto) large
{
  if( fgIsDvdPlay() )
  {
    return (fgDVDSearchKey(fgGoto));
  }
  else if ( fgIsVcdPlay() )
  {
    return (fgVCDSearchKey(fgGoto));
  }
  else if ( fgIsCddaPlay())
  {
    return (fgCDDASearchKey());
  }    
  else
  {
    return (UOP_OK);
  }        
}  

#ifdef GUI_CANCEL_BUTTON
/*********************************************************************
  Function    : static BOOL fgNonISOCancelKey(void) large
  Description :  
  Parameter : 
  Return    :
**********************************************************************/
static BOOL fgNonISOCancelKey(void) large
{
  	BYTE bPbcState = bSharedInfo(SI_PBC_STATE);
	BYTE bRepeatType = bSharedInfo(SI_REPEAT_MODE);
	BYTE bAuxCtrl = bSharedInfo(SI_USR_AUX_CTRL);
	BYTE bZoom = bSharedInfo(SI_ZOOM_SWITCH);
	
	if(bAuxCtrl != SV_REPEAT_ABNONE)  
	{
		vSendUopCmd(UOP_A_TO_B, SV_AB_OFF, 0, 0);
	}

  if(bRepeatType != SV_REPEAT_NONE)
  {
	  vSendUopCmd(UOP_REPEAT, SV_REPEAT_NONE, 0, 0);
  }

if (fgIsMute()) // mute off
  {
    vAdspMute(ADSP_OFF, 0);
    vOsdShowMute(OSD_MUTE_OFF);
#ifdef MTK_6CH_ADAC//billy[070415]  for can't cancel mute function
	{
		SetBitBIM(BIM_RIODRL, IOL_RD19);
		SetBitBIM(BIM_RIODOL, IOL_RD19);
              #ifdef MAX9702_Mute
		fgSetMAX9702SMute(FALSE);
              #endif
	}
#endif

  }

	if((bPbcState == SV_FF) || (bPbcState == SV_SF) || 
		 (bPbcState == SV_FR) || (bPbcState == SV_SR) ||
		 (bPbcState == SV_STEP) || (bPbcState == SV_STEP_BACK)|| (bPbcState == SV_PAUSE))//songchen.
	{
    vSendUopCmd(UOP_PLAY, 0, 0, 0);
	}
	
  if(bZoom != SV_ZOOM_OFF)
  {
		vSendUopCmd(UOP_ZOOM_IN, SV_ZOOM_OFF, 0, 0);
  }
	
	return (UOP_OK);
}
#endif
#ifdef SUPPORT_BROWSER
static BOOL fgNonISOBrowser(void) large
{
	BYTE bMenuId = bSharedInfo(SI_DVD_MENU_TYPE);

  if((fgIsDvdPlay() && (SV_ROOT_MENU != bMenuId) && (SV_TITLE_MENU != bMenuId) && (bSharedInfo(SI_PBC_STATE) != SV_STOP)) 
		 || (fgIsVcdPlay() && !((bSharedInfo(SI_PBC_SWITCH) == SV_PBC_ON) && (bSharedInfo(SI_VCD_DOM) == SV_SELECT_LIST))) 
		 || fgIsCddaPlay())
  	{
    vChangeInputState(INPUT_STATE_BROWSER, FALSE);
	  }
	else
	{
		vOsdShowError(SV_ERR_INVALID_OPERATION, OSD_TIMEOUT_SHORT);
	}
  return (UOP_OK);
}
#endif
static BOOL fgNonISOMarkKey(void) large
{
  if( fgIsDvdPlay() || fgIsVcdPlay() )
  {
#ifdef PLAYER_BOOKMARK
    vChangeInputState(INPUT_STATE_BOOKMARK, FALSE);
#endif
    return (UOP_OK);    
  }
  else if ( fgIsCddaPlay())
  {
    return (fgCDDAMarkKey());
  }    
  else
  {
    return (UOP_OK);
  }      
}  

static BOOL fgNonISOPbcKey(void) large
{
  if ( fgIsVcdPlay() )
  {
    return( fgVCDPbcKey() );
  }  
  else
  {
    return (UOP_OK);
  }  
}  

static BOOL fgNonISODigestKey(void) large
{
  if( fgIsDvdPlay() )
  {
    return (fgDVDDigestKey());
  }
  else if ( fgIsVcdPlay() )
  {
    return (fgVCDDigestKey());
  }
  else if ( fgIsCddaPlay())
  {
    return (fgCDDADigestKey());
  }    
  else
  {
    return (UOP_OK);
  }        
}  

static BOOL fgNonISOProgramKey(void) large
{
#ifdef PLAYER_PROGRAM
  vChangeInputState(INPUT_STATE_PROGRAM, FALSE);
#else
  vOsdShowError(SV_ERR_INVALID_OPERATION, OSD_TIMEOUT_SHORT);
#endif

  return (UOP_OK);  
}  

static BOOL fgNonISOShuffleKey(void) large
{
  BYTE bUsrCtrl = bSharedInfo(SI_USR_PBC_CTRL);
  BYTE bRepeatType = bSharedInfo(SI_REPEAT_MODE);

#ifdef USR_CTRL_CANCEL_REPEAT
  if ((bRepeatType != SV_REPEAT_NONE) &&
      (bRepeatType != SV_REPEAT_ABNONE))
  {
    vSendUopCmd(UOP_REPEAT, SV_REPEAT_NONE, 0, 0);
  }
#endif /* USR_CTRL_CANCEL_REPEAT */

  switch (bUsrCtrl)
  {
    case SV_SHUFFLE:
#ifdef SHUFFLE_RANDOM_SAME_KEY
      vSendUopCmd(UOP_RANDOM, SV_ON, 0, 0);
#else
      vSendUopCmd(UOP_SHUFFLE, SV_OFF, 0, 0);
#endif
      break;

    case SV_RANDOM:
      /* back to sequential play */
      vSendUopCmd(UOP_RANDOM, SV_OFF, 0, 0);
      break;

    default:
      vSendUopCmd(UOP_SHUFFLE, SV_ON, 0, 0);
      break;
  } /* switch (bUsrCtrl) */

  return (UOP_OK);
}  

#ifdef PLAYER_VRMT
static BOOL fgNonISOVremoteKey(void) large
{
#ifdef PLAYER_ZOOMIN_INDICATOR
	if(fgIsZoomBrShow() == TRUE)
	{
		vZoomBrOff();
	}
#endif

  if( fgIsDvdPlay() )
  {
    return (fgDVDVremoteKey());
  }
  else if ( fgIsVcdPlay() )
  {
    return (fgVCDVremoteKey());
  }
  else
  {
    return (UOP_FAIL); //BillDen
  }        
}  
#endif

#ifdef MEMORY_SUPPORT
static BOOL fgNonISOMemoryKey(void) large
{
  BYTE bPbcState = bSharedInfo(SI_PBC_STATE);
  if (!fgIsDiscPlay(bPbcState))
  {
    vOsdShowError(SV_ERR_PLAYBACK_ONLY, OSD_TIMEOUT_SHORT);
    return (UOP_OK);
  }
  if(!fgIsDvdPlay() && !fgIsVcdPlay())  
    return (UOP_FAIL);
    
#ifdef SUPPORT_DVD_AUDIO
  if(bSharedInfo(SI_DISC_TYPE) == SV_DVD_AUDIO)
    return (UOP_FAIL);
#endif

  _fgJYPress = TRUE; //BillDen
  
  vSendUopCmd(UOP_MEMORY, 0, 0, 0);
  
  _fgPlayFromMemory = TRUE;
  return (UOP_OK);
}  
#ifndef C51_WARNING
static BOOL fgNonISORecallKey(void) large
{
  vSendUopCmd(UOP_MEMORY_PLAY, 0, 0, 0);

  return (UOP_OK);
}
#endif
#endif

static BOOL fgNonISOTvModeKey(void) large
{
  if ( fgIsDvdPlay() )
  {
    return ( fgDVDTvModeKey() );
  }  
  else
  {
    return (UOP_OK);
  }  
}  

static BOOL fgNonISOZoomInKey(void) large
{
#ifndef RUSSIAN_BUYER_REQUEST2		//songchen 061211
 #ifdef SPECTRUM_IN_SETUP //billy050308
  if(bEepromReadByte(SPECTRUM_POSITION) == EV_ON)   //DENGSU 0702
  {
      vOsdShowError(SV_ERR_INVALID_OPERATION, OSD_TIMEOUT_SHORT);
      return (UOP_OK);
  }
#else
   if(fgIsEqShow())
   {
      vOsdShowError(SV_ERR_INVALID_OPERATION, OSD_TIMEOUT_SHORT);
      return (UOP_OK);
   }
#endif
#endif
  if( fgIsDvdPlay() )
  {
    return (fgDVDZoomInKey());
  }
  else if ( fgIsVcdPlay() )
  {
    return (fgVCDZoomInKey());
  }
  else if ( fgIsCddaPlay())
  {
    return (fgCDDAZoomInKey());
  }    
  else
  {
    return (UOP_OK);
  }        
}  

static BOOL fgNonISOZoomOutKey(void) large
{
#ifndef RUSSIAN_BUYER_REQUEST2
 #ifdef SPECTRUM_IN_SETUP
	 if(bEepromReadByte(SPECTRUM_POSITION) == EV_ON) 	//DENGSU 0702
	 {
		 //_rEqState.bDispType = OSD_EQ_TYPE_DISABLE;
		 //vOsdShowWb(OSD_WB_ZOOM_BR);
		 vOsdShowError(SV_ERR_INVALID_OPERATION, OSD_TIMEOUT_SHORT);
		 return (UOP_OK);
	 }
#else
	 if(fgIsEqShow())
	 {
		 vOsdShowError(SV_ERR_INVALID_OPERATION, OSD_TIMEOUT_SHORT);
		 return (UOP_OK);
	 }
#endif
#endif

  if( fgIsDvdPlay() )
  {
    return (fgDVDZoomOutKey());
  }
  else if ( fgIsVcdPlay() )
  {
    return (fgVCDZoomOutKey());
  }
  else if ( fgIsCddaPlay())
  {
    return (fgCDDAZoomOutKey());
  }    
  else
  {
    return (UOP_OK);
  }          
}  
#ifdef ENABLE_ZOOM_USER_MODE
static BOOL fgNonISOZoomUsrKey(void) large
{
  if( fgIsDvdPlay() )
  {
    return (fgDVDZoomUsrKey());
  }
  else if ( fgIsVcdPlay() )
  {
    return (fgVCDZoomUsrKey());
  }
  else if ( fgIsCddaPlay())
  {
    return (fgCDDAZoomUsrKey());
  }    
  else
  {
    return (UOP_OK);
  }          
}  
#endif
#ifdef AUDIO_IN_EN  
static BOOL fgNonFunctionKey(void) large
{
  if ( fgIsAinPlay() )
  {
    return ( fgAINFunctionKey() );
  }  
  else
  {
    return (UOP_OK);
  }  
}  
#endif  
static BOOL fgNonISOPasswordKey(void) large
{
  if ( fgIsDvdPlay() )
  {
    return ( fgDVDPasswordKey() );
  }  
  else
  {
    return (UOP_OK);
  }  
}  

#ifdef SUPPORT_DVD_AUDIO
static BOOL fgNonISODANextDlist(void) large
{
  return ( fgDANextDlist());
}  
static BOOL fgNonISODAPrevDlist(void) large
{
  return ( fgDAPrevDlist());
}  
static BOOL fgNonISODAHdnPasswordKey(void) large
{
  return ( fgDAHdnPasswordKey() );
}  
#endif                 


// *********************************************************************
// Common key dispatch function
// *********************************************************************

BOOL fgComKeyFunc(void) large
{
  BOOL fgRet = UOP_OK;

  switch (_bIRKey)
  {
/*  case IR_NUM0: */
/*  case IR_NUM1: */
/*  case IR_NUM2: */
/*  case IR_NUM3: */
/*  case IR_NUM4: */
/*  case IR_NUM5: */
/*  case IR_NUM6: */
/*  case IR_NUM7: */
/*  case IR_NUM8: */
/*  case IR_NUM9: */
/*  case IR_ADD10: */
/*  case IR_ADD20: */
/*  case IR_ADD5: */

#ifdef ENABLE_ZOOM_USER_MODE
    case IR_UP:
    case IR_LEFT:
    case IR_RIGHT:
    case IR_DOWN:
      fgRet = fgCOMDirKey();
      break;
#endif /* ENABLE_ZOOM_USER_MODE */

/*  case IR_ENTER: */
/*  case IR_PLAY:  */
/*  case IR_PAUSE: */
/*  case IR_STOP: */
/*  case IR_NEXT: */
/*  case IR_PREV: */
/*  case IR_REPEAT: */
/*  case IR_FF: */
/*  case IR_FR: */
/*  case IR_SF: */
/*  case IR_SR: */
/*  case IR_STEPF: */
/*  case IR_STEPR: */
/*  case IR_REVERSE: */
/*  case IR_SET_A: */
/*  case IR_SET_B: */
/*  case IR_TITLE_MENU: */
/*  case IR_ROOT_MENU: */
/*  case IR_RETURN: */
/*  case IR_NEXT_DLIST: */
/*  case IR_PREV_DLIST: */
/*  case IR_HOME_DLIST: */
/*  case IR_AUDIO: */
/*  case IR_SUB_TITLE: */
/*  case IR_SUB_TITLE_OFF: */
/*  case IR_ANGLE: */
/*  case IR_DISPLAY: */
/*  case IR_RESUME: */
/*  case IR_GOTO: */
/*  case IR_MARK: */
/*  case IR_CLEAR: */
/*  case IR_PBC: */
/*  case IR_DIGEST: */
/*  case IR_PROGRAM: */
/*  case IR_RANDOM: */
/*  case IR_VRMT: */
/*  case IR_MEMORY: */
/*  case IR_PLAY_MODE: */
#ifdef SUPPORT_EMD 
#ifndef DC_SELECT
    case IR_DEV_CHG:
      fgRet = fgDeviceChgKey();
    break;
#else
    case IR_DEV_CHG:
	fgRet = fgDCStateSetup();
	break;
#endif
#endif
    case IR_PAL_NTSC:
      fgRet = fgCOMTvFormatKey();
      break;

#ifdef ID_NO
    case IR_DISPLAY:
      if(bSharedInfo(SI_INIT_STATE)==SV_TRAY_OPENING)
        fgRet = bNONIDShowKey();
      else
        fgRet = UOP_OK;  
      break;
      
    case IR_READ:
      fgRet = bNONIDShowKey();
      break;

    case IR_WRITE:
      fgRet = bNONIDInputKey();
      break;
#endif
/*  case IR_TV_MODE: */  /* handled in play_dvd.c */

    case IR_COMPONENT:
      fgRet = fgCOMCompKey();
      break;

#if 0//def PSCAN_EN
    case IR_PSCAN:
      fgRet = fgCOMPScanKey();
      break;

    case IR_VGA:
      fgRet = fgCOMVGAKey();
      break;
#endif

/*  case IR_ZOOM_IN: */
/*  case IR_ZOOM_OUT: */
/*  case IR_ZOOM_USER: */

#ifdef SUPPORT_CAPTURE_LOGO
    case IR_CAPTURE:
      fgRet = fgCOMCaptureKey();
      break;
#endif /* SUPPORT_CAPTURE_LOGO */

#ifdef ASPECT_IN_REMOTE
    case IR_ASPECT:
      fgRet = fgCOMAspectKey();
      break;
#endif

#ifdef TFT_SWITCH
case IR_TFTSW:
      fgRet = fgCOMTftswitchKey();
      break;
#endif
    case IR_AUD_KEY_PLUS:
    //case IR_AUD_KEY_MINUS:
    case IR_AUD_KEY_RESUME:
      fgRet = fgCOMAudKeyShift();
      break;
#if defined(BBK_INTERNAL_KARA)&&!defined(BBK_NEW_GUI) 
    case IR_ECHO_PLUS:
      fgRet = fgCOMEchoPlusKey();
      break;

    case IR_ECHO_MINUS:
      fgRet = fgCOMEchoMinusKey();
      break;
#endif

    case IR_SURROUND:
      fgRet = fgCOMSurroundKey();
      break;
	  
#ifndef GUI_CANCEL_BUTTON
    case IR_VOCAL_ASSIST:
      fgRet = fgCOMVocalAssistKey();
      break;
#endif

#if defined(BBK_INTERNAL_KARA)&&!defined(BBK_NEW_GUI) 
    case IR_KARAOKE:
      fgRet = fgCOMKaraokeKey();
      break;
#endif

    case IR_ECHO_TYPE:
      fgRet = fgCOMEchoTypeKey();
      break;

    case IR_EQUALIZER:
      fgRet = fgCOMEqualizerKey();
      break;

/*  case IR_VOICE_CANCEL: */

⌨️ 快捷键说明

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