If you try to implement a new format supported by JMF (to export) you will need to implement a new DataSink and a new Codec. The codec just do the translation between Wav and AMR, and the Datsink say to JMF how to serialize the output flux of the Codec into a file. So I guess you will have 2 or three bases classes :
- AMRExportCodec (implements Codec)
- AMRSerializer (implement DataSink)
- and something like AMRFormat who extends AudioFormat can help you too.
The plugin mechanism allow you to register your plugin, so after you just have to test (just.... :)).
I don't wanna lie, it's difficult and difficult to test. The JMF hierarchy is very powerful because you can re-implement all the component if you want. But if you don't know when each methods is calling it's very long to debug.
Don't hesitate to download the pdf of JMF, it's very useful (http://java.sun.com/products/java-media/jmf/2.1.1/specdownload.html).
I didn't do the job for a DataSink, but I did for a Demultiplexer and a Codec, so I don't have any source code for you. But if i can help you, just ask.
I don't know if someone did a plugin to save a AMR file with JMF, but if this plugin exist focus on it you will win a lot of time.
good luck
Hi,
We have developed such converter.
Some info below;
Ankanet Audio Converter written in Java to make conversions as;
- WAV to AMR conversion
- AMR to WAV conversion
- MIDI to WAV conversion
- MIDI to AMR conversion
- monoWAV to monoMIDI conversions
You can easily use the Converter in any java program or as command line application.
please contact us for further details;
ankames@ankanet.com.tr
http://mobile.ankanet.com.tr
kind regards.
ankames