我想通过WIFI网络向我的电脑提供视频流,通过WIFI网络连接智能手机进行回归测试.完成智能手机后,视频应在开始时自动重启.
我目前正在使用rtsp作为协议和循环选项,但这不是强制性的.问题是,每次视频重新启动时,都需要进行新的rtsp握手.由于我测试的大多数智能手机应用程序都不支持在完成后自动重新连接流,因此我希望在整个过程中只有一次握手有效.
vlc mypath\myvideo.mp4 sout=#transcode{vcodec=h264,acodec=none}:rtp{sdp=rtsp://:8554/} --loop
Run Code Online (Sandbox Code Playgroud)
谢谢
我有一个普查员:
classdef Commands
properties
commandString;
readonly;
end
methods
function obj = Commands(commandString, readonly)
obj.commandString = commandString;
obj.readonly= readonly;
end
end
enumeration
PositionMode('p', false)
TravelDistance('s', false)
end
end
Run Code Online (Sandbox Code Playgroud)
我有一个字符串:
currentCommand = 'PositionMode';
Run Code Online (Sandbox Code Playgroud)
我希望能够回归:
Commands.PositionMode
Run Code Online (Sandbox Code Playgroud)
有没有更好的解决方案呢?
methods(Static)
function obj = str2Command(string)
obj = eval(['Commands.' string]);
end
end
Run Code Online (Sandbox Code Playgroud) 我想在F#中创建一个标签,它使用一个可变变量来返回一个值.不幸的是,F#将此标签设置为常量值.如果mutable的值发生更改,则标签的值仍然存在.是不是有点不一致?有没有办法让标签("a")依赖于mutable("x")?
let mutable x = 0;
let a = x + 2; // I want not to set a to a constant value
let b two = x + two;
x <- 1;
let c = b 2;
let isConsistent = a = c;
val mutable x : int = 1
val a : int = 2
val b : two:int -> int
val c : int = 3
val isConsistent : bool = false
Run Code Online (Sandbox Code Playgroud)