开发者

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 :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