[libsocialweb: 6/7] youtube: Support upload progress.
- From: Eitan Isaacson <eitani src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsocialweb: 6/7] youtube: Support upload progress.
- Date: Wed, 13 Apr 2011 17:09:45 +0000 (UTC)
commit 6ff430975964d90ea86317b9455d6c7230e181c0
Author: Eitan Isaacson <eitan isaacson collabora co uk>
Date: Thu Apr 7 11:59:06 2011 -0700
youtube: Support upload progress.
services/youtube/youtube.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/services/youtube/youtube.c b/services/youtube/youtube.c
index 676d02a..87b7ce2 100644
--- a/services/youtube/youtube.c
+++ b/services/youtube/youtube.c
@@ -481,6 +481,8 @@ query_iface_init (gpointer g_iface,
static void
_video_upload_cb (YoutubeProxy *proxy,
const gchar *payload,
+ gsize total,
+ gsize uploaded,
const GError *error,
GObject *weak_object,
gpointer user_data)
@@ -492,7 +494,8 @@ _video_upload_cb (YoutubeProxy *proxy,
sw_video_upload_iface_emit_video_upload_progress (self, opid, -1,
error->message);
} else {
- sw_video_upload_iface_emit_video_upload_progress (self, opid, 100, "");
+ gint percent = (gdouble) uploaded / (gdouble) total * 100;
+ sw_video_upload_iface_emit_video_upload_progress (self, opid, percent, "");
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]