Methods Summary |
---|
public void | addRenderEventListener(com.omnividea.media.renderer.video.opengl.RenderEventListener listener)
System.out.println("OpenGL Renderer: add Render Event");
this.listener = listener;
canvas.addGLEventListener(listener);
canvas.addMouseMotionListener(listener);
|
public void | close()
|
public java.awt.Rectangle | getBounds()
return null;
|
public java.awt.Component | getComponent()
//return canvas;
return panel;
|
public java.lang.Object | getControl(java.lang.String arg)
Object rc = null;
if(arg.equals("javax.media.control.FrameGrabbingControl")) rc = this;
return rc;
|
public java.awt.Component | getControlComponent()
return null;
|
public java.lang.Object[] | getControls()
Object[] obj = { this };
return obj;
|
public java.lang.String | getName()
return "Fobs GL Renderer";
|
public javax.media.Format[] | getSupportedInputFormats()
RGBFormat format = new RGBFormat();
return new Format[] { format };
|
public javax.media.Buffer | grabFrame()
//BufferedImage bufimg = (BufferedImage)FobsConfiguration.properties.get("BufferedImage");
Buffer buf = ImageToBuffer.createBuffer(lastImage,(float)0);
return buf;
|
public void | open()
|
public int | process(javax.media.Buffer buffer)
/*int[] bufferdata = (int[]) buffer.getData();
int nextIndex = (currentIndex +1)%2;
currentIndex = nextIndex;
*/
/*
int[] destination = pixels[nextIndex];
int size = destination.length;
int offsetSrc = 0;
int offsetDest = destination.length - formatWidth;
for(int i=0; i < formatHeight; ++i) {
for(int j=formatWidth - 1; j >= 0; --j) {
destination[offsetDest] = (bufferdata[offsetSrc] << 8);
++offsetDest;
++offsetSrc;
}
offsetDest -= formatWidth * 2;
}
if(listener != null) {
listener.setRenderingData(pixels[currentIndex]);
canvas.display();
}
*/
if(listener != null) {
listener.setRenderingData(pixels/*bufferdata*/);
canvas.display();
}
return BUFFER_PROCESSED_OK;
|
public void | reset()
|
public void | setBounds(java.awt.Rectangle arg0)
System.out.println("set bounds :: " + arg0);
|
public boolean | setComponent(java.awt.Component arg0)
return false;
|
public javax.media.Format | setInputFormat(javax.media.Format format)
FobsConfiguration.reset();
FobsConfiguration.videoFrameFormat=FobsConfiguration.YUV420;
/* vf = (RGBFormat) format;
this.formatWidth = (int) vf.getSize().getWidth();
this.formatHeight = (int) vf.getSize().getHeight();
listener.setFormat(formatWidth,formatHeight);
pixels[0] = new int[formatWidth * formatHeight];
pixels[1] = new int[formatWidth * formatHeight];
FobsConfiguration.videoFrameFormat=FobsConfiguration.RGBA;*/
vf = (RGBFormat) format;
int formatWidth = (int) vf.getSize().getWidth();
int formatHeight = (int) vf.getSize().getHeight();
listener.setFormat(formatWidth,formatHeight);
/*
bufferedImage = new BufferedImage(formatWidth,formatHeight, BufferedImage.TYPE_INT_RGB);
pixels = ( (DataBufferInt) bufferedImage.getRaster().getDataBuffer()).getData();
FobsConfiguration.properties.put("BufferedImage", bufferedImage);
FobsConfiguration.properties.put("BufferedImageIntBuffer", pixels);
*/
canvas.setSize(new Dimension(formatWidth,formatHeight));
panel.setPreferredSize(new Dimension(formatWidth,formatHeight));
return format;
|
void | setValue(java.lang.Object aValue, boolean isSelected)
System.out.println(aValue.getClass().getName());
|
public void | start()
/*
if(animator == null) {
animator = new Animator(canvas);
animator.start();
System.out.println("animator started");
}*/
|
public void | stop()
/*
if(animator != null) {
animator.stop();
animator = null;
}
*/
|