• No results found

Grilo: Easy Access to Online Multimedia Content. LinuxCon Europe 2012, Barcelona Juan A. Suarez Romero

N/A
N/A
Protected

Academic year: 2021

Share "Grilo: Easy Access to Online Multimedia Content. LinuxCon Europe 2012, Barcelona Juan A. Suarez Romero"

Copied!
24
0
0

Loading.... (view fulltext now)

Full text

(1)

Grilo

: Easy Access to Online Multimedia Content

LinuxCon Europe 2012, Barcelona

Juan A. Suarez Romero <[email protected]>

(2)

Grilo

: Easy Access to Online Multimedia Content

(3)

About me

Juan A. Suárez Romero

Computer engineer, Coruña University

Working at Igalia since 2007

Experience in multimedia

Involved in Maemo and MeeGo

Co-author of MAFW

(4)

Outline

1

Current problems

2

Grilo

3

Conclusions

(5)

Grilo

: Easy Access to Online Multimedia Content

Current problems

(6)

Many sources of content

Online/offline sources

Different protocol/API

Sources that do not

provide content

(meta-information)

(7)

Many different devices

Different screen sizes

Different hardware

components

Different platforms

(8)

Current approach

Develop one application per service

Each application with different UX

Not easily scalable: new sources require new applications

Expensive maintenance

In some cases, one application attending more than one

service

Services of the same type (e.g., Photo storage service)

Define a common layer between application and the service

(9)

What we need?

Stop reinventing the wheel!

Platform-level solution for accessing multimedia content

Provide homogeneous access to all content

Scalable with new sources of information

Collaboration!

Consistent user experience

Users care about the content, not the provider

(10)

Grilo

: Easy Access to Online Multimedia Content

(11)

What is

Grilo

?

Framework focused on making discovery and browsing

easy for application developers

A single, high-level API for all the sources

A collection plugins that provides access to the sources

An extendable system to provide more plugins

http://live.gnome.org/Grilo

(12)
(13)

Media types and Keys

Collection of keys and

values

Several keys provided by

core: title, URL, author, . . .

Plugins can extend them

with new keys

Support for multiple

values

Support for relations

between keys

(14)

Plugins and Sources

Key component of the

system

Plugins are dynamically

loaded by core

Plugins create one or more

sources

Sources support multiple

operations

Browse, Search, Store,

Remove, . . .

(15)

Plugins and Sources

Sources perform two main

roles:

Provide new media

content

Enrich already existent

media content

Sources collaborate among

them to solve the requests

(16)

Example of collaboration

Developer wants to show content from UPnP server and

play it

They need the

url

to play, a

title

and a

thumbnail

to show

1

Perform the request through core API

2

Core checks if the requested keys are supported by the

source

thumbnail

is not supported by UPnP source

3

Checks which sources are able to resolve

thumbnail

key

CoverArt source is able to

(17)

Example of collaboration

4

Core checks if those required keys are supported by

original UPnP source

If not, repeat the process as in the case of

thumbnail

5

Perform the request in the UPnP source with the keys

requested plus the new keys

6

When the results arrive, send them to CoverArt source to

include the

thumbnail

7

Send the final results to application

Developer only needs to deal with one provider

(18)

Implementing applications

Main language is C

Other languages supported through gobject introspection

(Python, Javascript, Vala, . . . )

Support for C++ (

grilomm

)

(19)

Code example

1 # ! / u s r / b i n / p y t h o n 2 3 import sys 4 from g i . r e p o s i t o r y import Grl 5

6 def main ( argv ) :

7 i f l e n ( argv ) < 1 : 8 p r i n t " Usage : m a k e _ l i s t . py < s e a r c h _ t e x t > " 9 r e t u r n 1 10 11 Grl . i n i t ( [ ] ) 12 r e g i s t r y = Grl . R e g i s t r y . 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 o p t i o n s = Grl . OperationOptions . new ( None )

18 o p t i o n s . s e t _ c o u n t ( 2 0 0 ) ;

19 r e s u l t s = Grl . m u l t i p l e _ s e a r c h _ s y n c ( None , argv [ 0 ] , keys , o p t i o n s ) 20 p r i n t " #EXT3MU"

21 f o r media in r e s u l t s :

22 i f i s i n s t a n c e ( media , Grl . MediaAudio ) :

23 p r i n t " #EXT3INF : " + s t r ( media . g e t _ d u r a t i o n ( ) ) + " , " + media . g e t _ t i t l e ( ) 24 p r i n t media . g e t _ u r l ( )

25

26 i f __name__ == " __main__ " :

27 main ( sys . argv [ 1 : ] )

(20)

Implementing plugins

Plugins must be written in C

Adding support for writing plugins declaratively (in XML)

Adding support for other languages (Lua)

(21)

Grilo

: Easy Access to Online Multimedia Content

Conclusions

(22)

Resources

Wiki

http://live.gnome.org/Grilo

Source code

http://git.gnome.org/browse/grilo

http://git.gnome.org/browse/grilo-plugins

http://git.gnome.org/browse/grilomm

IRC

#grilo

at

irc.gnome.org

Mailing list

http://mail.gnome.org/mailman/listinfo/

grilo-list

(23)

Grilo

: Easy Access to Online Multimedia Content

Thank you!

(24)

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 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

http://live.gnome.org/Grilo http://git.gnome.org/browse/grilo http://git.gnome.org/browse/grilo-plugins http://git.gnome.org/browse/grilomm http://mail.gnome.org/mailman/listinfo/grilo-list http://www.iconspedia.com/icon/hard-disk-1600.html http://www.gettyicons.com/free-icon/103/pretty-office-2-icon-set/free-memory-card-icon-png

References

Related documents