![](/img/trans.png)
[英]VLC.Dotnet.WPF control stretches portrait video. How can I get the control to not stretch the video
[英]--repeat comand doesn't work in Vlc.DotNet.WPF
我正在嘗試從我的服務器檢索 rtsp 流,當我斷開 vlc 連接時(發送拆卸請求后),我希望 vlc 重新連接。 當從控制台( vlc --repeat --rtsp-tcp rtsp://ip:port
)運行時,一切正常。 但是當從 wpf 應用程序運行時, --repeat 命令不起作用。
var libDirectory = new DirectoryInfo(Path.Combine(currentDirectory, "libvlc", IntPtr.Size == 4 ? "win-x86" : "win-x64"));
this.VlcControl.SourceProvider.CreatePlayer(libDirectory, new string[] { "--rtsp-tcp", "--repeat" });
string liveLink = $"rtsp://{ip}:{port}/{kid}";
this.VlcControl.SourceProvider.MediaPlayer.Play(liveLink);
已經嘗試使用命令--loop
和--insert-repeat=65535
什么都行不通。
任何人都可以提出解決問題的方法嗎?
// Declare a Delegate
delegate void delegate_vlc_play(Uri file, string[] pars);
// Make sure to link the Event
private void OnEndReached(object sender, Vlc.DotNet.Core.VlcMediaPlayerEndReachedEventArgs e)
{
if (_AutoLoop) // private field of externally visible Property "AutoLoop"
{
// Get a new instance of the delegate
delegate_vlc_play del_vlc = new delegate_vlc_play(myVLCControl.Play);
// Call asyncroneously (save _CurrentFile somewhere when you call the Play() in the first place)
del_vlc.BeginInvoke(new Uri(_CurrentFile), new string[] { }, null, null);
}
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.