/* * Copyright 2001-2004 SageTV, LLC. All rights reserved. */ As of SageTV 2.1.0 the ability exists to define an OSD rendering plugin which can be used to render the SageTV UI in alternate ways. The plugin interface is defined by a Java interface called sage.OSDRenderingPlugin which is in the Sage.jar file from the SageTV installation. SageTV will use the OSD plugin that is defined in the properties file by osd_rendering_plugin_class= To use the PVR350 OSD plugin that comes with SageTV, it gets set to sage.PVR350OSDRenderingPlugin. Set this value to the class name that implements the sage.OSDRenderingPlugin interface to use a different plugin. The plugin object is built by calling the default constructor for the plugin class. If OSD plugin is set, SageTV disables 3D acceleration. The SageTV directory is part of the classpath. The file plugins.jar in the SageTV directory is also in the classpath. This is the definition of the sage.OSDRenderingPlugin interface: /* * Copyright 2001-2004 SageTV, LLC. All rights reserved. */ package sage; public interface OSDRenderingPlugin { /* * Called to initialize the OSD. * * Returns true if succesful, false otherwise */ public boolean openOSD(); /* * Called to close the OSD. Resource cleanup should be done here. */ public void closeOSD(); /* * Returns false if this plugin requires the entire OSD bitmap when updates occur. * If this returns true, then the updateOSD function may be called with an updateAreaRectangle * that is smaller than the size of the entire UI. */ public boolean supportsRegionUpdates(); /* * This is where everything happens. This is called whenever the OSD graphic changes in any * way, or if the positioning of the video rectangle gets changed. * * argbBitmapData - An array of integers which contains the pixel values for the new OSD bitmap * in ARGB format. The length of this array will be 4*bitmapWidth*bitmapHeight * bitmapWidth - the width in pixels of the bitmap data passed in * bitmapHeight - the height in pixels of the bitmap data passed in * updateAreaRectangle - UI coordinates where the OSD bitmap should be placed. The width & height of * this rectangle will equal bitmapWidth & bitmapHeight respectively. * videoRectangle - UI coordinates where the video should be placed * * Returns true if the OSD update was successful, false otherwise. */ public boolean updateOSD(int[] argbBitmapData, int bitmapWidth, int bitmapHeight, java.awt.Rectangle updateAreaRectangle, java.awt.Rectangle videoRectangle); }