📄 hw_init.c
字号:
/*****************************************************************************
******************************************************************************
** **
** Copyright (c) 2002 Videon Central, Inc. **
** All rights reserved. **
** **
** The computer program contained herein contains proprietary information **
** which is the property of Videon Central, Inc. The program may be used **
** and/or copied only with the written permission of Videon Central, Inc. **
** or in accordance with the terms and conditions stipulated in the **
** agreement/contract under which the programs have been supplied. **
** **
******************************************************************************
*****************************************************************************/
/**
* @file hw_init.c
*
* $Id: hw_init.c,v 1.94 2006/11/09 18:19:52 rbehe Exp $
*/
#include "vdvd_types.h"
#include "osapi.h"
#include "pe_app.h"
#include "nav_task.h"
#include "pgc_play.h"
#include "dvd_prm.h"
#include "dvd_pgci.h"
#include "init.h"
#include "usrapi.h"
#include "spu_con.h"
#include "mpeg_ids.h"
#include "dbgprint.h"
#if ((KARAOKE_TYPE != KARAOKE_1) && (KARAOKE_TYPE != NO_KARAOKE))
#include "karaoke.h"
#endif
#ifdef DMALLOC
#include "dmalloc.h"
#endif
#define DEBUG_HW_INIT DBG_ERROR
#define DBG_ON(x) (DEBUG_HW_INIT >= x)
UBYTE program_transfer = 0;
UBYTE temp_video_mode[2] = {0};
extern PE_HANDLE tPE;
extern ULONG highlight_expire;
extern ULONG cell_still_expire;
extern ULONG button_sl_expire;
extern ULONG pgc_still_expire;
extern USHORT vobu_button_hl;
extern UBYTE DISK_TYPE;
extern UBYTE video_mode[2];
extern UBYTE audio_mode[2];
extern INT LX, LY, P_V_SIZE, P_H_SIZE;
extern UBYTE WAIT_NEXT_CMD;
extern UBYTE modify_video_mode;
extern PE_ICONFIGURE_ZOOM_PARAMETERS peZoomRestoreInfo;
extern UBYTE zoom_on;
extern UBYTE TV_Type_Changed;
extern USHORT num_of_times;
/************************************************************************/
/************************************************************************/
/** **/
/************************************************************************/
/************************************************************************/
UBYTE get_program_transfer( void )
{
// DbgPrint(("get_program_transfer() stub\n"));
return (program_transfer);
}
/************************************************************************/
/************************************************************************/
/** **/
/************************************************************************/
/************************************************************************/
void set_program_transfer(UBYTE value)
{
program_transfer = value;
}
/************************************************************************/
/************************************************************************/
/** **/
/************************************************************************/
/************************************************************************/
void pause_scr(void)
{
// DbgPrint(("pause_scr STUBBED\n"));
}
/************************************************************************/
/************************************************************************/
/** **/
/************************************************************************/
/************************************************************************/
void start_scr(void)
{
// DbgPrint(("start_scr STUBBED\n"));
}
BOOLEAN isVideoMuted(void)
{
PE_ICONFIGURE_VIDEO_MUTE mute;
mute = VIDEO_MUTE_OFF;
PEiConfigureGetVideoMute(tPE, &mute);
return ( (mute == VIDEO_MUTE_OFF) ? FALSE : TRUE );
}
/************************************************************************/
/************************************************************************/
/** **/
/** procedure change_video_mode() **/
/** **/
/************************************************************************/
/************************************************************************/
void change_video_mode( void )
{
UBYTE sysparam_value[2];
UBYTE movie16_9; /* 16:9 movie */
UBYTE ps_mode; /* pan & scan mode */
UBYTE lbx_mode; /* letterbox mode */
UBYTE lbx_ps_mode; /* both pan & scan and letterbox */
UBYTE tv_mode_lbx; /* TV 4:3 letterbox */
UBYTE tv_mode_ps; /* TV 4:3 pan & scan */
video_mode[0] = temp_video_mode[0];
video_mode[1] = temp_video_mode[1];
sysparam_value[0] = (get_sprm(SPRM_P_CFG_VID) & 0xff00) >> 8;
if (zoom_on)
{
zoom_on = FALSE;
LX = P_H_SIZE / 4;
LY = P_V_SIZE / 4;
PEiConfigureZoom(tPE, &peZoomRestoreInfo);
}
/* Set display mode based on vertical size */
if ((video_mode[1] & PICTURE_RESOLUTION) != RESOLUTION_3)
{
ULONG message[4];
movie16_9 = ((video_mode[0] & ASPECT_RATIO_MASK) == RATIO_16_9) ? 1 : 0;
ps_mode = ((video_mode[0] & DISPLAY_MODE) == PAN_SCAN_ONLY) ? 1 : 0;
lbx_mode = ((video_mode[0] & DISPLAY_MODE) == LETTERBOX_ONLY) ? 1 : 0;
lbx_ps_mode = ((video_mode[0] & DISPLAY_MODE) == PAN_SCAN_AND_LETTERBOX) ? 1 : 0;
tv_mode_lbx = ((sysparam_value[0] & 0x0f) == 0x02) ? 1 : 0;
tv_mode_ps = ((sysparam_value[0] & 0x0f) == 0x01) ? 1 : 0;
DBGPRINT(DBG_ON(DBG_TRACE), ("%s: movie16_9 = %d.\n", __FUNCTION__, movie16_9));
DBGPRINT(DBG_ON(DBG_TRACE), ("%s: ps_mode = %d.\n", __FUNCTION__, ps_mode));
DBGPRINT(DBG_ON(DBG_TRACE), ("%s: lbx_mode = %d.\n", __FUNCTION__, lbx_mode));
DBGPRINT(DBG_ON(DBG_TRACE), ("%s: lbx_ps_mode = %d.\n", __FUNCTION__, lbx_ps_mode));
DBGPRINT(DBG_ON(DBG_TRACE), ("%s: tv_mode_lbx = %d.\n", __FUNCTION__, tv_mode_lbx));
DBGPRINT(DBG_ON(DBG_TRACE), ("%s: tv_mode_ps = %d.\n", __FUNCTION__, tv_mode_ps));
DBGPRINT(DBG_ON(DBG_TRACE), ("%s: src pic lbx = %d.\n",
__FUNCTION__, (((video_mode[0] & PICTURE_LETTERBOX) == PICTURE_LETTERBOX) ? 1 : 0) ));
/* 720x480 and 704x480 */
if ( (movie16_9 && lbx_mode && (tv_mode_lbx || tv_mode_ps)) || (movie16_9 && lbx_ps_mode && tv_mode_lbx))
{
DBGPRINT(DBG_ON(DBG_TRACE), ("change_video_mode() -- ASPECT_RATIO_4X3_LETTERBOX\n"));
message[1] = VDVD_ASPECT_RATIO_4X3_LETTERBOX;
/* Setup letterbox display mode */
if (PEiConfigureSetAspectRatio(tPE, ASPECT_RATIO_4X3_LETTERBOX) != PE_SUCCESS)
{
DbgPrint(("PEiConfigureSetAspectRatio() -- FAILED\n"));
}
}
else
{
if ( (movie16_9 && ps_mode && (tv_mode_ps || tv_mode_lbx)) || (movie16_9 && lbx_ps_mode && tv_mode_ps) )
{
DBGPRINT(DBG_ON(DBG_TRACE), ("change_video_mode() -- ASPECT_RATIO_4X3_PANSCAN\n"));
message[1] = VDVD_ASPECT_RATIO_4X3_PANSCAN;
/* Setup panscan display mode */
if (PEiConfigureSetAspectRatio(tPE, ASPECT_RATIO_4X3_PANSCAN) != PE_SUCCESS)
{
DbgPrint(("PEiConfigureSetAspectRatio() -- FAILED\n"));
}
}
else
{
DBGPRINT(DBG_ON(DBG_TRACE), ("change_video_mode() -- ASPECT_RATIO_16X9\n"));
message[1] = VDVD_ASPECT_RATIO_16X9;
/* Setup panscan display mode */
if (PEiConfigureSetAspectRatio(tPE, ASPECT_RATIO_16X9) != PE_SUCCESS)
{
DbgPrint(("PEiConfigureSetAspectRatio() -- FAILED\n"));
}
}
}
/* send event to PSL */
message[0] = VDVD_STATUS_DISPLAY_ASPECT_RATIO_UPDATE;
UsrEventHandler(message);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -