有我的代码。我在控制本身所在的右上角看到视频,但主网格背景是空的。它应该通过VisualBrush拍摄视频,对吧?我GOOGLE了几个样本,他们都使用相同的技巧,但它不工作...Vlc.DotNet WPF视频背景问题
我也试图把一些控制顶部的控制,但没有显示通过,因为我假设它使用内部的WinForms控件,这是最顶级的。
那么我如何获得这个视频作为背景?
<Grid>
<vlc:VlcControl x:Name="myVlcControl" Width="100" Height="100" HorizontalAlignment="Right" VerticalAlignment="Top" />
<Grid>
<Grid.Background>
<VisualBrush Stretch="Uniform">
<VisualBrush.Visual>
<Image Source="{Binding VideoSource, ElementName=myVlcControl}" />
</VisualBrush.Visual>
</VisualBrush >
</Grid.Background>
</Grid>
你见过将是老版Vlc.DotNet的教程。 2015年初发布了一个更新的版本,该版本使用WPF HwndHost来显示WinForms播放器。只是做了一些探讨,我不认为你可以使用VisualBrush和HwndHost。 – goobering
好吧,这解释了为什么它不起作用。任何替代品?我需要显示rtsp流... –
如果您只需要显示您的Feed,那么您可以尝试使用MediaElement。很确定它支持RTSP和VisualBrushes。 – goobering