Hi guys:
Sorry if is not the correct forum, but I'm very interesting in use and help with the .NET interface for VLC, so my question is where can I get a fresh copy of the source or where can a check out the last version (svn repo?).
I would suggest using this wrapper instead:
viewtopic.php?f=14&t=52021&start=15
1) I'm a c#/mono programmer so I wonder if someone test this libvlc wrapper in c# on linux?
both wrappers work, with some few modifications. i am going to post my changes to the meedios wrapper in the corresponding thread.
2) the current wrapper is not a wrapper arround a ActiveX control right?
no
3) the native function wrappers are also in C# not VS.NET C++ right?
and finally...
no
4) what is the current status of the vlc streaming capabilities of LibVlc and/or the .NET wrapper?
does work, by adding stream output options to the mrl.
You are setting up the frequency and the other stuff, by adding mrl-options to your mediadiscriptor, right? Then you just have to add ":programs=[SID]" as option to your mediadiscriptor objekt.
You mean "libvlc_media.add_option(options, ref ex);"? I tried setting the options as you said, but it doesn't work. What does the "SID" mean? Is it the program ID of the TS stream? But the program ID is always changing.
SID is the service identifier that should be in any DVB stream. Imho it describes the Video and Audio PIDs belonging to a channel.
Here is some Code i wrote for the meedios Wrapper mentioned above:
Code: Select all
// Main.cs created with MonoDevelop
// User: bexx at 1:15 AM 11/20/2008
//
// To change standard headers go to Edit->Preferences->Coding->Standard Headers
//
using System;
using VideoLan;
using System.Threading;
namespace DVBsharp
{
public interface VlcDvbChannel
{
String[] mrlOptions
{
get;
}
}
public class SChannel : VlcDvbChannel
{
private readonly String name;
private readonly int frequency;
private readonly int symbolrate;
private readonly int sid;
private readonly bool horizontal;
public SChannel(String name, int frequency, int symbolrate, int sid, bool horizontal)
{
this.name = name;
this.frequency = frequency;
this.symbolrate = symbolrate;
this.sid = sid;
this.horizontal = horizontal;
}
public String Name
{
get { return name; }
}
public int Frequency
{
get { return frequency; }
}
public int Symbolrate
{
get { return symbolrate; }
}
public int Sid
{
get { return sid; }
}
public bool isHorizontal
{
get { return horizontal; }
}
public String[] mrlOptions
{
get { return new String[] {":dvb-frequency="+frequency, ":dvb-srate="+symbolrate, ":dvb-voltage="+(horizontal?"18":"13"), ":program="+sid}; } // program does work for streaming, but does not for playing
}
}
class MainClass
{
public static void Main(string[] args)
{
// init libvlc
VideoLanClient vlc = new VideoLanClient(new String[]{});
// mrl
VlcMedia media = vlc.NewMedia("dvb://");
SChannel chan1 = new SChannel("Das Erste", 11836000, 27500000, 28106, true);
foreach (string option in chan1.mrlOptions)
media.AddOption(option);
//player
VlcMediaPlayer player = vlc.NewMediaPlayer(IntPtr.Zero, media);
player.StateChanged += new EventHandler<StateChangedEventArgs>(StateChanged);
//
Thread.Sleep(10000);
player.Play();
Thread.Sleep(10000);
player.Video.FullScreen = true;
Thread.Sleep(30000);
player.Stop();
}
private static void StateChanged(object sender, StateChangedEventArgs e)
{
Console.WriteLine("State: " + e.NewState);
}
}
}
This is working on ubuntu with an new VideoLanClient Constructor, and should work on windows, when you adjust the "mrlOptions" property to your needs.