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

📄 dvdcontrol.c

📁 基于linux的DVD播放器程序
💻 C
📖 第 1 页 / 共 5 页
字号:
/**  * @todo more return values. * @todo better description. * * @param nav Specifies the connection to the DVD navigator. * * @return If successful DVD_E_Ok is returned. Otherwise an error code * is returned. * * @retval DVD_E_Ok Success. * @retval DVD_E_FailedToSend Failed to send the request. */DVDResult_t DVDTimeSearch(DVDNav_t *nav, DVDTimecode_t time){  MsgEvent_t ev;  ev.type = MsgEventQDVDCtrl;  DVD_SETSERIAL(nav, ev.dvdctrl.cmd);  ev.dvdctrl.cmd.type = DVDCtrlTimeSearch;  ev.dvdctrl.cmd.timesearch.time = time;  if(MsgSendEvent(nav->msgq, nav->client, &ev, 0) == -1) {    return DVD_E_FailedToSend;  }    return DVD_E_Ok;}/**  * @todo more return values. * @todo better description. * * @param nav Specifies the connection to the DVD navigator. * * @return If successful DVD_E_Ok is returned. Otherwise an error code * is returned. * * @retval DVD_E_Ok Success. * @retval DVD_E_FailedToSend Failed to send the request. */DVDResult_t DVDTimePlay(DVDNav_t *nav, DVDTitle_t Title, DVDTimecode_t time){  MsgEvent_t ev;  ev.type = MsgEventQDVDCtrl;  DVD_SETSERIAL(nav, ev.dvdctrl.cmd);  ev.dvdctrl.cmd.type = DVDCtrlTimePlay;  ev.dvdctrl.cmd.timeplay.title = Title;  ev.dvdctrl.cmd.timeplay.time = time;    if(MsgSendEvent(nav->msgq, nav->client, &ev, 0) == -1) {    return DVD_E_FailedToSend;  }    return DVD_E_Ok;}/**  * Skip seconds forwards or backwards. * The dvd navigator might not be able to jump to the exact number * of seconds, but will do the best it can. * * @param nav Specifies the connection to the DVD navigator. * * @return If successful DVD_E_Ok is returned. Otherwise an error code * is returned. * * @retval DVD_E_Ok Success. * @retval DVD_E_FailedToSend Failed to send the request. */DVDResult_t DVDTimeSkip(DVDNav_t *nav, int32_t seconds){  MsgEvent_t ev;  ev.type = MsgEventQDVDCtrl;  DVD_SETSERIAL(nav, ev.dvdctrl.cmd);  ev.dvdctrl.cmd.type = DVDCtrlTimeSkip;  ev.dvdctrl.cmd.timeskip.seconds = seconds;  if(MsgSendEvent(nav->msgq, nav->client, &ev, 0) == -1) {    return DVD_E_FailedToSend;  }    return DVD_E_Ok;}/**  * Pause playback. * @todo more return values. * * @param nav Specifies the connection to the DVD navigator. * * @return If successful DVD_E_Ok is returned. Otherwise an error code * is returned. * * @retval DVD_E_Ok Success. * @retval DVD_E_FailedToSend Failed to send the request. */DVDResult_t DVDPauseOn(DVDNav_t *nav){  MsgEvent_t ev;  ev.type = MsgEventQDVDCtrl;  DVD_SETSERIAL(nav, ev.dvdctrl.cmd);  ev.dvdctrl.cmd.type = DVDCtrlPauseOn;  if(MsgSendEvent(nav->msgq, nav->client, &ev, 0) == -1) {    return DVD_E_FailedToSend;  }    return DVD_E_Ok;}/**  * Resume playback if in pause mode. * @todo more return values. * * @param nav Specifies the connection to the DVD navigator. * * @return If successful DVD_E_Ok is returned. Otherwise an error code * is returned. * * @retval DVD_E_Ok Success. * @retval DVD_E_FailedToSend Failed to send the request. */DVDResult_t DVDPauseOff(DVDNav_t *nav){  MsgEvent_t ev;  ev.type = MsgEventQDVDCtrl;  DVD_SETSERIAL(nav, ev.dvdctrl.cmd);  ev.dvdctrl.cmd.type = DVDCtrlPauseOff;  if(MsgSendEvent(nav->msgq, nav->client, &ev, 0) == -1) {    return DVD_E_FailedToSend;  }    return DVD_E_Ok;}/**  * @todo Implement function. * * @param nav Specifies the connection to the DVD navigator. * * @return If successful DVD_E_Ok is returned. Otherwise an error code * is returned. * * @retval DVD_E_Ok Success. * @retval DVD_E_FailedToSend Failed to send the request. */DVDResult_t DVDStop(DVDNav_t *nav){  MsgEvent_t ev;  ev.type = MsgEventQDVDCtrl;  DVD_SETSERIAL(nav, ev.dvdctrl.cmd);  ev.dvdctrl.cmd.type = DVDCtrlStop;  if(MsgSendEvent(nav->msgq, nav->client, &ev, 0) == -1) {    return DVD_E_FailedToSend;  }    return DVD_E_Ok;}/** * Select the default menu language * @todo more return values. * * @param nav Specifies the connection to the DVD navigator. * @param Lang Specifies the language. * * @return If successful DVD_E_Ok is returned. Otherwise an error code * is returned. * * @retval DVD_E_Ok Success. * @retval DVD_E_FailedToSend Failed to send the request. */DVDResult_t DVDDefaultMenuLanguageSelect(DVDNav_t *nav, DVDLangID_t Lang){  MsgEvent_t ev;  ev.type = MsgEventQDVDCtrl;  DVD_SETSERIAL(nav, ev.dvdctrl.cmd);  ev.dvdctrl.cmd.type = DVDCtrlDefaultMenuLanguageSelect;  ev.dvdctrl.cmd.defaultmenulanguageselect.langid = Lang;  if(MsgSendEvent(nav->msgq, nav->client, &ev, 0) == -1) {    return DVD_E_FailedToSend;  }    return DVD_E_Ok;}/**  * Change the audio stream * @todo more return values. * * @param nav Specifies the connection to the DVD navigator. * @param StreamNr Specifies which audio stream to decode * * @return If successful DVD_E_Ok is returned. Otherwise an error code * is returned. * * @retval DVD_E_Ok Success. * @retval DVD_E_FailedToSend Failed to send the request. */DVDResult_t DVDAudioStreamChange(DVDNav_t *nav, DVDAudioStream_t StreamNr){  MsgEvent_t ev;  ev.type = MsgEventQDVDCtrl;  DVD_SETSERIAL(nav, ev.dvdctrl.cmd);  ev.dvdctrl.cmd.type = DVDCtrlAudioStreamChange;  ev.dvdctrl.cmd.audiostreamchange.streamnr = StreamNr;  if(MsgSendEvent(nav->msgq, nav->client, &ev, 0) == -1) {    return DVD_E_FailedToSend;  }    return DVD_E_Ok;}/**  * Selects the default audio language. * @todo more return values * * @param nav Specifies the connection to the DVD navigator. * @param Lang Specifies the lanugage id. * * @return If successful DVD_E_Ok is returned. Otherwise an error code * is returned. * * @retval DVD_E_Ok Success. * @retval DVD_E_Unspecified. */DVDResult_t DVDDefaultAudioLanguageSelect(DVDNav_t *nav, DVDLangID_t Lang){  MsgEvent_t ev;  ev.type = MsgEventQDVDCtrl;  DVD_SETSERIAL(nav, ev.dvdctrl.cmd);  ev.dvdctrl.cmd.type = DVDCtrlDefaultAudioLanguageSelect;  ev.dvdctrl.cmd.defaultaudiolanguageselect.langid = Lang;  if(MsgSendEvent(nav->msgq, nav->client, &ev, 0) == -1) {    return DVD_E_FailedToSend;  }    return DVD_E_Ok;}/**  * @todo Implement function. * * @param nav Specifies the connection to the DVD navigator. * * @return If successful DVD_E_Ok is returned. Otherwise an error code * is returned. * * @retval DVD_E_Ok Success. * @retval DVD_E_NotImplemented The function is not implemented. */DVDResult_t DVDKaraokeAudioPresentationMode(DVDNav_t *nav, DVDKaraokeDownmixMask_t DownmixMode){  return DVD_E_NotImplemented;}/** * @todo Implement function * * @param nav Specifies the connection to the DVD navigator. * * @return If successful DVD_E_Ok is returned. Otherwise an error code * is returned. * * @retval DVD_E_Ok Success. * @retval DVD_E_FailedToSend Failed to send the request. */DVDResult_t DVDAngleChange(DVDNav_t *nav, DVDAngle_t AngleNr){  MsgEvent_t ev;  ev.type = MsgEventQDVDCtrl;  DVD_SETSERIAL(nav, ev.dvdctrl.cmd);  ev.dvdctrl.cmd.type = DVDCtrlAngleChange;  ev.dvdctrl.cmd.anglechange.anglenr = AngleNr;    if(MsgSendEvent(nav->msgq, nav->client, &ev, 0) == -1) {    return DVD_E_FailedToSend;  }    return DVD_E_Ok;}/** * @todo Implement function * * @param nav Specifies the connection to the DVD navigator. * * @return If successful DVD_E_Ok is returned. Otherwise an error code * is returned. * * @retval DVD_E_Ok Success. * @retval DVD_E_NotImplemented The function is not implemented. */DVDResult_t DVDStillOff(DVDNav_t *nav){  return DVD_E_NotImplemented;}/** * @todo Implement function * * @param nav Specifies the connection to the DVD navigator. * * @return If successful DVD_E_Ok is returned. Otherwise an error code * is returned. * * @retval DVD_E_Ok Success. * @retval DVD_E_NotImplemented The function is not implemented. */DVDResult_t DVDVideoPresentationModeChange(DVDNav_t *nav,					   DVDDisplayMode_t mode){  return DVD_E_NotImplemented;}/** * Selects the default subpicture language. * @todo more return values * * @param nav Specifies the connection to the DVD navigator. * @param Lang Specifies the language id. * * @return If successful DVD_E_Ok is returned. Otherwise an error code * is returned. * * @retval DVD_E_Ok Success. * @retval DVD_E_Unspecified. */DVDResult_t DVDDefaultSubpictureLanguageSelect(DVDNav_t *nav, DVDLangID_t Lang){  MsgEvent_t ev;  ev.type = MsgEventQDVDCtrl;  DVD_SETSERIAL(nav, ev.dvdctrl.cmd);  ev.dvdctrl.cmd.type = DVDCtrlDefaultSubpictureLanguageSelect;  ev.dvdctrl.cmd.defaultsubpicturelanguageselect.langid = Lang;  if(MsgSendEvent(nav->msgq, nav->client, &ev, 0) == -1) {    return DVD_E_FailedToSend;  }    return DVD_E_Ok;}/** * Change the subpicture stream. * @todo more return values. * * @param nav Specifies the connection to the DVD navigator. * @param SubpictureNr Specifies which subpicture stream to change to. * * @return If successful DVD_E_Ok is returned. Otherwise an error code * is returned. * * @retval DVD_E_Ok Success. * @retval DVD_E_FailedToSend Failed to send the request. */DVDResult_t DVDSubpictureStreamChange(DVDNav_t *nav,				      DVDSubpictureStream_t SubpictureNr){  MsgEvent_t ev;  ev.type = MsgEventQDVDCtrl;  DVD_SETSERIAL(nav, ev.dvdctrl.cmd);  ev.dvdctrl.cmd.type = DVDCtrlSubpictureStreamChange;  ev.dvdctrl.cmd.subpicturestreamchange.streamnr = SubpictureNr;  if(MsgSendEvent(nav->msgq, nav->client, &ev, 0) == -1) {    return DVD_E_FailedToSend;  }    return DVD_E_Ok;}/** * Set the display of subpictures on or off. * @todo more return values. * * @param nav Specifies the connection to the DVD navigator. * @param Display Specifies wheter to disaply or hide subpictures. * * @return If successful DVD_E_Ok is returned. Otherwise an error code * is returned. * * @retval DVD_E_Ok Success. * @retval DVD_E_FailedToSend Failed to send the request. */DVDResult_t DVDSetSubpictureState(DVDNav_t *nav, DVDBool_t Display){  MsgEvent_t ev;  ev.type = MsgEventQDVDCtrl;  DVD_SETSERIAL(nav, ev.dvdctrl.cmd);  ev.dvdctrl.cmd.type = DVDCtrlSetSubpictureState;  ev.dvdctrl.cmd.subpicturestate.display = Display;  if(MsgSendEvent(nav->msgq, nav->client, &ev, 0) == -1) {    return DVD_E_FailedToSend;  }    return DVD_E_Ok;}/** * Select the country for parental check. * @todo more return values * * @param nav Specifies the connection to the DVD navigator. * @param country Specifies the country id. * * @return If successful DVD_E_Ok is returned. Otherwise an error code * is returned. * * @retval DVD_E_Ok Success. * @retval DVD_E_FailedToSend Failed to send the request. */DVDResult_t DVDParentalCountrySelect(DVDNav_t *nav, DVDCountryID_t country){  MsgEvent_t ev;  ev.type = MsgEventQDVDCtrl;  DVD_SETSERIAL(nav, ev.dvdctrl.cmd);  ev.dvdctrl.cmd.type = DVDCtrlParentalCountrySelect;  ev.dvdctrl.cmd.parentalcountryselect.countryid = country;    if(MsgSendEvent(nav->msgq, nav->client, &ev, 0) == -1) {    return DVD_E_FailedToSend;  }    return DVD_E_Ok;}/** * Selects the parental level. * @todo more return values * * @param nav Specifies the connection to the DVD navigator. * @param level Specifies the parental level. * * @return If successful DVD_E_Ok is returned. Otherwise an error code * is returned. * * @retval DVD_E_Ok Success. * @retval DVD_E_FailedToSend Failed to send the request. */DVDResult_t DVDParentalLevelSelect(DVDNav_t *nav, DVDParentalLevel_t level){  MsgEvent_t ev;  ev.type = MsgEventQDVDCtrl;  DVD_SETSERIAL(nav, ev.dvdctrl.cmd);  ev.dvdctrl.cmd.type = DVDCtrlParentalLevelSelect;  ev.dvdctrl.cmd.parentallevelselect.level = level;    if(MsgSendEvent(nav->msgq, nav->client, &ev, 0) == -1) {    return DVD_E_FailedToSend;  }    return DVD_E_Ok;}/** * Selects the region of the player. * @todo more return values * * @param nav Specifies the connection to the DVD navigator. * @param level Specifies the region. * * @return If successful DVD_E_Ok is returned. Otherwise an error code * is returned. * * @retval DVD_E_Ok Success. * @retval DVD_E_FailedToSend Failed to send the request. */DVDResult_t DVDPlayerRegionSelect(DVDNav_t *nav, DVDPlayerRegion_t region){  MsgEvent_t ev;  ev.type = MsgEventQDVDCtrl;  DVD_SETS

⌨️ 快捷键说明

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