Hi! Thanks for help! This is a solution:
(The Socket must be visible and have been dimensions!!!)
using System;
using Gtk;
using System.Runtime.InteropServices;
public partial class MainWindow : Gtk.Window
{
private Gtk.Socket socket;
private int xid;
public MainWindow () : base(Gtk.WindowType.Toplevel)
{
Build ();
this.socket = new Socket();
this.socket.WidthRequest = 320;
this.socket.HeightRequest = 240;
this.socket.Visible = true;
this.socket.Realized += new EventHandler(OnVideoWidgetRealized);
this.fixed2.Put(socket, 0, 0);
}
protected virtual void OnVideoWidgetRealized (object sender, EventArgs
args)
{
this.xid = (int)socket.Id;
}
protected void OnDeleteEvent (object sender, DeleteEventArgs a)
{
Application.Quit ();
a.RetVal = true;
this.socket = new Socket();
}
protected virtual void OnButton17Clicked (object sender,
System.EventArgs
e)
{
var paramString = string.Format("-wid {0} -vo x11 -really-quiet
-msglevel
all=-1 gooddog.wmv", xid);
System.Diagnostics.Process proc = new
System.Diagnostics.Process();
proc.StartInfo.FileName = "/usr/bin/mplayer";
proc.StartInfo.Arguments = paramString;
proc.Start();
proc.WaitForExit();
}
}
--
View this message in context:
http://mono.1490590.n4.nabble.com/Video-player-widget-tp3456066p3483020.html
Sent from the Mono - Gtk# mailing list archive at Nabble.com.
_______________________________________________
Gtk-sharp-list maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list