LibVLCSharp Stream does not work consistently

This forum is about all development around libVLC.
Smurfj3
New Cone
New Cone
Posts: 1
Joined: 11 Apr 2023 22:56

LibVLCSharp Stream does not work consistently

Postby Smurfj3 » 11 Apr 2023 23:06

My application has a list of type MediaPlayer, I bind to in my XAML like so:

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>
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.

mfkl
Developer
Developer
Posts: 739
Joined: 13 Jun 2017 10:41

Re: LibVLCSharp Stream does not work consistently

Postby mfkl » 13 Apr 2023 06:32

Please share a minimal sample over git so we can have a look. My guess is you are starting the stream before the layout has finished fully loading, so libvlc has nowhere to draw.
https://mfkl.github.io


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 18 guests