diff options
author | Benjamin Otte <otte@redhat.com> | 2018-02-24 23:57:52 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2018-03-18 05:19:59 +0100 |
commit | 074c8297369bb539373036880720a7a653bf6e8f (patch) | |
tree | 07db64884c672c8de7f694431561fb10edc503ed | |
parent | 2a8d7f8d6ac728b83c1f9eb9498c37cc959a9648 (diff) | |
download | gtk+-074c8297369bb539373036880720a7a653bf6e8f.tar.gz |
demos: Add a video benchmark to widgetbowl demo
-rw-r--r-- | demos/gtk-demo/widgetbowl.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/demos/gtk-demo/widgetbowl.c b/demos/gtk-demo/widgetbowl.c index aadee03610..6b0260469a 100644 --- a/demos/gtk-demo/widgetbowl.c +++ b/demos/gtk-demo/widgetbowl.c @@ -82,6 +82,18 @@ create_label (void) } static GtkWidget * +create_video (void) +{ + GtkMediaStream *stream = gtk_media_file_new_for_resource ("/images/gtk-logo.webm"); + GtkWidget *w = gtk_image_new_from_paintable (GDK_PAINTABLE (stream)); + gtk_media_stream_set_loop (stream, TRUE); + gtk_media_stream_play (stream); + g_object_unref (stream); + + return w; +} + +static GtkWidget * create_gears (void) { GtkWidget *w = gtk_gears_new (); @@ -102,6 +114,7 @@ static const struct { { "Label" , create_label }, { "Spinner" , create_spinner }, { "Spinbutton", create_spinbutton }, + { "Video", create_video }, { "Gears", create_gears }, }; |