⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pluginmanagerinitializer.java

📁 FMJ(freedom media for java)是java视频开发的新选择
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
package net.sf.fmj.test.compat.plugins;import javax.media.Format;import javax.media.format.AudioFormat;import javax.media.format.RGBFormat;import javax.media.format.VideoFormat;import javax.media.format.YUVFormat;import javax.media.protocol.ContentDescriptor;import javax.media.protocol.FileTypeDescriptor;/** * Copy of javax.media.pim.PlugInManagerInitializer, used to test. *  * @author Ken Larson * */class PlugInManagerInitializer{	public static void init()	{//		 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),

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -