Grilo: Easy Access to Online Multimedia Content (LinuxCon Europe 2012)
Grilo: Easy Access to Online Multimedia Content
-
Upload
juan-a-suarez-romero -
Category
Technology
-
view
672 -
download
2
description
Transcript of Grilo: Easy Access to Online Multimedia Content
Grilo: Easy Access to Online Multimedia Content
LinuxCon Europe 2012, Barcelona
Juan A. Suarez Romero <[email protected]>
Grilo: Easy Access to Online Multimedia Content
Introduction
Grilo: Easy Access to Online Multimedia Content LinuxCon Europe 2012, Barcelona
About me
Juan A. Suárez RomeroComputer engineer, Coruña UniversityWorking at Igalia since 2007Experience in multimediaInvolved in Maemo and MeeGoCo-author of MAFW
Grilo: Easy Access to Online Multimedia Content LinuxCon Europe 2012, Barcelona
Outline
1 Current problems
2 Grilo
3 Conclusions
4 Thank you!
Grilo: Easy Access to Online Multimedia Content LinuxCon Europe 2012, Barcelona
Grilo: Easy Access to Online Multimedia Content
Current problems
Grilo: Easy Access to Online Multimedia Content LinuxCon Europe 2012, Barcelona
Many sources of content
Online/offline sourcesDifferent protocol/APISources that do notprovide content(meta-information)
Grilo: Easy Access to Online Multimedia Content LinuxCon Europe 2012, Barcelona
Many different devices
Different screen sizesDifferent hardwarecomponentsDifferent platforms
Grilo: Easy Access to Online Multimedia Content LinuxCon Europe 2012, Barcelona
Current approach
Develop one application per serviceEach application with different UXNot easily scalable: new sources require new applicationsExpensive maintenance
In some cases, one application attending more than oneservice
Services of the same type (e.g., Photo storage service)Define a common layer between application and the service
Not shared effort! Reinventing the wheel all time
Grilo: Easy Access to Online Multimedia Content LinuxCon Europe 2012, Barcelona
What we need?
Stop reinventing the wheel!
Platform-level solution for accessing multimedia contentProvide homogeneous access to all contentScalable with new sources of informationCollaboration!Consistent user experience
Users care about the content, not the provider
Grilo: Easy Access to Online Multimedia Content LinuxCon Europe 2012, Barcelona
Grilo: Easy Access to Online Multimedia Content
Grilo
Grilo: Easy Access to Online Multimedia Content LinuxCon Europe 2012, Barcelona
What is Grilo?
Framework focused on making discovery and browsingeasy for application developers
A single, high-level API for all the sourcesA collection plugins that provides access to the sourcesAn extendable system to provide more plugins
http://live.gnome.org/Grilo
Grilo: Easy Access to Online Multimedia Content LinuxCon Europe 2012, Barcelona
Architecture overview
Grilo: Easy Access to Online Multimedia Content LinuxCon Europe 2012, Barcelona
Media types and Keys
Collection of keys andvaluesSeveral keys provided bycore: title, URL, author, . . .
Plugins can extend themwith new keys
Support for multiplevaluesSupport for relationsbetween keys
Grilo: Easy Access to Online Multimedia Content LinuxCon Europe 2012, Barcelona
Plugins and Sources
Key component of thesystemPlugins are dynamicallyloaded by corePlugins create one or moresourcesSources support multipleoperations
Browse, Search, Store,Remove, . . .
All operations are optional
Grilo: Easy Access to Online Multimedia Content LinuxCon Europe 2012, Barcelona
Plugins and Sources
Sources perform two mainroles:
Provide new mediacontentEnrich already existentmedia content
Sources collaborate amongthem to solve the requests
Grilo: Easy Access to Online Multimedia Content LinuxCon Europe 2012, Barcelona
Example of collaboration
Developer wants to show content from UPnP server andplay itThey need the url to play, a title and a thumbnail to show
1 Perform the request through core API2 Core checks if the requested keys are supported by the
sourcethumbnail is not supported by UPnP source
3 Checks which sources are able to resolve thumbnail keyCoverArt source is able toBut it requires to know two keys: artist and album
Grilo: Easy Access to Online Multimedia Content LinuxCon Europe 2012, Barcelona
Example of collaboration
4 Core checks if those required keys are supported byoriginal UPnP source
If not, repeat the process as in the case of thumbnail5 Perform the request in the UPnP source with the keys
requested plus the new keys6 When the results arrive, send them to CoverArt source to
include the thumbnail7 Send the final results to application
Developer only needs to deal with one provider
Grilo: Easy Access to Online Multimedia Content LinuxCon Europe 2012, Barcelona
Implementing applications
Main language is COther languages supported through gobject introspection(Python, Javascript, Vala, . . . )
Support for C++ (grilomm)Some initial support for Qt/QML
Grilo: Easy Access to Online Multimedia Content LinuxCon Europe 2012, Barcelona
Code example
1 # ! / usr / b i n / python23 import sys4 from gi . r e p o s i t o r y import Grl56 def main ( argv ) :7 i f len ( argv ) < 1 :8 print " Usage : make_l is t . py <se arc h_ te x t >"9 return 1
1011 Grl . i n i t ( [ ] )12 r e g i s t r y = Grl . Reg is t ry . g e t _ d e f a u l t ( )13 r e g i s t r y . l o a d _ a l l _ p l u g i n s ( )14 keys = [ Grl .METADATA_KEY_DURATION,15 Grl . METADATA_KEY_TITLE,16 Grl .METADATA_KEY_URL]17 opt ions = Grl . OperationOptions . new( None)18 opt ions . se t_count ( 2 0 0 ) ;19 r e s u l t s = Grl . mult iple_search_sync ( None , argv [ 0 ] , keys , opt ions )2021 print " #EXT3MU"22 for media in r e s u l t s :23 i f i s i n s t a n c e ( media , Grl . MediaAudio ) :24 print " #EXT3INF : " + s t r ( media . get_durat ion ( ) ) + " , " + media . g e t _ t i t l e ( )25 print media . g e t _ u r l ( )2627 i f __name__ == " __main__ " :28 main ( sys . argv [ 1 : ] )
Grilo: Easy Access to Online Multimedia Content LinuxCon Europe 2012, Barcelona
Implementing plugins
Plugins must be written in CAdding support for writing plugins declaratively (in XML)Adding support for other languages (Lua)
Grilo: Easy Access to Online Multimedia Content LinuxCon Europe 2012, Barcelona
Grilo: Easy Access to Online Multimedia Content
Conclusions
Grilo: Easy Access to Online Multimedia Content LinuxCon Europe 2012, Barcelona
Resources
Wikihttp://live.gnome.org/Grilo
Source codehttp://git.gnome.org/browse/grilohttp://git.gnome.org/browse/grilo-pluginshttp://git.gnome.org/browse/grilomm
IRC#grilo at irc.gnome.org
Mailing listhttp://mail.gnome.org/mailman/listinfo/grilo-list
Do not miss our booth in ground floor (in front of Rossiniroom)
Grilo: Easy Access to Online Multimedia Content LinuxCon Europe 2012, Barcelona
Grilo: Easy Access to Online Multimedia Content
Thank you!
Grilo: Easy Access to Online Multimedia Content LinuxCon Europe 2012, Barcelona
Images used in this presentation
Hard Disk Icon by Mazenl77 (CC Attribution)http://www.iconspedia.com/icon/hard-disk-1600.html
Memory Card Icon by Custom Icon Design Studiohttp://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 ownbrands
Grilo: Easy Access to Online Multimedia Content LinuxCon Europe 2012, Barcelona