public virtual string Author { get; } Public Overridable ReadOnly Property Author As String public:virtual property String^ Author {String^ get();}
A string value representing the author's name.
using Leadtools;using Leadtools.MediaFoundation;using LeadtoolsMediaFoundationExamples.Fixtures;public bool _result = false;public PlayCtrlForm _form = new PlayCtrlForm();public PlayCtrl _playctrl;public PlaySeeking _seekingCaps;public TimeSpan _start = TimeSpan.Zero;public void HasDialogExample(){// reference the play control_playctrl = _form.PlayCtrl;// input file for playbackstring inFile = Path.Combine(LEAD_VARS.MediaDir, "PlayCtrl_Source.avi");try{// turn off autostart and auto rewind_playctrl.AutoStart = false;_playctrl.AutoRewind = false;// set the source file_playctrl.SourceFile = inFile;// show some media info if availableShowMediaInfo();// the HasDialog method tells us that the control// can display the desired settings dialog.// check to see if the selected video processor properties dialog is availableif (_playctrl.HasDialog(PlayDlg.SelVideoProcessor)){// now show it to change some settings_playctrl.ShowDialog(PlayDlg.SelVideoProcessor, _form);_result = true;}// get the source object typeSourceObjectType sot = _playctrl.SourceType;// check some audio propertiesbool mute = _playctrl.Mute;int bal = _playctrl.Balance;int vol = _playctrl.Volume;// seeking caps - you can use these to enable menu states or toolbar buttons_seekingCaps = _playctrl.CheckSeekingCapabilities(PlaySeeking.Forward | PlaySeeking.Backward);// subscribe to the key press event to demo play functions_playctrl.KeyPress += new Leadtools.MediaFoundation.KeyPressEventHandler(PlayCtrl_KeyPress);// start the capture process_playctrl.Run();// 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|| _playctrl.State == PlayState.Paused|| _playctrl.State == PlayState.NotReady)Application.DoEvents();// call reset source here to release resources// but not necessary if we are just exiting_playctrl.ResetSource();}catch (Exception){_result = false;}}// state variables for helper timer statespublic bool _markedSelStart = false;public bool _markedSelEnd = false;public bool _seekedSelStart = false;public bool _seekedSelEnd = false;// key press event handler to manage playback functionsvoid PlayCtrl_KeyPress(object sender, Leadtools.MediaFoundation.KeyPressEventArgs e){char key = (char)e.keyAscii;switch (key){case 'b':if (!_markedSelStart){_markedSelStart = true;_playctrl.MarkSelectionStart();System.Diagnostics.Debug.WriteLine("Mark Selection Start: " + _playctrl.SelectionStart.ToString() + " secs");System.Diagnostics.Debug.WriteLine(" ... playctrl.State: " + _playctrl.State.ToString());}break;case 'e':if (!_markedSelEnd){_markedSelEnd = true;_playctrl.Pause();_playctrl.MarkSelectionEnd();System.Diagnostics.Debug.WriteLine("Mark Selection End: "+ _playctrl.SelectionEnd.ToString()+ " secs");System.Diagnostics.Debug.WriteLine(" ... playctrl.State: "+ _playctrl.State.ToString());_playctrl.SeekSelectionStart();_playctrl.Run();}break;case 's':if (!_seekedSelStart){_seekedSelStart = true;System.Diagnostics.Debug.WriteLine("Seek To Selection Start: "+ _playctrl.SelectionStart.ToString()+ " secs");System.Diagnostics.Debug.WriteLine(" ... playctrl.State: "+ _playctrl.State.ToString());_playctrl.SeekSelectionStart();}break;case 'f':// toggle full screen_playctrl.ToggleFullScreenMode();break;case '+':if (_playctrl.State == PlayState.Running)_playctrl.Pause();_playctrl.NextFrame();break;case '-':if (_playctrl.State == PlayState.Running)_playctrl.Pause();_playctrl.PreviousFrame();break;case 'z':if (!_seekedSelEnd){// turn off full screen mode_playctrl.FullScreenMode = false;_seekedSelEnd = true;System.Diagnostics.Debug.WriteLine("Seek To Selection End: "+ _playctrl.SelectionEnd.ToString()+ " secs");System.Diagnostics.Debug.WriteLine(" ... playctrl.State: "+ _playctrl.State.ToString());_playctrl.SeekSelectionEnd();}break;case 'x':_playctrl.Stop();break;}}private void ShowMediaInfo(){double d = 0;string sa, scr, sd, sr, st;sa = scr = sd = sr = st = "Unavailable";try{d = _playctrl.FrameDuration;sa = _playctrl.Author;scr = _playctrl.Copyright;sd = _playctrl.Description;sr = _playctrl.Rating;st = _playctrl.Title;}catch (Exception){}MessageBox.Show(_form, string.Format("Duration: {0}\nAuthor: {1}\nCopyright: {2}\nDesc: {3}\nRating: {4}\nTitle: {5}\n",d, sa, scr, sd, sr, st), "Media Info");}void SelectedOptions(){_playctrl.SeekStart();_playctrl.SeekEnd();int te = _playctrl.TrackingSelectionEnd;int ts = _playctrl.TrackingSelectionStart;double se = _playctrl.SelectionEnd;double ss = _playctrl.SelectionStart;}static class LEAD_VARS{public const string MediaDir = @"C:\LEADTOOLS21\Media";}
Imports LeadtoolsImports Leadtools.MediaFoundationImports LeadtoolsMediaFoundationExamples.FixturesPublic _result As Boolean = FalsePublic _form As PlayCtrlForm = New PlayCtrlForm()Public _playctrl As PlayCtrlPublic _seekingCaps As PlaySeekingPublic _start As TimeSpan = TimeSpan.ZeroPublic Sub HasDialogExample()' reference the play control_playctrl = _form.PlayCtrl' input file for playbackDim inFile As String = Path.Combine(LEAD_VARS.MediaDir, "PlayCtrl_Source.avi")Try' turn off autostart and auto rewind_playctrl.AutoStart = False_playctrl.AutoRewind = False' set the source file_playctrl.SourceFile = inFile' show some media info if availableShowMediaInfo()' the HasDialog method tells us that the control' can display the desired settings dialog.' check to see if the selected video processor properties dialog is availableIf _playctrl.HasDialog(PlayDlg.SelVideoProcessor) Then' now show it to change some settings_playctrl.ShowDialog(PlayDlg.SelVideoProcessor, _form)_result = TrueEnd If' get the source object typeDim sot As SourceObjectType = _playctrl.SourceType' check some audio propertiesDim mute As Boolean = _playctrl.MuteDim bal As Integer = _playctrl.BalanceDim vol As Integer = _playctrl.Volume' seeking caps - you can use these to enable menu states or toolbar buttons_seekingCaps = _playctrl.CheckSeekingCapabilities(PlaySeeking.Forward Or PlaySeeking.Backward)' subscribe to the key press event to demo play functionsAddHandler _playctrl.KeyPress, AddressOf PlayCtrl_KeyPress' start the capture process_playctrl.Run()' 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.Do While _playctrl.State = PlayState.Running _OrElse _playctrl.State = PlayState.Paused _OrElse _playctrl.State = PlayState.NotReadyApplication.DoEvents()Loop' call reset source here to release resources' but not necessary if we are just exiting_playctrl.ResetSource()Catch e1 As Exception_result = FalseEnd TryEnd Sub' state variables for helper timer statesPublic _markedSelStart As Boolean = FalsePublic _markedSelEnd As Boolean = FalsePublic _seekedSelStart As Boolean = FalsePublic _seekedSelEnd As Boolean = False' key press event handler to manage playback functionsPrivate Sub PlayCtrl_KeyPress(ByVal sender As Object, ByVal e As Leadtools.MediaFoundation.KeyPressEventArgs)Dim key As Char = CChar(ChrW(e.keyAscii))Select Case keyCase "b"cIf (Not _markedSelStart) Then_markedSelStart = True_playctrl.MarkSelectionStart()System.Diagnostics.Debug.WriteLine("Mark Selection Start: " & _playctrl.SelectionStart.ToString() & " secs")System.Diagnostics.Debug.WriteLine(" ... playctrl.State: " & _playctrl.State.ToString())End IfCase "e"cIf (Not _markedSelEnd) Then_markedSelEnd = True_playctrl.Pause()_playctrl.MarkSelectionEnd()System.Diagnostics.Debug.WriteLine("Mark Selection End: " & _playctrl.SelectionEnd.ToString() & " secs")System.Diagnostics.Debug.WriteLine(" ... playctrl.State: " & _playctrl.State.ToString())_playctrl.SeekSelectionStart()_playctrl.Run()End IfCase "s"cIf (Not _seekedSelStart) Then_seekedSelStart = TrueSystem.Diagnostics.Debug.WriteLine("Seek To Selection Start: " & _playctrl.SelectionStart.ToString() & " secs")System.Diagnostics.Debug.WriteLine(" ... playctrl.State: " & _playctrl.State.ToString())_playctrl.SeekSelectionStart()End IfCase "f"c' toggle full screen_playctrl.ToggleFullScreenMode()Case "+"cIf _playctrl.State = PlayState.Running Then_playctrl.Pause()End If_playctrl.NextFrame()Case "-"cIf _playctrl.State = PlayState.Running Then_playctrl.Pause()End If_playctrl.PreviousFrame()Case "z"cIf (Not _seekedSelEnd) Then' turn off full screen mode_playctrl.FullScreenMode = False_seekedSelEnd = TrueSystem.Diagnostics.Debug.WriteLine("Seek To Selection End: " & _playctrl.SelectionEnd.ToString() & " secs")System.Diagnostics.Debug.WriteLine(" ... playctrl.State: " & _playctrl.State.ToString())_playctrl.SeekSelectionEnd()End IfCase "x"c_playctrl.Stop()End SelectEnd SubPrivate Sub ShowMediaInfo()Dim d As Double = 0Dim sa, scr, sd, sr, st As Stringsa = "Unavailable"scr = "Unavailable"sd = "Unavailable"sr = "Unavailable"st = "Unavailable"Tryd = _playctrl.FrameDurationsa = _playctrl.Authorscr = _playctrl.Copyrightsd = _playctrl.Descriptionsr = _playctrl.Ratingst = _playctrl.TitleCatch e1 As ExceptionEnd TryMessageBox.Show(_form, String.Format("Duration: {0}" _& Microsoft.VisualBasic.Constants.vbLf _& "Author: {1}" _& Microsoft.VisualBasic.Constants.vbLf _& "Copyright: {2}" _& Microsoft.VisualBasic.Constants.vbLf _& "Desc: {3}" & Microsoft.VisualBasic.Constants.vbLf _& "Rating: {4}" & Microsoft.VisualBasic.Constants.vbLf _& "Title: {5}" _& Microsoft.VisualBasic.Constants.vbLf,d, sa, scr, sd, sr, st), "Media Info")End SubPrivate Sub SelectedOptions()_playctrl.SeekStart()_playctrl.SeekEnd()Dim te As Integer = _playctrl.TrackingSelectionEndDim ts As Integer = _playctrl.TrackingSelectionStartDim se As Double = _playctrl.SelectionEndDim ss As Double = _playctrl.SelectionStartEnd SubPublic NotInheritable Class LEAD_VARSPublic Const MediaDir As String = "C:\LEADTOOLS21\Media"End Class
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
