Re: How to redraw the blanked section of a widget after a expose-event?

2007-09-26 Thread Milosz Derezynski
This forces the XOverlay element (in this case xvimagesink?) to
redraw: 
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstxoverlay.html#gst-x-overlay-expose
, although your actual code would be of much interest in order to
help.

-- Milosz

On 9/27/07, krist misra <[EMAIL PROTECTED]> wrote:
> Hi Paul,
> Thanks for your reply, generally for the static stuff, such as text or a
> picture, it can be saved and then redrawed after expose-event occurs, but
> how can i save and redraw it for video that keeps moving on? I try to set
> the xviamge output to the exposed widget one more time in the expose-event
> handler, I thought it should rerender the covered part, but in fact it does
> not act as what i was thinking.
> I am not sure where I should post this question, maillist of gstreamer or
> that of gtk...
> Thanks
>
> K.M
>
>
>
> On 9/27/07, Paul Davis <[EMAIL PROTECTED]> wrote:
> > On Thu, 2007-09-27 at 10:42 +0800, krist misra wrote:
> > > Hi experts,
> > >
> > > I am using GTK+ and gstreamer to capture and show the video frames, I
> > > created a drawable widget using gtk_drawing_area_new() and using
> > > xvimage element of gstreamer to render the video, I also connected
> > > them by a gstreamer function gst_x_overlay_set_xwindow_id(), so the
> > > video frames rendered  by xvimage can show in the widget, now it works
> > > well.
> >
> > > But I encounter a problem that if part of the drawable widget being
> > > covered by a menu or something, when the menu disappears, the covered
> > > section keeps blank, even other part of the widget still show the
> > > video.
> >
> > an expose event handler is required to *redraw* the area specified in
> > the expose event. receipt of this event means (generally speaking) that
> > whatever the contents of the window in that area used to be, they are
> > lost and needed to be recomputed/redrawn.
> >
> >
> >
>
>
> ___
> gtk-list mailing list
> gtk-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-list
>
>
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: How to redraw the blanked section of a widget after a expose-event?

2007-09-26 Thread Paul Davis
On Thu, 2007-09-27 at 12:36 +0800, krist misra wrote:
> Hi Paul,
> Thanks for your reply, generally for the static stuff, such as text or
> a  picture, it can be saved and then redrawed after expose-event
> occurs, but how can i save and redraw it for video that keeps moving
> on? I try to set the xviamge output to the exposed widget one more
> time in the expose-event handler, I thought it should rerender the
> covered part, but in fact it does not act as what i was thinking.
> I am not sure where I should post this question, maillist of gstreamer
> or that of gtk...

sounds as though you need to find a way to proxy the event or something
related to it to xviamage ... 



___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: How to redraw the blanked section of a widget after a expose-event?

2007-09-26 Thread krist misra
Hi Paul,
Thanks for your reply, generally for the static stuff, such as text or a
 picture, it can be saved and then redrawed after expose-event occurs, but
how can i save and redraw it for video that keeps moving on? I try to set
the xviamge output to the exposed widget one more time in the expose-event
handler, I thought it should rerender the covered part, but in fact it does
not act as what i was thinking.
I am not sure where I should post this question, maillist of gstreamer or
that of gtk...
Thanks

K.M


On 9/27/07, Paul Davis <[EMAIL PROTECTED]> wrote:
>
> On Thu, 2007-09-27 at 10:42 +0800, krist misra wrote:
> > Hi experts,
> >
> > I am using GTK+ and gstreamer to capture and show the video frames, I
> > created a drawable widget using gtk_drawing_area_new() and using
> > xvimage element of gstreamer to render the video, I also connected
> > them by a gstreamer function gst_x_overlay_set_xwindow_id(), so the
> > video frames rendered  by xvimage can show in the widget, now it works
> > well.
>
> > But I encounter a problem that if part of the drawable widget being
> > covered by a menu or something, when the menu disappears, the covered
> > section keeps blank, even other part of the widget still show the
> > video.
>
> an expose event handler is required to *redraw* the area specified in
> the expose event. receipt of this event means (generally speaking) that
> whatever the contents of the window in that area used to be, they are
> lost and needed to be recomputed/redrawn.
>
>
>
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: How to redraw the blanked section of a widget after a expose-event?

