Re: Remove flickering on resize and get rid of the aspect frame



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.

Stefan
>> again, this is an awesome feature. it seems to work fine, i just have
>> some comments:
>>
>>      * on start, i automatically get 2 small black borders on each side
>>        with a resolution of 640x480. we should remove that.
>>     
>
> I tried but it's quite difficult. Here setting the default window
> width to 612 (now is 640) makes the bars vanish but I doubt with a
> different theme, or a different font size, this window would be the
> same.
> Try yourself resizing the window (just the width should be enough) and
> getting the optimal size with xwininfo. I guess it won't be 612..
> We need a way to set a default size just for the drawing area but the
> only one I know is size_request that sets a minimum hardcoded size, we
> need just an initial size.
> If anyone knows how to do it please tell us!
>
>   
>>      * crazy thought: what about painting the whole window black?
>>        except for accessibility, this might look nice
>>     
>
> Hehe probably it'd look nice but it would be completely different from
> the rest of the desktop. I don't think you would get too much
> consensus here :)
>
>   
>>      * http://bugzilla.gnome.org/show_bug.cgi?id=527623 comes to my
>>        mind, should we fix that too?
>>     
>
> Uhm cheese works fine on my netbook and I can resize it to fit the
> screen. Anyway I think the only definitive way to fix that would be to
> have an horizontal mode (with the vertical thumbview on a side).
> That will eventually fix the hildon mode not working anymore.
>
>   
>> thanks for your great work!
>>     
>
> thank you!
>
> Filippo
> _______________________________________________
> Cheese-list mailing list
> Cheese-list gnome org
> http://mail.gnome.org/mailman/listinfo/cheese-list
>   



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