Archive for February, 2010

dev/dream – awakening

Sunday, February 7th, 2010

My week.. well 5 days of coding are basically over, so to begin this entry, here is a transcript of my white-board-wiki todo-list as it currently is. These are not in order – on the board the sections are in a sort of circle.

- Logging. it needs some.
- Handlers – fix my crap handler impl (this is an RCP thing).
- Icons – get some decent ones (ATM i am reusing terra icons).

- back / pause buttons, etc.
- support multiple external playback engines.
- extra play order modes.
- read meta data (mainly track length).

- Queries (these will be savable sub-views of libraries).
- Store entry paths relative to source directories? (just an idea, might help with portability)

- save meta data.
- differentiate between saving metadata and saving the list content.

- configure playback engines.
- etc…

Of course, this does not cover any of the remaining big items on my list such as media repositories, meta data syncing and tagging. The next big thing to do is to take advantage of my newly externalised playback engine interface and write a decent one that makes morrigan actually usable for my every day needs. I have fond some promising leads on using DirectShow in java will probably start with this one. I know it will be windows only, but at least then morrigan will begin to complete with terra for compatibility. This is important – once I can start using morrigan instead of terra, I will have hit a strong mile-stone. And once I am using it with anger, I should be able to start properly hardening the code bade.

If anyone is interested in beta-testing, I should have a decent build to play with in the next couple of days. I can also make the beta source available, if anyone is interested.

dev/dream – end of ‘session’ 1

Wednesday, February 3rd, 2010

Progress: I can add and remove files from a playlist and doubleclicking them plays that file… providing its a .wav. I tried copying across the playback code from musicman and it seems to work, until you give it a .mp3 and it throws a unknown format exception. *sigh* As soon as i have finished writing this i am stopping to eat dinner.

Since pictures tell far more, here is a sample UI screen shot:

Current issues:
- Can’t play mp3 (when it should).
- My implementation of “? extends AbstractHandler implements IHandler”‘s execute() is really nasty but I can’t workout how I am *supposed* to do it.
- Standard java logging seems to be colliding with RCP – the console handler does not work. Needs further investigation.

fortunately, only the first of these is blocking. If i can clear that, then i can move on and start implementing the library.

dev/dream morrigan development week off to a late start

Tuesday, February 2nd, 2010

I was supposed to start yesterday, but Quilage stole Saturday and then I went back to my parents for a couple of days to pick up my luggage that took 3 weeks to get from Geneva to Epsom. Thanks for that, Thompson Travel. But I digress…

Initial progress is slow, but that is somewhat expected. Some time taken by re-familiarising my self with RCP stuff, the code I wrote before some time ago. But that all makes sense now and I have nearly finished a very basic playlist editor. All that is left is to link in the methods I have to read and write playlist files to the right bits of RCP. Once this is done, I get to actually try and make it play files.

This is the first major hurdle. Java is not renowned for its media APIs. To work around the myriad of different ways of playing media, I plan to abstract out the actual playback engine so that it can be pluggable. This should also help with cross-platform support. If I am really lucky, I should be able to use DirectShow on Windows and GStreamer on Linux. As for OSX, that’s an SEP.

The first iteration will only be able to play mp3 files, and will use the very simple playback mechanism Tsuki Chama uses in MusicMan. I am lead to believe its cross-platform (I should probably test this) and will do for now as I start to design the playback abstraction layer.

I have planned my work for this week into 4 slightly vague user stories.

1. A user can add local files to a playlist and play them.

2. A user can maintain a library of local media.

3. A user can check media out from a remote media repository.

4. A user can sync metadata against a remote media repository.

I know these are a little vague, but as most of the design process is exploratory they are a sufficient guide for now. Also these clearly don’t cover all the features I want to add, this is just what I think I can do in a week :S. And obviously at the moment, I am still on story 1.

I have a strange flow-chart on a scrap of paper next to me that describes all the interactions I want in the system. Soon I will digitise it and discuss the ideas.