Changes in / [374c558:f0807b8]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
server/lib/TODO
r374c558 rf0807b8 69 69 [ ] http://gutenbach.mit.edu/ticket/41 70 70 [ ] http://gutenbach.mit.edu/ticket/18 71 72 === CONSIDERATIONS FOR MPD === 73 74 We are considering using MPD (the Music Player Daemon) for playback, instead 75 of mplayer. This gives us a pony (gapless playback), and makes some other 76 things, like keeping track of the queue, much easier. There is a lot of work 77 needed to make this work, though. 78 79 THIS ADDS A DEPENDENCY: python-mpd 80 81 We will have to re-implement all the functions in jobs.py, and completely 82 re-structure player.py 83 84 If we want video playback eventually (and we do), there will be some hackery 85 involved. We will pause mpd playback, do the video playback completely 86 separately, and then resume mpd playback. 87 88 Some almost-pseudocode: 89 90 startup: 91 client = MPDClient() 92 client.connect(**{'host':'/var/run/mpd/socket', 'port':'6600'}) 93 94 adding a song to the queue: 95 Receive job 96 Put it into a file [gutenbach/FILENAME] 97 Tell MPD to add it to the queue [client.addid('gutenbach/FILENAME')] 98 Find out what the id is 99 Store all the data [including the temporary filename] 100 IF WE ARE SUPPOSED TO BE PLAYING, MAKE SURE WE *ARE* PLAYING 101 In particular, if the queue was empty, start playback [gutenbach.play()] 102 103 when a job completes playing: 104 Remove the file [rm gutenbach/FILENAME] 105 106 getting the queue: 107 get playlist, parse return [client.playlistid()] 108 109 removing a job: 110 dequeue it [client.deleteid('NUMBER')] 111 remove the file 112 tell them what you did 113 114 restart song: 115 client.seek(0,1) [0% through song 1...] 116
Note: See TracChangeset
for help on using the changeset viewer.