📄 playctrl.cpp
字号:
return (PLAYCTRL_SUCCESS);
}
/**
* PlayCtrlLinkPlayItem -- Start playback of the current playlist at specified playitem.
*
* @param
* playitem_number -- playitem number
*
* @retval
* PLAYCTRL_STATUS
*/
PLAYCTRL_STATUS PlayCtrlLinkPlayItem(uint32 playitem_number)
{
if (hPBC == NULL)
{
DbgPrint(("PlayCtrlLinkPlayItem: playback control engine not created!\n"));
return (PLAYCTRL_FAILURE);
}
/*
* Process the command in the pbc engine task.
* This should be a synchronous operation.
*/
if (PbcEngineProcessCmd(hPBC, PLAYCTRL_LINKPI, playitem_number, 0, 0, TRUE) != PLAYCTRL_SUCCESS)
{
DbgPrint(("PlayCtrlLinkPlayItem: pbc engine failed to process command!\n"));
return (PLAYCTRL_FAILURE);
}
return (PLAYCTRL_SUCCESS);
}
/**
* PlayCtrlPlayPLMark -- Start playback of playlist at specified mark
*
* @param
* playlist_number -- playlist number
* mark -- playmark id
*
* @retval
* PLAYCTRL_STATUS
*/
PLAYCTRL_STATUS PlayCtrlPlayPLMark(uint32 playlist_number, uint32 playlist_mark, BOOLEAN fIsUserOP)
{
if (hPBC == NULL)
{
DbgPrint(("PlayCtrlPlayPLMark: playback control engine not created!\n"));
return (PLAYCTRL_FAILURE);
}
/*
* Process the command in the pbc engine task.
* This should be a synchronous operation.
*/
if (PbcEngineProcessCmd(hPBC, PLAYCTRL_PLAYPLMARK, playlist_number, playlist_mark, fIsUserOP, TRUE) != PLAYCTRL_SUCCESS)
{
DbgPrint(("PlayCtrlPlayPLMark: pbc engine failed to process command!\n"));
return (PLAYCTRL_FAILURE);
}
return (PLAYCTRL_SUCCESS);
}
/**
* PlayCtrlLinkMark -- Start playback of the current playlist at the specified mark.
*
* @param
* playlist_mark -- Entry Mark id
*
* @retval
* PLAYCTRL_STATUS
*/
PLAYCTRL_STATUS PlayCtrlLinkMark(uint32 playlist_mark, BOOLEAN fIsUserOP)
{
if (hPBC == NULL)
{
DbgPrint(("PlayCtrlLinkMark: playback control engine not created!\n"));
return (PLAYCTRL_FAILURE);
}
/*
* Process the command in the pbc engine task.
* This should be a synchronous operation.
*/
if (PbcEngineProcessCmd(hPBC, PLAYCTRL_LINKMARK, playlist_mark, fIsUserOP, 0, TRUE) != PLAYCTRL_SUCCESS)
{
DbgPrint(("PlayCtrlLinkMark: pbc engine failed to process command!\n"));
return (PLAYCTRL_FAILURE);
}
return (PLAYCTRL_SUCCESS);
}
/**
* PlayCtrlPlayPLTime -- Start playback of playlist at specified time
*
* @param
* playlist_number -- playlist number
* time -- time into a title (in sec)
*
* @retval
* PLAYCTRL_STATUS
*/
PLAYCTRL_STATUS PlayCtrlPlayPLTime(uint32 playlist_number, uint32 time, BOOLEAN fIsUserOP)
{
if (hPBC == NULL)
{
DBGPRINT(DBG_ON(DBG_ERROR), ("PlayCtrlPlayPLTime: playback control engine not created!\n"));
return (PLAYCTRL_FAILURE);
}
/*
* Process the command in the pbc engine task.
* This should be a synchronous operation.
*/
if (PbcEngineProcessCmd(hPBC, PLAYCTRL_PLAYPLTIME, playlist_number, time, fIsUserOP, TRUE) != PLAYCTRL_SUCCESS)
{
DBGPRINT(DBG_ON(DBG_ERROR), ("PlayCtrlPlayPLTime: pbc engine failed to process command!\n"));
return (PLAYCTRL_FAILURE);
}
return (PLAYCTRL_SUCCESS);
}
/**
* PlayCtrlTimeSearch -- Start playback of the current playlist at specified time
*
* @param
* time -- time into a title (in sec)
* fIsUserOP -- flag that is set if time search is from a uop
*
* @retval
* PLAYCTRL_STATUS
*/
PLAYCTRL_STATUS PlayCtrlTimeSearch(uint32 time, BOOLEAN fIsUserOP)
{
if (hPBC == NULL)
{
DBGPRINT(DBG_ON(DBG_ERROR), ("PlayCtrlTimeSearch: playback control engine not created!\n"));
return (PLAYCTRL_FAILURE);
}
/*
* Process the command in the pbc engine task.
* This should be a synchronous operation.
*/
if (PbcEngineProcessCmd(hPBC, PLAYCTRL_LINKTIME, time, fIsUserOP, 0, TRUE) != PLAYCTRL_SUCCESS)
{
DBGPRINT(DBG_ON(DBG_ERROR), ("PlayCtrlTimeSearch: pbc engine failed to process command!\n"));
return (PLAYCTRL_FAILURE);
}
return (PLAYCTRL_SUCCESS);
}
/**
* PlayCtrlStop -- Terminate playback of a playlist.
*
* @param
* none
*
* @retval
* PLAYCTRL_STATUS
*/
PLAYCTRL_STATUS PlayCtrlStop(void)
{
if (hPBC == NULL)
{
DBGPRINT(DBG_ON(DBG_ERROR), ("PlayCtrlStop: playback control engine not created!\n"));
return (PLAYCTRL_FAILURE);
}
/*
* Process the command in the pbc engine task.
* This should be a synchronous operation.
*/
if (PbcEngineProcessCmd(hPBC, PLAYCTRL_STOP, 0, 0, 0, TRUE) != PLAYCTRL_SUCCESS)
{
DBGPRINT(DBG_ON(DBG_ERROR), ("PlayCtrlStop: pbc engine failed to process command!\n"));
return (PLAYCTRL_FAILURE);
}
return (PLAYCTRL_SUCCESS);
}
/**
* PlayCtrlSuspend -- Suspend playback of a playlist. State information of
* playlist should be stored in backup registers.
*
* @param
* none
*
* @retval
* PLAYCTRL_STATUS
*/
PLAYCTRL_STATUS PlayCtrlSuspend(void)
{
if (hPBC == NULL)
{
DBGPRINT(DBG_ON(DBG_ERROR), ("PlayCtrlSuspend: playback control engine not created!\n"));
return (PLAYCTRL_FAILURE);
}
/*
* Process the command in the pbc engine task.
* This should be a synchronous operation.
*/
if (PbcEngineProcessCmd(hPBC, PLAYCTRL_SUSPEND, 0, 0, 0, TRUE) != PLAYCTRL_SUCCESS)
{
DBGPRINT(DBG_ON(DBG_ERROR), ("PlayCtrlSuspend: pbc engine failed to process command!\n"));
return (PLAYCTRL_FAILURE);
}
return (PLAYCTRL_SUCCESS);
}
/**
* PlayCtrlResume -- Resume playback of a suspended playlist. State information
* of suspended playlist should be loaded from backup registers.
*
*
* @param
* none
*
* @retval
* PLAYCTRL_STATUS
*/
PLAYCTRL_STATUS PlayCtrlResume(void)
{
if (hPBC == NULL)
{
DBGPRINT(DBG_ON(DBG_ERROR), ("PlayCtrlResume: playback control engine not created!\n"));
return (PLAYCTRL_FAILURE);
}
/*
* Process the command in the pbc engine task.
* This should be a synchronous operation.
*/
if (PbcEngineProcessCmd(hPBC, PLAYCTRL_RESUME, 0, 0, 0, TRUE) != PLAYCTRL_SUCCESS)
{
DBGPRINT(DBG_ON(DBG_ERROR), ("PlayCtrlResume: pbc engine failed to process command!\n"));
return (PLAYCTRL_FAILURE);
}
return (PLAYCTRL_SUCCESS);
}
/**
* PlayCtrlSkipToNextPoint -- Start playback at next skip point in athe playlist.
*
* @param
* none
*
* @retval
* PLAYCTRL_STATUS
*/
PLAYCTRL_STATUS PlayCtrlSkipToNextPoint(uint32 *pOutChapterNumber, uint8 mark_type)
{
if (hPBC == NULL)
{
DBGPRINT(DBG_ON(DBG_ERROR), ("PlayCtrlSkipToNextPoint: playback control engine not created!\n"));
return (PLAYCTRL_FAILURE);
}
/*
* Process the command in the pbc engine task.
* This should be a synchronous operation.
*/
if (PbcEngineProcessCmd(hPBC, PLAYCTRL_SKIPTONEXTPOINT, (ULONG)pOutChapterNumber, (ULONG)mark_type, 0, TRUE) != PLAYCTRL_SUCCESS)
{
DBGPRINT(DBG_ON(DBG_ERROR), ("PlayCtrlSkipToNextPoint: pbc engine failed to process command!\n"));
return (PLAYCTRL_FAILURE);
}
return (PLAYCTRL_SUCCESS);
}
/**
* PlayCtrlSkipToPrevPoint -- Start playback at previous skip point in the playlist.
*
* @param
* none
*
* @retval
* PLAYCTRL_STATUS
*/
PLAYCTRL_STATUS PlayCtrlSkipToPrevPoint(uint32 *pOutChapterNumber, uint8 mark_type)
{
if (hPBC == NULL)
{
DBGPRINT(DBG_ON(DBG_ERROR), ("PlayCtrlSkipToPrevPoint: playback control engine not created!\n"));
return (PLAYCTRL_FAILURE);
}
/*
* Process the command in the pbc engine task.
* This should be a synchronous operation.
*/
if (PbcEngineProcessCmd(hPBC, PLAYCTRL_SKIPTOPREVPOINT, (ULONG)pOutChapterNumber, (ULONG)mark_type, 0, TRUE) != PLAYCTRL_SUCCESS)
{
DBGPRINT(DBG_ON(DBG_ERROR), ("PlayCtrlSkipToPrevPoint: pbc engine failed to process command!\n"));
return (PLAYCTRL_FAILURE);
}
return (PLAYCTRL_SUCCESS);
}
/**
* PlayCtrlRestartPoint -- Restart playback at the mark_time_stamp of the current Entry Point.
*
* @param
* none
*
* @retval
* PLAYCTRL_STATUS
*/
PLAYCTRL_STATUS PlayCtrlRestartPoint(uint32 *pOutChapterNumber, uint8 mark_type)
{
if (hPBC == NULL)
{
DBGPRINT(DBG_ON(DBG_ERROR), ("PlayCtrlRestartPoint: playback control engine not created!\n"));
return (PLAYCTRL_FAILURE);
}
/*
* Process the command in the pbc engine task.
* This should be a synchronous operation.
*/
if (PbcEngineProcessCmd(hPBC, PLAYCTRL_RESTARTPOINT, (ULONG)pOutChapterNumber, (ULONG)mark_type, 0, TRUE) != PLAYCTRL_SUCCESS)
{
DBGPRINT(DBG_ON(DBG_ERROR), ("PlayCtrlRestartPoint: pbc engine failed to process command!\n"));
return (PLAYCTRL_FAILURE);
}
return (PLAYCTRL_SUCCESS);
}
/**
* PlayCtrlSetRepeat -- Set playback repeat mode. Handles chapter repeat and repeat-a-b. Does
* not handle title repeat - title repeat is handled by hdmv module.
*
* @param
* repeat_mode - VDVD type repeat mode
*
* @retval
* PLAYCTRL_STATUS
*/
PLAYCTRL_STATUS PlayCtrlSetRepeat(uint8 repeat_mode)
{
if (hPBC == NULL)
{
DBGPRINT(DBG_ON(DBG_ERROR), ("PlayCtrlSetRepeat: playback control engine not created!\n"));
return (PLAYCTRL_FAILURE);
}
/*
* Process the command in the pbc engine task.
*/
if (PbcEngineProcessCmd(hPBC, PLAYCTRL_REPEAT, repeat_mode, 0, 0, FALSE) != PLAYCTRL_SUCCESS)
{
DBGPRINT(DBG_ON(DBG_ERROR), ("PlayCtrlSetRepeat: pbc engine failed to process command!\n"));
return (PLAYCTRL_FAILURE);
}
return (PLAYCTRL_SUCCESS);
}
/**
* PlayCtrlPauseOn -- Suspend playback and keep suspended playback displayed.
*
* @param
* none
*
* @retval
* PLAYCTRL_STATUS
*/
PLAYCTRL_STATUS PlayCtrlPauseOn(void)
{
if (hPBC == NULL)
{
DBGPRINT(DBG_ON(DBG_ERROR), ("PlayCtrlPauseOn: playback control engine not created!\n"));
return (PLAYCTRL_FAILURE);
}
/*
* Process the command in the pbc engine task.
*/
if (PbcEngineProcessCmd(hPBC, PLAYCTRL_PAUSEON, 0, 0, 0, TRUE) != PLAYCTRL_SUCCESS)
{
DBGPRINT(DBG_ON(DBG_ERROR), ("PlayCtrlPauseOn: pbc engine failed to process command!\n"));
return (PLAYCTRL_FAILURE);
}
return (PLAYCTRL_SUCCESS);
}
/**
* PlayCtrlPauseOff -- Release suspended playback.
*
* @param
* none
*
* @retval
* PLAYCTRL_STATUS
*/
PLAYCTRL_STATUS PlayCtrlPauseOff(void)
{
if (hPBC == NULL)
{
DBGPRINT(DBG_ON(DBG_ERROR), ("PlayCtrlPauseOff: playback control engine not created!\n"));
return (PLAYCTRL_FAILURE);
}
/*
* Process the command in the pbc engine task.
*/
if (PbcEngineProcessCmd(hPBC, PLAYCTRL_PAUSEOFF, 0, 0, 0, TRUE) != PLAYCTRL_SUCCESS)
{
DBGPRINT(DBG_ON(DBG_ERROR), ("PlayCtrlPauseOff: pbc engine failed to process command!\n"));
return (PLAYCTRL_FAILURE);
}
return (PLAYCTRL_SUCCESS);
}
/**
* PlayCtrlStillOn -- Freeze playback of presentation.
*
* @param
* none
*
* @retval
* PLAYCTRL_STATUS
*/
PLAYCTRL_STATUS PlayCtrlStillOn(void)
{
if (hPBC == NULL)
{
DBGPRINT(DBG_ON(DBG_ERROR), ("PlayCtrlStillOn: playback control engine not created!\n"));
return (PLAYCTRL_FAILURE);
}
/*
* Process the command in the pbc engine task.
*/
if (PbcEngineProcessCmd(hPBC, PLAYCTRL_STILLON, 0, 0, 0, TRUE) != PLAYCTRL_SUCCESS)
{
DBGPRINT(DBG_ON(DBG_ERROR), ("PlayCtrlStillOn: pbc engine failed to process command!\n"));
return (PLAYCTRL_FAILURE);
}
return (PLAYCTRL_SUCCESS);
}
/**
* PlayCtrlStillOff -- Release frozen playback.
*
* @param
* none
*
* @retval
* PLAYCTRL_STATUS
*/
PLAYCTRL_STATUS PlayCtrlStillOff(void)
{
if (hPBC == NULL)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -