GNOME Bugzilla – Bug 727748
Generate thumbnails for local files
Last modified: 2014-09-02 20:11:52 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. :)
git 3.12+, thumbnails are not created for local videos. https://www.youtube.com/watch?v=9CduQ2imnB0&feature=youtu.be
*** Bug 729003 has been marked as a duplicate of this bug. ***
that is an ugly bug. I hope it will be fixed by 3.14.
Created attachment 284431 [details] [review] main: Add async thumbnailing helper To thumbnail videos using totem-video-thumbnailer through gnome-desktop.
Created attachment 284432 [details] [review] main: Port thumbnail fetcher to GTask And make sure we don't simply return from a failed icon fetch!
Created attachment 284433 [details] [review] main: Fetch missing thumbnails When populating the icon view.
Review of attachment 284431 [details] [review]: Looks good to me.
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.
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?
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.
Created attachment 285164 [details] [review] main: Port thumbnail fetcher to GTask And make sure we don't simply return from a failed icon fetch!
Created attachment 285165 [details] [review] main: Fetch missing thumbnails When populating the icon view.
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.
Review of attachment 285164 [details] [review]: Looks good to me.
Review of attachment 285165 [details] [review]: ++
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.
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