Package javax.media

Examples of javax.media.Format.matches()


   
    {
      final VideoFormat f1 = new VideoFormat(VideoFormat.MPEG, new Dimension(0, 0), 1000, Format.byteArray, 1.f);
      final VideoFormat f2 = new VideoFormat(null, new Dimension(0, 0), 1000, Format.byteArray, 1.f);
      assertTrue(f1.matches(f2));
      assertTrue(f2.matches(f1));
    }
   
    {
      final VideoFormat f1 = new VideoFormat(VideoFormat.MPEG, new Dimension(0, 0), 1000, Format.byteArray, 1.f);
      final VideoFormat f2 = new VideoFormat(VideoFormat.MPEG, new Dimension(0, 0), 1000, Format.intArray, 1.f);
View Full Code Here


   
    {
      final VideoFormat f1 = new VideoFormat(VideoFormat.MPEG, new Dimension(0, 0), 1000, Format.byteArray, 1.f);
      final VideoFormat f2 = new VideoFormat(VideoFormat.MPEG, new Dimension(0, 0), 1000, Format.intArray, 1.f);
      assertFalse(f1.matches(f2));
      assertFalse(f2.matches(f1));
    }
   
    {
      final VideoFormat f1 = new VideoFormat(VideoFormat.MPEG, new Dimension(0, 0), 1000, Format.byteArray, 1.f);
      final VideoFormat f2 = new VideoFormat(VideoFormat.MPEG, new Dimension(0, 0), 1000, null, 1.f);
View Full Code Here

   
    {
      final VideoFormat f1 = new VideoFormat(VideoFormat.MPEG, new Dimension(0, 0), 1000, Format.byteArray, 1.f);
      final VideoFormat f2 = new VideoFormat(VideoFormat.MPEG, new Dimension(0, 0), 1000, null, 1.f);
      assertTrue(f1.matches(f2));
      assertTrue(f2.matches(f1));
    }
   
    {
      final VideoFormat f1 = new VideoFormat(VideoFormat.MPEG, new Dimension(0, 0), 1000, Format.byteArray, 1.f);
      final VideoFormat f2 = new VideoFormat(VideoFormat.MPEG, new Dimension(0, 0), 1000, Format.byteArray, 2.f);
View Full Code Here

   
    {
      final VideoFormat f1 = new VideoFormat(VideoFormat.MPEG, new Dimension(0, 0), 1000, Format.byteArray, 1.f);
      final VideoFormat f2 = new VideoFormat(VideoFormat.MPEG, new Dimension(0, 0), 1000, Format.byteArray, 2.f);
      assertFalse(f1.matches(f2));
      assertFalse(f2.matches(f1));
    }
   
    {
      final VideoFormat f1 = new VideoFormat(VideoFormat.MPEG, new Dimension(0, 0), 1000, Format.byteArray, 1.f);
      final VideoFormat f2 = new VideoFormat(VideoFormat.MPEG, new Dimension(0, 0), 1000, Format.byteArray, Format.NOT_SPECIFIED);
View Full Code Here

   
    {
      final VideoFormat f1 = new VideoFormat(VideoFormat.MPEG, new Dimension(0, 0), 1000, Format.byteArray, 1.f);
      final VideoFormat f2 = new VideoFormat(VideoFormat.MPEG, new Dimension(0, 0), 1000, Format.byteArray, Format.NOT_SPECIFIED);
      assertTrue(f1.matches(f2));
      assertTrue(f2.matches(f1));
    }
   
   
  }
 
View Full Code Here

        final Format f3 = f1.intersects(f2);
       
        assertTrue(f1.equals(f3));
        assertTrue(f1.matches(f3));
        assertTrue(f3.equals(f1));
        assertTrue(f3.matches(f1))
      }
    }
   
    // explicit intersect results
    {
View Full Code Here

//        System.out.println("" + f2_1);
//        System.out.println("" + f2_1_actual);
        assertTrue(f2_1.equals(f2_1_actual));
        assertTrue(f2_1.matches(f2_1_actual));
        assertTrue(f2_1_actual.equals(f2_1));
        assertTrue(f2_1_actual.matches(f2_1));
      }
    }


  }
View Full Code Here

     
          final Iterator iter = mgr.formatMap.keySet().iterator();
          while (iter.hasNext()) {
              Integer id = (Integer) iter.next();
              Format testFormat = (Format) mgr.formatMap.get(id);
              if (testFormat.matches(f)) {
                 return true;
              }
          }
         
      return false;
View Full Code Here

        Iterator iter = formatMap.keySet().iterator();
        while (iter.hasNext()) {
            Integer id = (Integer) iter.next();
            Format testFormat = (Format) formatMap.get(id);
            //System.out.println("Comparing with format "+testFormat);
            if (testFormat.matches(fmt)) {
                format = id.intValue();
                //System.out.println("GOT IT!");
            }
        }
        if (format == -1) {
View Full Code Here

//      {
//        checkEncodingCode(f1);
//       
//      }
      assertEquals(f1, f1);
      assertTrue(f1.matches(f1));

      if (f1.getEncoding() != null)
      {
//        if (!f1.isSameEncoding(f1))
//          System.out.println(f1);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.