| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
The "X-Tumbler Settings" group is searched in each desktop file with the
same keys as in `tumbler.rc`, where the default configuration is now.
Closes #52.
|
|
|
|
| |
G_IMPLEMENT_INTERFACE_DYNAMIC does the job since GLib 2.24.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Refactor the entire code to use TumblerFileInfo instead of separate
URI/MIME/flavor arrays. We now support flavors which means that
applications can request "normal" and "large" thumbnails and thus have
more control over what is created. This simplifies the code in a lot of
places. We now use a real GObject class called TumblerThumbnailFlavor
instead of a fixed-size enum. Cache backends can return as many flavors
as they want, each consisting of a name, a width and a height. As a
consequence, we can also get rid of the configure flags to
enable/disable normal, large and cropped thumbnails. The default cache
plugin shipped with Tumbler only supports "normal" (128x128px) and
"large" (256x256px).
Optimize the code a little bit. We now load the TunarFileInfo and
ThunarThumbnail only *once* for each URI instead of loading them once in
the scheduler and again in thumbnailer plugins.
This needs careful testing. I might have introduced a few memory leaks
here and there, plus new bugs... you never know.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Tumbler will now only check for the file
$(libdir)/tumbler-1/plugins/cache/tumbler-cache-plugin.so
which is supposed to link to the cache backend that is being used. If
the XDG cache is built, tumbler-cache-plugin.so is set up to link to
this plugin.
The fact that we only have a singleton cache makes things much less
ambiguous.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Don't generate the D-Bus C bindings before creating the dist tarball.
Instead, ship the XML infos and generate the bindings at build time.
This requires a separate check for dbus-binding-tool.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
There's a new method tumbler_cache_is_thumbnail() now which has to
be implemented by plugins. It is used by TumblerFileInfo in
tumbler_file_info_load() to check whether the file is a thumbnail
itself. In that case, tumbler_file_info_load() will fail with
a TUMBLER_ERROR_IS_THUMBNAIL error.
Add another check in TumblerThresholdScheduler to make unqueuing
requests in the middle of the process work.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a major refactoring of the source code. Amongst others, the
classes TumblerProviderFactory, TumblerThumbnailer,
TumblerAbstractThumbnailer, TumblerThumbnailerProvider, TumblerCache,
TumblerCacheProvider and TumblerFileInfo have been added.
From now on tumbler supports different storage backends and thumbnailers
as plugins. Storage backends have to implement TumblerCache,
thumbnailers have to implement TumblerThumbnailer.
Plugins have to implement three methods: tumbler_plugin_initialize(),
tumbler_plugin_shutdown() and tumbler_plugin_get_types(). The latter
is expected to return a list of provider types for cache or thumbnailer
implementations.
Two example plugins have been added, one for the XDG thumbnail cache
and one for a GdkPixbuf based thumbnailer.
The code of tumblerd was updated to reflect these changes in libtumbler.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Depend on libpng 1.2 and make gdk-pixbuf a hard dependency.
Remove tumbler/tumbler-thumbnail.{c,h}. Move all related functions into
TumblerThumbnailInfo.
Improve the generation of tumbler-marshal.{c,h}, so that they can be
included in the library and be used by others.
Improve TumblerThumbnailInfo and TumblerPNGThumbnailInfo. The interface
now has functions to save fail thumbnails and pixbufs for all supported
thumbnail flavors. It can also check whether there are invalid/outdated
flavors. It also knows about the GFile's and sizes of all flavors.
Specialized thumbnailers can use TumblerThumbnailInfo to check if they
need to do something and if so, what they need to do. Once they have
a GdkPixbuf ready, they can just hand it over to the
TumblerThumbnailInfo and don't have to worry about saving.
Also improve TumblerPNGThumbnailInfo, which is an implementation of
TumblerThumbnailInfo that supports the thumbnail cache defined in the
Thumbnail Managing Standard.
The built-in pixbuf thumbnailer is almost completely implemented now.
However, it doesn't support cropped thumbnails yet.
This commit also adds a new method tumbler_scheduler_emit_uri_error()
which can be used to emit an error for only one URI. Finally, it
includes a few code cleanups.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
TumblerThumbnailInfo is an interface for querying thumbnail information
for a certain TumblerThumbnailFormat (PNG, JPEG etc.). By default only
PNG is supported, via TumblerPNGThumbnailInfo, as required for the
Thumbnail Managing Standard.
TumblerThumbnailInfo acts as a factory which creates a thumbnail info
for an URI (and optionall, a format). The returned thumbnail info
provides information about the existence of a certain thumbnail flavor
for the URI and other bits defined in the Thumbnail Managing Standard.
See http://jens.triq.net/thumbnail-spec/creation.html fore more info.
Right now, there's nothing implemented. These are just skeletons.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds the TUMBLER_ERROR_DOMAIN and TUMBLER_ERROR defines and
a TumblerErrorEnum with currently only containing TUMBLER_ERROR_FAILED.
Also new is the TumblerThumbnailFlavor enum type, together with a few
utility functions related to creating thumbnails:
- tumbler_thumbnail_get_flavors() returns all flavors supported by
the current build of tumbler,
- tumbler_thumbnail_flavor_get_size() returns the size corresponding
to a flavor (e.g. 128 for TUMBLER_THUMBNAIL_FLAVOR_NORMAL),
- tumbler_thumbnail_flavor_get_directory() returns a GFile pointing
to the flavor directory (e.g. $HOME/.thumbnails/normal/ for
TUMBLER_THUMBNAIL_FLAVOR_NORMAL),
- tumbler_thumbnail_get_file() returns a GFile pointing to the
thumbnail destination file of an URI and a flavor,
- tumbler_thumbnail_create_and_open_file() tries to create such a
GFile and also tries to open it for writing, returning the
GFileOutputStream if possible.
|
|
|
|
|
|
|
|
|
| |
There's a library called tumbler (or tumbler-1) now which provides
utility classes and functions for writing specialized thumbnailers. The
libary is LGPL while the D-Bus service itself is GPL.
The tumbler service was renamed to tumblerd and the marshallers
were moved into the library.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
TumblerNaiveScheduler is a very simple scheduler running in the main
loop. It processes requests as they come and emits signals per-URI. It
is mainly useful for testing purposes.
With the first scheduler being available, implement "started",
"finished", "error" and "ready" signals in TumblerThumbnailer,
TumblerBuiltinThumbnailer, TumblerScheduler, TumblerNaiveScheduler and
TumblerService.
Also implement tumbler_builtin_scheduler_create() based on the
TumblerBuiltinThumbnailerFunc specified in the constructor. We now have
an environment to implement and test the built-in pixbuf thumbnailer.
|
|
|
|
|
|
|
|
|
|
| |
Try to claim ownership for the generic thumbnailer interface name and
fail from tumbler_service_start() on errors. Add a GMutex to
TumblerService.
Also add tumbler-service-dbus.xml and modify Makefile.am to generate
D-Bus bindings for the generic thumbnailer service. Install type info
and register the service object in tumbler_service_start().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Thumbnail requests need to be scheduled in some way. Let's say the
service receives a request for 1000 thumbnails and one for 5 after the
first one. How should these be scheduled?
TumblerScheduler provides an interface for different schedulers, one of
which is TumblerThresholdScheduler. TumblerThresholdScheduler is
inspired by the thumbnailer in hildon-thumbnail. It uses two thread
pools, one for large and one for small requests. Requests are managed
using a LIFO and inserted into one of the pools depending on the number
of requested thumbnails (the threshold).
However, for the moment these are just skeletons.
This commit also makes sure to copy hash keys before inserting
thumbnailers into the registry hash table.
|
|
|
|
|
|
|
|
| |
Add an optional dependency on gdk-pixbuf-2.0 >= 2.14 for the pixbuf
thumbnailer created with tumbler_pixbuf_thumbnailer_new(). Use
gdk_pixbuf_get_formats() to get a list of formats and MIME types
supported by GdkPixbuf. Pass these to the constructor of the
thumbnailer.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add new properties "uri-schemes" and "hash-keys" to TumblerThumbnailer
and add getter functions for all TumblerThumbnailer properties.
Add URI schemes parameter to the TumblerBuiltinThumbnailer constructor
and compute hash keys for built-in thumbnailers based on the provided
URI schemes and mime types.
Adds TumblerSpecializedThumbnailer which is created for each thumbnailer
either found in $XDG_DATA_DIRS/thumbnailers/ or registered dynamically
via org.freedesktop.thumbnailer.Manager.Register(). Internally it uses a
DBusGProxy to talk to the specialized thumbnailer service.
Add a GMutex to TumblerManager and lock all functions for now. Implement
the Register() method which creates a new TumblerSpecializedThumbnailer
and adds it to the registry.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit introduces the TumblerThumbnailer interface which is
supposed to be implemented twice, once for built-in thumbnailers that
run in the same process as tumbler itself, and once for specialized
thumbnailers which talk to tumbler over D-Bus. TumblerThumbnailer
provides a function for creating a thumbnail plus "ready" and "error"
signals. Their signatures may still change though.
TumblerBuiltinThumbnailer is a new class for built-in thumbnailers. It
is a little similar to ExoSimpleJob in that it allows built-in
thumbnailers to be created by defining a create function and a list of
mime types.
Also new is tumbler_pixbuf_thumbnailer_new() which creates a pixbuf
thumbnailer. It's just a skeleton for now.
TumblerRegistry now has a method tumbler_registry_add() for adding a
new TumblerThumbnailer to the registry.
Last but not least, there's tumbler-marshal.list for custom marshallers
now.
|
|
|
|
|
|
|
| |
This adds XML description of the D-Bus interface for
org.freedesktop.thumbnailer.Manager. tumbler_manager_start() is now
implemented. Also new is tumbler-utils.h which adds the
dbus_async_return_if_fail() macro.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The added skeletons are:
- TumblerRegistry, which loads specialized thumbnailers and supports
monitoring the thumbnailer directories for changes.
- TumblerManager, which implements org.freedesktop.thumbnailer.Manager
and uses the registry to determine the MIME types supported by
tumbler. It also adds new specialized thumbnailers to the registry
when the org.freedesktop.thumbnailer.Manager.Register() method is
called over D-Bus.
- TumblerService, which implements org.freedesktop.thumbnailer.Generic
and uses the specialized thumbnailers to delegate thumbnail
requests.
These classes don't do anything useful yet. They just exist.
|
|
|