Top Banner
Grilo: present and future Juan A. Suárez Romero <[email protected]>
26

Grilo: present and future (GUADEC 2012)

Jul 02, 2015

Download

Technology

Igalia

By Juan A. Suárez Romero.

This talk will focus on Grilo[1], a framework which purpose is to provide media application developers with proper tools to access online and offline multimedia. More specifically, Grilo provides:

- A single, high-level API that abstracts the differences among various media content providers, allowing application developers to browse and search content from various services and sources with little work on the application side.

- A collection of plugins for accessing content from various media providers. Developers can share efforts and code by writing plugins for the framework that are application agnostic.

- A flexible API that allows plugin developers to write plugins of various kinds.

Today, Grilo is already being used by various GNOME applications, such as Totem[2], Rhythmbox[3] or MediaExplorer[4] and it will have even more relevance in the future of the platform, where it is expected to be a key component of the new multimedia applications[5][6].

During this talk we will look at the current version of Grilo, and we will cover the new features that are coming for the 0.2 release: new API aimed to be extensible, new capabilities for filtering, a new design of plugins architecture, support for declarative plugin development, and, of course, the new plugins.

[1] http://live.gnome.org/Grilo
[2] http://projects.gnome.org/totem/
[3] http://projects.gnome.org/rhythmbox/
[4] http://media-explorer.org/
[5] http://live.gnome.org/Design/Apps/Music
[6] http://live.gnome.org/Design/Apps/Videos
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Grilo: present and future (GUADEC 2012)

Grilo: present and future

Juan A. Suárez Romero <[email protected]>

Page 2: Grilo: present and future (GUADEC 2012)

Outline

● Why Grilo?● What is Grilo?● Next coming

Page 3: Grilo: present and future (GUADEC 2012)

Playing Content

Multimediaapplication

Fetch Play

Page 4: Grilo: present and future (GUADEC 2012)

Playing Content

Multimediaapplication

Fetch Format? ogg, mkv, avi Codec? mp3, h264, theora

Page 5: Grilo: present and future (GUADEC 2012)

Playing Content

Multimediaapplication

Fetch Gstreamer

Plugins.

Page 6: Grilo: present and future (GUADEC 2012)

Fetching Content

Multimediaapplication

GVFS/GIO/POSIX Gstreamer

Plugins.

Page 7: Grilo: present and future (GUADEC 2012)

Fetching Content

Multimediaapplication

Online/offline contentDifferent protocolsDifferent APIs Gstreamer

Plugins.

Page 8: Grilo: present and future (GUADEC 2012)

Fetching Content

Page 9: Grilo: present and future (GUADEC 2012)

Fetching Content

Multimediaapplication

Gstreamer

Plugins.

Grilo

Plugins.

Page 10: Grilo: present and future (GUADEC 2012)

Grilo Key Components

MediaSource

MediaSource

MediaSource

MetadataSource

MetadataSource

MetadataSource

PluginRegistry

Audio Video Image Box

Data

MetadataKey

1..*

1..*

contains

provides Media

enriches

registersregisters

High level API

Low level API

Provided by plugins

Page 11: Grilo: present and future (GUADEC 2012)

Grilo Sources

● Provides the multimedia content● Plugins

– Dynamic loaded libraries– Each plugin provides one or more sources

● Two types of sources:

– Media Sources– Metadata Sources

Page 12: Grilo: present and future (GUADEC 2012)

GrlUpnpSourceGrlUpnpSource

Grilo Sources

GrlMediaSource

GrlYoutubeSource GrlJamendoSource GrlUpnpSource

GrlMetadataSource

GrlGravatarSource GrlLasfmSource

libgrlyoutube.so libgrljamendo.so libgrlupnp.so libgrllastfm-albumart.solibgrlgravatar.so

Page 13: Grilo: present and future (GUADEC 2012)

Grilo Sources

● Source can declare new metadata keys● Trade-off between application and plugin

