开发者

JMF Output Stream

开发者 https://www.devze.com 2022-12-29 20:49 出处:网络
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().

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

精彩评论

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