<p>Hi experts,</p>
<p>I build a bin to receive video streams from udpsrc and finally use xvimagesink to render video frames, I also create a drawable widget with gtk_drawing_area_new() and use gst_x_overlay_set_xwindow_id() to set the output to this widget. But I meet a problem that if this widget or part of it being covered by a menu or something, after it exposes again the covered section keeps blank,
</p>
<p>I try to resolve it by connecting the "expose-event" signal to my expose_cb() function, in this function I call gst_x_overlay_set_xwindow_id() again and gtk_widget_show(), but after I have done all of these it seems still not work.
<br>What I should do in the expose function or anywhere to let it redraw the blanked section?<br>Thanks a lot.<br>below is part of the source code,<br>----------------------------------------------------------------------------------------
<br>static gboolean expose_cb(GtkWidget * widget, GdkEventExpose * event, gpointer data)<br>{<br> gst_x_overlay_set_xwindow_id(GST_X_OVERLAY(data),<br> GDK_WINDOW_XWINDOW(widget->window));
<br> gtk_widget_show_all(widget);<br>}</p>
<p>int main()<br>{<br>...<br> gstreamer_main_video_image = gtk_drawing_area_new();<br>...<br> screen_sink = gst_bin_get_by_name (GST_BIN (appdata.bin), "screensink");<br>...<br> gst_x_overlay_set_xwindow_id(GST_X_OVERLAY(screen_sink),
<br> GDK_WINDOW_XWINDOW(gstreamer_main_video_image->window));<br> g_signal_connect(gstreamer_main_video_image, "expose-event", G_CALLBACK(expose_cb),<br> screen_sink);<br> gtk_widget_show_all(gstreamer_window);
<br>...<br>}<br>----------------------------------------------------------------------------------------<br>Thanks</p>
<p>Krist<br></p>