de.humatic.dsj.rc
Class DirectDrawControls

java.lang.Object
  extended by de.humatic.dsj.rc.RendererControls
      extended by de.humatic.dsj.rc.DirectDrawControls

public class DirectDrawControls
extends RendererControls

DirectDrawControls provides extended control over the native DirectDraw7 Renderer. An application retrieves this object by calling getRendererControl() on a DSFiltergraph that has been set up with the RENDER_NATIVE / DD7 flag.


Field Summary
 int type
           
static int VERTICAL_SYNC
           
 
Fields inherited from class de.humatic.dsj.rc.RendererControls
BRIGHTNESS, CONTRAST, D3D9, DDR, EVR, HUE, IMG, J2D, NVR, SATURATION, VMR
 
Method Summary
 void displayResized(int x, int y, int w, int h)
          When you resize the display, you should redraw any overlay, that has been set.
 void setFlags(int rendererFlags)
          Allows to control further aspects of rendering by setting / clearing bits in the flags parameter.
 void setOutputRect(int streamID, int oX, int oY, int oW, int oH)
          Provides scaling functionality for the videostream (stream 0) and an eventual overlay image (stream 1 or RenderControls.IMG).
 boolean setOverlayImage(java.awt.image.BufferedImage image, int[] dest, java.awt.Color keyColor, float alpha)
          Installs a BufferedImage object to be rendered over the running video.
 
Methods inherited from class de.humatic.dsj.rc.RendererControls
getControls, getFlags, getRendererStatistics
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERTICAL_SYNC

public static final int VERTICAL_SYNC
See Also:
Constant Field Values

type

public int type
Method Detail

setOutputRect

public void setOutputRect(int streamID,
                          int oX,
                          int oY,
                          int oW,
                          int oH)
                   throws DSJException
Provides scaling functionality for the videostream (stream 0) and an eventual overlay image (stream 1 or RenderControls.IMG).

Overrides:
setOutputRect in class RendererControls
Throws:
DSJException

setOverlayImage

public boolean setOverlayImage(java.awt.image.BufferedImage image,
                               int[] dest,
                               java.awt.Color keyColor,
                               float alpha)
                        throws DSJException
Installs a BufferedImage object to be rendered over the running video. %dest sets the rectangle the image will be initially drawn into (& eventually scaled to). To change the overlayed image on the DirectDraw renderer, do your drawing into the image and call this method again.
To remove the overlay, call this method with %image set to null.
This method is overridden from the superclass, DirectDrawControls do not support alpha.

Overrides:
setOverlayImage in class RendererControls
Throws:
DSJException

displayResized

public void displayResized(int x,
                           int y,
                           int w,
                           int h)
When you resize the display, you should redraw any overlay, that has been set. This method is called internally by the rendering engine to adjust parameters. It is public for package design reasons & should not be called by application code.

Overrides:
displayResized in class RendererControls

setFlags

public void setFlags(int rendererFlags)
Allows to control further aspects of rendering by setting / clearing bits in the flags parameter. Currently only the VERTICAL_SYNC flag is defined. When set it will force the renderer to refresh only on vertical blanking, which helps to avoid tearing, but may cost some CPU.

Overrides:
setFlags in class RendererControls