1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
using AxAXVLC;
using AXVLC;
//ActiveX VLC
private AxVLCPlugin vlcPlayer = new AxVLCPlugin();
((System.ComponentModel.ISupportInitialize)(vlcPlayer)).BeginInit();
vlcPlayer.Enabled = true;
vlcPlayer.Location = new System.Drawing.Point(100, 100);
vlcPlayer.Name = "VLC";
vlcPlayer.Size = new System.Drawing.Size(320, 240);
private void Start_VLC(object sender, EventArgs e)
{
try
{
//Je lance ma webcam et j'envoi son flux par udp
this.axVLC.addTarget("dshow:// :dshow-vdev=\"\" :dshow-adev=\"none\" :dshow-size=\"\"", new string[] { ":sout=#transcode{vcodec=h264,vb=256,scale=1,acodec=mp4a,ab=32,channels=2}:duplicate{dst=display,dst=std{access=udp,mux=ts,dst=192.168.29.243:1234}}" }, AXVLC.VLCPlaylistMode.VLCPlayListAppendAndGo, -666);
}
catch (Exception e)
{
MessageBox.Show(e.ToString());
}
} |