developers● Operations

– Media source: browse, search, metadata, remove, store, notify changes

– Metadata source: resolve, store specific metadata

Page 14: Grilo: present and future (GUADEC 2012)

Grilo Sources

● Cooperation between sources (full resolution)

Application GrlTrackerMedia

GrlMediaGrlMediaGrlMedia

search (tracker, “offspring”, url, lyricslyrics, title, thumbnailthumbnail, album)

createssend

Media Source

GrlLastfmSource

Metadata Source

GrlLyricsSource

Metadata Sourcelyrics thumbnail

Grilo core API

search (tracker, “offspring”, url, lyrics, title, thumbnail, album, artistartist)

Page 15: Grilo: present and future (GUADEC 2012)

What's coming?

Page 16: Grilo: present and future (GUADEC 2012)

XML Plugins

Page 17: Grilo: present and future (GUADEC 2012)

Caps/Opts

● How to filter results?– Filter by type

– Filter by specific key

● Problems– Support in sources

– Too many parameters in function signature

Page 18: Grilo: present and future (GUADEC 2012)

Caps/Opts

search (GrlMediaSource *source,

 const gchar *text, const GList *keys, guint skip, guint count, GrlMetadataResolutionFlags *flags, GrlMediaSourceResultCb callback, gpointer user_data);

Page 19: Grilo: present and future (GUADEC 2012)

Caps/Opts

● Capabilities (GrlCaps)

– Defines what the source can do

– Currently, different types of filtering● Filter by media type● Filter by key● Filter by range

– Extend for other capabilities● Sorting

Page 20: Grilo: present and future (GUADEC 2012)

Caps/Opts

● Options (GrlOperationOptions)

– Defines what the application want to do

– Matches the source capabilities

– Simplifies the function signature

search (GrlMediaSource *source,

const gchar *text,const GList *keys,GrlOperationOptions *options,GrlMediaSourceResultCb callback,gpointer user_data);

Page 21: Grilo: present and future (GUADEC 2012)

Plugins Hierarchy

GrlMetadataSource

GrlMediasource

GrlMediaPlugin

GrlLastfmAlbumartSource

GrlJamendoSource

Page 22: Grilo: present and future (GUADEC 2012)

Plugins Hierarchy

GrlMetadataSource GrlMediasource

GrlPlugin

GrlLastfmAlbumartSource GrlJamendoSource

GrlSource1..*

Page 23: Grilo: present and future (GUADEC 2012)

Plugins Hierarchy

GrlPlugin

GrlLastfmAlbumartSource GrlJamendoSource

GrlSource1..*

Page 24: Grilo: present and future (GUADEC 2012)

Improved full resolution algorithm

● Several metadata sources solving the same key– If one fails, try the next one

● Dependency not provided by media source– Chain the resolution

Page 25: Grilo: present and future (GUADEC 2012)

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

Page 26: Grilo: present and future (GUADEC 2012)

Credits● Television Icon by The Noun Project (CC Attribution)

http://www.iconspedia.com/icon/television-icon-19995.html

● Icon Mobile Phone by Jean Victor Balin http://openclipart.org/detail/29119

● Hard Disk Icon by Mazenl77 (CC Attribution) http://www.iconspedia.com/icon/hard-disk-1600.html

● Memory Card Icon by Custom Icon Design Studio http://www.gettyicons.com/free-icon/103/pretty-office-2-icon-set/free-memory-card-icon-png/

● Vimeo, Flickr, Jamendo, YouTube and UpnP logos under copyright of their own brands

● Option by rofltosh (CC BY-NC 2.0) http://www.flickr.com/photos/atomicbartbeans/71575328/

● Hold on by Andrew Pescod (CC BY-NC-SA 2.0) http://www.flickr.com/photos/andrewpescod/175668680/

● Train by Andifeelfine (CC BY-NC-ND 2.0) http://www.flickr.com/photos/andifeelfine/235779841/