计数属性(直播)

概括
检索可用的实时流的总数。
句法
C#
VB
C ++
上市int数数 {得到;}
上市只读财产数数作为整数
上市财产int数数 {int得到();}

适当的价值

整数值表示实时流的数量。

例子
C#
VB
使用LeadTools;使用LeadTools.MediasTreaming;上市服务器_server =无效的;上市布尔_Result =错误的;上市空白printLiveStreamSexample(){尝试{细绳strlivestreams =“”;//创建服务器对象的实例_server =新的ledstools.mediastreaming.server();//检索实时流的副本livestreams streams = _server.getLiveStreams();strlivestreams +=细绳。格式(“ ---实时流(count = {0})--- \ n \ n”,streams.count.tostring());//将所有实时流属性打印到字符串为了((intnindex = 0;nindex {livestream stream = streams.getLivestream(nindex);strlivestreams +=细绳。格式(“实时流[{0}]:路径= \“ {1} \”。\ n”,nindex.toString(),stream.path);intnselection = stream.videodevices.selection;细绳strdevice =“”;如果(nselection <0)strdevice =“ <无选择>”;别的strdevice = stream.VideOdeVices [nselection] .friendlyname;strlivestreams +=细绳。格式(“视频设备= \” {0} \“。\ n”,strdevice);nselection = stream.audiodevices.selection;strdevice =“”;如果(nselection <0)strdevice =“ <无选择>”;别的strdevice = stream.audiodevices [nselection] .friendlyname;strlivestreams +=细绳。格式(“音频设备= \” {0} \“。\ n”,strdevice);strlivestreams +=细绳。格式(“视频width = \” {0} \“。\ n”,stream.videowidth.tostring());strlivestreams +=细绳。格式(“视频高度= \” {0} \“。\ n”,stream.videoheight.tostring());如果(stream.usevideoinputsize)strlivestreams +=细绳。格式(“使用视频输入size = \” true \“。\ n”);别的strlivestreams +=细绳。格式(“使用视频输入size = \” false \“。\ n”);strlivestreams +=细绳。格式(“视频帧速率= \” {0} \“。\ n”,stream.videoframerate.tostring());如果(流式VideoinputFramerate)strlivestreams +=细绳。格式(“使用视频输入帧速率= \“ true \”。\ n”);别的strlivestreams +=细绳。格式(“使用视频输入帧速率= \“ false \”。\ n”);strlivestreams +=细绳。格式(“视频比率= \” {0} \“。\ n”,stream.videobitrate.tostring());如果(stream.qsvacceleration)strlivestreams +=细绳。格式(“ qsvacceleration = \” true \“。\ n”);别的strlivestreams +=细绳。格式(“ qsvacceleration = \” false \“。\ n”);如果(流。strlivestreams +=细绳。格式(“ cudaacceleration = \” true \“。\ n”);别的strlivestreams +=细绳。格式(“ cudaacceleration = \” false \“。\ n”);nselection = stream.audiotypes.selection;细绳strtype =“”;如果(nselection <0)strtype =“ <无选择>”;别的strtype = stream.audiotypes [nselection] .friendlyname;如果(stream.usedeviceencoding)strlivestreams +=细绳。格式(“使用设备编码= \” true \“。\ n”);别的strlivestreams +=细绳。格式(“使用设备编码= \” false \“。\ n”);strlivestreams +=细绳。格式(“最小片段持续时间= \” {0} \“。\ n”,stream.minimummimum fragmentDuration.toString());如果(流式)strlivestreams +=细绳。格式(“ enable = \” true \“。\ n”);别的strlivestreams +=细绳。格式(“ enable = \” false \“。\ n”);如果(流动激素)strlivestreams +=细绳。格式(“ activateondemand = \” true \“。\ n”);别的strlivestreams +=细绳。格式(“ activateondemand = \” false \“。\ n”);strlivestreams +=细绳。格式(“ idletimeout = \” {0} \“。\ n”,stream.idletimeout.tostring());如果(流。strlivestreams +=细绳。格式(“ cudadecoding = \” true \“。\ n”);别的strlivestreams +=细绳。格式(“ cudadecoding = \” false \“。\ n”);如果(stream.qsvdecoding)strlivestreams +=细绳。格式(“ qsvdecoding = \” true \“。\ n”);别的strlivestreams +=细绳。格式(“ qsvdecoding = \” false \“。\ n”);如果(stream.hasvideodeviceurl){strlivestreams +=细绳。格式(“ videodeviceurl = \” {0} \“。\ n”,stream.videodeviceurl);}}//显示消息包含实时流信息字符串MessageBox.Show(strlivestreams,“ LeadTools媒体流式示例”,MessageBoxButtons.ok,MessageBoxicon.Information);_Result =真的;}抓住(例外){_Result =错误的;}}
进口LeadTools进口LeadTools.MediasTreaming上市_服务器作为服务器=没有什么上市_结果作为布尔=错误的上市printLiveStreamSexample()尝试暗淡Strlivestreams作为细绳=“”'创建服务器对象的实例_server =新的leadtools.mediastreaming.server()'检索现场流的副本暗淡作为livestreams = _server.getLiveStreams()strlivestreams +=细绳。格式(“ ---实时流(count = {0})----”&vblf&vblf,流。数数.tostring())'将所有实时流属性打印到字符串为了Nindex作为整数= 0流。数数-1暗淡溪流作为livestream = streams.getLivestream(nindex)strlivestreams +=细绳。格式(“实时流[{0}]:路径=“” {1}“”。&vblf,nindex.tostring(),stream.path)暗淡nselection作为整数= stream.videodevices.selection暗淡Strdevice作为细绳=“”如果nselection <0然后strdevice =“ <无选择>”别的strdevice = stream.VideDodevices(nse​​lection).friendlyname结尾如果strlivestreams +=细绳。格式(“视频设备=”“ {0}”。&vblf,strdevice)nselection = stream.audiodevices.selectionstrdevice =“”如果nselection <0然后strdevice =“ <无选择>”别的strdevice = stream.audiodevices(nse​​lection).friendlyname结尾如果strlivestreams +=细绳。格式(“音频设备=”“ {0}”。&vblf,strdevice)strlivestreams +=细绳。格式(“视频宽度=”“ {0}”。&vblf,stream.videowidth.tostring())strlivestreams +=细绳。格式(“视频高度=”“ {0}”。&vblf,stream.videoheight.tostring())如果stream.usevideoinputsize然后strlivestreams +=细绳。格式(“使用视频输入size =”“ true”。&vblf)别的strlivestreams +=细绳。格式(“使用视频输入size =”“ false”。&vblf)结尾如果strlivestreams +=细绳。格式(“视频帧速率=”“ {0}”。&vblf,stream.videoframerate.tostring())如果stream.usevideoinputframerate然后strlivestreams +=细绳。格式(“使用视频输入帧速率=““ true”“”。&vblf)别的strlivestreams +=细绳。格式(“使用视频输入帧速率=““ false”“”。&vblf)结尾如果strlivestreams +=细绳。格式(“视频比特率=”“ {0}”。&vblf,stream.videobitrate.tostring())如果stream.qsvacceleration然后strlivestreams +=细绳。格式(“ qsvacceleration =”“ true”。&vblf)别的strlivestreams +=细绳。格式(“ qsvacceleration =”“ false”。&vblf)结尾如果如果然后strlivestreams +=细绳。格式(“ cudaacceleration =”“ true”。&vblf)别的strlivestreams +=细绳。格式(“ cudaacceleration =”“ false”。&vblf)结尾如果nselection = stream.audiotypes.selection暗淡strtype作为细绳=“”如果nselection <0然后strtype =“ <无选择>”别的strtype = stream.audiotypes(nse​​lection).friendlyname结尾如果如果stream.usedeviceencoding然后strlivestreams +=细绳。格式(“使用设备编码=”“ true”“”。&vblf)别的strlivestreams +=细绳。格式(“使用设备编码=”“ false”“。”。&vblf)结尾如果strlivestreams +=细绳。格式(“最小片段持续时间=”“ {0}”。&vblf,stream.minimum fragmentDuration.tostring())如果然后strlivestreams +=细绳。格式(“ enable =”“ true”“。”。&vblf)别的strlivestreams +=细绳。格式(“ enable =”“ false”“。”。&vblf)结尾如果如果流。激活剂然后strlivestreams +=细绳。格式(“ activateDemand =”“ true”。&vblf)别的strlivestreams +=细绳。格式(“ activateDemand =”“ false”。&vblf)结尾如果strlivestreams +=细绳。格式(“ idletimeout =”“ {0}”。&vblf,stream.idletimeout.tostring())如果然后strlivestreams +=细绳。格式(“ cudadecoding =”“ true”。&vblf)别的strlivestreams +=细绳。格式(“ cudadecoding =”“ false”。&vblf)结尾如果如果stream.qsvdecoding然后strlivestreams +=细绳。格式(“ qsvDecoding =”“ true”。&vblf)别的strlivestreams +=细绳。格式(“ qsvDecoding =”“ false”。&vblf)结尾如果如果stream.hasvideodeviceurl然后strlivestreams +=细绳。格式(“ videodeviceurl =”“ {0}”。&vblf,stream.videodeviceurl)结尾如果下一个'显示消息包含实时流信息字符串MessageBox.Show(strlivestreams,“ LeadTools媒体流式示例”,MessageBoxButtons.ok,MessageBoxicon.Information)_Result =真的抓住生成exceptionname作为例外_Result =错误的结尾尝试结尾
要求

目标平台

也可以看看

参考

直播课

直播成员

LeadTools.MediasTreaming组件
188金宝搏的网址客服|支持|联系我们|知识产权通知
©1991-2021Lead Technologies,Inc。版权所有。