publicDevicesAudioDevices {get; }
PublicReadOnlyPropertyAudioDevicesAsDevices
TheAudioDevicescollection.
usingLeadtools;
usingLeadtools.MediaStreaming;
publicServer _server =null;
publicbool_result =false;
publicvoidPrintLiveStreamsExample()
{
try
{
stringstrLiveStreams ="";
// create an instance of the server object
_server =newLeadtools.MediaStreaming.Server();
// retrieve a copy of the Live Streams
LiveStreams Streams = _server.GetLiveStreams();
strLiveStreams +=string.Format("--- Live Streams (count = {0}) ---\n\n", Streams.Count.ToString());
// print the all live streams properties to a string
for(intnIndex = 0; nIndex < Streams.Count; nIndex++)
{
LiveStream stream = Streams.GetLiveStream(nIndex);
strLiveStreams +=string.Format("Live Stream[{0}]: Path = \"{1}\".\n", nIndex.ToString(), stream.Path);
intnSelection = stream.VideoDevices.Selection;
stringstrDevice ="";
if(nSelection < 0)
strDevice ="
" ;else
strDevice = stream.VideoDevices[nSelection].FriendlyName;
strLiveStreams +=string.Format("Video Device = \"{0}\".\n", strDevice);
nSelection = stream.AudioDevices.Selection;
strDevice ="";
if(nSelection < 0)
strDevice ="
" ;else
strDevice = stream.AudioDevices[nSelection].FriendlyName;
strLiveStreams +=string.Format(“音频德维克e = \"{0}\".\n", strDevice);
strLiveStreams +=string.Format("Video Width = \"{0}\".\n", stream.VideoWidth.ToString());
strLiveStreams +=string.Format("Video Height = \"{0}\".\n", stream.VideoHeight.ToString());
if(stream.UseVideoInputSize)
strLiveStreams +=string.Format("Use Video Input Size = \"true\".\n");
else
strLiveStreams +=string.Format("Use Video Input Size = \"false\".\n");
strLiveStreams +=string.Format("Video Frame Rate = \"{0}\".\n", stream.VideoFrameRate.ToString());
if(stream.UseVideoInputFrameRate)
strLiveStreams +=string.Format("Use Video Input Frame Rate = \"true\".\n");
else
strLiveStreams +=string.Format("Use Video Input Frame Rate = \"false\".\n");
strLiveStreams +=string.Format("Video Bit Rate = \"{0}\".\n", stream.VideoBitRate.ToString());
if(stream.QSVAcceleration)
strLiveStreams +=string.Format("QSVAcceleration = \"true\".\n");
else
strLiveStreams +=string.Format("QSVAcceleration = \"false\".\n");
if(stream.CUDAAcceleration)
strLiveStreams +=string.Format("CUDAAcceleration = \"true\".\n");
else
strLiveStreams +=string.Format("CUDAAcceleration = \"false\".\n");
nSelection = stream.AudioTypes.Selection;
stringstrType ="";
if(nSelection < 0)
strType ="
" ;else
strType = stream.AudioTypes[nSelection].FriendlyName;
if(stream.UseDeviceEncoding)
strLiveStreams +=string.Format("Use Device Encoding = \"true\".\n");
else
strLiveStreams +=string.Format("Use Device Encoding = \"false\".\n");
strLiveStreams +=string.Format("Minimum Fragment Duration = \"{0}\".\n", stream.MinimumFragmentDuration.ToString());
if(stream.Enable)
strLiveStreams +=string.Format("Enable = \"true\".\n");
else
strLiveStreams +=string.Format(“启用= \”假\”。\ n”);
if(stream.ActivateOnDemand)
strLiveStreams +=string.Format("ActivateOnDemand = \"true\".\n");
else
strLiveStreams +=string.Format("ActivateOnDemand = \"false\".\n");
strLiveStreams +=string.Format("IdleTimeOut = \"{0}\".\n", stream.IdleTimeOut.ToString());
if(stream.CUDADecoding)
strLiveStreams +=string.Format("CUDADecoding = \"true\".\n");
else
strLiveStreams +=string.Format("CUDADecoding = \"false\".\n");
if(stream.QSVDecoding)
strLiveStreams +=string.Format("QSVDecoding = \"true\".\n");
else
strLiveStreams +=string.Format("QSVDecoding = \"false\".\n");
if(stream.HasVideoDeviceURL)
{
strLiveStreams +=string.Format("VideoDeviceURL = \"{0}\".\n", stream.VideoDeviceURL);
}
}
// display a message contains the Live Streams information string
MessageBox.Show(strLiveStreams,"LEADTOOLS Media Streaming Examples", MessageBoxButtons.OK, MessageBoxIcon.Information);
_result =true;
}
catch(Exception)
{
_result =false;
}
}
ImportsLeadtools
ImportsLeadtools.MediaStreaming
Public_serverAsServer =Nothing
Public_resultAsBoolean=False
PublicSubPrintLiveStreamsExample()
Try
DimstrLiveStreamsAsString=""
' create an instance of the server object
_server =NewLeadtools.MediaStreaming.Server()
' retrieve a copy of the Live Streams
DimStreamsAsLiveStreams = _server.GetLiveStreams()
strLiveStreams +=String.Format("--- Live Streams (count = {0}) ---"& vbLf & vbLf, Streams.Count.ToString())
' print the all live streams properties to a string
FornIndexAsInteger= 0ToStreams.Count- 1
DimstreamAsLiveStream = Streams.GetLiveStream(nIndex)
strLiveStreams +=String.Format("Live Stream[{0}]: Path = ""{1}""."& vbLf, nIndex.ToString(), stream.Path)
DimnSelectionAsInteger= stream.VideoDevices.Selection
DimstrDeviceAsString=""
IfnSelection < 0Then
strDevice ="
" Else
strDevice = stream.VideoDevices(nSelection).FriendlyName
EndIf
strLiveStreams +=String.Format("Video Device = ""{0}""."& vbLf, strDevice)
nSelection = stream.AudioDevices.Selection
strDevice =""
IfnSelection < 0Then
strDevice ="
" Else
strDevice = stream.AudioDevices(nSelection).FriendlyName
EndIf
strLiveStreams +=String.Format(“音频德维克e = ""{0}""."& vbLf, strDevice)
strLiveStreams +=String.Format("Video Width = ""{0}""."& vbLf, stream.VideoWidth.ToString())
strLiveStreams +=String.Format("Video Height = ""{0}""."& vbLf, stream.VideoHeight.ToString())
Ifstream.UseVideoInputSizeThen
strLiveStreams +=String.Format("Use Video Input Size = ""true""."& vbLf)
Else
strLiveStreams +=String.Format("Use Video Input Size = ""false""."& vbLf)
EndIf
strLiveStreams +=String.Format("Video Frame Rate = ""{0}""."& vbLf, stream.VideoFrameRate.ToString())
Ifstream.UseVideoInputFrameRateThen
strLiveStreams +=String.Format("Use Video Input Frame Rate = ""true""."& vbLf)
Else
strLiveStreams +=String.Format("Use Video Input Frame Rate = ""false""."& vbLf)
EndIf
strLiveStreams +=String.Format(“视频比特率=””“{0}”。"& vbLf, stream.VideoBitRate.ToString())
Ifstream.QSVAccelerationThen
strLiveStreams +=String.Format("QSVAcceleration = ""true""."& vbLf)
Else
strLiveStreams +=String.Format("QSVAcceleration = ""false""."& vbLf)
EndIf
Ifstream.CUDAAccelerationThen
strLiveStreams +=String.Format("CUDAAcceleration = ""true""."& vbLf)
Else
strLiveStreams +=String.Format("CUDAAcceleration = ""false""."& vbLf)
EndIf
nSelection = stream.AudioTypes.Selection
DimstrTypeAsString=""
IfnSelection < 0Then
strType ="
" Else
strType = stream.AudioTypes(nSelection).FriendlyName
EndIf
Ifstream.UseDeviceEncodingThen
strLiveStreams +=String.Format("Use Device Encoding = ""true""."& vbLf)
Else
strLiveStreams +=String.Format("Use Device Encoding = ""false""."& vbLf)
EndIf
strLiveStreams +=String.Format("Minimum Fragment Duration = ""{0}""."& vbLf, stream.MinimumFragmentDuration.ToString())
Ifstream.EnableThen
strLiveStreams +=String.Format("Enable = ""true""."& vbLf)
Else
strLiveStreams +=String.Format("Enable = ""false""."& vbLf)
EndIf
Ifstream.ActivateOnDemandThen
strLiveStreams +=String.Format("ActivateOnDemand = ""true""."& vbLf)
Else
strLiveStreams +=String.Format("ActivateOnDemand = ""false""."& vbLf)
EndIf
strLiveStreams +=String.Format("IdleTimeOut = ""{0}""."& vbLf, stream.IdleTimeOut.ToString())
Ifstream.CUDADecodingThen
strLiveStreams +=String.Format("CUDADecoding = ""true""."& vbLf)
Else
strLiveStreams +=String.Format("CUDADecoding = ""false""."& vbLf)
EndIf
Ifstream.QSVDecodingThen
strLiveStreams +=String.Format("QSVDecoding = ""true""."& vbLf)
Else
strLiveStreams +=String.Format("QSVDecoding = ""false""."& vbLf)
EndIf
Ifstream.HasVideoDeviceURLThen
strLiveStreams +=String.Format("VideoDeviceURL = ""{0}""."& vbLf, stream.VideoDeviceURL)
EndIf
Next
' display a message contains the Live Streams information string
MessageBox.Show(strLiveStreams,"LEADTOOLS Media Streaming Examples", MessageBoxButtons.OK, MessageBoxIcon.Information)
_result =True
CatchgeneratedExceptionNameAsException
_result =False
EndTry
EndSub
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
188宝金博怎么下载
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
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.