After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 727748 - Generate thumbnails for local files
Generate thumbnails for local files
Status: RESOLVED FIXED
Product: totem
Classification: Core
Component: Movie player
3.12.x
Other Linux
: Normal normal
: ---
Assigned To: General Totem maintainer(s)
General Totem maintainer(s)
: 729003 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2014-04-07 14:07 UTC by Zeeshan Ali
Modified: 2014-09-02 20:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
main: Add async thumbnailing helper (4.38 KB, patch)
2014-08-25 16:52 UTC, Bastien Nocera
reviewed Details | Review
main: Port thumbnail fetcher to GTask (6.14 KB, patch)
2014-08-25 16:52 UTC, Bastien Nocera
needs-work Details | Review
main: Fetch missing thumbnails (2.18 KB, patch)
2014-08-25 16:52 UTC, Bastien Nocera
needs-work Details | Review
main: Add async thumbnailing helper (4.62 KB, patch)
2014-09-02 18:59 UTC, Bastien Nocera
reviewed Details | Review
main: Port thumbnail fetcher to GTask (6.27 KB, patch)
2014-09-02 18:59 UTC, Bastien Nocera
committed Details | Review
main: Fetch missing thumbnails (2.20 KB, patch)
2014-09-02 18:59 UTC, Bastien Nocera
committed Details | Review
main: Add async thumbnailing helper (4.73 KB, patch)
2014-09-02 19:28 UTC, Bastien Nocera
committed Details | Review

Description Zeeshan Ali 2014-04-07 14:07:57 UTC
In the new UI, thumbnails play a very important part now but seems totem itself never creates the thumbnails so you have to view the folders in nautilus to create the thumbnails. That is very annoying. Its a bit funny that nautilus uses a tool provided by totem to create these thumbnails. :)
Comment 1 Asif Ali Rizvan 2014-04-16 09:51:49 UTC
git 3.12+, thumbnails are not created for local videos.
https://www.youtube.com/watch?v=9CduQ2imnB0&feature=youtu.be
Comment 2 Bastien Nocera 2014-04-26 14:08:24 UTC
*** Bug 729003 has been marked as a duplicate of this bug. ***
Comment 3 Sri Ramkrishna 2014-08-24 20:18:35 UTC
that is an ugly bug.  I hope it will be fixed by 3.14.
Comment 4 Bastien Nocera 2014-08-25 16:52:33 UTC
Created attachment 284431 [details] [review]
main: Add async thumbnailing helper

To thumbnail videos using totem-video-thumbnailer through gnome-desktop.
Comment 5 Bastien Nocera 2014-08-25 16:52:39 UTC
Created attachment 284432 [details] [review]
main: Port thumbnail fetcher to GTask

And make sure we don't simply return from a failed icon fetch!
Comment 6 Bastien Nocera 2014-08-25 16:52:45 UTC
Created attachment 284433 [details] [review]
main: Fetch missing thumbnails

When populating the icon view.
Comment 7 Philip Withnall 2014-08-25 21:50:28 UTC
Review of attachment 284431 [details] [review]:

Looks good to me.
Comment 8 Philip Withnall 2014-08-25 21:53:47 UTC
Review of attachment 284432 [details] [review]:

::: src/icon-helpers.c
@@ +71,1 @@
 		return;

I think task is leaked on this path.

@@ +80,3 @@
 	}
 
+	g_task_return_pointer (task, pixbuf, g_object_unref);

And this path.

@@ +97,1 @@
 		return;

And this one.

@@ +195,3 @@
+	if (url_thumb == NULL) {
+		g_task_return_pointer (task, NULL, NULL);
+		return;

task is leaked on this path.

@@ +203,3 @@
+		g_task_return_pointer (task,
+				       g_object_ref (G_OBJECT (thumbnail)),
+				       g_object_unref);

And here.
Comment 9 Philip Withnall 2014-08-25 21:55:53 UTC
Review of attachment 284433 [details] [review]:

::: src/icon-helpers.c
@@ +178,3 @@
+	}
+
+	g_task_return_pointer (task, pixbuf, g_object_unref);

I think task is leaked on both paths here.

@@ +311,3 @@
 	} else {
+		if (grl_media_get_thumbnail (media) ||
+		    g_str_equal (grl_media_get_source (media), "grl-tracker-source")) {

You used g_strcmp0() above. Why be different?
Comment 10 Bastien Nocera 2014-09-02 18:59:03 UTC
Created attachment 285163 [details] [review]
main: Add async thumbnailing helper

To thumbnail videos using totem-video-thumbnailer through gnome-desktop,
using a GThreadPool to make sure we don't request more than 5 thumbnails
at a time.
Comment 11 Bastien Nocera 2014-09-02 18:59:09 UTC
Created attachment 285164 [details] [review]
main: Port thumbnail fetcher to GTask

And make sure we don't simply return from a failed icon fetch!
Comment 12 Bastien Nocera 2014-09-02 18:59:16 UTC
Created attachment 285165 [details] [review]
main: Fetch missing thumbnails

When populating the icon view.
Comment 13 Philip Withnall 2014-09-02 19:23:07 UTC
Review of attachment 285163 [details] [review]:

::: src/icon-helpers.c
@@ +130,3 @@
+
+	if (g_task_return_error_if_cancelled (task))
+		return;

task is leaked on this path.

@@ +357,3 @@
+
+	factory = gnome_desktop_thumbnail_factory_new (GNOME_DESKTOP_THUMBNAIL_SIZE_LARGE);
+	thumbnail_pool = g_thread_pool_new ((GFunc) thumbnail_media_async_thread, NULL, 5, TRUE, NULL);

Leaks the thumbnail_pool.
Comment 14 Philip Withnall 2014-09-02 19:24:38 UTC
Review of attachment 285164 [details] [review]:

Looks good to me.
Comment 15 Philip Withnall 2014-09-02 19:25:37 UTC
Review of attachment 285165 [details] [review]:

++
Comment 16 Bastien Nocera 2014-09-02 19:28:08 UTC
Created attachment 285167 [details] [review]
main: Add async thumbnailing helper

To thumbnail videos using totem-video-thumbnailer through gnome-desktop,
using a GThreadPool to make sure we don't request more than 5 thumbnails
at a time.
Comment 17 Bastien Nocera 2014-09-02 20:11:36 UTC
Attachment 285164 [details] pushed as 56e20af - main: Port thumbnail fetcher to GTask
Attachment 285165 [details] pushed as 5be27dd - main: Fetch missing thumbnails
Attachment 285167 [details] pushed as 87afdef - main: Add async thumbnailing helper