static void
_g_digicam_manager_class_init (GDigicamManagerClass
*klass)
{
GObjectClass *object_class = (GObjectClass*) kla...
Opening
Sources
Sources
Grilo
● Framework focused on making discovery and
browsing easy for application developers
● A single, high-level API for ...
Grilo
SOURCESOURCESOURCE
SOURCESOURCEMEDIA
SOURCESOURCE
METADATA
KEYS
creates
contains provides
Youtube
Jamendo
Flickr
IMD...
Totem
Totem
Requirements
● Define what we need
● Type of content
– Any kind?
– Only video? Music?
● Metadata keys
– URL
– Title
– Thum...
Content to show
● Ignore any source that does not provide Videos
● In “browse” view, ignore any source that does
not suppo...
Information to show
- Title
- Author
- Duration
- Thumbnail
- URL
- Title
- Author
- Duration
- Thumbnail
- URL
Browse Sea...
Invoke Grilo
- Title
- Author
- Duration
- Thumbnail
- URL
- Title
- Author
- Duration
- Thumbnail
- URL
Browse Search
Problems
● Two problems to solve
● Source not handling some keys
● Too much expensive to retrieve some keys
Totem
● Flags to control content retrieval
● Normal: provides the known requested content
– GRL_RESOLVE_NORMAL
● Fast only...
Reduce the problems
● Request content in chunks
● Request fast only in first iteration
● While current chunk is visible
● ...
GNOME Music
GNOME Music
Cover Art
GNOME Music
● Music defines its own structure
● Grilo's one is different
● Does not have concept of “Artist” or “Album”
● ...
GNOME Music
Approaches
● Request content from Tracker directly
● Create Grilo Media elements to add missing information
(Cover Art)
● ...
Closing
Other use-cases
● Application to upload audio/video content to
web services
● store() function
● Mediaplayer with auto-res...
Show me a code
Resources
● Wiki
● http://live.gnome.org/Grilo
● Source code
● git://git.gnome.org/grilo
● git://git.gnome.org/grilo-plugi...
Upcoming SlideShare
Loading in …5
×

Writing multimedia applications with Grilo (GUADEC 2013)

288 views

Published on

By Juan A. Suarez.

Grilo is a framework that helps developers to retrieve multimedia content from different sources, both local and online, using a single and common API to browse, search and finally get the results.

Nowadays Grilo is used by different applications inside the GNOME project: Totem, Rygel, Rythmbox, and in new coming applications like gnome-music and gnome-photos (this one in a next version).

The aim of this talk is to check the requirements these different applications have to access the content, and how Grilo helps to fulfil them. We will see also other use-cases that can be solved with Grilo, which for sure be helpful for other developments.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
288
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Writing multimedia applications with Grilo (GUADEC 2013)

  1. 1. static void _g_digicam_manager_class_init (GDigicamManagerClass *klass) { GObjectClass *object_class = (GObjectClass*) klass; g_assert (G_DIGICAM_IS_MANAGER_CLASS (klass)); parent_class = g_type_class_peek_parent (klass); g_type_class_add_private (klass, sizeof (GDigicamManagerPrivate)); /* Override virtual functions */ object_class->finalize = _g_digicam_manager_finalize; /** * GDigicamManager::focus-done: * @manager: the gdigicam manager Juan A. Suárez Romero jasuarez@igalia.com Writing multimedia applications with Grilo
  2. 2. Opening
  3. 3. Sources
  4. 4. Sources
  5. 5. Grilo ● Framework focused on making discovery and browsing easy for application developers ● A single, high-level API for all the sources ● Plugins ● Provides access to multimedia content ● Extendable
  6. 6. Grilo SOURCESOURCESOURCE SOURCESOURCEMEDIA SOURCESOURCE METADATA KEYS creates contains provides Youtube Jamendo Flickr IMDB ... Audio Video Image ... Title Artist Album ...
  7. 7. Totem
  8. 8. Totem
  9. 9. Requirements ● Define what we need ● Type of content – Any kind? – Only video? Music? ● Metadata keys – URL – Title – Thumbnail – ... 55 metadata keys
  10. 10. Content to show ● Ignore any source that does not provide Videos ● In “browse” view, ignore any source that does not support browsing ● In “search” view, ignore any source that does not support searching
  11. 11. Information to show - Title - Author - Duration - Thumbnail - URL - Title - Author - Duration - Thumbnail - URL Browse Search
  12. 12. Invoke Grilo - Title - Author - Duration - Thumbnail - URL - Title - Author - Duration - Thumbnail - URL Browse Search
  13. 13. Problems ● Two problems to solve ● Source not handling some keys ● Too much expensive to retrieve some keys
  14. 14. Totem ● Flags to control content retrieval ● Normal: provides the known requested content – GRL_RESOLVE_NORMAL ● Fast only: provides the known requested content that does not penalize the operation in terms of performance – GRL_RESOLVE_FAST_ONLY ● Full: provides the known requested content using all the available sources – GRL_RESOLVE_FULL
  15. 15. Reduce the problems ● Request content in chunks ● Request fast only in first iteration ● While current chunk is visible ● Ask for each visible media element the discarded keys (using full flag) ● URL key case: slow key and not shown in the UI ● Request it when user wants to play
  16. 16. GNOME Music
  17. 17. GNOME Music Cover Art
  18. 18. GNOME Music ● Music defines its own structure ● Grilo's one is different ● Does not have concept of “Artist” or “Album” ● They are “boxes” ● Needs to sort the results
  19. 19. GNOME Music
  20. 20. Approaches ● Request content from Tracker directly ● Create Grilo Media elements to add missing information (Cover Art) ● Instruct Grilo's Tracker plugin how to construct the medias ● Use query() function ● Very specific to the plugin ● In case of Tracker plugin, use SPARQL to make the query – First column is the media to build – Use alias to map each SPARQL column to specific metadata keys
  21. 21. Closing
  22. 22. Other use-cases ● Application to upload audio/video content to web services ● store() function ● Mediaplayer with auto-resume ● “playback-interrupted-time” key ● store_metadata() function – Metadata Store source handles it
  23. 23. Show me a code
  24. 24. Resources ● Wiki ● http://live.gnome.org/Grilo ● Source code ● git://git.gnome.org/grilo ● git://git.gnome.org/grilo-plugins ● IRC ● #grilo at irc.gnome.org ● Mailing list ● http://mail.gnome.org/mailman/listinfo/grilo-list

×