[vlc-devel] Re: GdkBadShmSeg: x11-gtk problem at EOF
Jean-Paul Saman
jean-paul.saman at planet.nl
Sun Jan 18 15:38:52 CET 2004
federico f wrote:
> hello everyone,
>
> i've modified the 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).
Why using gtk-1.2 in a video output plugin ??
Please bear in mind that this WILL BREAK the iPAQ port of VLC, because
it does not use gtk-1.2.
It would be better to create a new video output plugin and name it
vout_gtk12 instead of modifying the vout_x11.
> 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
--
Many greetings,
Jean-Paul Saman
Consultant/Freelancer
--------------------------------------------------------------
VLC iPAQ maintainer http://www.videolan.org
RedHat Certified Engineer RHCE number: 807202745005548
--------------------------------------------------------------
--
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html
If you are in trouble, please contact <postmaster at videolan.org>
More information about the vlc-devel
mailing list