hii,
i m using ubuntu 11.10
and working on Monodevelop to create c# apps
i want to embed media control in my app.
can we make videocontrol widget in monodevelop????
so that we can drag drop the control like other controls
....im posting my code,i tried with mplayer
with this code im able to invoke mplayerexe and play video in it.
but this mplayer is opening out side of app.i want it to embed in my gtk widget.
Code:
---------------------code----------------------
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();
}
}