![]() If you have downloaded an 圆4 build, replace the vlc-x86 folder name by vlc-amd64. I have researched a bit on the UWP-MediaPlayerElement to but I can't find a way to get my byte into it.After this, you need to get a recent nightly build of vlc-winrt: x86 or 圆4Įxtract the content from the archive to vlc-winrt/libvlc/Universal/vlc-x86/Debug/ and create the directories as necessary (where vlc-winrt is the repositorty root). Or is there even a better way to stream the video in this case? How can I get this to work with the VLC-Control (LibVLCSharp) in UWP? Am I missing something fundamental? It shows that the VLC-Control connects to the pipe, and I can see that data is written to the pipe but it doesn't display video. But on the UWP-App I can't get it to work even after adding /LOCAL/ to the pipe name. ![]() This works fine on the Windowsforms-App and I can get the delay down to 2 or 3 seconds (It should be better in the end but it is acceptable). (new Media(libVLC, FromType.FromLocation)) VideoView1.MediaPlayer = new MediaPlayer(libVLC) VideoPipe.Write(VideoData, 0, VideoDataLength) įollowing code initializes the pipe-server: // Open pipe that will be read by VLC.Īnd for VLC: LibVLC libVLC = new LibVLC() On the interface, I write the received byte to a named pipe, to which the VLC-Control connects to: while (VideoConnection.Connected)Īwait (VideoData, 0, VideoDataLength) SendByteArray() uses the NetworkStream.Write() Method. ![]() IFVideo.SendByteArray(VideoData, VideoDataLength) If (IFVideo != null & IFVideo.Connected = true) while (RCVVideo.Connected)Īwait (VideoData, 0, VideoDataLength) The next method runs on the server and just forwards the byte array to the connected interface-client. VideoConnection.SendByteArray(VideoData, VideoDataLength) īasically, this method just reads the h264 data from the Standard-Output-Stream of the raspivid process in chunks and sends it to the server. ![]() Send captured data to connected clients. While (await (VideoData, 0, VideoDataLength) != -1 & !VideoChannelToken.IsCancellationRequested & RemoteDeviceConnected & !VideoStreamPaused) If(!Array.Exists(Process.GetProcesses(), p => p.ProcessName.Contains("raspivid"))) Check if Raspivid-Process is already running While (!RemoteDeviceConnected || VideoStreamPaused) Wait with streaming until the Interface is connected I use mono to run my C# script on the Raspberry and the code to stream the Video looks like this: while (true) But instead of using the Eneter.Messaging-library I use my own class for communication with TcpClients. I have tried several techniques like Netcat the video output over the server to the client or direct TCP-streaming with raspivid, but the best solution so far is the one I found in this project here. This part already works but now my problem is that I have to implement video streaming from the Raspberry to the UWP-APP.īecause my partner is in charge of creating and designing the UWP-APP, I have made myself a little Test-Interface with WindowsForms. Because both, the Raspberry and the computer with the interface, have got a private IP, I have to use a server to forward messages from one client to the other one. ![]() For a project, I have to communicate with a Raspberry Pi Zero from a UWP-APP via TCP. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |