JMF Output Stream
Does anyone have a simple example of how to take a local file and (unicast) st开发者_开发百科ream it with Java JMF? Examples from others seem scarce.
Use Manager#createPlayer()
.
File audioFile = new File("/path/to/audiofile.wav");
Player player = Manager.createPlayer(audioFile.toURL());
player.play();
Don't forget to read the introducory javadoc of the Manager
class for other hints.
I've found http://jcs.mobile-utopia.com/jcs/26201_RTPManager.java, although am having trouble getting it to work at the moment, hence Problems creating an RTP stream with JMF :)
精彩评论