2007-09-26 Thread Paul Davis
On Thu, 2007-09-27 at 10:42 +0800, krist misra wrote:
> Hi experts,
> 
> I am using GTK+ and gstreamer to capture and show the video frames, I
> created a drawable widget using gtk_drawing_area_new() and using
> xvimage element of gstreamer to render the video, I also connected
> them by a gstreamer function gst_x_overlay_set_xwindow_id(), so the
> video frames rendered  by xvimage can show in the widget, now it works
> well.

> But I encounter a problem that if part of the drawable widget being
> covered by a menu or something, when the menu disappears, the covered
> section keeps blank, even other part of the widget still show the
> video.

an expose event handler is required to *redraw* the area specified in
the expose event. receipt of this event means (generally speaking) that
whatever the contents of the window in that area used to be, they are
lost and needed to be recomputed/redrawn.


___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


How to redraw the blanked section of a widget after a expose-event?

2007-09-26 Thread krist misra
Hi experts,

I am using GTK+ and gstreamer to capture and show the video frames, I
created a drawable widget using gtk_drawing_area_new() and using xvimage
element of gstreamer to render the video, I also connected them by a
gstreamer function gst_x_overlay_set_xwindow_id(), so the video frames
rendered  by xvimage can show in the widget, now it works well.

But I encounter a problem that if part of the drawable widget being covered
by a menu or something, when the menu disappears, the covered section keeps
blank, even other part of the widget still show the video.

I try to write a function expose_cb() and connect it with the signal
"expose-event", in that function I call gst_x_overlay_set_xwindow_id()
again and also gtk_widget_show_all(), but it seems still not work. cos it's
showing a video so I cannot save some image and redraw it again
after it exposes.

Anyone can help me? how should I do in the expose_cb or something else?
Thanks a lot
below is part of the source code
-
static gboolean expose_cb(GtkWidget * widget, GdkEventExpose * event,
gpointer data)
{
gst_x_overlay_set_xwindow_id(GST_X_OVERLAY(data),
  GDK_WINDOW_XWINDOW(widget->window));
gtk_widget_show_all(widget);
}

int main()
{
...
  gstreamer_main_video_image = gtk_drawing_area_new();
...
  screen_sink = gst_bin_get_by_name (GST_BIN (appdata.bin), "screensink");
...
  gst_x_overlay_set_xwindow_id(GST_X_OVERLAY(screen_sink),
GDK_WINDOW_XWINDOW(gstreamer_main_video_image->window));
   g_signal_connect(gstreamer_main_video_image, "expose-event",
G_CALLBACK(expose_cb),
 screen_sink);
  gtk_widget_show_all(gstreamer_window);
...
}

Krist.
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: gtk version

2007-09-26 Thread Vivien Malerba
On 9/26/07, Amboo Srivastava <[EMAIL PROTECTED]> wrote:
>
>
> Hi all,
>
> I am a newbie to Linux/Solaris. I am running into a problem related to gtk
> version. I have 2 versions of gtk+ installed on my Solaris 10 machine. I
> have installed gtk 2.6 from blastwave.org but when I type in the command:
> pkg-config --modversion gtk+-2.0, I get gtk2.4.9 as the version installed.
> Is it possible by any means to know how many versions of gtk are installed
> and which one is currently being used? How do I remove the older version of
> gtk? Any help on this will be deeply appreciated.
>

pkg-config uses the PKG_CONFIG_PATH environment variable to look for
.pc files, and it also looks for default location(s). Make sure that
variable is set to point to the prefix of the GTK+ version you want to
use.

Vivien
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


gtk version

2007-09-26 Thread Amboo Srivastava
Hi all,
 
I am a newbie to Linux/Solaris. I am running into a problem related to
gtk version. I have 2 versions of gtk+ installed on my Solaris 10
machine. I have installed gtk 2.6 from blastwave.org but when I type in
the command: pkg-config --modversion gtk+-2.0, I get gtk2.4.9 as the
version installed. Is it possible by any means to know how many versions
of gtk are installed and which one is currently being used? How do I
remove the older version of gtk? Any help on this will be deeply
appreciated.
 
Thanks in advance,
-Amboo
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list