LibVLCSharp Stream does not work consistently
Posted: 11 Apr 2023 23:06
My application has a list of type MediaPlayer, I bind to in my XAML like so:
Everytime I switch to that content page it either works or doesn't, it's very inconsistent. What is really weird to me, is that VLC spams the console with messages like:
[VLC] [0000007c1bfc8d90/3822] libvlc window: libvlc_media_player options not set
[VLC] [0000007c370d1a90/38b2] libvlc vout display: parent window not available
[VLC] [0000007c370c0990/3822] libvlc video output: video output creation failed
[VLC] [0000007c3cd7fa10/3822] libvlc decoder: failed to create video output
Even when the stream is working perfectly fine, it still spams those messages. This is just have 1 item in the list.
I figured I would fix the "[VLC] [0000007c1bfc8d90/3822] libvlc window: libvlc_media_player options not set" error by setting some options, which it did get rid of that specific message, but it just got replaces by a tons of different messages.
Code: Select all
FlexLayout x:Name="FlexyAllCams" BindableLayout.ItemsSource="{Binding RTSPStreams}">
<BindableLayout.ItemTemplate>
<DataTemplate>
<shared:VideoView x:Name="CameraView" MediaPlayerChanged="CameraView_MediaPlayerChanged" MediaPlayer="{Binding MediaPlayer, Mode=OneTime}" WidthRequest="150" HeightRequest="150" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand"></shared:VideoView>
</DataTemplate>
</BindableLayout.ItemTemplate>
</FlexLayout>
[VLC] [0000007c1bfc8d90/3822] libvlc window: libvlc_media_player options not set
[VLC] [0000007c370d1a90/38b2] libvlc vout display: parent window not available
[VLC] [0000007c370c0990/3822] libvlc video output: video output creation failed
[VLC] [0000007c3cd7fa10/3822] libvlc decoder: failed to create video output
Even when the stream is working perfectly fine, it still spams those messages. This is just have 1 item in the list.
I figured I would fix the "[VLC] [0000007c1bfc8d90/3822] libvlc window: libvlc_media_player options not set" error by setting some options, which it did get rid of that specific message, but it just got replaces by a tons of different messages.