realize()
和prefetch()
究竟是什么意思?
用于音频文件:
InputStream is = getClass().getResourceAsStream("/SMS.mp3");
player = Manager.createPlayer(is,"audio/mpeg")
player.realize();
player.prefetch();
player.start();
for Camera ...
player = Manager.createPlayer("capture://video");
player.realize();
videoControl = (VideoControl)player.getControl("VideoControl");
Canvas canvas = new VLCCanvas( videoControl);
d.setCurrent(canvas);
player.start();
所以在上面的代码中,有时它只使用了realize(),有时也使用了prefetch()。但这意味着什么?