Package javax.media.protocol

Examples of javax.media.protocol.ContentDescriptor


    }

    {
      final Element e = element.getChild("content-descriptor-encoding");
      if (e != null)
        processorWizardConfig.contentDescriptor = new ContentDescriptor(e.getTextTrim());
    }

   
   
    {
View Full Code Here


      System.err.println("Failed to configure the processor.");
      return false;
  }

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

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

  if (!programmed)
      return "Couldn't find video track";

  // Set the output content descriptor to RAW_RTP
  ContentDescriptor cd = new ContentDescriptor(ContentDescriptor.RAW_RTP);
  processor.setContentDescriptor(cd);

  // Realize the processor. This will internally create a flow
  // graph and attempt to create an output datasource for JPEG/RTP
  // video frames.
View Full Code Here

  public Format getFormat() {
      return format;
  }

  public ContentDescriptor getContentDescriptor() {
      return new ContentDescriptor(ContentDescriptor.RAW);
  }
View Full Code Here

      return "Couldn't find tracks in processor";

  // Set the output content descriptor to RAW_RTP
  // This will limit the supported formats reported from
  // Track.getSupportedFormats to only valid RTP formats.
  ContentDescriptor cd = new ContentDescriptor(ContentDescriptor.RAW_RTP);
  processor.setContentDescriptor(cd);

  Format supported[];
  Format chosen;
  boolean atLeastOneTrack = false;
View Full Code Here

      tracks[i].setFormat(preferredVideoFormat);
        } else {
      System.err.println("Bad track in processor for " + mediaFile);
        }
    }
    proc.setContentDescriptor(new ContentDescriptor(ContentDescriptor.RAW));
    reachedState = waitForState(proc, Controller.Realized);
    if (!reachedState)
        return false;
    DataSource ds = proc.getDataOutput();
    if (ds == null)
View Full Code Here

    notifyAll();
      }
  }
 
  public ContentDescriptor getContentDescriptor() {
      return new ContentDescriptor(ContentDescriptor.RAW);
  }
View Full Code Here

public class RawMux extends AbstractStreamCopyMux
{

  public RawMux()
  {
    super(new ContentDescriptor(ContentDescriptor.RAW));
  }
View Full Code Here

