📄 psl_process_status.cpp
字号:
return (PSL_NULL_POINTER);
}
/* check that icon data is valid */
if (pPSL->pIconData == NULL)
{
DBGPRINT(DBG_ON(DBG_ERROR), ("PslProcessStatusFastRwd: NULL handle!\n"));
return (PSL_FAILURE);
}
/* Get the fast reverse icon */
pPSL->pIconData->pActiveIcon = PslBitmapGetFRIcon();
if (pPSL->pIconData->pActiveIcon == NULL)
{
DBGPRINT(DBG_ON(DBG_ERROR), ("PslProcessStatusFastRwd: failed to get icon!\n"));
return (PSL_FAILURE);
}
/* If time display is not active, icon should timeout */
if (PslScreenLayoutIsStatusDisplayActive(pPSL) == FALSE)
{
ulTimeout = 3000;
}
/* Set the Icon timer */
if (OS_TimerSetMsec(pPSL->pIconData->Timer, ulTimeout) != OS_OK)
{
DbgPrint(("PslProcessStatusFastRwd: Timer set FAILED\n"));
return (PSL_FAILURE);
}
/* Draw the icon */
if (PslScreenLayoutDrawIcon(pPSL, pPSL->pIconData->pActiveIcon) != PSL_SUCCESS)
{
DBGPRINT(DBG_ON(DBG_ERROR), ("PslProcessStatusFastRwd: failed to draw icon!\n"));
return (PSL_FAILURE);
}
return (PSL_SUCCESS);
}
/**
* PslProcessStatusChapterSkip -- Process the chapter skip status event
*
* @param
* pPSL - handle to internal PSL data
* ulData1 - data parameter associated with status event
* ulData2 - data parameter associated with status event
* pvBuffer - buffer containing data associated with status event
* ulBufferSize - size of buffer pointed to by pvBuffer
*
* @retval
* PSL_SUCCESS if successful
* PSL_FAILURE if not successful
*/
PSL_STATUS PslProcessStatusChapterSkip(PSL_HANDLE *pPSL, ULONG ulData1, ULONG ulData2, PVOID pvBuffer, ULONG ulBufferSize)
{
char cTmp[5];
ULONG ulTimeout = 3000;
DBGPRINT(DBG_ON(DBG_TRACE), ("PslProcessStatusChapterSkip: ENTER\n"));
if (pPSL == NULL)
{
DBGPRINT(DBG_ON(DBG_ERROR), ("PslProcessStatusChapterSkip: NULL handle!\n"));
return (PSL_NULL_POINTER);
}
/*
* If time display is not active, display the chapter number.
*/
if ( (PslScreenLayoutIsStatusDisplayActive(pPSL) == FALSE) &&
(PslScreenLayoutIsCDDAActive(pPSL) == FALSE) )
{
/* Set chapter number string */
cTmp[0] = (char)((ulData1 / 10) + '0');
cTmp[1] = (char)((ulData1 % 10) + '0');
cTmp[2] = '\0';
/* set chapter number setting text */
if (PslScreenLayoutSetButtonText(&pPSL->pStatusMenu->pButton[5][1], cTmp) != PSL_SUCCESS)
{
DBGPRINT(DBG_ON(DBG_ERROR), ("PslProcessStatusChapterSkip: failure setting button text!\n"));
return (PSL_FAILURE);
}
/* set the status menu mode to chapter skip */
pPSL->pStatusMenu->tCurrentMode = PSL_STATUS_MODE_CHAPTER_SKIP;
/* Set the status menu timer */
if (OS_TimerSetMsec(pPSL->pStatusMenu->Timer, ulTimeout) != OS_OK)
{
DbgPrint(("PslProcessStatusChapterSkip: Timer set FAILED\n"));
return (PSL_FAILURE);
}
/* draw the status menu */
if (PslScreenLayoutDrawStatusMenu(pPSL) != PSL_SUCCESS)
{
DBGPRINT(DBG_ON(DBG_ERROR), ("PslProcessStatusChapterSkip: failure drawing status menu!\n"));
return (PSL_FAILURE);
}
}
return (PSL_SUCCESS);
}
/**
* PslProcessStatusStepFwd -- Process the step fwd status event
*
* @param
* pPSL - handle to internal PSL data
* ulData1 - data parameter associated with status event
* ulData2 - data parameter associated with status event
* pvBuffer - buffer containing data associated with status event
* ulBufferSize - size of buffer pointed to by pvBuffer
*
* @retval
* PSL_SUCCESS if successful
* PSL_FAILURE if not successful
*/
PSL_STATUS PslProcessStatusStepFwd(PSL_HANDLE *pPSL, ULONG ulData1, ULONG ulData2, PVOID pvBuffer, ULONG ulBufferSize)
{
DBGPRINT(DBG_ON(DBG_TRACE), ("PslProcessStatusStepFwd: no functionality\n"));
return (PSL_SUCCESS);
}
/**
* PslProcessStatusStepBwd -- Process the step back status event
*
* @param
* pPSL - handle to internal PSL data
* ulData1 - data parameter associated with status event
* ulData2 - data parameter associated with status event
* pvBuffer - buffer containing data associated with status event
* ulBufferSize - size of buffer pointed to by pvBuffer
*
* @retval
* PSL_SUCCESS if successful
* PSL_FAILURE if not successful
*/
PSL_STATUS PslProcessStatusStepBwd(PSL_HANDLE *pPSL, ULONG ulData1, ULONG ulData2, PVOID pvBuffer, ULONG ulBufferSize)
{
DBGPRINT(DBG_ON(DBG_ERROR), ("PslProcessStatusStepBwd: stubbed\n"));
return (PSL_FAILURE);
}
/**
* PslProcessStatusRepeat -- Process the repeat status event
*
* @param
* pPSL - handle to internal PSL data
* ulData1 - data parameter associated with status event
* ulData2 - data parameter associated with status event
* pvBuffer - buffer containing data associated with status event
* ulBufferSize - size of buffer pointed to by pvBuffer
*
* @retval
* PSL_SUCCESS if successful
* PSL_FAILURE if not successful
*/
PSL_STATUS PslProcessStatusRepeat(PSL_HANDLE *pPSL, ULONG ulData1, ULONG ulData2, PVOID pvBuffer, ULONG ulBufferSize)
{
ULONG ulTimeout = 3000;
char cTmp[25];
DBGPRINT(DBG_ON(DBG_TRACE), ("PslProcessStatusRepeat: ENTER\n"));
if (pPSL == NULL)
{
DBGPRINT(DBG_ON(DBG_ERROR), ("PslProcessStatusRepeat: NULL handle!\n"));
return (PSL_NULL_POINTER);
}
/* check that status menu data is valid */
if (pPSL->pStatusMenu == NULL)
{
DBGPRINT(DBG_ON(DBG_ERROR), ("PslProcessStatusRepeat: status menu not created!\n"));
return (PSL_FAILURE);
}
/* Set the repeat mode string */
switch (ulData1)
{
case VDVD_INFO_REPEAT_OFF:
strcpy(cTmp, "Off");
break;
case VDVD_INFO_REPEAT_ALL:
strcpy(cTmp, "All");
break;
case VDVD_INFO_REPEAT_TITLE:
strcpy(cTmp, "Title");
break;
case VDVD_INFO_REPEAT_CHAPTER:
strcpy(cTmp, "Chapter");
break;
case VDVD_INFO_REPEAT_A:
strcpy(cTmp, "A -");
ulTimeout = 0;
break;
case VDVD_INFO_REPEAT_AB:
strcpy(cTmp, "A - B");
break;
default:
strcpy(cTmp, "");
break;
}
/* set repeat mode setting text */
if (PslScreenLayoutSetButtonText(&pPSL->pStatusMenu->pButton[1][1], cTmp) != PSL_SUCCESS)
{
DBGPRINT(DBG_ON(DBG_ERROR), ("PslProcessStatusRepeat: failure setting button text!\n"));
return (PSL_FAILURE);
}
/* set the status menu mode to angle */
pPSL->pStatusMenu->tCurrentMode = PSL_STATUS_MODE_REPEAT;
/* Set the status menu timer */
if (OS_TimerSetMsec(pPSL->pStatusMenu->Timer, ulTimeout) != OS_OK)
{
DbgPrint(("PslProcessStatusRepeat: Timer set FAILED\n"));
return (PSL_FAILURE);
}
/* draw the status menu */
if (PslScreenLayoutDrawStatusMenu(pPSL) != PSL_SUCCESS)
{
DBGPRINT(DBG_ON(DBG_ERROR), ("PslProcessStatusRepeat: failure drawing status menu!\n"));
return (PSL_FAILURE);
}
return (PSL_SUCCESS);
}
/**
* PslProcessStatusNoDisc -- Process the no disc status event
*
* @param
* pPSL - handle to internal PSL data
* ulData1 - data parameter associated with status event
* ulData2 - data parameter associated with status event
* pvBuffer - buffer containing data associated with status event
* ulBufferSize - size of buffer pointed to by pvBuffer
*
* @retval
* PSL_SUCCESS if successful
* PSL_FAILURE if not successful
*/
PSL_STATUS PslProcessStatusNoDisc(PSL_HANDLE *pPSL, ULONG ulData1, ULONG ulData2, PVOID pvBuffer, ULONG ulBufferSize)
{
ULONG ulTimeout = 0;
DBGPRINT(DBG_ON(DBG_TRACE), ("PslProcessStatusNoDisc: ENTER\n"));
if (pPSL == NULL)
{
DBGPRINT(DBG_ON(DBG_ERROR), ("PslProcessStatusNoDisc: NULL pointer!\n"));
return (PSL_NULL_POINTER);
}
/* Set the osd timer */
if (OS_TimerSetMsec(pPSL->Timer, ulTimeout) != OS_OK)
{
DbgPrint(("PslProcessStatusNoDisc: Timer set FAILED\n"));
return (PSL_FAILURE);
}
/* Draw message on generic osd */
if (PslScreenLayoutDrawGeneric(pPSL, PSL_STATUS_NO_DISC, ulData1) != PSL_SUCCESS)
{
DBGPRINT(DBG_ON(DBG_ERROR), ("PslProcessStatusNoDisc: failed to draw message!\n"));
return (PSL_FAILURE);
}
return (PSL_SUCCESS);
}
/**
* PslProcessStatusDiscType -- Process the disc type status event
*
* @param
* pPSL - handle to internal PSL data
* ulData1 - data parameter associated with status event
* ulData2 - data parameter associated with status event
* pvBuffer - buffer containing data associated with status event
* ulBufferSize - size of buffer pointed to by pvBuffer
*
* @retval
* PSL_SUCCESS if successful
* PSL_FAILURE if not successful
*/
PSL_STATUS PslProcessStatusDiscType(PSL_HANDLE *pPSL, ULONG ulData1, ULONG ulData2, PVOID pvBuffer, ULONG ulBufferSize)
{
ULONG ulTimeout = 0;
DBGPRINT(DBG_ON(DBG_TRACE), ("PslProcessStatusDiscType: ENTER\n"));
if (pPSL == NULL)
{
DBGPRINT(DBG_ON(DBG_ERROR), ("PslProcessStatusDiscType: NULL pointer!\n"));
return (PSL_NULL_POINTER);
}
#ifdef CDDA_ENABLE
if (ulData1 == VDVD_INFO_DISCTYPE_CDDA)
{
if (PslScreenLayoutDrawCDDAInterface(pPSL) != PSL_SUCCESS)
{
DbgPrint(("PslProcessStatusDiscType: failed to draw cdda gui!\n"));
return (PSL_FAILURE);
}
}
else
#endif
{
/* Set the osd timer */
if (OS_TimerSetMsec(pPSL->Timer, ulTimeout) != OS_OK)
{
DbgPrint(("PslProcessStatusDiscType: Timer set FAILED\n"));
return (PSL_FAILURE);
}
/* Draw message on generic osd */
if (PslScreenLayoutDrawGeneric(pPSL, PSL_STATUS_DISC_TYPE, ulData1) != PSL_SUCCESS)
{
DBGPRINT(DBG_ON(DBG_ERROR), ("PslProcessStatusDiscType: failed to draw message!\n"));
return (PSL_FAILURE);
}
}
return (PSL_SUCCESS);
}
/**
* PslProcessStatusLoading -- Process the loading status event
*
* @param
* pPSL - handle to internal PSL data
* ulData1 - data parameter associated with status event
* ulData2 - data parameter associated with status event
* pvBuffer - buffer containing data associated with status event
* ulBufferSize - size of buffer pointed to by pvBuffer
*
* @retval
* PSL_SUCCESS if successful
* PSL_FAILURE if not successful
*/
PSL_STATUS PslProcessStatusLoading(PSL_HANDLE *pPSL, ULONG ulData1, ULONG ulData2, PVOID pvBuffer, ULONG ulBufferSize)
{
ULONG ulTimeout = 0;
DBGPRINT(DBG_ON(DBG_TRACE), ("PslProcessStatusLoading: ENTER\n"));
if (pPSL == NULL)
{
DBGPRINT(DBG_ON(DBG_ERROR), ("PslProcessStatusLoading: NULL pointer!\n"));
return (PSL_NULL_POINTER);
}
/* Set the osd timer */
if (OS_TimerSetMsec(pPSL->Timer, ulTimeout) != OS_OK)
{
DbgPrint(("PslProcessStatusLoading: Timer set FAILED\n"));
return (PSL_FAILURE);
}
/* Draw message on generic osd */
if (PslScreenLayoutDrawGeneric(pPSL, PSL_STATUS_LOADING, ulData1) != PSL_SUCCESS)
{
DBGPRINT(DBG_ON(DBG_ERROR), ("PslProcessStatusLoading: failed to draw message!\n"));
return (PSL_FAILURE);
}
return (PSL_SUCCESS);
}
/**
* PslProcessStatusLoadComplete -- Process the load complete status event
*
* @param
* pPSL - handle to internal PSL data
* ulData1 - data parameter associated with status event
* ulData2 - data parameter associated with status event
* pvBuffer - buffer containing data associated with status event
* ulBufferSize - size of buffer pointed to by pvBuffer
*
* @retval
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -