📄 dvdv_show.c
字号:
/****************************************************************************
* File name *
* Dvdv_show.c *
* *
* Start date *
* 2004.4.21 *
* *
* By *
* Inseo Han *
* *
* Contact *
* ishan@samsung.com *
* *
* Description *
* This file contains the functions for displaying OSD or controlling VFD. *
* This can be modified by the customer according to the UI policy. *
* *
* HISTORY *
* *
* NAME DATE REMARKS *
* *
* *
* *
*****************************************************************************/
/***************************************************************************
* INCLUDES
**************************************************************************/
#include <string.h>
#include "Basic_typedefs.h"
#include "CUSTOM/Custom_option.h"
#include "OS/OS_abstract.h"
#include "API/SH_types.h"
#include "API/SH_api.h"
#include "API/SH_BM_api.h"
#include "COMMON/Common.h"
#include "MAIN/Appl_types.h"
#include "MAIN/Global_state.h"
#include "MAIN/Uop_msg.h"
#include "CUSTOM/Osd_types.h"
#include "CUSTOM/Osd_if.h"
#include "CUSTOM/Key_handler_setup.h"
#include "CUSTOM/Key_defs.h"
#include "CUSTOM/FP_handle.h"
#include "DRIVER/I2C/I2c_api.h"
#include "DRIVER/EEPROM/Eeprom_drv.h"
#include "DRIVER/FS/Fs_api.h"
#include "MAIN/DVD/Dvd_predef.h"
#include "MAIN/DVD/Dvd_common.h"
#include "MAIN/DVD/Dvdv_show.h"
#include "MAIN/DVD/Dvd_def.h"
#include "MAIN/DVD/Dvdv_nv_data.h"
#include "MAIN/DVD/Dvd_prv_types.h"
#include "MAIN/DVD/Dvdv_global.h" //wanglin 20050708
extern ONOFF gOsd_angle_onoff; // Qian liping 060427
void UpdatePbTime(void);
VOID CursorLayerOff( VOID );
/***************************************************************************
* Global variables
**************************************************************************/
/***************************************************************************
* Private functions
**************************************************************************/
#if _USE_5008//BY QQ 060109
VOID GetSuitableShowTimeInDvd(UCHAR *vhour, UCHAR *vmin, UCHAR *vsec)
{
VOID (*GetDvdTime)( BYTE1 *, BYTE1 *, BYTE1* );
BYTE1 info_state,disp_main_state;
GetDvdTime = GetDvdvPbTime;//By QQ 051219 default value
info_state = GetDisplayInfoState() ;
disp_main_state = GetDisplayMainState();
#ifdef _APP_CAP_FUNC_REMAIN_TIME
#ifdef _APP_CAP_KEY_TIME_KEY
if(disp_main_state == DISPLAY_TIME)
{
BYTE1 info_time_state = GetDisplayTimeInfoState() ;
if(info_time_state == INFO_FIRST)
{
GetDvdTime = GetDvdvTitleTime;
}
else
if(info_time_state == INFO_SECOND)
{
GetDvdTime = GetDvdvChapterTime;
}
}
#else /*_SUPPORT_TIME_KEY*/
if(info_state == INFO_THIRD)
{
GetDvdTime = GetDvdvTitleTime;
}else
if(info_state == INFO_FOURTH)
{
GetDvdTime = GetDvdvChapterTime;
}
#endif /*_SUPPORT_TIME_KEY*/
#endif /*_SUPPORT_REMAIN_TIME*/
GetDvdTime( vhour , vmin , vsec );
}
#endif
/******************************************************************************
* Function name : RefreshDvdDisplayInfo
* Arguments :
* IN
* OUT
* INOUT
* Return :
*
* By : Inseo Han
* Description : This function updates the current DVD information OSD.
* This function should be called every time after the title
* or chapter has been changed.
*
*
* Revisions :
******************************************************************************
*/
static void RefreshDvdDisplayInfo(void)
{
MediaInfo_t media;
#ifdef _ENABLE_DVDV_DIGEST
if(gState.dvdv_digest.bDigestFlag && gState.dvdv_digest.ucTotalIndex != 0 )
{
media.dvdv.total_digestnum = gState.dvdv_digest.ucTotalIndex;
media.dvdv.cur_digestIndex =gState.dvdv_digest.ucCurrentPage*DVD_PRIVIEW_NUM
+ gState.dvdv_digest.ucCurrentIndex+1;
}
else
media.dvdv.total_digestnum=media.dvdv.cur_digestIndex=0;
#endif
GetDvdVideoInfo(&media.dvdv);
SetMediaInfoState( media );
#ifdef _ENABLE_DVDV_DIGEST
/*Create the graphic plane here if we use frame buffer for it. Otherwise it will broke
the frame buffer 1 picture when we enter digest mode from normal play. It means, only after the
vp fixed on frame buffer 0, we can init the data in frame buffer 1 . Jiang Shanbin*/
if(gState.dvdv_digest.bDigestFlag && gState.dvdv_digest.ucTotalIndex != 0 )
{
if(!gState.dvdv_digest.bIsGraphicPlaneCreated)
{
OSD_SetMainDisplay(DISPLAY_DIGEST_MENU, SYS_NO_WAIT);//clina 060803
gState.dvdv_digest.bIsGraphicPlaneCreated = TRUE;
}
}
#endif
OSD_ChangeDisplay(OSD_CTRL_UPDATE_INFO, NULL, SYS_NO_WAIT);
}
static VOID RefreshTtPttSearch(DvdUopResult_t result)
{
if ( result != DVD_UR_SUCCESS )
{
// DVD_UR_INVALID_TTN
// DVD_UR_INVALID_PTTN
RefreshDvdDisplayInfo();
}
else
{
/* Check to clear "stop" if needed */
OSD_SetIconDisplay(ICON_PLAY, NULL, SYS_NO_WAIT);
}
}
static BOOL IsSearchOsdAllowed()
{
return TRUE;
}
/***************************************************************************
* Standard APIs for displaying OSD/VFD for DVD
**************************************************************************/
VOID DvdShowStart(VOID)
{
#if _APP_CAP_OSD_DISC_TYPE // Qian liping 060525
OSD_SetIconDisplay( ICON_DISC_TYPE, NULL, SYS_NO_WAIT );
#else
OSD_SetIconDisplay( ICON_PLAY, NULL, SYS_NO_WAIT );
#endif
}
VOID DvdIconRedrawCheck(VOID)
{
if(!IS_ICON_TRANS_MSG) /* Yanglu 05.03.09 */
OSD_SetIconDisplay( ICON_KEEP, NULL, SYS_NO_WAIT );
}
VOID DvdShowRefreshZoomOsd(VOID)
{
OSD_SetIconDisplay( ICON_ZOOM_VALUE, NULL, SYS_NO_WAIT );
}
void DvdShowPbTimeChanged(UCHAR vhour, UCHAR vmin, UCHAR vsec )
{
OSD_State_st *osd_state;
OsdCtrl_st ctrl;
MediaInfo_t media;
UCHAR hour, min, sec;
hour = vhour;
min = vmin;
sec = vsec;
#if _USE_5008//BY QQ 060109
GetSuitableShowTimeInDvd( &hour , &min , &sec );
#endif
if( hour > 3 )
hour = 3;
GetDvdVideoInfo(&media.dvdv);
osd_state = OSD_GetState();
if(gState.domain != DVD_DOM_VMGM && gState.domain != DVD_DOM_VTSM)//victor li,for dvd-video
//SetVfdPlaybackInfo(media.dvdv.cur_title, (BYTE2)media.dvdv.cur_chapter, (BYTE2)(( (hour * 60 + min)*60)+sec ));
SetVfdPlaybackInfo(0, (BYTE2)media.dvdv.cur_chapter, (BYTE2)(( (hour * 60 + min)*60)+sec )); //clina 060407
if (//clina 060728
#if _APP_CAP_KEY_TIME_KEY
osd_state->etCur_dsp == DISPLAY_TIME||
#endif /*_APP_CAP_KEY_TIME_KEY*/
#if _APP_CAP_FUNC_DVD_DIGEST
osd_state->etCur_dsp == DISPLAY_DIGEST_MENU||
#endif
(osd_state->etCur_dsp == DISPLAY_INFO && (
#if _APP_CAP_FUNC_REMAIN_TIME
osd_state->etInfo_dsp == INFO_THIRD || osd_state->etInfo_dsp == INFO_FOURTH ||
#endif/*_APP_CAP_FUNC_REMAIN_TIME*/
((osd_state->etInfo_dsp == INFO_FIRST ) && !(osd_state->etInfo_sub == INFO_SUB_VTIME && GetTempValueSetFlag()== TRUE))
) )
)
{
ctrl.p.time.hour = hour;
ctrl.p.time.min = min;
ctrl.p.time.sec = sec;
OSD_TimerUpdate(OSD_CTRL_UPDATE_TIME, &ctrl, SYS_NO_WAIT);
}
}
extern INLINE IconState_et GetDisplayIconState( VOID );
VOID DvdShowAngleBlock(BOOL on)
{
#if 0 // Qian liping 060427
if ( on )
#else
if(on && (gOsd_angle_onoff == TRUE) && (GetDisplayIconState()!=ICON_CAMERA) )
#endif
OSD_SetIconDisplay(ICON_CAMERA, NULL, SYS_NO_WAIT);
else
OSD_SetIconDisplay(ICON_KEEP, NULL, SYS_NO_WAIT); // Qian liping 060427
}
VOID DvdShowAngleNumChanged(VOID)
{
//OSD_ChangeDisplay(OSD_CTRL_UPDATE_INFO, NULL, SYS_NO_WAIT); //BY QQ 050714 osd info -> press "FF" quickly -> osd info string will flick very frequently --- fixed
}
VOID DvdShowPgChanged(VOID)
{
RefreshDvdDisplayInfo();
}
VOID DvdShowRepeatCleared(DvdRepeatState_t repeat_type)
{
//OsdCtrl_st osd_ctrl;
SetVfdRepeatDisplay(FP_REPEAT_CLEAR);
if(repeat_type == DVD_REPEAT_B )
OSD_SetIconDisplay(ICON_REPEAT_OFF, NULL, SYS_NO_WAIT);
/* (Fix the bug) "Repeat A-" still remains after PGC changed,
even though Repeat is cleared (200350806,ishan) */
else if ( repeat_type == DVD_REPEAT_A )
DvdIconRedrawCheck();
}
VOID DvdShowPasswdCheck(VOID)
{
OSD_SetMainDisplay(DISPLAY_ADULT_PSWD_CHECK, SYS_WAIT);
}
VOID DvdShowAdultConfirm(VOID)
{
OSD_SetMainDisplay(DISPLAY_ADULT_CONFIRM, SYS_WAIT);
}
VOID DvdShowAbnormalState(DvdAbnormalReason_t reason)
{
/* Reset zoom state and clear zoom icon (20050803,ishan) */
/* (Fix the bug) Zoom 2x -> Press Stop -> "2x" OSD still remained */
SetZoomFactorState(ZOOM_NONE);
switch ( reason )
{
case DVD_CP_ERROR:
case DVD_DUMP_ERROR:
case DVD_UNKNOWN_ERROR:
case DVD_CANNOT_PLAY:
case DVD_SERVO_ERROR:
OSD_SetMainDisplay(DISPLAY_UNKNOWN_DISC, SYS_NO_WAIT);
break;
case DVD_REGION_ERROR:
OSD_SetMainDisplay(DISPLAY_RC_ERROR, SYS_WAIT);
break;
#ifdef _DVD_CHECK_PAL_DISC
case DVD_PAL_DISC_PROHIBITED:
// Should be modified here !!!!
OSD_SetMainDisplay(DISPLAY_UNKNOWN_DISC, SYS_NO_WAIT);
break;
#endif
default:
ASSERT(0);
break;
}
}
void DvdShowStill(DvdStillState_t state)
{
switch ( state )
{
case DVD_VOBU_STILL:
case DVD_CELL_STILL:
case DVD_PGC_STILL:
break;
default:
ASSERT(0);
break;
}
}
extern INLINE OSD_MainType_et GetDisplayMainState( VOID );
void DvdShowDomainChanged(Domain_t domain)
{
//DspState_t dsp;
switch ( domain )
{
case DVD_DOM_TT:
break;
case DVD_DOM_VTSM:
case DVD_DOM_VMGM:
case DVD_DOM_FP:
if( GetDisplayMainState() != DISPLAY_INFO )// Qian liping 060427
OSD_SetMainDisplay(DISPLAY_OFF, SYS_WAIT); /* (yanglu, 051203) */
/* (Fix the bug) Panasonic DVD test disc -> menu -> select 12. Auto Demonstration
-> Open Info OSD -> Press next skip -> Info OSD disappears.
In this case domain is changed TT -> VMGM -> TT */
#if 0
/* Turn off all the OSD except Setup and Program OSD */
dsp = GetDisplayMainState();
if ( ( dsp != DISPLAY_PROGRAM)
&& ( dsp != DISPLAY_SETUP) )
{
/* <<< @: 5008CHN-XXX.QQ 050830: prevent title menu string clearing quickly */
//if( ! gDvd_perm_flag.is_first_play) //wanglin 20050708
//OsdImageAndIconOff();
OSD_SetMainDisplay(DISPLAY_OFF, SYS_WAIT);
DvdIconRedrawCheck();
/* >>> @: 5008CHN-XXX.QQ 050830 */
}
#endif
break;
case DVD_DOM_STOP:
break;
default:
ASSERT(0);
break;
}
}
/******************************************************************************
* Function name : DvdShowRestartNormalPlayFromTrickPlay
* Arguments :
* IN
* OUT
*
* INOUT
* Return :
* By : Inseo Han
* Description : This function is called when it reaches to the start of PGC while backward
* scan play and it starts to play back normally at the start of PGC.
*
* Revisions :
******************************************************************************/
void DvdShowRestartNormalPlayFromTrickPlay(void)
{
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -