how to do video conferencing using jmf

hi guys, can anybody help me out on developing a videoconferencing using jmf. ASAP PLZZZZZZZ.my email id is .siddhartha_bh@yahoo.comsiddhartha
[190 byte] By [siddhartha_bh] at [2007-9-26 1:37:33]
# 1

Hi,

Here is the sample code for playing the movie.

public class MoviePlayer extends JFrame implements ControllerListener {

private Player player = null;

public static void main(String args[]) {

new MoviePlayer(args[0]);

}

public MoviePlayer(String movieFile) {

getContentPane().setLayout(new BorderLayout());

setSize(new Dimension(200, 200));

setVisible(true);

setTitle(movieFile);

loadMovie(movieFile);

addWindowListener(new WindowAdapter() {

public void windowClosing(WindowEvent we) {

player.stop();

player.deallocate();

System.exit(1);

}

});

}

private void loadMovie(String movieFile) {

try {

MediaLocator ml = new MediaLocator("file:" + movieFile);

player = Manager.createPlayer(ml);

player.addControllerListener(this);

player.start();

} catch (IOException ioe) {

ioe.printStackTrace();

} catch (NoPlayerException npe) {

npe.printStackTrace();

}

}

public synchronized void controllerUpdate(ControllerEvent ce) {

if (ce instanceof RealizeCompleteEvent) {

Component comp;

if ((comp = player.getVisualComponent()) != null)

getContentPane().add(comp, BorderLayout.CENTER);

if ((comp = player.getControlPanelComponent()) != null)

getContentPane().add(comp, BorderLayout.SOUTH);

validate();

}

}

}

I hope this will help you.

Thanks

Bakrudeen

Technical Support Engineer

Sun MicroSystems Inc, India

bakrudeen_indts at 2007-6-29 2:24:27 > top of Java-index,Archived Forums,Java Programming...
# 2
Hi,Also you can refer this URL, which gives the excellent examples in Animation. http://www.csse.monash.edu.au/courseware/cse3420/Lectures/Module8/module.html ThanksBakrudeen
bakrudeen_indts at 2007-6-29 2:24:27 > top of Java-index,Archived Forums,Java Programming...
# 3
Can you list our what class file I should import in order to run the program?
del3 at 2007-6-29 2:24:27 > top of Java-index,Archived Forums,Java Programming...
# 4

Hi,

Please see this URL.

There you can get the source code with excellent animation programs and your regarding import also can be found out.

http://www.csse.monash.edu.au/courseware/cse3420/Lectures/Module8/module.html

Thanks

Bakrudeen

bakrudeen_indts at 2007-6-29 2:24:27 > top of Java-index,Archived Forums,Java Programming...
# 5
I browsed the web site you list. Thank you. I compile the pgogram succefully but it give me runtime error "could not creteplayer". What does this mean? How can I solve it. Thank you.
del3 at 2007-6-29 2:24:27 > top of Java-index,Archived Forums,Java Programming...
# 6
Hi, May I know in which program you got the error. It is in the above program or any of the other programs in that specified site.Why I am asking this, I have run this program before a month without any problem.ThanksBakrudeen
bakrudeen_indts at 2007-6-29 2:24:27 > top of Java-index,Archived Forums,Java Programming...
# 7
Hi,Please give me some time. I am working on your query.ThanksBakrudeen
bakrudeen_indts at 2007-6-29 2:24:27 > top of Java-index,Archived Forums,Java Programming...
# 8
yes, i download that program from the web site you gave and run it with the command java.exe. IT gave me the error. Thank you.
del3 at 2007-6-29 2:24:27 > top of Java-index,Archived Forums,Java Programming...
# 9

It looks like I don't know how to run the application. I put a midi file name "CanYouFeel" to the same directory as the program. Then I type in the command

java MoviePlayer CanYouFeel.mid

but it failed to execute the application. Is it the way I run the program wrong.

Regards

del3

del3 at 2007-6-29 2:24:27 > top of Java-index,Archived Forums,Java Programming...