GdkBadShmSeg: VLC x11-gtk problem at EOF



hello everyone,
 
i've modified the VideoLanClient X11 video output plugin, xcommon.c, by using Gtk-1.2 . I will spare the details on the Makefile changes i've made (X11 lib and headers flags).
 
The gtk_main plugin is loaded in the Activate function.
 
Now in place of the 2 Xlib windows, in the  there'a GTK window which includes a drawing area and a button.
All the Gtk widgets are declared as global variables.
 
static int CreateWindow( vout_thread_t *p_vout, x11_window_t *p_win )

gdk_threads_enter();
 gwin=gtk_window_new(GTK_WINDOW_TOPLEVEL);
  
 
gtk_widget_realize(gwin);
gtk_signal_connect (GTK_OBJECT (gwin), "destroy",
                      GTK_SIGNAL_FUNC (destroy),(gpointer)p_vout);
 
//DRAWING AREA
 
da=gtk_drawing_area_new();
gtk_drawing_area_size((GtkDrawingArea*)da,240,255);
//VBOX
vbox=gtk_vbox_new(FALSE,0);
 
gtk_widget_show(vbox);
gtk_container_add(GTK_CONTAINER(gwin),vbox);
gtk_box_pack_start(GTK_BOX(vbox),da,FALSE,FALSE,0);
//function creating button
CreateButton(vbox);
gtk_widget_show_all(gwin);
gdk_threads_leave();
return VLC_SUCCESS;
The aim is to display the current frame in the drawing area (da). Then i've modified the XShmPutImage() function in Display_Video():
 
XShmPutImage( GDK_WINDOW_XDISPLAY(da->window),
                      GDK_WINDOW_XWINDOW(da->window),
                      GDK_GC_XGC(da->style->fg_gc[da->state]), p_pic->p_sys->p_image,
                      0 /*src_x*/, 0 /*src_y*/, 0 /*dest_x*/, 0 /*dest_y*/,
                      p_vout->output.i_width, p_vout->output.i_height,
                      False  );//Don't put TRUE !*/
 
I left the remaining code untouched, SHM parameters and stuff, and that's what I get only at EOF:
 
Gdk-ERROR ** : BadShmSeg( invalid shared segment parameter) error_code 167 request_code 144 minor_code 3
 
What's the story , any idea ?
 
Greetings,
federico


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]