BEFORE COMPILATION
-Download jdk1.1.7B or later (jdk1.1.x) from the Sun Microsystems site.
Install it in a directory of your choice.
-Download swing-1.1 or later from the Sun Microsystems site. Install it in a directory 
of your choice.
-Install MSVC++ 6.0 and set required PATH and CLASSPATH variables as given below.


COMPILING AND RUNNING THE SOFTWARE:
	There is an executable available with the zip file. But to compile and run the
application do the following:

ENVIRONMENT VARIABLES:
Set the following environment variables, according to where you installed JDK and Swing.
If you are running NT, add these variables as administrator. Avoid spaces in the middle of 
the PATH and CLASSPATH. Do not use a long PATH. ( It might help to install 4dos on your
machine as it lets you have longer PATH environment variable)


set JAVA_HOME=< java_ directory >;
set SWING_HOME=< swing directory >;

set CLASSPATH=.;%JAVA_HOME%\lib\classes.zip;%SWING_HOME%\swingall.jar;
set CLASSPATH=%CLASSPATH%;< dir that contains imiplayer >\IM1Player\Mpgj\java;< dir that contains 					mpegj stuff ( outside the IM1player dir ) >\java;
set CLASSPATH=%CLASSPATH%C:\PROGRA~1\MICROS~2\VC98\Lib;

set PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;%JAVA_HOME%\BIN;C:\PROGRA~1\MICROS~2\VC98\BIN;.;
set PATH=%PATH%;< dir that contains imiplayer >\IM1Player\Mpgj\lib;
set PATH=%PATH%;< dir that contains imiplayer >\IM1Player\Debug;

set INCLUDE=%JAVA_HOME%\INCLUDE;%JAVA_HOME%\INCLUDE\WIN32
set LIB=%JAVA_HOME%\LIB

HOW TO COMPILE THE EXECUTABLES:
-Use MSVC 6.0 to open .dsw files in IM1 directory. First open 2DPlayer-CSELT\IM1-2D.dsw, 
set it as active project and Build.
-Compile all the Java APIs. ( Note: the .class files for the Java APIs are also included in 
the zip file. So this is not really necessary. JDK1.1.8 was used for compilation.)

HOW TO RUN:
On Windows NT 4.0 Service Pack 3 or Windows 95.
Copy 2DPlayer-CSELT\im1-2d.ini under windows directory.
Double click on IM1Player\Plugins\decoders.reg, IM1Player\Plugins\DMIF.reg
Double click on IM1Player\mpeg.reg
Double click on the IM1Player\Debug\IM1-2D.exe icon. A window pops up. Select File-> Open 
and choose to open one of the compiled samples from the \Samples\* directories.

HOW TO MAKE YOUR OWN SAMPLES:
In the samples directory, there is a Mux.exe and a BifsEnc.exe included. Use these 
executbles to create your samples.

Important Note:
MPEGJ stream is a Java application which is to be streamed and executed on the player side.
For the class file or one of the class files, in case the stream consists of many files 
zipped together, to be executed, it should implement MPEGlet interface. 

For help use one of the directories in the Samples directory as a template.
( Note that you should NOT have the zip file or class file which is to be streamed over 
anywhere in the class path as this poses a problem for the MPEGJClassLoader, currently. 
This will be fixed soon.) 

Like video has .h263 as a raw sample, a raw sample in case of MPEGJ consists of one of the 
following:

1. A single zip file containing all the required files for the application with a Java
Stream Header prepended to it.

2. A single class file with a Java Stream Header prepended to it. 

3. A chain of class files each with a header of their own and all these appended together
in a single file one after another. Note that the size of each class file along with its 
header is to be specified in filesize.txt in a new line so that the muxer will divide each 
class with its java stream header into a separate access unit. 

( For example, the enchdr in Samples\VideoAndMpegj dir. is just the jdemods.zip prepended 
with a header. jdemods.zip contains the AtlanticDemo Application and it is streamed as an 
MPEGJ stream)

Once you have prepared a raw MPEGJ Stream, follow the template in Samples/VideoAndMpegj
and prepare the .scr and .txt files. Then follow these steps:

a.)..\BifsEnc VideoAndMpegj.txt
b.)..\Mux VideoAndMpegj.scr ( for this just make sure that the entries in the filesize.txt 
are right.)

c.)Rename the created VideoAndMpegj.mp4 file as VideoAndMpegj-z.mpg4.


NEW FEATURES:

- Muxer changed to recognise and mux MPEGJ streams with other Media streams. 
- MPEGJ Decoder added and entered into the registry. The MPEGJClassLoder is in Java and is
invoked through the JNI. ( See MPEGJDecoder::Decode() for details.)
- All the managers are initialized from the MPEGJTerminal::initialize() function, which inturn 
 populate their function tables with the function pointers. 
- There is an example of the new framework in place. getnumOfChannels() function in 
DMIFMonitor is now getting the number of channels via the function pointer table. 
In future extensions it will be easy to follow this example to implement the new framework
completely.

FUTURE ENHANCEMENTS:

- To provide a start-code for MPEGJAccess units. Currently we need to specify the offsets in a file. (filesize.txt)

- To use the DTS and CTS from the synch layer to load the MPEGJAccess units at the correct instant. 

- To enable the MPEGJClassLoader to handle compressed bytecode. Currently the MPEGJ raw sample can only be an uncompressed archive of class files or a single uncompressed class file. 

- Currently, the MPEGJ access unit is being cast as a Video node. When Draw is called, it is checked if the stream format is MPEGJ and if it is so, we just return without actually drawing. This is only a temporary work-around and needs to be changed. 



