adding playlist support to grilo
- From: Mateu Batle <mateu batle collabora com>
- To: grilo-list gnome org
- Subject: adding playlist support to grilo
- Date: Thu, 07 Feb 2013 00:22:02 +0100
Hi all,
It would be great to get some feedback about implementing a new feature
for playlist support in Grilo.
Let me explain myself with an example: imagine browsing the filesystem
and a playlist is found (currently it is shown as GrlMediaAudio in case
it is shown at all). With this feature, the playlist would be mapped to
a GrlMediaBox while browsing (so a like a virtual directory), and the
entries of the playlist would be shown as GrlMedia objects inside the
GrlMediaBox. In this way, applications can browse easily into existing
playlists. Probably we want this feature as optional, so it can be
enabled / disabled for the plugins or sources that make sense.
There are several ways to add this functionality into Grilo:
(a) Hardcode the feature into an existing plugin. Not that good, since
several plugins could need this, and it would not be possible to reuse
easily.
(b) Implement the feature as a new plugin, and add some glue code into
each plugin that wants to use it. So it would be a plugin that is used
by other plugins (instead of applications), which is not usual in the
grilo design. Grilo is more designed to make plugins collaborate without
knowing each other. This could be done through test_media_from_uri &
media_from_uri API for example, or even the query API.
(c) Implement the feature as a library (similar to the way done with
GrlNet), which can be reused from other plugins or applications. So we
can provide the best API for this feature and not be limited by the
grilo plugin API as in (b).
After some short discussion about these options, (c) is the one I like most.
The idea is to use totem playlist parser library, which seems to parse
most popular formats and it is part of the gnome family, apart of
already being used in grilo plugins (optical media plugin).
Another use case or implementation of the library could be using the
tracker database, which internally uses totem playlist parsing library.
However, currently tracker or grilo tracker plugin do not do this
mapping to virtual directories. Depending on our environment, we might
have already this information available in the tracker store, so it
could be possible to get it from there. What is not so clear is if get
it from tracker is really more efficient than parse a file with totem
library. I guess we could find some case where tracker store is more
eficient, maybe with playlist with lots of entries or when we require
the count of items in the playlist.
I haven't thought much on the API yet, but the goal is to make as simple
as possible the glue code to be written in a plugin in order to
implement the playlist support feature.
best regards,
Mateu
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]