SelectDefaultSubpictureLanguage Method

Summary
Sets the default language and default extension for the Subpicture text.
Syntax
C#
C++/CLI
public void SelectDefaultSubpictureLanguage( 
   int Language, 
   DVDSubpictureLangExt ext 
) 
public: 
void SelectDefaultSubpictureLanguage(  
   int Language, 
   DVDSubpictureLangExt ext 
)  

Parameters

Language
The value specifying the default language (LCID).

ext
The value specifying the default Subpicture extension.

Remarks

The DefaultSubpictureLanguage property and the DefaultSubpictureLanguageExt property contain the current default language and default extension for the Subpicture text, respectively. For a list of possible LCID values, refer to the Microsoft documentation for LCID.

For a list of possible Subpicture extension values, refer to the DVDSubpictureLangExt enumeration. For more detailed information, refer to the Microsoft documentation for IDvdControl2.SelectDefaultSubpictureLanguage.

Example
C#
using Leadtools; 
using Leadtools.Multimedia; 
using LeadtoolsMultimediaExamples.Fixtures; 
 
 
public bool _result = false; 
public PlayCtrlForm _form = new PlayCtrlForm(); 
public PlayCtrl _playctrl; 
 
public void IsAudioStreamEnabledExample() 
{ 
   // reference the play control 
   _playctrl = _form.PlayCtrl; 
 
   string inFile = 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 options 
      DvdInfoCheck(); 
 
      // 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 info 
private void DvdInfoCheck() 
{ 
   string bstrVal; 
   int val; 
   int button = _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; 
   long audioLang = _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; 
   bool enabled = _playctrl.DvdController.IsAudioStreamEnabled(0); 
   val = _playctrl.DvdController.DefaultAudioLanguage; 
 
   _playctrl.DvdController.SelectDefaultAudioLanguage(1033, DVDAudioLangExt.Captions); 
 
   string directory = _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; 
   long subpicLang = _playctrl.DvdController.GetSubpictureLanguage(0); 
   bool subPicStream = _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; 
   string ppCountry = 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 control 
private void mnAcceptParentalLevelChange_Click() 
{ 
   _playctrl.DvdController.AcceptParentalLevelChange(true); 
} 
 
private void mnActivateAtPosition_Click() 
{ 
   _playctrl.DvdController.ActivateAtPosition(10, 10); 
} 
 
private void mnActivateButton_Click() 
{ 
   _playctrl.DvdController.ActivateButton(); 
} 
 
private void mnChangeDVDRegion_Click() 
{ 
   _playctrl.DvdController.ChangeDVDRegion(_form); 
} 
 
private void mnNotifyParentalLevelChange_Click() 
{ 
   _playctrl.DvdController.NotifyParentalLevelChange(true); 
} 
 
private void mnPause_Click() 
{ 
   _playctrl.DvdController.Pause(true); 
} 
 
private void mnPlayAtInTitle_Click() 
{ 
   _playctrl.DvdController.PlayAtTimeInTitle(1, 10000000); 
} 
 
private void mnPlayAtTime_Click() 
{ 
   _playctrl.DvdController.PlayAtTime(10000000); 
} 
 
private void mnPlaybackword_Click() 
{ 
   _playctrl.DvdController.PlayBackwards(5); 
} 
 
private void mnPlayChapter_Click() 
{ 
   _playctrl.DvdController.PlayChapter(1); 
} 
 
private void mnPlaychapterautostop_Click() 
{ 
   _playctrl.DvdController.PlayChaptersAutoStop(1, 2, 5); 
} 
 
private void mnPlaychapterintitle_Click() 
{ 
   _playctrl.DvdController.PlayChapterInTitle(1, 3); 
} 
 
private void mnPlayfowrward_Click() 
{ 
   _playctrl.DvdController.PlayForwards(5); 
} 
 
private void mnPlayNextChapter_Click() 
{ 
   _playctrl.DvdController.PlayNextChapter(); 
} 
 
private void mnPlayperiod_Click() 
{ 
   _playctrl.DvdController.PlayPeriodInTitleAutoStop(1, 30, 120); 
} 
 
private void mnPlayPrevChapter_Click() 
{ 
   _playctrl.DvdController.PlayPrevChapter(); 
} 
 
private void mnPlaytitle_Click() 
{ 
   _playctrl.DvdController.PlayTitle(1); 
} 
 
private void mnReplayChapter_Click() 
{ 
   _playctrl.DvdController.ReplayChapter(); 
} 
 
private void mnResume_Click() 
{ 
   _playctrl.DvdController.Resume(); 
} 
 
private void mnReturnfromsubmenu_Click() 
{ 
   _playctrl.DvdController.ReturnFromSubmenu(); 
} 
 
private void mnSelectAndActivateButton_Click() 
{ 
   _playctrl.DvdController.SelectAndActivateButton(1); 
} 
 
private void mnSelectAtPosition_Click() 
{ 
   _playctrl.DvdController.SelectAtPosition(10, 10); 
} 
 
private void mnSelectButton_Click() 
{ 
   _playctrl.DvdController.SelectButton(1); 
} 
 
private void mnSelectRelativeButton_Click() 
{ 
   _playctrl.DvdController.SelectRelativeButton(DVDRelativeButton.Right); 
} 
 
private void mnSetDVDDirectory_Click() 
{ 
   _playctrl.DvdController.DVDDirectory = @"e:\video_ts"; 
} 
 
private void mnShowMenu_Click() 
{ 
   _playctrl.DvdController.ShowMenu(DVDMenuId.Root); 
} 
 
private void mnStillOff_Click() 
{ 
   _playctrl.DvdController.StillOff(); 
} 
 
private void mnStop_Click() 
{ 
   _playctrl.DvdController.Stop(); 
} 
 
static class LEAD_VARS 
{ 
   public const string MediaDir = @"C:\LEADTOOLS23\Media"; 
} 
Requirements

Target Platforms

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Multimedia Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.