[MPlayer-users] embed mplayer window to gtk window and -wid option
Jayalakshmi
jaya at innovatesolutions.net
Tue Oct 13 08:45:38 CEST 2009
hi,
below I have attached my code, can anyone please tell me, why it is not
showing any window ? only i can here sound.
-------------------
#include <gtk/gtk.h>
int main( int argc,
char *argv[] )
{
GtkWidget *window;
GtkWidget *socket;
char cmd1[500];
gtk_init (&argc, &argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
socket = gtk_socket_new ();
gtk_widget_show (socket);
gtk_container_add (GTK_CONTAINER (window), socket);
gtk_widget_realize (socket);
g_print ("The ID of the sockets window is %d\n",
gtk_socket_get_id (socket));
system("killall mplayer");
sprintf(cmd1,"mplayer -wid %d -input file=/tmp/mplayer-input
Cutyyyyy.avi \n",gtk_socket_get_id (socket));
system(cmd1);
gtk_widget_show_all (window);
gtk_main ();
return 0;
}
---------------
waiting for solution,
jaya
More information about the MPlayer-users
mailing list