Examples of ContentDescriptor


Examples of javax.media.protocol.ContentDescriptor

      final ProcessorModel p = new ProcessorModel(
          new Format[] {
            new Format("abc"),
            new Format("xyz")
          },
          new ContentDescriptor("abc"));
      for (int i = 0; i < 4; ++i)
        assertEquals(p.getTrackCount(i), 2);
     
      assertTrue(p.getOutputTrackFormat(0).equals(new Format("abc")));
      assertTrue(p.getOutputTrackFormat(1).equals(new Format("xyz")));
View Full Code Here

Examples of javax.media.protocol.ContentDescriptor

  public static Demultiplexer getSourceCompatibleDemultiplexer(DataSource source)
  {
    if (TRACE) logger.fine("Content type: " + source.getContentType());
     
      // loop through demuxs for content type:
    final ContentDescriptor contentDescriptor = new ContentDescriptor(source.getContentType());
      final Vector demuxs = PlugInManager.getPlugInList(contentDescriptor, null, PlugInManager.DEMULTIPLEXER);
      if (TRACE) logger.fine("Num demux: " + demuxs.size());
      for (int i = 0; i < demuxs.size(); ++i)
      {
       
View Full Code Here

Examples of javax.media.protocol.ContentDescriptor

  {
    com.sun.media.multiplexer.RawBufferMux m = new com.sun.media.multiplexer.RawBufferMux();
   
    ContentDescriptor[] d = m.getSupportedOutputContentDescriptors(null);
    assertEquals(d.length, 1);
    assertEquals(d[0], new ContentDescriptor("raw"));
   
   
    Format[] f = m.getSupportedInputFormats();
    assertEquals(f.length, 2);
    assertEquals(f[0], new AudioFormat(null, -1.0, -1, -1, -1, -1, -1, -1.0, Format.byteArray));
    assertEquals(f[1], new VideoFormat(null, null, -1, Format.byteArray, -1.0f));

    ContentDescriptor[] d2 = m.getSupportedOutputContentDescriptors(f);
    assertEquals(d2.length, 1);
    assertEquals(d2[0], new ContentDescriptor("raw"));
   
  }
View Full Code Here

Examples of javax.media.protocol.ContentDescriptor

  public void testInputSourceStream() throws IOException
  {
    String test = new File("samplemedia/safexmas.mov").getAbsolutePath();

    InputSourceStream s = new InputSourceStream(new FileInputStream(test), new ContentDescriptor("video.quicktime"));
    assertEquals(s.getContentLength(), -1);
    assertEquals(s.endOfStream(), false);
    assertEquals(s.getControls().length, 0);
    assertEquals(s.getContentDescriptor().getContentType(), "video.quicktime");
    assertEquals(s.willReadBlock(), false);
View Full Code Here

Examples of javax.media.protocol.ContentDescriptor

    instance = this;
  }

  public ContentDescriptor[] getSupportedInputContentDescriptors()
  {
    return new ContentDescriptor[] {new ContentDescriptor("audio.test")};
  }
View Full Code Here

Examples of javax.media.protocol.ContentDescriptor

  }

  public Format[] getSupportedInputFormats()
  {
    trace("getSupportedInputFormats");
    return new Format[] {new ContentDescriptor("zzz")};
  }
View Full Code Here

Examples of javax.media.protocol.ContentDescriptor

    PullSourceStream sts[] = s.getStreams();
    assertEquals(sts.length, 1);
   
    PullSourceStream st = sts[0];
    assertEquals(st.getControls().length, 0);
    ContentDescriptor cd = st.getContentDescriptor();
    assertEquals(cd.getContentType(), "video.quicktime");
    assertEquals(cd.getEncoding(), "video.quicktime");
    assertTrue(cd.getDataType() == byte[].class);
   
   
    assertFalse(st.endOfStream());
    assertEquals(st.getContentLength(), 3547908L);
    assertEquals(s.getDuration().getNanoseconds(), 9223372036854775806L);
View Full Code Here

Examples of javax.media.protocol.ContentDescriptor

    /**
     * Returns the content descriptor of this stream.
     * @return the content descriptor of this stream - the RAW_RTP content descriptor
     */
    public ContentDescriptor getContentDescriptor() {
        return new ContentDescriptor(ContentDescriptor.RAW_RTP);
    }
View Full Code Here

Examples of javax.media.protocol.ContentDescriptor

      if (!waitForState(processor, Processor.Configured)) {
        throw new IOException("Failed to configure the processor.");
      }

      // Set the output content descriptor to QuickTime.
      processor.setContentDescriptor(new ContentDescriptor(FileTypeDescriptor.QUICKTIME));

      // Query for the processor for supported formats.
      // Then set it on the processor.
      TrackControl trackControls[] = processor.getTrackControls();
      Format format[] = trackControls [0].getSupportedFormats();
View Full Code Here

Examples of javax.media.protocol.ContentDescriptor

    public Format getFormat() {
      return this.format;
    }

    public ContentDescriptor getContentDescriptor() {
      return new ContentDescriptor(ContentDescriptor.RAW);
    }
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.