LEADTOOLS Multimedia (Leadtools.Multimedia assembly)
LEAD Technologies, Inc

GetClosedCaptioningTargetFile Method

Example 





Ouput variable which receives the name of the file used to save the closed captioning data.
Ouput variable which receives the value of flags that used to save the closed captioning data. For a list of possible values, refer to ClosedCaptioningFlags enumeration values.
Retrieves the filename and flags set using SetClosedCaptioningTargetFile.
Syntax
public virtual void GetClosedCaptioningTargetFile( 
   out string FileName,
   out ClosedCaptioningFlags Flags
)
'Declaration
 
Public Overridable Sub GetClosedCaptioningTargetFile( _
   ByRef FileName As String, _
   ByRef Flags As ClosedCaptioningFlags _
) 
'Usage
 
Dim instance As ConvertCtrl
Dim FileName As String
Dim Flags As ClosedCaptioningFlags
 
instance.GetClosedCaptioningTargetFile(FileName, Flags)
public virtual void GetClosedCaptioningTargetFile( 
   out string FileName,
   out ClosedCaptioningFlags Flags
)
 function Leadtools.Multimedia.ConvertCtrl.GetClosedCaptioningTargetFile( 
   FileName ,
   Flags 
)
public:
virtual void GetClosedCaptioningTargetFile( 
   [Out] String^ FileName,
   [Out] ClosedCaptioningFlags Flags
) 

Parameters

FileName
Ouput variable which receives the name of the file used to save the closed captioning data.
Flags
Ouput variable which receives the value of flags that used to save the closed captioning data. For a list of possible values, refer to ClosedCaptioningFlags enumeration values.
Remarks
This method retrives null and zero flag if no filename has been set.
Example
Copy CodeCopy Code  
Public _result As Boolean = False
      Public _form As ConvertCtrlForm = New ConvertCtrlForm()
      Public Sub ClosedCaptioningTargetFile()
         ' reference the convert control
         Dim convertctrl As ConvertCtrl = _form.ConvertCtrl

         ' target file
         Dim targetFileCc As String = Path.Combine(LEAD_VARS.MediaDir, "ConvertCtrl_ClosedCaptioningTargetFile.srt")
         Dim flags As ClosedCaptioningFlags = ClosedCaptioningFlags.Default
         Dim testFile As String = String.Empty
         Dim testFlags As ClosedCaptioningFlags

         Try

            ' set target file name and save options
            convertctrl.SetClosedCaptioningTargetFile(targetFileCc, flags)

            convertctrl.GetClosedCaptioningTargetFile(testFile, testFlags)

            If testFile = targetFileCc AndAlso testFlags = flags Then
               _result = True
            Else
               _result = False
            End If
         Catch e1 As Exception
            _result = False
         End Try
      End Sub

Public NotInheritable Class LEAD_VARS
   Public Const MediaDir As String = "C:\Program Files (x86)\LEAD Technologies\LEADTOOLS 175\Media";
End Class
public bool _result = false;
      public ConvertCtrlForm _form = new ConvertCtrlForm();
      public void ClosedCaptioningTargetFile()
      {
         // reference the convert control
         ConvertCtrl convertctrl = _form.ConvertCtrl;

         // target file
         string targetFileCc = Path.Combine(LEAD_VARS.MediaDir,"ConvertCtrl_ClosedCaptioningTargetFile.srt");
         ClosedCaptioningFlags flags = ClosedCaptioningFlags.Default;
         string testFile;
         ClosedCaptioningFlags testFlags;

         try
         {
            // set target file name and save options
            convertctrl.SetClosedCaptioningTargetFile(targetFileCc, flags);

            convertctrl.GetClosedCaptioningTargetFile(out testFile, out testFlags);

            if (testFile == targetFileCc && testFlags == flags)
               _result = true;
            else
               _result = false;
         }
         catch (Exception)
         {
            _result = false;
         }
      }

static class LEAD_VARS
{
   public const string MediaDir = @"C:\Program Files (x86)\LEAD Technologies\LEADTOOLS 175\Media";
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

ConvertCtrl Class
ConvertCtrl Members

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.

Leadtools.Multimedia requires a Multimedia or Multimedia Suite license and unlock key. For more information, refer to: LEADTOOLS Toolkit Features