Package net.sf.fmj.utility

Examples of net.sf.fmj.utility.PlugInInfo


    final List<Object> list = plugInList(flags);
    for (Object o : list)
    {
      if (o instanceof PlugInInfo)
      {
        final PlugInInfo i = (PlugInInfo) o;
        PlugInManager.addPlugIn(i.className,
            i.in,
            i.out,
            i.type);
      }
View Full Code Here


   
   
//     PlugInManager.DEMULTIPLEXER:
    if ((flags & JMF) != 0)
    {
      result.add(new PlugInInfo("com.ibm.media.parser.video.MpegParser",
        new Format[] {
          new ContentDescriptor("audio.mpeg"),
          new ContentDescriptor("video.mpeg"),
          new ContentDescriptor("audio.mpeg"),
        },
        new Format[] {},
        PlugInManager.DEMULTIPLEXER));
      result.add(new PlugInInfo("com.sun.media.parser.audio.WavParser",
        new Format[] {
          new ContentDescriptor("audio.x_wav"),
        },
        new Format[] {},
        PlugInManager.DEMULTIPLEXER));
      result.add(new PlugInInfo("com.sun.media.parser.audio.AuParser",
        new Format[] {
          new ContentDescriptor("audio.basic"),
        },
        new Format[] {},
        PlugInManager.DEMULTIPLEXER));
      result.add(new PlugInInfo("com.sun.media.parser.audio.AiffParser",
        new Format[] {
          new ContentDescriptor("audio.x_aiff"),
        },
        new Format[] {},
        PlugInManager.DEMULTIPLEXER));
      result.add(new PlugInInfo("com.sun.media.parser.audio.GsmParser",
        new Format[] {
          new ContentDescriptor("audio.x_gsm"),
        },
        new Format[] {},
        PlugInManager.DEMULTIPLEXER));
    }
//     FMJ overrides to come before SUN ones:
//      this one needs to be after the audio parsers, otherwise it will be used instead of them in some cases.
//     TODO: why does the sun one get an NPE?
//     TODO: this causes audio not to play properly:
    if ((flags & FMJ) != 0)
    {      result.add(new PlugInInfo("net.sf.fmj.media.parser.RawPushBufferParser",
            new Format[] {
              new ContentDescriptor("raw"),
            },
            new Format[] {},
            PlugInManager.DEMULTIPLEXER));
    // end FMJ override.
    }
    if ((flags & JMF) != 0)
    {
      result.add(new PlugInInfo("com.sun.media.parser.RawStreamParser",
        new Format[] {
          new ContentDescriptor("raw"),
        },
        new Format[] {},
        PlugInManager.DEMULTIPLEXER));
      result.add(new PlugInInfo("com.sun.media.parser.RawBufferParser",
        new Format[] {
          new ContentDescriptor("raw"),
        },
        new Format[] {},
        PlugInManager.DEMULTIPLEXER));
      result.add(new PlugInInfo("com.sun.media.parser.RawPullStreamParser",
        new Format[] {
          new ContentDescriptor("raw"),
        },
        new Format[] {},
        PlugInManager.DEMULTIPLEXER));
      result.add(new PlugInInfo("com.sun.media.parser.RawPullBufferParser",
        new Format[] {
          new ContentDescriptor("raw"),
        },
        new Format[] {},
        PlugInManager.DEMULTIPLEXER));
      result.add(new PlugInInfo("com.sun.media.parser.video.QuicktimeParser",
        new Format[] {
          new ContentDescriptor("video.quicktime"),
        },
        new Format[] {},
        PlugInManager.DEMULTIPLEXER));
      result.add(new PlugInInfo("com.sun.media.parser.video.AviParser",
        new Format[] {
          new ContentDescriptor("video.x_msvideo"),
        },
        new Format[] {},
        PlugInManager.DEMULTIPLEXER));
 
  //     PlugInManager.CODEC:
      result.add(new PlugInInfo("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));
      result.add(new PlugInInfo("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));
      result.add(new PlugInInfo("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));
      result.add(new PlugInInfo("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));
      result.add(new PlugInInfo("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));
      result.add(new PlugInInfo("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));
      // this one appears to be designed to convert to RTP-friendly audio formats?
      result.add(new PlugInInfo("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));
      result.add(new PlugInInfo("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));
      result.add(new PlugInInfo("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));
      result.add(new PlugInInfo("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));
      result.add(new PlugInInfo("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));
      result.add(new PlugInInfo("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));
      result.add(new PlugInInfo("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));
      result.add(new PlugInInfo("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));
      result.add(new PlugInInfo("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));
      result.add(new PlugInInfo("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));
      result.add(new PlugInInfo("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));
      result.add(new PlugInInfo("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));
      result.add(new PlugInInfo("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));
      result.add(new PlugInInfo("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));
      result.add(new PlugInInfo("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));
      result.add(new PlugInInfo("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));
      result.add(new PlugInInfo("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));
      result.add(new PlugInInfo("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));
      result.add(new PlugInInfo("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));
      result.add(new PlugInInfo("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));
      result.add(new PlugInInfo("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));
      result.add(new PlugInInfo("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));
      result.add(new PlugInInfo("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));
    }
   
    // mgodehardt: disabled this, is added later, we ask the class for input and output formats
    /*if ((flags & FMJ) != 0)
    {  result.add(new PlugInInfo("net.sf.fmj.media.codec.video.jpeg.Packetizer",
          new Format[] {
            new JPEGFormat(),
          },
          new Format[] {
            new VideoFormat("jpeg/rtp", null, -1, Format.byteArray, -1.0f),
          },
          PlugInManager.CODEC));
    }*/
   
    if ((flags & JMF) != 0)
    {

      result.add(new PlugInInfo("com.sun.media.codec.video.jpeg.Packetizer",
        new Format[] {
          new JPEGFormat(),    // TODO: VideoFormat?
        },
        new Format[] {
          new VideoFormat("jpeg/rtp", null, -1, Format.byteArray, -1.0f),
        },
        PlugInManager.CODEC));
    }
    if ((flags & FMJ) != 0)
    {  result.add(new PlugInInfo("net.sf.fmj.media.codec.video.jpeg.DePacketizer",
          new Format[] {
            new VideoFormat("jpeg/rtp", null, -1, Format.byteArray, -1.0f),
          },
          new Format[] {
            new JPEGFormat(),
          },
          PlugInManager.CODEC));
    }
    if ((flags & JMF) != 0)
    {

      result.add(new PlugInInfo("com.sun.media.codec.video.jpeg.DePacketizer",
        new Format[] {
          new VideoFormat("jpeg/rtp", null, -1, Format.byteArray, -1.0f),
        },
        new Format[] {
          new JPEGFormat()// TODO: VideoFormat?
        },
        PlugInManager.CODEC));
      result.add(new PlugInInfo("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));
      result.add(new PlugInInfo("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:
    if ((flags & JMF) != 0)
    {
      result.add(new PlugInInfo("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));
      result.add(new PlugInInfo("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));
      result.add(new PlugInInfo("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));
      result.add(new PlugInInfo("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));
 
      result.add(new PlugInInfo("com.sun.media.renderer.video.JPEGRenderer",
        new Format[] {
          new JPEGFormat(),
        },
        new Format[] {},
        PlugInManager.RENDERER));
 
  //     PlugInManager.MULTIPLEXER:
      result.add(new PlugInInfo("com.sun.media.multiplexer.RawBufferMux",
        new Format[] {},
        new Format[] {
          new ContentDescriptor("raw"),
        },
        PlugInManager.MULTIPLEXER));
      result.add(new PlugInInfo("com.sun.media.multiplexer.RawSyncBufferMux",
        new Format[] {},
        new Format[] {
          new ContentDescriptor("raw"),
        },
        PlugInManager.MULTIPLEXER));
      result.add(new PlugInInfo("com.sun.media.multiplexer.RTPSyncBufferMux",
        new Format[] {},
        new Format[] {
          new ContentDescriptor("raw.rtp"),
        },
        PlugInManager.MULTIPLEXER));
      result.add(new PlugInInfo("com.sun.media.multiplexer.audio.GSMMux",
        new Format[] {},
        new Format[] {
          new FileTypeDescriptor("audio.x_gsm"),
        },
        PlugInManager.MULTIPLEXER));
      result.add(new PlugInInfo("com.sun.media.multiplexer.audio.MPEGMux",
        new Format[] {},
        new Format[] {
          new FileTypeDescriptor("audio.mpeg"),
        },
        PlugInManager.MULTIPLEXER));
      result.add(new PlugInInfo("com.sun.media.multiplexer.audio.WAVMux",
        new Format[] {},
        new Format[] {
          new FileTypeDescriptor("audio.x_wav"),
        },
        PlugInManager.MULTIPLEXER));
      result.add(new PlugInInfo("com.sun.media.multiplexer.audio.AIFFMux",
        new Format[] {},
        new Format[] {
          new FileTypeDescriptor("audio.x_aiff"),
        },
        PlugInManager.MULTIPLEXER));
      result.add(new PlugInInfo("com.sun.media.multiplexer.audio.AUMux",
        new Format[] {},
        new Format[] {
          new FileTypeDescriptor("audio.basic"),
        },
        PlugInManager.MULTIPLEXER));
      result.add(new PlugInInfo("com.sun.media.multiplexer.video.AVIMux",
        new Format[] {},
        new Format[] {
          new FileTypeDescriptor("video.x_msvideo"),
        },
        PlugInManager.MULTIPLEXER));
      result.add(new PlugInInfo("com.sun.media.multiplexer.video.QuicktimeMux",
        new Format[] {},
        new Format[] {
          new FileTypeDescriptor("video.quicktime"),
        },
        PlugInManager.MULTIPLEXER));
    }
   
    if ((flags & FMJ) != 0)
    {
      result.add("net.sf.fmj.media.codec.video.jpeg.Packetizer");
     
      result.add("net.sf.fmj.media.renderer.video.SimpleSwingRenderer");
      result.add("net.sf.fmj.media.renderer.video.SimpleAWTRenderer");
      result.add("net.sf.fmj.media.renderer.video.Java2dRenderer");
      result.add("net.sf.fmj.media.renderer.video.JPEGRTPRenderer");
      result.add("net.sf.fmj.media.renderer.video.JPEGRenderer");

      result.add("net.sf.fmj.media.parser.JavaSoundParser");
      result.add("net.sf.fmj.media.codec.JavaSoundCodec");
      result.add("net.sf.fmj.media.renderer.audio.JavaSoundRenderer");
           
            result.add("net.sf.fmj.media.codec.audio.gsm.Decoder");
            result.add("net.sf.fmj.media.codec.audio.gsm.Encoder");
            result.add("net.sf.fmj.media.codec.audio.gsm.DePacketizer");
            result.add("net.sf.fmj.media.codec.audio.gsm.Packetizer");
            result.add("net.sf.fmj.media.multiplexer.audio.GsmMux");
            result.add("net.sf.fmj.media.parser.GsmParser");

      result.add("net.sf.fmj.media.codec.audio.ulaw.Decoder");
      result.add("net.sf.fmj.media.codec.audio.ulaw.Encoder");
      result.add("net.sf.fmj.media.codec.audio.ulaw.DePacketizer");
      result.add("net.sf.fmj.media.codec.audio.ulaw.Packetizer");
      result.add("net.sf.fmj.media.codec.audio.RateConverter");
     
      result.add("net.sf.fmj.media.codec.audio.alaw.Decoder");
      result.add("net.sf.fmj.media.codec.audio.alaw.Encoder");
      result.add("net.sf.fmj.media.codec.audio.alaw.DePacketizer");
      result.add("net.sf.fmj.media.codec.audio.alaw.Packetizer");
      result.add("net.sf.fmj.media.codec.video.jpeg.JpegEncoder");
      result.add("net.sf.fmj.media.codec.video.lossless.GIFEncoder");
      result.add("net.sf.fmj.media.codec.video.lossless.GIFDecoder");
      result.add("net.sf.fmj.media.codec.video.lossless.PNGEncoder");
      result.add("net.sf.fmj.media.codec.video.lossless.PNGDecoder");
     
      result.add("net.sf.fmj.media.parser.RawPushBufferParser");
      //result.add("net.sf.fmj.media.parser.RawPullStreamParser"); // TODO: test and add.  Does it conflict with RawPushBufferParser?
      result.add("net.sf.fmj.media.multiplexer.RTPSyncBufferMux");
      result.add("net.sf.fmj.media.multiplexer.RawBufferMux");
      result.add("net.sf.fmj.media.multiplexer.audio.AIFFMux");
      result.add("net.sf.fmj.media.multiplexer.audio.AUMux");
      //result.add("net.sf.fmj.media.multiplexer.audio.JavaSoundAUMux"); // not needed, AUMux works fine.
      result.add("net.sf.fmj.media.multiplexer.audio.WAVMux");
     
      // TODO: the filter graph builder can't quite deal with this one yet:
      //result.add("net.sf.fmj.media.codec.video.ImageScaler");
     
            if ( !DISABLE_OGG )
            {
          result.add("net.sf.fmj.theora_java.JavaOggParser");
      }
     
//      if (OSUtils.isMacOSX() || OSUtils.isWindows())
//      {
//        result.add("net.sf.fmj.qt.QTParser");
//      }
     
      result.add("net.sf.fmj.media.parser.MultipartMixedReplaceParser");
      result.add("net.sf.fmj.media.multiplexer.MultipartMixedReplaceMux");
     
      result.add("net.sf.fmj.media.parser.XmlMovieParser");
      result.add("net.sf.fmj.media.multiplexer.XmlMovieMux");
      result.add("net.sf.fmj.media.multiplexer.audio.CsvAudioMux");
     
     
     
         // SIP communicator packetizers/depacketizers.
          result.add("net.java.sip.communicator.impl.media.codec.audio.speex.JavaEncoder");
          result.add("net.java.sip.communicator.impl.media.codec.audio.speex.JavaDecoder");
          result.add("net.java.sip.communicator.impl.media.codec.audio.ilbc.JavaEncoder");
          result.add("net.java.sip.communicator.impl.media.codec.audio.ilbc.JavaDecoder");
         
          // t4l jpeg encoder/decoder:
          result.add("com.t4l.jmf.JPEGDecoder");
          //result.add("com.t4l.jmf.JPEGEncoder");  // TODO: FMJ has a JPEG encoder above, need to merge and get best of both worlds
    }
   
    if ((flags & FMJ_NATIVE) != 0)
    {
      // ffmpeg-java parser: may not be in classpath
      result.add("net.sf.fmj.ffmpeg_java.FFMPEGParser");
      result.add("net.sf.fmj.theora_java.NativeOggParser");
    }   
   
    if ((flags & THIRD_PARTY) != 0)
    {
      // JFFMPEG: may not be in classpath
      // JFFMPEG is not needed for ogg playback, because JavaSound with an spi can handle
      // ogg audio files.  net.sourceforge.jffmpeg.demux.ogg.OggDemux does not appear to split
      // out the video stream, so if this demux gets used instead of net.sf.fmj.theora_java.OGGParser,
      // audio will play but no video.
//        result.add("net.sourceforge.jffmpeg.demux.ogg.OggDemux");
//          result.add("net.sourceforge.jffmpeg.AudioDecoder");
         
//          result.add("net.sourceforge.jffmpeg.demux.avi.AviDemux");
//          result.add("net.sourceforge.jffmpeg.VideoDecoder");
//          result.add("net.sourceforge.jffmpeg.AudioDecoder");
//          PlugInManager.removePlugIn("com.sun.media.parser.video.AviParser", PlugInManager.DEMULTIPLEXER);

          // FOBS4JMF: may not be in classpath
          result.add("com.omnividea.media.parser.video.Parser");
          result.add("com.omnividea.media.codec.video.NativeDecoder");
          result.add("com.omnividea.media.codec.audio.NativeDecoder");
          result.add("com.omnividea.media.codec.video.JavaDecoder");
          // protocol: com.omnividea - also added in JmfRegistry
    }
   
    if ((flags & FMJ) != 0 && (flags & JMF) != 0)
    {
      // TODO: verify that mp3s play with JMF installed.
//      // remove the audio/mpeg from ibm's: - this can result in a demux with no renderer.
//          if (PlugInManager.removePlugIn("com.ibm.media.parser.video.MpegParser", PlugInManager.DEMULTIPLEXER))
//          {
        result.add(new PlugInInfo("com.ibm.media.parser.video.MpegParser",
            new Format[] {
              //new ContentDescriptor("audio.mpeg"),
              new ContentDescriptor("video.mpeg"),
              //new ContentDescriptor("audio.mpeg"),
            },
View Full Code Here

    final List<Object> list = RegistryDefaults.plugInList(flags);
    for (Object o : list)
    {
      if (o instanceof PlugInInfo)
      {
        final PlugInInfo i = (PlugInInfo) o;
        registryContents.plugins[i.type-1].add(i.className);
      }
      else
     
        final PlugInInfo i = PlugInUtility.getPlugInInfo((String) o);
        if (i != null)
          registryContents.plugins[i.type-1].add(i.className);
       
      }
     
View Full Code Here

TOP

Related Classes of net.sf.fmj.utility.PlugInInfo

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.