XMMS2 Collections
Sébastien Cevey <seb@cine7.net>
http://bytes.inso.cc/
Metaweb presentation (October 22, 2009)
Swiss Federal Institute
- f Technology, Lausanne
XMMS2 Music Player Playlouder MSP
XMMS2 Collections Sbastien Cevey <seb@cine7.net> - - PowerPoint PPT Presentation
XMMS2 Collections Sbastien Cevey <seb@cine7.net> http://bytes.inso.cc/ Metaweb presentation (October 22, 2009) Swiss Federal Institute XMMS2 Music Player Playlouder MSP of Technology, Lausanne Outline 1. Introduction 2. Concept 3.
Sébastien Cevey <seb@cine7.net>
http://bytes.inso.cc/
Metaweb presentation (October 22, 2009)
Swiss Federal Institute
XMMS2 Music Player Playlouder MSP
2
3
4
5
IPC
IPC IPC IPC
Interface: CLI, GUI, headless Language: C, C++, Python, Ruby, Perl, etc.
Ruby/Qt CLI last.fm scrobbler
Media Library (SQLite) playlists playback
Unix Domain Socket TCP
6
id key value 42 artist Britney Spears 42 title Toxic 42 duration 245497 43 artist Beyonce
7
8
9
10
11
12
13
user input abstract representation SQL query set of media
14
user input abstract representation SQL query set of media
15
user input abstract representation set of media
16
17
18
Universe
19
Universe Compare
artist=“Pink Floyd”
20
Universe Compare
artist=“Pink Floyd”
Compare
year<=1975
21
Universe Compare
artist=“Pink Floyd”
Compare
year<=1975
Intersection
22
Universe Idlist Compare
artist=“Pink Floyd”
Compare
year<=1975
Intersection
23
Universe Idlist Compare
artist=“Pink Floyd”
Compare
year<1975
Intersection Union
24
Universe Idlist Reference
All media in the Media Library Static list of media (by id) All media in the saved collection $name in
$namespace
$name $namespace
25
Idlist
Playlists Collections ...
Idlist
...
Idlist
...
Idlist
...
Intersection
...
Compare
year<=1975
...
“Default” “DJ Mix” “Cool playlist” “70’s favourites” “Chillout tracks” “Early stuff”
26
Intersection Union Complement
1..N 1 1..N
All media present in all the operands All media present in any of the operands All media not present in the operand
27
Compare
$field $operation $value
Match
$field $pattern
Has
$field 1 1 1
Similar to Compare, but takes a $pattern with wildcards (*, ?) instead of an exact value All media that have $field set All media where $field satisfies the comparison $operation with $value
($operation: <, <=, =, =>, >)
28
Universe
29
Universe Compare
artist=“The XX”
30
Universe Compare
artist=“The XX”
Idlist
31
Universe Compare
artist=“The XX”
Union Idlist
“Hipster Songs”
32
Universe Compare
artist=“The XX”
Union Idlist
“Hipster Songs”
Reference
“Hipster Songs” in ”Collections”
33
Universe Compare
artist=“The XX”
Union Idlist
“Hipster Songs”
Reference
“Hipster Songs” in ”Collections”
Compare
lastplayed<3days
34
Universe Compare
artist=“The XX”
Union Idlist
“Hipster Songs”
Reference
“Hipster Songs” in ”Collections”
Compare
lastplayed<3days
Match
title=”Crystal*”
35
36
id key value 42 artist Britney Spears 42 title Toxic 42 url file:///home/... Google Summer of Code 2008 project by Erik Massop (nesciens)
37
id key source value 42 artist plugins/id3v2 Britny Spaers 42 artist clients/nycli Britney Spears 42 title plugins/id3v2 Toxic 42 url server file:///home/... Google Summer of Code 2008 project by Erik Massop (nesciens)
38
Token
$property $value 1
All media where $property token-matches
$value (e.g. “Floyd” matches “Pink Floyd”)
Order
$type $order 1
Returns a medialist ordered by $order
Limit
$start $length 1
Mediaset
1
Returns $length entries from the operand, starting at $start Returns the mediaset of the operand (no
39
e.g.:
40
41
42
nycli (new official CLI) http://xmms2.sf.net/
43
abraca http://abraca.xmms.se/
44
all = coll_universe() m_floyd = coll_match(all, field=”artist”,
value=”Pink Floyd”) m_early = coll_match(m_floyd, field=”year”,
value=”1975”) m_static = coll_idlist([42,1337,666]) m_join = coll_union(m_early, m_static)
coll_query_ids(conn, coll, order[], limit_start, limit_len);
coll_query_infos(conn, coll, order[], limit_start, limit_len, fetch[], group[]);
matched by coll, ordered by the list of properties
45
coll_query_ids(conn, m_join, [‘artist’,‘album’,‘tracknr’]); => [412, 413, 414, 323, 5454, 4234, ...] coll_query_infos(conn, m_join, [‘artist’,‘album’,‘tracknr’], 0, 50, [‘artist’, ‘title’]); => [{artist: ‘Pink Floyd’, title: ‘Eclipse’}, {artist: ‘Pink Floyd’, title: ‘Echoes’}, {artist: ‘Britney Spears’, title: ‘Toxic’}, ...]
46
coll_query_infos(conn, m_join, [‘artist’,‘album’], 0, 50, [‘artist’,‘album’], [‘album’]); => [{artist: ‘Pink Floyd’, album: ‘Meddle’}, {artist: ‘Britney Spears’, album: ‘Foo’}, ...]
47
Save collections in the XMMS2 server:
xmmsc_coll_save(conn, coll, name, namespace); xmmsc_coll_get(conn, name, namespace); xmmsc_coll_list(conn, namespace); xmmsc_coll_rename(conn, name, to, namespace); xmmsc_coll_remove(conn, name, namespace); xmmsc_coll_find(conn, media_id, namespace);
48
49
Spring http://my-trac.assembla.com/spring/
50
Spring http://my-trac.assembla.com/spring/
51
Spring http://my-trac.assembla.com/spring/
52
Spring http://my-trac.assembla.com/spring/
53
Spring http://my-trac.assembla.com/spring/
54
Spring http://my-trac.assembla.com/spring/
55
abraca http://abraca.xmms.se/
56
Etude http://code.google.com/p/etude-music-player/
57
58
59
60
61
(Storage System for Short Strings)
62
63
64