本文整理汇总了Java中com.jme3.video.VFrame类的典型用法代码示例。如果您正苦于以下问题:Java VFrame类的具体用法?Java VFrame怎么用?Java VFrame使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
VFrame类属于com.jme3.video包,在下文中一共展示了VFrame类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: decodeRgbFromBuffer
import com.jme3.video.VFrame; //导入依赖的package包/类
private void decodeRgbFromBuffer(long time){
VFrame frame = videoQueue.nextReturnedFrame(true);
conv.convert(yuv, xOff, yOff, width, height);
int[] rgb = conv.getRGBData();
frame.setTime(time);
ByteBuffer data = frame.getImage().getData(0);
data.clear();
data.asIntBuffer().put(rgb);
try {
// if it throws an exception someone
// else modified it. "unknown error"..
videoQueue.put(frame);
} catch (InterruptedException ex) {
}
}
示例2: close
import com.jme3.video.VFrame; //导入依赖的package包/类
public void close(){
// enqueue a frame with time == -2 to indicate end of stream
VFrame frame = videoQueue.nextReturnedFrame(true);
frame.setTime(-2);
try {
videoQueue.put(frame);
} catch (InterruptedException ex) {
}
}
示例3: drawFrame
import com.jme3.video.VFrame; //导入依赖的package包/类
/**
* Draw frame.
*
* @param frame
* the frame
*/
private void drawFrame(VFrame frame)
{
frame.setImage(frame.getImage());
mat.setTexture("m_Texture", frame);
renderer.setTexture(0, frame);
videoQueue.returnFrame(frame);
lastFrameTime = frame.getTime();
}
示例4: initializeFrames
import com.jme3.video.VFrame; //导入依赖的package包/类
private void initializeFrames(){
for (int i = 0; i < videoQueue.remainingCapacity(); i++){
videoQueue.returnFrame(new VFrame(width, height));
}
}