Introduction
Using Java Advanced Images (JAI) and Java Multimedia Framework (JMF) as examples, this exercise will familiarize students with API packages. Before you start working on this request you should read Unit 1 of the course to get an idea of the two packages, their pros and cons, current issues, and other alternatives.
This request is a programming exercise aimed at developing a simple image viewer and a media player. If you have a working knowledge of Java, the coding should be fairly simple. Do not overdo the exercise. It is not the purpose of the exercise to develop killer multimedia applications. It is hoped that you will enjoy this exercise.
The request assumes a certain programming expertise using Java Swing. If you are not comfortable, Sun has a great tutorial on Swing:
http://docs.oracle.com/javase/tutorial/uiswing/
This request is divided into two parts, and you must deliver two programs:
Part 1: Write an image viewer using JAI
Your JAI image viewer must have the following components and functionalities:
- A menu bar with a File option that opens a file from a file dialog, and an Exit option to quit the application.
- Zoom-in, Zoom-out and Normal buttons. You should enable and disable the buttons whenever appropriate.
- A scrollable pane to view the image.
- The viewer must support JPEG and BMP. You may add other file formats if you wish.
Part 2: Write a media player using JMF.
Your MMF media player should have the following components and functionalities:
- It should play video files in MPEG, AVI and MOV formats, and audio files in MIDI format. Feel free to add other supported formats.
- A menu bar with an Open option to open a media file, a Close option to close the currently opened file, and an Exit option to quit the application.
- A control that consists of the following buttons:
- Playbutton – plays the current video or audio file.
- Stopbutton – stops the current video or audio file.
- Pausebutton – stop playing the current video or audio file. When the play button is pressed, it continues to play the file from the paused position.
- Position bar – display the current position of the media file.
Deliverables
You are required to submit the following:
- All source codes.
- A setup guide to allow your tutor to set up the necessary environment to run both programs.
All files must be zipped into one single file using Winzip. Keep a clean directory structure so that Part 1 and Part 2 are unzipped into separate directories.