From 06bba05143eee025075ab9d4bd47be60793ce87b Mon Sep 17 00:00:00 2001 From: Stefan Sauer Date: Tue, 23 Oct 2012 15:54:06 +0200 Subject: [PATCH] cleanup. update name and year, queue a redraw for album art --- mediainfo/src/mi-app.vala | 2 +- mediainfo/src/mi-info.vala | 15 +++++---------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/mediainfo/src/mi-app.vala b/mediainfo/src/mi-app.vala index e0f7463ca9..94f6228e57 100644 --- a/mediainfo/src/mi-app.vala +++ b/mediainfo/src/mi-app.vala @@ -1,5 +1,5 @@ /* GStreamer media browser - * Copyright (C) 2010 Stefan Sauer + * Copyright (C) 2010-2012 Stefan Sauer * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public diff --git a/mediainfo/src/mi-info.vala b/mediainfo/src/mi-info.vala index d0ab2533cd..e0e17c57bb 100644 --- a/mediainfo/src/mi-info.vala +++ b/mediainfo/src/mi-info.vala @@ -1,5 +1,5 @@ /* GStreamer media browser - * Copyright (C) 2010 Stefan Sauer + * Copyright (C) 2010-2012 Stefan Sauer * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -628,6 +628,8 @@ public class MediaInfo.Info : VPaned nb.append_page (table, new Label (@"audio $i")); } nb.show_all(); + + drawing_area.queue_draw(); //l = info.get_container_streams (); @@ -765,15 +767,7 @@ public class MediaInfo.Info : VPaned if (str.length > 0) str += "\n"; - // TODO: decode images: - /* - GInputStream is = g_memory_input_stream_new_from_data(GST_BUFFER_DATA(buf),GST_BUFFER_SIZE(buf,NULL); - GdkPixbuf pb = gdk_pixbuf_new_from_stream(is, NULL, NULL); - g_input_stream_close(is,NULL,NULL); - res = gdk_pixbuf_scale_simple(pb, w, h, GDK_INTERP_BILINEAR); - */ - // - need to figure a way to return them - // - where we show them -> in the drawing area + // decode images, we show them in the drawing area v = s.get_value (fn); if (v.holds(typeof(Gst.Buffer))) { Gst.Buffer buf = v.get_buffer(); @@ -782,6 +776,7 @@ public class MediaInfo.Info : VPaned try { InputStream is = new MemoryInputStream.from_data (buf.data,null); album_art = new Gdk.Pixbuf.from_stream (is, null); + debug("found album art"); is.close(null); } catch (Error e) { debug ("Decoding album art failed: %s: %s", e.domain.to_string (), e.message);