  {

//     PlugInManager.DEMULTIPLEXER:
    PlugInManager.addPlugIn("com.ibm.media.parser.video.MpegParser",
      new Format[] {
        new ContentDescriptor("audio.mpeg"),
        new ContentDescriptor("video.mpeg"),
        new ContentDescriptor("audio.mpeg"),
      },
      new Format[] {},
      PlugInManager.DEMULTIPLEXER);
    PlugInManager.addPlugIn("com.sun.media.parser.audio.WavParser",
      new Format[] {
        new ContentDescriptor("audio.x_wav"),
      },
      new Format[] {},
      PlugInManager.DEMULTIPLEXER);
    PlugInManager.addPlugIn("com.sun.media.parser.audio.AuParser",
      new Format[] {
        new ContentDescriptor("audio.basic"),
      },
      new Format[] {},
      PlugInManager.DEMULTIPLEXER);
    PlugInManager.addPlugIn("com.sun.media.parser.audio.AiffParser",
      new Format[] {
        new ContentDescriptor("audio.x_aiff"),
      },
      new Format[] {},
      PlugInManager.DEMULTIPLEXER);
    PlugInManager.addPlugIn("com.sun.media.parser.audio.GsmParser",
      new Format[] {
        new ContentDescriptor("audio.x_gsm"),
      },
      new Format[] {},
      PlugInManager.DEMULTIPLEXER);
    PlugInManager.addPlugIn("com.sun.media.parser.RawStreamParser",
      new Format[] {
        new ContentDescriptor("raw"),
      },
      new Format[] {},
      PlugInManager.DEMULTIPLEXER);
    PlugInManager.addPlugIn("com.sun.media.parser.RawBufferParser",
      new Format[] {
        new ContentDescriptor("raw"),
      },
      new Format[] {},
      PlugInManager.DEMULTIPLEXER);
    PlugInManager.addPlugIn("com.sun.media.parser.RawPullStreamParser",
      new Format[] {
        new ContentDescriptor("raw"),
      },
      new Format[] {},
      PlugInManager.DEMULTIPLEXER);
    PlugInManager.addPlugIn("com.sun.media.parser.RawPullBufferParser",
      new Format[] {
        new ContentDescriptor("raw"),
      },
      new Format[] {},
      PlugInManager.DEMULTIPLEXER);
    PlugInManager.addPlugIn("com.sun.media.parser.video.QuicktimeParser",
      new Format[] {
        new ContentDescriptor("video.quicktime"),
      },
      new Format[] {},
      PlugInManager.DEMULTIPLEXER);
    PlugInManager.addPlugIn("com.sun.media.parser.video.AviParser",
      new Format[] {
        new ContentDescriptor("video.x_msvideo"),
      },
      new Format[] {},
      PlugInManager.DEMULTIPLEXER);

//     PlugInManager.CODEC:
    PlugInManager.addPlugIn("com.sun.media.codec.audio.mpa.JavaDecoder",
      new Format[] {
        new AudioFormat("mpegaudio", 16000.0, -1, -1, -1, 1, -1, -1.0, Format.byteArray),
        new AudioFormat("mpegaudio", 22050.0, -1, -1, -1, 1, -1, -1.0, Format.byteArray),
        new AudioFormat("mpegaudio", 24000.0, -1, -1, -1, 1, -1, -1.0, Format.byteArray),
        new AudioFormat("mpegaudio", 32000.0, -1, -1, -1, 1, -1, -1.0, Format.byteArray),
        new AudioFormat("mpegaudio", 44100.0, -1, -1, -1, 1, -1, -1.0, Format.byteArray),
        new AudioFormat("mpegaudio", 48000.0, -1, -1, -1, 1, -1, -1.0, Format.byteArray),
      },
      new Format[] {
        new AudioFormat("LINEAR", -1.0, -1, -1, -1, -1, -1, -1.0, Format.byteArray),
      },
      PlugInManager.CODEC);
    PlugInManager.addPlugIn("com.sun.media.codec.video.cinepak.JavaDecoder",
      new Format[] {
        new VideoFormat("cvid", null, -1, Format.byteArray, -1.0f),
      },
      new Format[] {
        new RGBFormat(null, -1, Format.intArray, -1.0f, 32, 0xff, 0xff00, 0xff0000, 1, -1, 0, -1),
      },
      PlugInManager.CODEC);
    PlugInManager.addPlugIn("com.ibm.media.codec.video.h263.JavaDecoder",
      new Format[] {
        new VideoFormat("h263", null, -1, Format.byteArray, -1.0f),
        new VideoFormat("h263/rtp", null, -1, Format.byteArray, -1.0f),
      },
      new Format[] {
        new RGBFormat(null, -1, null, -1.0f, -1, 0xffffffff, 0xffffffff, 0xffffffff, -1, -1, -1, -1),
      },
      PlugInManager.CODEC);
    PlugInManager.addPlugIn("com.sun.media.codec.video.colorspace.JavaRGBConverter",
      new Format[] {
        new RGBFormat(null, -1, null, -1.0f, -1, 0xffffffff, 0xffffffff, 0xffffffff, -1, -1, -1, -1),
      },
      new Format[] {
        new RGBFormat(null, -1, null, -1.0f, -1, 0xffffffff, 0xffffffff, 0xffffffff, -1, -1, -1, -1),
      },
      PlugInManager.CODEC);
    PlugInManager.addPlugIn("com.sun.media.codec.video.colorspace.JavaRGBToYUV",
      new Format[] {
        new RGBFormat(null, -1, Format.byteArray, -1.0f, 24, 0xffffffff, 0xffffffff, 0xffffffff, -1, -1, -1, -1),
        new RGBFormat(null, -1, Format.intArray, -1.0f, 32, 0xff0000, 0xff00, 0xff, 1, -1, -1, -1),
        new RGBFormat(null, -1, Format.intArray, -1.0f, 32, 0xff, 0xff00, 0xff0000, 1, -1, -1, -1),
      },
      new Format[] {
        new YUVFormat(null, -1, Format.byteArray, -1.0f, 2, -1, -1, -1, -1, -1),
      },
      PlugInManager.CODEC);
    PlugInManager.addPlugIn("com.ibm.media.codec.audio.PCMToPCM",
      new Format[] {
        new AudioFormat("LINEAR", -1.0, 16, 1, -1, -1, -1, -1.0, Format.byteArray),
        new AudioFormat("LINEAR", -1.0, 16, 2, -1, -1, -1, -1.0, Format.byteArray),
        new AudioFormat("LINEAR", -1.0, 8, 1, -1, -1, -1, -1.0, Format.byteArray),
        new AudioFormat("LINEAR", -1.0, 8, 2, -1, -1, -1, -1.0, Format.byteArray),
      },
      new Format[] {
        new AudioFormat("LINEAR", -1.0, -1, -1, -1, -1, -1, -1.0, Format.byteArray),
      },
      PlugInManager.CODEC);
    PlugInManager.addPlugIn("com.ibm.media.codec.audio.rc.RCModule",
      new Format[] {
        new AudioFormat("LINEAR", -1.0, 16, 2, -1, -1, -1, -1.0, Format.byteArray),
        new AudioFormat("LINEAR", -1.0, 16, 1, -1, -1, -1, -1.0, Format.byteArray),
        new AudioFormat("LINEAR", -1.0, 8, 2, -1, -1, -1, -1.0, Format.byteArray),
        new AudioFormat("LINEAR", -1.0, 8, 1, -1, -1, -1, -1.0, Format.byteArray),
      },
      new Format[] {
        new AudioFormat("LINEAR", 8000.0, 16, 2, 0, 1, -1, -1.0, Format.byteArray),
        new AudioFormat("LINEAR", 8000.0, 16, 1, 0, 1, -1, -1.0, Format.byteArray),
      },
      PlugInManager.CODEC);
    PlugInManager.addPlugIn("com.sun.media.codec.audio.rc.RateCvrt",
      new Format[] {
        new AudioFormat("LINEAR", -1.0, -1, -1, -1, -1, -1, -1.0, Format.byteArray),
      },
      new Format[] {
        new AudioFormat("LINEAR", -1.0, -1, -1, -1, -1, -1, -1.0, Format.byteArray),
      },
      PlugInManager.CODEC);
    PlugInManager.addPlugIn("com.sun.media.codec.audio.msadpcm.JavaDecoder",
      new Format[] {
        new AudioFormat("msadpcm", -1.0, -1, -1, -1, -1, -1, -1.0, Format.byteArray),
      },
      new Format[] {
        new AudioFormat("LINEAR", -1.0, -1, -1, -1, -1, -1, -1.0, Format.byteArray),
      },
      PlugInManager.CODEC);
    PlugInManager.addPlugIn("com.ibm.media.codec.audio.ulaw.JavaDecoder",
      new Format[] {
        new AudioFormat("ULAW", -1.0, -1, -1, -1, -1, -1, -1.0, Format.byteArray),
      },
      new Format[] {
        new AudioFormat("LINEAR", -1.0, -1, -1, -1, -1, -1, -1.0, Format.byteArray),
      },
      PlugInManager.CODEC);
    PlugInManager.addPlugIn("com.ibm.media.codec.audio.alaw.JavaDecoder",
      new Format[] {
        new AudioFormat("alaw", -1.0, -1, -1, -1, -1, -1, -1.0, Format.byteArray),
      },
      new Format[] {
        new AudioFormat("LINEAR", -1.0, -1, -1, -1, -1, -1, -1.0, Format.byteArray),
      },
      PlugInManager.CODEC);
    PlugInManager.addPlugIn("com.ibm.media.codec.audio.dvi.JavaDecoder",
      new Format[] {
        new AudioFormat("dvi/rtp", -1.0, -1, -1, -1, -1, -1, -1.0, Format.byteArray),
      },
      new Format[] {
        new AudioFormat("LINEAR", -1.0, -1, -1, -1, -1, -1, -1.0, Format.byteArray),
      },
      PlugInManager.CODEC);
    PlugInManager.addPlugIn("com.ibm.media.codec.audio.g723.JavaDecoder",
      new Format[] {
        new AudioFormat("g723", -1.0, -1, -1, -1, -1, -1, -1.0, Format.byteArray),
        new AudioFormat("g723/rtp", -1.0, -1, -1, -1, -1, -1, -1.0, Format.byteArray),
      },
      new Format[] {
        new AudioFormat("LINEAR", -1.0, -1, -1, -1, -1, -1, -1.0, Format.byteArray),
      },
      PlugInManager.CODEC);
    PlugInManager.addPlugIn("com.ibm.media.codec.audio.gsm.JavaDecoder",
      new Format[] {
        new AudioFormat("gsm", -1.0, -1, -1, -1, -1, -1, -1.0, Format.byteArray),
        new AudioFormat("gsm/rtp", -1.0, -1, -1, -1, -1, -1, -1.0, Format.byteArray),
      },
      new Format[] {
        new AudioFormat("LINEAR", -1.0, -1, -1, -1, -1, -1, -1.0, Format.byteArray),
      },
      PlugInManager.CODEC);
    PlugInManager.addPlugIn("com.ibm.media.codec.audio.gsm.JavaDecoder_ms",
      new Format[] {
        new AudioFormat("gsm/ms", -1.0, -1, -1, -1, -1, -1, -1.0, Format.byteArray),
      },
      new Format[] {
        new AudioFormat("LINEAR", -1.0, -1, -1, -1, -1, -1, -1.0, Format.byteArray),
      },
      PlugInManager.CODEC);
    PlugInManager.addPlugIn("com.ibm.media.codec.audio.ima4.JavaDecoder",
      new Format[] {
        new AudioFormat("ima4", -1.0, -1, -1, -1, -1, -1, -1.0, Format.byteArray),
      },
      new Format[] {
        new AudioFormat("LINEAR", -1.0, -1, -1, -1, -1, -1, -1.0, Format.byteArray),
      },
      PlugInManager.CODEC);
    PlugInManager.addPlugIn("com.ibm.media.codec.audio.ima4.JavaDecoder_ms",
      new Format[] {
        new AudioFormat("ima4/ms", -1.0, -1, -1, -1, -1, -1, -1.0, Format.byteArray),
      },
      new Format[] {
        new AudioFormat("LINEAR", -1.0, -1, -1, -1, -1, -1, -1.0, Format.byteArray),
      },
      PlugInManager.CODEC);
    PlugInManager.addPlugIn("com.ibm.media.codec.audio.ulaw.JavaEncoder",
      new Format[] {
        new AudioFormat("LINEAR", -1.0, 16, 1, -1, -1, -1, -1.0, Format.byteArray),
        new AudioFormat("LINEAR", -1.0, 16, 2, -1, -1, -1, -1.0, Format.byteArray),
        new AudioFormat("LINEAR", -1.0, 8, 1, -1, -1, -1, -1.0, Format.byteArray),
        new AudioFormat("LINEAR", -1.0, 8, 2, -1, -1, -1, -1.0, Format.byteArray),
      },
      new Format[] {
        new AudioFormat("ULAW", 8000.0, 8, 1, -1, -1, -1, -1.0, Format.byteArray),
      },
      PlugInManager.CODEC);
    PlugInManager.addPlugIn("com.ibm.media.codec.audio.dvi.JavaEncoder",
      new Format[] {
        new AudioFormat("LINEAR", -1.0, 16, 1, 0, 1, -1, -1.0, Format.byteArray),
      },
      new Format[] {
        new AudioFormat("dvi/rtp", -1.0, 4, 1, -1, -1, -1, -1.0, Format.byteArray),
      },
      PlugInManager.CODEC);
    PlugInManager.addPlugIn("com.ibm.media.codec.audio.gsm.JavaEncoder",
      new Format[] {
        new AudioFormat("LINEAR", -1.0, 16, 1, 0, 1, -1, -1.0, Format.byteArray),
      },
      new Format[] {
        new AudioFormat("gsm", -1.0, -1, -1, -1, -1, -1, -1.0, Format.byteArray),
      },
      PlugInManager.CODEC);
    PlugInManager.addPlugIn("com.ibm.media.codec.audio.gsm.JavaEncoder_ms",
      new Format[] {
        new AudioFormat("LINEAR", -1.0, 16, 1, 0, 1, -1, -1.0, Format.byteArray),
      },
      new Format[] {
        new com.sun.media.format.WavAudioFormat("gsm/ms", -1.0, -1, -1, -1, -1, -1, -1, -1.0f, Format.byteArray, null),
      },
      PlugInManager.CODEC);
    PlugInManager.addPlugIn("com.ibm.media.codec.audio.ima4.JavaEncoder",
      new Format[] {
        new AudioFormat("LINEAR", -1.0, 16, -1, 0, 1, -1, -1.0, Format.byteArray),
      },
      new Format[] {
        new AudioFormat("ima4", -1.0, -1, -1, -1, -1, -1, -1.0, Format.byteArray),
      },
      PlugInManager.CODEC);
    PlugInManager.addPlugIn("com.ibm.media.codec.audio.ima4.JavaEncoder_ms",
      new Format[] {
        new AudioFormat("LINEAR", -1.0, 16, -1, 0, 1, -1, -1.0, Format.byteArray),
      },
      new Format[] {
        new com.sun.media.format.WavAudioFormat("ima4/ms", -1.0, -1, -1, -1, -1, -1, -1, -1.0f, Format.byteArray, null),
      },
      PlugInManager.CODEC);
    PlugInManager.addPlugIn("com.sun.media.codec.audio.ulaw.Packetizer",
      new Format[] {
        new AudioFormat("ULAW", -1.0, 8, 1, -1, -1, 8, -1.0, Format.byteArray),
      },
      new Format[] {
        new AudioFormat("ULAW/rtp", -1.0, 8, 1, -1, -1, 8, -1.0, Format.byteArray),
      },
      PlugInManager.CODEC);
    PlugInManager.addPlugIn("com.sun.media.codec.audio.ulaw.DePacketizer",
      new Format[] {
        new AudioFormat("ULAW/rtp", -1.0, -1, -1, -1, -1, -1, -1.0, Format.byteArray),
      },
      new Format[] {
        new AudioFormat("ULAW", -1.0, -1, -1, -1, -1, -1, -1.0, Format.byteArray),
      },
      PlugInManager.CODEC);
    PlugInManager.addPlugIn("com.sun.media.codec.audio.mpa.Packetizer",
      new Format[] {
        new AudioFormat("mpeglayer3", 16000.0, -1, -1, -1, 1, -1, -1.0, Format.byteArray),
        new AudioFormat("mpeglayer3", 22050.0, -1, -1, -1, 1, -1, -1.0, Format.byteArray),
        new AudioFormat("mpeglayer3", 24000.0, -1, -1, -1, 1, -1, -1.0, Format.byteArray),
        new AudioFormat("mpeglayer3", 32000.0, -1, -1, -1, 1, -1, -1.0, Format.byteArray),
        new AudioFormat("mpeglayer3", 44100.0, -1, -1, -1, 1, -1, -1.0, Format.byteArray),
        new AudioFormat("mpeglayer3", 48000.0, -1, -1, -1, 1, -1, -1.0, Format.byteArray),
        new AudioFormat("mpegaudio", 16000.0, -1, -1, -1, 1, -1, -1.0, Format.byteArray),
        new AudioFormat("mpegaudio", 22050.0, -1, -1, -1, 1, -1, -1.0, Format.byteArray),
        new AudioFormat("mpegaudio", 24000.0, -1, -1, -1, 1, -1, -1.0, Format.byteArray),
        new AudioFormat("mpegaudio", 32000.0, -1, -1, -1, 1, -1, -1.0, Format.byteArray),
        new AudioFormat("mpegaudio", 44100.0, -1, -1, -1, 1, -1, -1.0, Format.byteArray),
        new AudioFormat("mpegaudio", 48000.0, -1, -1, -1, 1, -1, -1.0, Format.byteArray),
      },
      new Format[] {
        new AudioFormat("mpegaudio/rtp", -1.0, -1, -1, -1, -1, -1, -1.0, Format.byteArray),
      },
      PlugInManager.CODEC);
    PlugInManager.addPlugIn("com.sun.media.codec.audio.mpa.DePacketizer",
      new Format[] {
        new AudioFormat("mpegaudio/rtp", -1.0, -1, -1, -1, -1, -1, -1.0, Format.byteArray),
      },
      new Format[] {
        new AudioFormat("mpegaudio", 44100.0, 16, -1, 1, 1, -1, -1.0, Format.byteArray),
        new AudioFormat("mpegaudio", 48000.0, 16, -1, 1, 1, -1, -1.0, Format.byteArray),
        new AudioFormat("mpegaudio", 32000.0, 16, -1, 1, 1, -1, -1.0, Format.byteArray),
        new AudioFormat("mpegaudio", 22050.0, 16, -1, 1, 1, -1, -1.0, Format.byteArray),
        new AudioFormat("mpegaudio", 24000.0, 16, -1, 1, 1, -1, -1.0, Format.byteArray),
        new AudioFormat("mpegaudio", 16000.0, 16, -1, 1, 1, -1, -1.0, Format.byteArray),
        new AudioFormat("mpegaudio", 11025.0, 16, -1, 1, 1, -1, -1.0, Format.byteArray),
        new AudioFormat("mpegaudio", 12000.0, 16, -1, 1, 1, -1, -1.0, Format.byteArray),
        new AudioFormat("mpegaudio", 8000.0, 16, -1, 1, 1, -1, -1.0, Format.byteArray),
        new AudioFormat("mpeglayer3", 44100.0, 16, -1, 1, 1, -1, -1.0, Format.byteArray),
        new AudioFormat("mpeglayer3", 48000.0, 16, -1, 1, 1, -1, -1.0, Format.byteArray),
        new AudioFormat("mpeglayer3", 32000.0, 16, -1, 1, 1, -1, -1.0, Format.byteArray),
        new AudioFormat("mpeglayer3", 22050.0, 16, -1, 1, 1, -1, -1.0, Format.byteArray),
        new AudioFormat("mpeglayer3", 24000.0, 16, -1, 1, 1, -1, -1.0, Format.byteArray),
        new AudioFormat("mpeglayer3", 16000.0, 16, -1, 1, 1, -1, -1.0, Format.byteArray),
        new AudioFormat("mpeglayer3", 11025.0, 16, -1, 1, 1, -1, -1.0, Format.byteArray),
        new AudioFormat("mpeglayer3", 12000.0, 16, -1, 1, 1, -1, -1.0, Format.byteArray),
        new AudioFormat("mpeglayer3", 8000.0, 16, -1, 1, 1, -1, -1.0, Format.byteArray),
      },
      PlugInManager.CODEC);
    PlugInManager.addPlugIn("com.ibm.media.codec.audio.gsm.Packetizer",
      new Format[] {
        new AudioFormat("gsm", 8000.0, -1, 1, -1, -1, 264, -1.0, Format.byteArray),
      },
      new Format[] {
        new AudioFormat("gsm/rtp", 8000.0, -1, 1, -1, -1, 264, -1.0, Format.byteArray),
      },
      PlugInManager.CODEC);
    PlugInManager.addPlugIn("com.ibm.media.codec.audio.g723.Packetizer",
      new Format[] {
        new AudioFormat("g723", 8000.0, -1, 1, -1, -1, 192, -1.0, Format.byteArray),
      },
      new Format[] {
        new AudioFormat("g723/rtp", 8000.0, -1, 1, -1, -1, 192, -1.0, Format.byteArray),
      },
      PlugInManager.CODEC);
    PlugInManager.addPlugIn("com.sun.media.codec.video.jpeg.Packetizer",
      new Format[] {
        new VideoFormat("jpeg", null, -1, Format.byteArray, -1.0f),
      },
      new Format[] {
        new VideoFormat("jpeg/rtp", null, -1, Format.byteArray, -1.0f),
      },
      PlugInManager.CODEC);
    PlugInManager.addPlugIn("com.sun.media.codec.video.jpeg.DePacketizer",
      new Format[] {
        new VideoFormat("jpeg/rtp", null, -1, Format.byteArray, -1.0f),
      },
      new Format[] {
        new VideoFormat("jpeg", null, -1, Format.byteArray, -1.0f),
      },
      PlugInManager.CODEC);
    PlugInManager.addPlugIn("com.sun.media.codec.video.mpeg.Packetizer",
      new Format[] {
        new VideoFormat("mpeg", null, -1, Format.byteArray, -1.0f),
      },
      new Format[] {
        new VideoFormat("mpeg/rtp", null, -1, Format.byteArray, -1.0f),
      },
      PlugInManager.CODEC);
    PlugInManager.addPlugIn("com.sun.media.codec.video.mpeg.DePacketizer",
      new Format[] {
        new VideoFormat("mpeg/rtp", null, -1, Format.byteArray, -1.0f),
      },
      new Format[] {
        new VideoFormat("mpeg", null, -1, Format.byteArray, -1.0f),
      },
      PlugInManager.CODEC);

//     PlugInManager.EFFECT:

//     PlugInManager.RENDERER:
    PlugInManager.addPlugIn("com.sun.media.renderer.audio.JavaSoundRenderer",
      new Format[] {
        new AudioFormat("LINEAR", -1.0, -1, -1, -1, -1, -1, -1.0, Format.byteArray),
        new AudioFormat("ULAW", -1.0, -1, -1, -1, -1, -1, -1.0, Format.byteArray),
      },
      new Format[] {},
      PlugInManager.RENDERER);
    PlugInManager.addPlugIn("com.sun.media.renderer.audio.SunAudioRenderer",
      new Format[] {
        new AudioFormat("ULAW", 8000.0, 8, 1, -1, -1, -1, -1.0, Format.byteArray),
      },
      new Format[] {},
      PlugInManager.RENDERER);
    PlugInManager.addPlugIn("com.sun.media.renderer.video.AWTRenderer",
      new Format[] {
        new RGBFormat(null, -1, Format.intArray, -1.0f, 32, 0xff0000, 0xff00, 0xff, 1, -1, 0, -1),
        new RGBFormat(null, -1, Format.intArray, -1.0f, 32, 0xff, 0xff00, 0xff0000, 1, -1, 0, -1),
      },
      new Format[] {},
      PlugInManager.RENDERER);
    PlugInManager.addPlugIn("com.sun.media.renderer.video.LightWeightRenderer",
      new Format[] {
        new RGBFormat(null, -1, Format.intArray, -1.0f, 32, 0xff0000, 0xff00, 0xff, 1, -1, 0, -1),
        new RGBFormat(null, -1, Format.intArray, -1.0f, 32, 0xff, 0xff00, 0xff0000, 1, -1, 0, -1),
      },
      new Format[] {},
      PlugInManager.RENDERER);
    PlugInManager.addPlugIn("com.sun.media.renderer.video.JPEGRenderer",
      new Format[] {
        new VideoFormat("jpeg", null, -1, Format.byteArray, -1.0f),
      },
      new Format[] {},
      PlugInManager.RENDERER);

//     PlugInManager.MULTIPLEXER:
    PlugInManager.addPlugIn("com.sun.media.multiplexer.RawBufferMux",
      new Format[] {},
      new Format[] {
        new ContentDescriptor("raw"),
      },
      PlugInManager.MULTIPLEXER);
    PlugInManager.addPlugIn("com.sun.media.multiplexer.RawSyncBufferMux",
      new Format[] {},
      new Format[] {
        new ContentDescriptor("raw"),
      },
      PlugInManager.MULTIPLEXER);
    PlugInManager.addPlugIn("com.sun.media.multiplexer.RTPSyncBufferMux",
      new Format[] {},
      new Format[] {
        new ContentDescriptor("raw.rtp"),
      },
      PlugInManager.MULTIPLEXER);
    PlugInManager.addPlugIn("com.sun.media.multiplexer.audio.GSMMux",
      new Format[] {},
      new Format[] {
View Full Code Here

      assertStringVectorEquals(v1, v2);
     
    }
   
    {
      final Format in = new ContentDescriptor("audio.mpeg");
      final Format out = null;
     
      final Vector v1 = javax.media.PlugInManager.getPlugInList(in, out, javax.media.PlugInManager.DEMULTIPLEXER);
      final Vector v2 = net.sf.fmj.test.compat.plugins.PlugInManager.getPlugInList(in, out, javax.media.PlugInManager.DEMULTIPLEXER);
     
      assertStringVectorEquals(v1, v2);
     
    }
   
    {
      final Format in = new AudioFormat("mpegaudio", 16000.0, -1, -1, -1, 1, -1, -1.0, Format.byteArray);
      final Format out = new AudioFormat("LINEAR", -1.0, -1, -1, -1, -1, -1, -1.0, Format.byteArray);
     
      final Vector v1 = javax.media.PlugInManager.getPlugInList(in, out, javax.media.PlugInManager.CODEC);
      final Vector v2 = net.sf.fmj.test.compat.plugins.PlugInManager.getPlugInList(in, out, javax.media.PlugInManager.CODEC);
     
      assertStringVectorEquals(v1, v2);
     
    }
   
   
    {
      final Format in = new AudioFormat("mpegaudio", 16001.0, -1, -1, -1, 1, -1, -1.0, Format.byteArray);
      final Format out = new AudioFormat("LINEAR", -1.0, -1, -1, -1, -1, -1, -1.0, Format.byteArray);
     
      final Vector v1 = javax.media.PlugInManager.getPlugInList(in, out, javax.media.PlugInManager.CODEC);
      final Vector v2 = net.sf.fmj.test.compat.plugins.PlugInManager.getPlugInList(in, out, javax.media.PlugInManager.CODEC);
     
      assertStringVectorEquals(v1, v2);
     
    }
   
    {
      final Format in = new AudioFormat("mpegaudio", Format.NOT_SPECIFIED, -1, -1, -1, 1, -1, -1.0, Format.byteArray);
      final Format out = new AudioFormat("LINEAR", -1.0, -1, -1, -1, -1, -1, -1.0, Format.byteArray);
     
      final Vector v1 = javax.media.PlugInManager.getPlugInList(in, out, javax.media.PlugInManager.CODEC);
      final Vector v2 = net.sf.fmj.test.compat.plugins.PlugInManager.getPlugInList(in, out, javax.media.PlugInManager.CODEC);
     
      assertStringVectorEquals(v1, v2);
     
    }
   
   
    {
      final boolean r1 = javax.media.PlugInManager.removePlugIn("com.ibm.media.parser.video.MpegParser",
          javax.media.PlugInManager.DEMULTIPLEXER);
      final boolean r2 = net.sf.fmj.test.compat.plugins.PlugInManager.removePlugIn("com.ibm.media.parser.video.MpegParser",
          javax.media.PlugInManager.DEMULTIPLEXER);
     
      assertEquals(r1, r2);
     
      assertPlugInManagersEqual();
    }
   
    {
      final boolean a1 = javax.media.PlugInManager.addPlugIn("com.ibm.media.parser.video.MpegParser",
          new Format[] {
            new ContentDescriptor("audio.mpeg"),
            new ContentDescriptor("video.mpeg"),
            new ContentDescriptor("audio.mpeg"),
          },
          new Format[] {},
          javax.media.PlugInManager.DEMULTIPLEXER);
      final boolean a2 = net.sf.fmj.test.compat.plugins.PlugInManager.addPlugIn("com.ibm.media.parser.video.MpegParser",
          new Format[] {
            new ContentDescriptor("audio.mpeg"),
            new ContentDescriptor("video.mpeg"),
            new ContentDescriptor("audio.mpeg"),
          },
          new Format[] {},
          javax.media.PlugInManager.DEMULTIPLEXER);
     
      assertEquals(a1, a2);
     
      assertPlugInManagersEqual();
    }
   
    {
      final boolean a1 = javax.media.PlugInManager.addPlugIn("com.ibm.media.parser.video.MpegParser",
          new Format[] {
            new ContentDescriptor("audio.mpeg"),
            new ContentDescriptor("video.mpeg"),
            new ContentDescriptor("audio.mpeg"),
          },
          new Format[] {},
          javax.media.PlugInManager.DEMULTIPLEXER);
      final boolean a2 = net.sf.fmj.test.compat.plugins.PlugInManager.addPlugIn("com.ibm.media.parser.video.MpegParser",
          new Format[] {
            new ContentDescriptor("audio.mpeg"),
            new ContentDescriptor("video.mpeg"),
            new ContentDescriptor("audio.mpeg"),
          },
          new Format[] {},
          javax.media.PlugInManager.DEMULTIPLEXER);
     
      assertEquals(a1, a2);
      assertFalse(a1);
     
      assertPlugInManagersEqual();
    }
   
   
    {
      final boolean a1 = javax.media.PlugInManager.addPlugIn("org.foo.media.parser.video.MpegParser",
          new Format[] {
            new ContentDescriptor("audio.mpeg"),
            new ContentDescriptor("video.mpeg"),
            new ContentDescriptor("audio.mpeg"),
          },
          new Format[] {},
          javax.media.PlugInManager.DEMULTIPLEXER);
      final boolean a2 = net.sf.fmj.test.compat.plugins.PlugInManager.addPlugIn("org.foo.media.parser.video.MpegParser",
          new Format[] {
            new ContentDescriptor("audio.mpeg"),
            new ContentDescriptor("video.mpeg"),
            new ContentDescriptor("audio.mpeg"),
          },
          new Format[] {},
          javax.media.PlugInManager.DEMULTIPLEXER);
     
      assertEquals(a1, a2);
     
      assertPlugInManagersEqual();
    }

    {
      final boolean r1 = javax.media.PlugInManager.removePlugIn("org.foo.media.parser.video.MpegParser",
          javax.media.PlugInManager.DEMULTIPLEXER);
      final boolean r2 = net.sf.fmj.test.compat.plugins.PlugInManager.removePlugIn("org.foo.media.parser.video.MpegParser",
          javax.media.PlugInManager.DEMULTIPLEXER);
     
      assertEquals(r1, r2);
     
      assertPlugInManagersEqual();
    }
   
    {
      final Vector v1 = new Vector();
      final Vector v2 = new Vector();
     
      v1.add("com.ibm.media.parser.video.MpegParser");
      v2.add("com.ibm.media.parser.video.MpegParser");
     
      javax.media.PlugInManager.setPlugInList(v1, javax.media.PlugInManager.DEMULTIPLEXER);
      net.sf.fmj.test.compat.plugins.PlugInManager.setPlugInList(v2, javax.media.PlugInManager.DEMULTIPLEXER);
 
     
      assertPlugInManagersEqual();
    }
   
    {
      javax.media.PlugInManager.setPlugInList(new Vector(), javax.media.PlugInManager.DEMULTIPLEXER);
      net.sf.fmj.test.compat.plugins.PlugInManager.setPlugInList(new Vector(), javax.media.PlugInManager.DEMULTIPLEXER);
 
     
      assertPlugInManagersEqual();
    }
   
    {
      final Vector v1 = new Vector();
      final Vector v2 = new Vector();
     
      v1.add("com.ibm.media.parser.video.MpegParser");
      v2.add("com.ibm.media.parser.video.MpegParser");
     
      javax.media.PlugInManager.setPlugInList(v1, javax.media.PlugInManager.DEMULTIPLEXER);
      net.sf.fmj.test.compat.plugins.PlugInManager.setPlugInList(v2, javax.media.PlugInManager.DEMULTIPLEXER);
 
     
      assertPlugInManagersEqual();
    }
   
    {
      final boolean a1 = javax.media.PlugInManager.addPlugIn("org.foo.media.parser.video.MpegParser",
          new Format[] {
            new ContentDescriptor("audio.mpeg"),
            new ContentDescriptor("video.mpeg"),
            new ContentDescriptor("audio.mpeg"),
          },
          new Format[] {},
          javax.media.PlugInManager.DEMULTIPLEXER);
      final boolean a2 = net.sf.fmj.test.compat.plugins.PlugInManager.addPlugIn("org.foo.media.parser.video.MpegParser",
          new Format[] {
            new ContentDescriptor("audio.mpeg"),
            new ContentDescriptor("video.mpeg"),
            new ContentDescriptor("audio.mpeg"),
          },
          new Format[] {},
          javax.media.PlugInManager.DEMULTIPLEXER);
     
      assertEquals(a1, a2);
View Full Code Here

TOP

Related Classes of javax.media.protocol.ContentDescriptor

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.