public string FriendlyName { get; } Public Property FriendlyName As String
A string that receives the device's Friendly Name.
(Read-only). Gets the device's descriptive name. The returned name is not unique. However, it is ideal for presenting a descriptive name in user interfaces.
using Leadtools;using Leadtools.MediaStreaming;public Server _server = null;public bool _result = false;public void PrintCaptureDevicesExample(){try{string strDevices = "";// create an instance of the server object_server = new Leadtools.MediaStreaming.Server();// retrieve a copy of the Live StreamsLiveStreams Streams = _server.GetLiveStreams();// create live stream just to enumerate the devicesLiveStream stream = Streams.CreateLiveStream();// print the capture devices to a stringstrDevices += "--- Live Stream Devices---\n\n";//Get the Video DevicesDevices VideoDevices = stream.VideoDevices;strDevices += string.Format("--- Video Devices (count = {0}) ---\n\n", VideoDevices.Count.ToString());// Print Video Devicesint nIndex = 0;foreach (Device Device in VideoDevices){strDevices += string.Format("Device[{0}]: FriendlyName = \"{1}\".\n", nIndex.ToString(), Device.FriendlyName);strDevices += string.Format("Name = \"{0}\".\n", nIndex.ToString(), Device.Name);if (Device.Selected)strDevices += "Selected = \"true\" \n";elsestrDevices += "Selected = \"false\" \n";nIndex++;}//Get the Audio DevicesDevices AudioDevices = stream.AudioDevices;strDevices += string.Format("--- Audio Devices (count = {0}) ---\n\n", AudioDevices.ToString());// Print Audio DevicesnIndex = 0;foreach (Device Device in AudioDevices){strDevices += string.Format("Device[{0}]: FriendlyName = \"{1}\".\n", nIndex.ToString(), Device.FriendlyName);strDevices += string.Format("Name = \"{0}\".\n", nIndex.ToString(), Device.Name);if (Device.Selected)strDevices += "Selected = \"true\" \n";elsestrDevices += "Selected = \"false\" \n";nIndex++;}// display a message contains the Devices information stringMessageBox.Show(strDevices, "LEADTOOLS Media Streaming Examples", MessageBoxButtons.OK, MessageBoxIcon.Information);_result = true;}catch (Exception){_result = false;}}
Imports LeadtoolsImports Leadtools.MediaStreamingPublic _server As Server = NothingPublic _result As Boolean = FalsePublic Sub PrintCaptureDevicesExample()TryDim strDevices As String = ""' create an instance of the server object_server = New Leadtools.MediaStreaming.Server()' retrieve a copy of the Live StreamsDim Streams As LiveStreams = _server.GetLiveStreams()' create live stream just to enumerate the devicesDim stream As LiveStream = Streams.CreateLiveStream()' print the capture devices to a stringstrDevices &= "--- Live Stream Devices---" & Constants.vbLf + Constants.vbLf'Get the Video DevicesDim VideoDevices As Devices = stream.VideoDevicesstrDevices &= String.Format("--- Video Devices (count = {0}) ---" & Constants.vbLf + Constants.vbLf, VideoDevices.Count.ToString())' Print Video DevicesDim nIndex As Integer = 0For Each Device As Device In VideoDevicesstrDevices &= String.Format("Device[{0}]: FriendlyName = ""{1}""." & Constants.vbLf, nIndex.ToString(), Device.FriendlyName)strDevices &= String.Format("Name = ""{0}""." & Constants.vbLf, nIndex.ToString(), Device.Name)If Device.Selected ThenstrDevices &= "Selected = ""true"" " & Constants.vbLfElsestrDevices &= "Selected = ""false"" " & Constants.vbLfEnd IfnIndex += 1Next Device'Get the Audio DevicesDim AudioDevices As Devices = stream.AudioDevicesstrDevices &= String.Format("--- Audio Devices (count = {0}) ---" & Constants.vbLf + Constants.vbLf, AudioDevices.ToString())' Print Audio DevicesnIndex = 0For Each Device As Device In AudioDevicesstrDevices &= String.Format("Device[{0}]: FriendlyName = ""{1}""." & Constants.vbLf, nIndex.ToString(), Device.FriendlyName)strDevices &= String.Format("Name = ""{0}""." & Constants.vbLf, nIndex.ToString(), Device.Name)If Device.Selected ThenstrDevices &= "Selected = ""true"" " & Constants.vbLfElsestrDevices &= "Selected = ""false"" " & Constants.vbLfEnd IfnIndex += 1Next Device' display a message contains the Devices information stringMessageBox.Show(strDevices, "LEADTOOLS Media Streaming Examples", MessageBoxButtons.OK, MessageBoxIcon.Information)_result = TrueCatch e1 As Exception_result = FalseEnd TryEnd Sub
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
