SoftwarePractice.org: Home | Courseware | Wiki | Archive

Embedded web server for media control

From SoftwarePractice.org

This article describes an embedded web server project. The project is suitable for a second-year Java design and programming class.

Description

Increasingly, computers are being used as part of people's stereo and home entertainment systems. In this project, we will focus on the use of the computer for stereo audio playback.

One approach to using a computer this way is to locate one near the stereo system, and connect a DAC (digital-analog convertor) to it. The DAC can be a card located in the computer or (increasingly) an external device connected by a USB or FireWire cable. The output from the DAC is connected to one of the inputs of the stereo system.

To use the computer as a playback device, you firstly copy your CDs onto the hard drive, using one of many programs available for the purpose. You then play back the tracks you want through the audio output device. (For the purposes of this project, you will use the Java Media Framework for audio replay.)

Now, if you are on the other side of the room, it's a little inconvenient to control the playback computer. To that end, you are going to implement a web interface to your audio playback. That is, you will write a web server, which will run on your playback computer. You will then be able to use a standard web browser (running on, say, a laptop) to select and play back tracks from your hard disk. Specifically, the web interface will allow you to:

  • Browse the tracks stored on the hard disk
  • Organize the tracks stored on the hard disk
  • Create playlists of tracks
  • Play back selected tracks or playlists

(The web interface does not have to generate the audio files in the first place -- you can assume that you have already used some other program to do that.)

The web server is to be written entirely in Java. You will be given a skeletal Java web server program to get you going.

Resources

Personal tools