Resume Method

Summary
Leaves a menu and resumes playback.
Syntax
C#
VB
C++
publicvoidResume()
PublicSubResume()
public:voidResume();
Remarks

This methoddoes notsupport command synchronization. For more information on the options available when playing DVDs in LEADTOOLS Multimedia, refer toDVD Playback.

For more detailed information, refer to the Microsoft documentation for IDvdControl2.Resume.

Example
C#
VB
usingLeadtools;usingLeadtools.Multimedia;usingLeadtoolsMultimediaExamples.Fixtures;publicbool_result =false;publicPlayCtrlForm _form =newPlayCtrlForm();publicPlayCtrl _playctrl;publicvoidIsAudioStreamEnabledExample(){// reference the play control_playctrl = _form.PlayCtrl;stringinFile = Path.Combine(LEAD_VARS.MediaDir,@"VIDEO_TS\VIDEO_TS.IFO");try{// set auto start off_playctrl。AutoStart =false;// use DVDSource_playctrl。UseDVDSource =true;// set the input file_playctrl。SourceFile = inFile;// check the DVD optionsDvdInfoCheck();// play it_playctrl。Run();}catch(Exception){_result =false;}// we'll loop on the state and pump messages for this example.// but you should not need to if running from a Windows Forms application.while(_playctrl.State == PlayState.Running)Application.DoEvents();}// check DVD properties and infoprivatevoidDvdInfoCheck(){stringbstrVal;intval;intbutton = _playctrl.DvdController.CurrentButton;val = _playctrl。DvdController.GetButtonWidth(button);val = _playctrl。DvdController.GetButtonHeight(button);val = _playctrl。DvdController.GetButtonLeft(button);val = _playctrl。DvdController.GetButtonTop(button);val = _playctrl。DvdController.DefaultMenuLanguage;_playctrl。DvdController.DefaultMenuLanguage = 1033;val = _playctrl。DvdController.GetNumberOfChapters(0);val = _playctrl。DvdController.TotalTitleTime;DVDTimecodeFlags tcFlags = _playctrl.DvdController.TitleTimecodeFlags;val = _playctrl。DvdController.CurrentAngle;if(_playctrl.DvdController.AnglesAvailable > 1)_playctrl。DvdController.CurrentAngle = 2;DVDValidUserOp userOp = _playctrl.DvdController.CurrentUOPS;longaudioLang = _playctrl.DvdController.GetAudioLanguage(0);val = _playctrl。DvdController.CurrentAudioStream;if(_playctrl.DvdController.AudioStreamsAvailable > 1)_playctrl。DvdController.CurrentAudioStream = 2;val = _playctrl。DvdController.CurrentTime;val = _playctrl。DvdController.CurrentVolume;val = _playctrl。DvdController.VolumesAvailable;val = _playctrl。DvdController.TitlesAvailable;boolenabled = _playctrl.DvdController.IsAudioStreamEnabled(0);val = _playctrl。DvdController.DefaultAudioLanguage;_playctrl。DvdController.SelectDefaultAudioLanguage(1033, DVDAudioLangExt.Captions);stringdirectory = _playctrl.DvdController.DVDDirectory;val = _playctrl。DvdController.CurrentSubpictureStream;val = _playctrl。DvdController.SubpictureStreamsAvailable;if((val > 1)){_playctrl。DvdController.CurrentSubpictureStream = 1;}val = _playctrl。DvdController.DefaultSubpictureLanguage;_playctrl。DvdController.SelectDefaultSubpictureLanguage(1033, DVDSubpictureLangExt.Caption_Normal);val = _playctrl。DvdController.CurrentTitle;DVDSubpictureLangExt subPicLangExt = _playctrl.DvdController.DefaultSubpictureLanguageExt;DVDAudioLangExt audioLangExt = _playctrl.DvdController.DefaultAudioLanguageExt;longsubpicLang = _playctrl.DvdController.GetSubpictureLanguage(0);boolsubPicStream = _playctrl.DvdController.IsSubpictureStreamEnabled(0);val = _playctrl。DvdController.GetDVDTextLanguageLCID(0);val = _playctrl。DvdController.DVDTextNumberOfLanguages;val = _playctrl。DvdController.GetGPRM(0);_playctrl。DvdController.SetGPRM(0, 1);val = _playctrl。DvdController.GetDVDTextNumberOfStrings(0);val = _playctrl。DvdController.ButtonsAvailable;val = _playctrl。DvdController.PlayerParentalLevel;val = _playctrl。DvdController.PlayerParentalCountry;stringppCountry =string.Format("{0}{1}", (char)(val & 0xFF), (char)(val >> 8));if(ppCountry !="US"){val = (int)'U';val + = ((int)'S'<< 8);_playctrl。DvdController.SelectParentalCountry(val,"user","pwd");}val = _playctrl。DvdController.GetTitleParentalLevels(-1);_playctrl。DvdController.SelectParentalLevel(9,"user","pwd");DVDDomain domain = _playctrl.DvdController.CurrentDomain;DVDDiscSide diskSide = _playctrl.DvdController.CurrentDiscSide;val = _playctrl。DvdController.CurrentChapter;DVDTextStringType textStrType = _playctrl.DvdController.GetDVDTextStringType(0, 0);if(!_playctrl.DvdController.SubpictureOn)_playctrl。DvdController.SubpictureOn =true;val = _playctrl。DvdController.GetSPRM(0);bstrVal = _playctrl.DvdController.GetDVDTextString(0, 0);bstrVal = _playctrl.DvdController.DVDUniqueID;}// menu event helpers for DVD navigation and controlprivatevoidmnAcceptParentalLevelChange_Click(){_playctrl。DvdController.AcceptParentalLevelChange(true);}privatevoidmnActivateAtPosition_Click(){_playctrl。DvdController.ActivateAtPosition(10, 10);}privatevoidmnActivateButton_Click(){_playctrl。DvdController.ActivateButton();}privatevoidmnChangeDVDRegion_Click(){_playctrl。DvdController.ChangeDVDRegion(_form);}privatevoidmnNotifyParentalLevelChange_Click(){_playctrl。DvdController.NotifyParentalLevelChange(true);}privatevoidmnPause_Click(){_playctrl。DvdController.Pause(true);}privatevoidmnPlayAtInTitle_Click(){_playctrl。DvdController.PlayAtTimeInTitle(1, 10000000);}privatevoidmnPlayAtTime_Click(){_playctrl。DvdController.PlayAtTime(10000000);}privatevoidmnPlaybackword_Click(){_playctrl。DvdController.PlayBackwards(5);}privatevoidmnPlayChapter_Click(){_playctrl.DvdController.PlayChapter(1);}privatevoidmnPlaychapterautostop_Click(){_playctrl.DvdController.PlayChaptersAutoStop(1, 2, 5);}privatevoidmnPlaychapterintitle_Click(){_playctrl.DvdController.PlayChapterInTitle(1, 3);}privatevoidmnPlayfowrward_Click(){_playctrl。DvdController.PlayForwards(5);}privatevoidmnPlayNextChapter_Click(){_playctrl。DvdController.PlayNextChapter();}privatevoidmnPlayperiod_Click(){_playctrl。DvdController.PlayPeriodInTitleAutoStop(1, 30, 120);}privatevoidmnPlayPrevChapter_Click(){_playctrl。DvdController.PlayPrevChapter();}privatevoidmnPlaytitle_Click(){_playctrl。DvdController.PlayTitle(1);}privatevoidmnReplayChapter_Click(){_playctrl。DvdController.ReplayChapter();}privatevoidmnResume_Click(){_playctrl。DvdController.Resume();}privatevoidmnReturnfromsubmenu_Click(){_playctrl。DvdController.ReturnFromSubmenu();}privatevoidmnSelectAndActivateButton_Click(){_playctrl。DvdController.SelectAndActivateButton(1);}privatevoidmnSelectAtPosition_Click(){_playctrl。DvdController.SelectAtPosition(10, 10);}privatevoidmnSelectButton_Click(){_playctrl。DvdController.SelectButton(1);}privatevoidmnSelectRelativeButton_Click(){_playctrl。DvdController.SelectRelativeButton(DVDRelativeButton.Right);}privatevoidmnSetDVDDirectory_Click(){_playctrl。DvdController.DVDDirectory =@"e:\video_ts";}privatevoidmnShowMenu_Click(){_playctrl。DvdController.ShowMenu(DVDMenuId.Root);}privatevoidmnStillOff_Click(){_playctrl.DvdController.StillOff ();}privatevoidmnStop_Click(){_playctrl。DvdController.Stop();}staticclassLEAD_VARS{publicconststringMediaDir =@"C:\LEADTOOLS21\Media";}
ImportsLeadtoolsImportsLeadtools.MultimediaImportsLeadtoolsMultimediaExamples.FixturesPublic_resultAsBoolean=FalsePublic_formAsPlayCtrlForm =NewPlayCtrlForm()Public_playctrlAsPlayCtrlPublicSubIsAudioStreamEnabledExample()' reference the play control_playctrl = _form.PlayCtrlDiminFileAsString= Path.Combine(LEAD_VARS.MediaDir,"VIDEO_TS\VIDEO_TS.IFO")Try' set auto start off_playctrl。AutoStart =False' use DVDSource_playctrl。UseDVDSource =True' set the input file_playctrl。SourceFile = inFile' check the DVD optionsDvdInfoCheck()' play it_playctrl。Run()Catche1AsException_result =FalseEndTry' we'll loop on the state and pump messages for this example.' but you should not need to if running from a Windows Forms application.DoWhile_playctrl。= PlayState状态。运行Application.DoEvents()LoopEndSub' check DVD properties and infoPrivateSubDvdInfoCheck()DimbstrValAsStringDimvalAsIntegerDimbuttonAsInteger= _playctrl.DvdController.CurrentButtonval = _playctrl。DvdController.GetButtonWidth(button)val = _playctrl。DvdController.GetButtonHeight(button)val = _playctrl。DvdController.GetButtonLeft(button)val = _playctrl。DvdController.GetButtonTop(button)val = _playctrl。DvdController.DefaultMenuLanguage_playctrl。DvdController.DefaultMenuLanguage = 1033val = _playctrl。DvdController.GetNumberOfChapters(0)val = _playctrl。DvdController.TotalTitleTimeDimtcFlagsAsDVDTimecodeFlags = _playctrl.DvdController.TitleTimecodeFlagsval = _playctrl。DvdController.CurrentAngleIf_playctrl。DvdController.AnglesAvailable > 1Then_playctrl。DvdController.CurrentAngle = 2EndIfDimuserOpAsDVDValidUserOp = _playctrl.DvdController.CurrentUOPSDimaudioLangAsLong= _playctrl.DvdController.GetAudioLanguage(0)val = _playctrl。DvdController.CurrentAudioStreamIf_playctrl。DvdController.AudioStreamsAvailable > 1Then_playctrl。DvdController.CurrentAudioStream = 2EndIfval = _playctrl。DvdController.CurrentTimeval = _playctrl。DvdController.CurrentVolumeval = _playctrl。DvdController.VolumesAvailableval = _playctrl。DvdController.TitlesAvailableDimenabledAsBoolean= _playctrl.DvdController.IsAudioStreamEnabled(0)val = _playctrl。DvdController.DefaultAudioLanguage_playctrl。DvdController.SelectDefaultAudioLanguage(1033, DVDAudioLangExt.Captions)DimdirectoryAsString= _playctrl.DvdController.DVDDirectoryval = _playctrl。DvdController.CurrentSubpictureStreamval = _playctrl。DvdController.SubpictureStreamsAvailableIf(val > 1)Then_playctrl。DvdController.CurrentSubpictureStream = 1EndIfval = _playctrl。DvdController.DefaultSubpictureLanguage_playctrl。DvdController.SelectDefaultSubpictureLanguage(1033, DVDSubpictureLangExt.Caption_Normal)val = _playctrl。DvdController.CurrentTitleDimsubPicLangExtAsDVDSubpictureLangExt = _playctrl.DvdController.DefaultSubpictureLanguageExtDimaudioLangExtAsDVDAudioLangExt = _playctrl.DvdController.DefaultAudioLanguageExtDimsubpicLangAsLong= _playctrl.DvdController.GetSubpictureLanguage(0)DimsubPicStreamAsBoolean= _playctrl.DvdController.IsSubpictureStreamEnabled(0)val = _playctrl。DvdController.GetDVDTextLanguageLCID(0)val = _playctrl。DvdController.DVDTextNumberOfLanguagesval = _playctrl。DvdController.GetGPRM(0)_playctrl。DvdController.SetGPRM(0, 1)val = _playctrl。DvdController.GetDVDTextNumberOfStrings(0)val = _playctrl。DvdController.ButtonsAvailableval = _playctrl。DvdController.PlayerParentalLevelval = _playctrl。DvdController.PlayerParentalCountryDimppCountryAsString=String.Format("{0}{1}",CChar(ChrW(valAnd&HFF)),CChar(ChrW(val >> 8)))IfppCountry <>"US"Thenval =CInt(AscW("U"c))val + = (CInt(AscW("S"c)) << 8)_playctrl。DvdController.SelectParentalCountry(val,"user","pwd")EndIfval = _playctrl。DvdController.GetTitleParentalLevels(-1)_playctrl。DvdController.SelectParentalLevel(9,"user","pwd")DimdomainAsDVDDomain = _playctrl.DvdController.CurrentDomainDimdiskSideAsDVDDiscSide = _playctrl.DvdController.CurrentDiscSideval = _playctrl。DvdController.CurrentChapterDimtextStrTypeAsDVDTextStringType = _playctrl.DvdController.GetDVDTextStringType(0, 0)If(Not_playctrl。DvdController.SubpictureOn)Then_playctrl。DvdController.SubpictureOn =TrueEndIfval = _playctrl。DvdController.GetSPRM(0)bstrVal = _playctrl.DvdController.GetDVDTextString(0, 0)bstrVal = _playctrl.DvdController.DVDUniqueIDEndSub' menu event helpers for DVD navigation and controlPrivateSubmnAcceptParentalLevelChange_Click()_playctrl。DvdController.AcceptParentalLevelChange(True)EndSubPrivateSubmnActivateAtPosition_Click()_playctrl。DvdController.ActivateAtPosition(10, 10)EndSubPrivateSubmnActivateButton_Click()_playctrl。DvdController.ActivateButton()EndSubPrivateSubmnChangeDVDRegion_Click()_playctrl。DvdController.ChangeDVDRegion(_form)EndSubPrivateSubmnNotifyParentalLevelChange_Click()_playctrl。DvdController.NotifyParentalLevelChange(True)EndSubPrivateSubmnPause_Click()_playctrl。DvdController.Pause(True)EndSubPrivateSubmnPlayAtInTitle_Click()_playctrl。DvdController.PlayAtTimeInTitle(1, 10000000)EndSubPrivateSubmnPlayAtTime_Click()_playctrl。DvdController.PlayAtTime(10000000)EndSubPrivateSubmnPlaybackword_Click()_playctrl。DvdController.PlayBackwards(5)EndSubPrivateSubmnPlayChapter_Click()_playctrl.DvdController.PlayChapter(1)EndSubPrivateSubmnPlaychapterautostop_Click()_playctrl.DvdController.PlayChaptersAutoStop(1, 2, 5)EndSubPrivateSubmnPlaychapterintitle_Click()_playctrl.DvdController.PlayChapterInTitle(1, 3)EndSubPrivateSubmnPlayfowrward_Click()_playctrl。DvdController.PlayForwards(5)EndSubPrivateSubmnPlayNextChapter_Click()_playctrl。DvdController.PlayNextChapter()EndSubPrivateSubmnPlayperiod_Click()_playctrl。DvdController.PlayPeriodInTitleAutoStop(1, 30, 120)EndSubPrivateSubmnPlayPrevChapter_Click()_playctrl。DvdController.PlayPrevChapter()EndSubPrivateSubmnPlaytitle_Click()_playctrl。DvdController.PlayTitle(1)EndSubPrivateSubmnReplayChapter_Click()_playctrl。DvdController.ReplayChapter()EndSubPrivateSubmnResume_Click()_playctrl。DvdController.Resume()EndSubPrivateSubmnReturnfromsubmenu_Click()_playctrl。DvdController.ReturnFromSubmenu()EndSubPrivateSubmnSelectAndActivateButton_Click()_playctrl。DvdController.SelectAndActivateButton(1)EndSubPrivateSubmnSelectAtPosition_Click()_playctrl。DvdController.SelectAtPosition(10, 10)EndSubPrivateSubmnSelectButton_Click()_playctrl。DvdController.SelectButton(1)EndSubPrivateSubmnSelectRelativeButton_Click()_playctrl。DvdController.SelectRelativeButton(DVDRelativeButton.Right)EndSubPrivateSubmnSetDVDDirectory_Click()_playctrl。DvdController.DVDDirectory ="e:\video_ts"EndSubPrivateSubmnShowMenu_Click()_playctrl。DvdController.ShowMenu(DVDMenuId.Root)EndSubPrivateSubmnStillOff_Click()_playctrl。DvdController.StillOff()EndSubPrivateSubmnStop_Click()_playctrl。DvdController.Stop()EndSubPublicNotInheritableClassLEAD_VARSPublicConstMediaDirAsString="C:\LEADTOOLS21\Media"EndClass
Requirements

Target Platforms

Leadtools.Multimedia Assembly
188金宝搏的网址客服|Support|Contact Us|Intellectual Property Notices
© 1991-2021LEAD Technologies, Inc.All Rights Reserved.