JMF Codec implementations?

A

Antti Nummiaho

JMF has a javax.media.Codec interface which seems to have nice methods
for converting a video from one format to another:

codec.setInputFormat(inputFormat);
codec.setOutputFormat(outputFormat);
codec.process(inputBuffer, outputBuffer);

Only problem is that Codec is an interface. How can I get a class that
implements the Codec interface in JMF? JMF supports many media formats
(http://java.sun.com/products/java-media/jmf/2.1.1/formats.html) so
one could assume that it would be possible to use JMF to convert
between them.
 
S

S.A. Samokhodkin

Antti Nummiaho ?????:
JMF has a javax.media.Codec interface which seems to have nice methods
for converting a video from one format to another:

codec.setInputFormat(inputFormat);
codec.setOutputFormat(outputFormat);
codec.process(inputBuffer, outputBuffer);

Only problem is that Codec is an interface. How can I get a class that
implements the Codec interface in JMF? JMF supports many media formats
(http://java.sun.com/products/java-media/jmf/2.1.1/formats.html) so
one could assume that it would be possible to use JMF to convert
between them.

(import javax.media.* of course)

PlugInManager.getPlugInList(inputFormat,outputFormat,PlugInManager.CODEC)

Regards
 
A

Antti Nummiaho

S.A. Samokhodkin said:
Antti Nummiaho ?????:

(import javax.media.* of course)

PlugInManager.getPlugInList(inputFormat,outputFormat,PlugInManager.CODEC)

Ok, but I still can't get an instance of a class that implements
Codec.

If I set the input format to for example avi and output format to
mpeg, PlugInManager returns a vector which has one element, an
instance of class com.ibm.media.codec.audio.ACMCodec. This, however,
does not seem to implement the interface Codec. If I try to cast it to
Codec, it throws a ClassCastException.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top