Package com.sun.media.renderer.video

Examples of com.sun.media.renderer.video.AWTRenderer


public class AWTRendererTest extends TestCase
{
 
  public void testAWTRenderer()
  {
    VideoRenderer r = new AWTRenderer();
    //System.out.println(r.getName());
    assertEquals(r.getName(), "AWT Renderer");
    //System.out.println(r.getBounds());
    assertTrue(r.getBounds() == null);
    //System.out.println(r.getComponent());
    assertTrue(r.getComponent() != null);
   
    //System.out.println(r.getControls());
    Object[] controls = r.getControls();
    assertEquals(controls.length, 1);
    assertEquals(controls[0], r);
//    for (int i = 0; i < controls.length; ++i)
//    {  Object control = controls[i];
//      System.out.println("\t" + control.getClass());
//      System.out.println("\t" + control);
//      System.out.println("\t" + (control == r));
//     
//    }
   
    final Format[] supportedInputFormats;
   

   
    if (OSUtils.isMacOSX() && !ClasspathChecker.checkManagerImplementation()) // TODO: why do we get two of the same on the mac using JMF?
    {
      supportedInputFormats = new Format[] {
          //RGB, 32-bit, Masks=16711680:65280:255, LineStride=-1, class [I
          new RGBFormat(null, -1, Format.intArray, -1.0f, 32, 0xff0000, 0xff00, 0xff, 1, -1, 0, -1),
         
          // TODO: why do we get two of the same on the mac using JMF?
          new RGBFormat(null, -1, Format.intArray, -1.0f, 32, 0xff0000, 0xff00, 0xff, 1, -1, 0, -1),
       
        };
    }
    else
    {
      supportedInputFormats = new Format[] {
          //RGB, 32-bit, Masks=16711680:65280:255, LineStride=-1, class [I
          new RGBFormat(null, -1, Format.intArray, -1.0f, 32, 0xff0000, 0xff00, 0xff, 1, -1, 0, -1),
         
          //RGB, 32-bit, Masks=255:65280:16711680, LineStride=-1, class [I
          new RGBFormat(null, -1, Format.intArray, -1.0f, 32, 0xff, 0xff00, 0xff0000, 1, -1, 0, -1)
       
        };
    }
   
    final Format[] formats = r.getSupportedInputFormats();
    assertEquals(formats.length, supportedInputFormats.length);
       
    for (int i = 0; i < formats.length; ++i)
    {  Format format = formats[i];
//      System.out.println("\t" + format);
View Full Code Here

TOP

Related Classes of com.sun.media.renderer.video.AWTRenderer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.