[Libvlcsharp] How to feed libvlcsharp with data[] stream
Posted: 06 Dec 2021 09:37
Hello guys
I have an app in vb.net (winForms) that I want to play a valid TS with the video & audio PIDs. It works fine if I stream it using TCP/UDP protocol from the app itself, but I want to do it without doing a network stream.
I see this can be doing using StreamMediaInput, but I don't know how to do it right.
I have this:
Doing stream to TCP to a libvlcsharp is ok, how I can doing it directly passing the Data() array to libvlcsharp?
The problem is the buffer. It plays well few seconds and then it stops playback. How I can handle this? It seems that memory that are in vlc_memorystream aren't reset when is needed..
I'm a bit newbie in this things, so a help will be very welcome
Thank you.
I have an app in vb.net (winForms) that I want to play a valid TS with the video & audio PIDs. It works fine if I stream it using TCP/UDP protocol from the app itself, but I want to do it without doing a network stream.
I see this can be doing using StreamMediaInput, but I don't know how to do it right.
I have this:
Code: Select all
Dim vlc_memorystream as stream
Private Sub WriteStream(ByVal Data() As Byte, ByVal len As Integer)
'Data() array is the video TS (MPEG-2) (188 bytes len)
vlc_memorystream.Write(Data, 0, len)
End Sub
Doing stream to TCP to a libvlcsharp is ok, how I can doing it directly passing the Data() array to libvlcsharp?
The problem is the buffer. It plays well few seconds and then it stops playback. How I can handle this? It seems that memory that are in vlc_memorystream aren't reset when is needed..
I'm a bit newbie in this things, so a help will be very welcome
Thank you.