Could not realize media player
Posted
by
user556894
on Stack Overflow
See other posts from Stack Overflow
or by user556894
Published on 2010-12-31T21:21:37Z
Indexed on
2011/01/01
2:53 UTC
Read the original article
Hit count: 274
jmf
I am using this code to run avi file using jmf but the error come like "Could not realize media player"
and how to open all video format using jmf
import javax.media.*;
import javax.media.format.*;
import java.io.*;
import java.util.*;
public class Test{
public static void main(String a[]) throws Exception{
CaptureDeviceInfo di = null;
Player p = null;
Vector deviceList = CaptureDeviceManager.getDeviceList(new AudioFormat("linear", 44100, 16, 2));
if (deviceList.size() > 0){
di = (CaptureDeviceInfo)deviceList.firstElement();
System.out.println((di.getLocator()).toExternalForm());
}else{
System.out.println("Exiting");
System.exit(-1);
}
try{
p = Manager.createPlayer(di.getLocator());
}catch (IOException e){
System.out.println(e);
}catch (NoPlayerException e) {
System.out.println(e);
}
System.out.println("Playing Started");
p.start();
}
}
© Stack Overflow or respective owner