开发者

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

开发者 https://www.devze.com 2023-02-25 19:54 出处:网络
What do realize() and prefetch() mean exactly? for Audio files: InputStream is = getClass().getResourceAsStream(\"/SMS.mp3\");

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

精彩评论

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