Page 1 of 1

VLC_AddTarget() returns 4 -> whats that for an error?

Posted: 24 May 2007 16:17
by CaptainIglo
Hi,

I'm using LibVLC.dll under C# and sometimes if I and a file to the VLC-Playlist with VLC_AddTarget the method returns 4.
Whats that for an Error and how could I avoid them?

greets

Posted: 30 May 2007 09:13
by CaptainIglo
Nobody knows this?!?
No one of the developers here?

Posted: 30 May 2007 09:18
by MetalheadGautham
please give more details about your problem and your system, and illustrate your post with a screenshot.

Posted: 30 May 2007 10:34
by CaptainIglo
I'm using the following wrapper to use VLC in C#:
http://www.nht-center.net/VLC.net_Main.cs

And the following code to add the File to the VLC:

Code: Select all

options = new string[] { ":sout=#standard{access=udp,mux=ts,dst=" + RemoteIP + ":" + Port + "}", ":no-one-instance", ":no-loop", ":no-drop-late-frames" }; VLC.Error err = vlc.AddTarget(VideoFile, options); if (err == VLC.Error.Success) { err = vlc.Play(); if (err == VLC.Error.Success) { err = vlc.Next(); if (err != VLC.Error.Success) { if (vlc.IsPlaying) { Message.Enqueue("Starting Video Stream: " + VideoFile + " on Port " + Port); OnStatusMessage(EventArgs.Empty); } else { Message.Enqueue("Error starting to stream " + VideoFile + " on Port " + Port + ": VLC is not playing - " + vlc.GetError()); OnStatusMessage(EventArgs.Empty); } } else { Message.Enqueue("Error selecting the target " + VideoFile + " on Port " + Port + ": " + vlc.GetError()); OnStatusMessage(EventArgs.Empty); } } else { Message.Enqueue("Error playing the stream " + VideoFile + " on Port " + Port + ": " + vlc.GetError()); OnStatusMessage(EventArgs.Empty); } } else { Message.Enqueue("Error adding target " + VideoFile + " on Port " + Port + ": " + vlc.GetError()); OnStatusMessage(EventArgs.Empty); }
Where VideoFile is the Filename including the Path to the File.
I got sometime the return of 4 (unkonwn error) at the VLC_AddTarget() method, but sometimes it works.