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