小编che*_*Out的帖子

使用VLC来承载无限视频循环的流

我想通过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)

谢谢

vlc rtsp video-streaming

8
推荐指数
2
解决办法
1万
查看次数

字符串到枚举

我有一个普查员:

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)

matlab enumeration

5
推荐指数
1
解决办法
474
查看次数

如何将标签链接到F#中的可变变量?

我想在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)

f# mutable

0
推荐指数
1
解决办法
94
查看次数

标签 统计

enumeration ×1

f# ×1

matlab ×1

mutable ×1

rtsp ×1

video-streaming ×1

vlc ×1