Re: Remove flickering on resize and get rid of the aspect frame
- From: Stefan Kost <ensonic hora-obscura de>
- To: Filippo Argiolas <fargiolas gnome org>
- Cc: "cheese-list gnome org" <cheese-list gnome org>
- Subject: Re: Remove flickering on resize and get rid of the aspect frame
- Date: Mon, 25 May 2009 11:03:10 +0300
Filippo Argiolas schrieb:
> On Mon, May 25, 2009 at 9:37 AM, Stefan Kost <ensonic hora-obscura de> wrote:
>
>> hi,
>>
>> Filippo Argiolas schrieb:
>>
>>> On Sun, May 24, 2009 at 6:47 PM, daniel g. siegel <dgsiegel gnome org> wrote:
>>>
>>>
>>>> hey filippo!
>>>>
>>>>
>>> hey!
>>>
>>>
>>>
>> in the gstreamer seek example we do this:
>> video_window = gtk_drawing_area_new ();
>> g_signal_connect (G_OBJECT (video_window), "expose-event",
>> G_CALLBACK (handle_expose_cb), NULL);
>> gtk_widget_set_double_buffered (video_window, FALSE);
>>
>> static gboolean
>> handle_expose_cb (GtkWidget * widget, GdkEventExpose * event, gpointer data)
>> {
>> if (state < GST_STATE_PAUSED) {
>> gdk_draw_rectangle (widget->window, widget->style->black_gc, TRUE,
>> 0, 0, widget->allocation.width, widget->allocation.height);
>> }
>> return FALSE;
>> }
>>
>> this is kind of video-specific - it ensures that xvimagsink paint the
>> video if pipeline is in paused and there is an expose. but you could
>> also turn off expose-handling on xvimagesink.
>>
>
> I'm not sure to understand what you mean. According to GstXOverlay
> docs, gst_x_overlay_expose should work in PAUSED state too. Am I
> missing anything?
>
Yes, exactly. Unless you disable "handle-expose" in xvimagesink, it will
redraw current frame in paused/playing. But if the pipeline is not
started yet, and you resize the window no one repaints and it looks
ugly. Thats what the above code takes care of.
Stefan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]