开发者

What do realize() and prefetch() mean exactly?

What do realize() and prefetch() mean exactly?

for Audio files:

InputStream is = getClass().getResourceAsStream("/SMS.mp3");
player = Manager.createPlayer(is,"audio/mpeg")
player.realize();
player.prefetch();
player.start();

for Camera...

player = Manager.createPlayer("ca开发者_如何学运维pture://video");
player.realize();
videoControl = (VideoControl)player.getControl("VideoControl");
Canvas canvas = new VLCCanvas( videoControl);
d.setCurrent(canvas);
player.start();

so here in the above code some times it uses only realize() and some times prefetch() too. But what does that mean?


You should probably look at the API docs which talk about exactly this. I imagine that the API is flexible and can execute uncalled state transitions when a later one is specified to be executed (i.e., realisation without prefetch being called first).

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