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

📄 ulawdepacketizertest.java

📁 FMJ(freedom media for java)是java视频开发的新选择
💻 JAVA
字号:
package net.sf.fmj.test.compat.sun;import javax.media.Format;import javax.media.format.AudioFormat;import junit.framework.TestCase;/** *  * @author Ken Larson * */public class ULawDePacketizerTest extends TestCase{	public void testDePacketizer()	{		MyDePacketizer p = new MyDePacketizer();		assertEquals(p.getName(), "ULAW DePacketizer");						Format[] f = p.getSupportedInputFormats();		assertEquals(f.length, 1);		assertEquals(f[0], new AudioFormat("ULAW/rtp", -1.0, -1, -1, -1, -1, -1, -1.0, Format.byteArray));				Format[] f2 = p.getSupportedOutputFormats(f[0]);		assertEquals(f2.length, 1);		assertEquals(f2[0], new AudioFormat("ULAW", -1.0, -1, -1, -1, -1, -1, -1.0, Format.byteArray));					Format[] f3 = p.getProtected1();		assertTrue(f == f3);				Format[] f4 = p.getProtected2();		//assertTrue(f4.length == 0);	// TODO: fails in FMJ			Format[] f5 = p.getSupportedOutputFormats(new AudioFormat(AudioFormat.DOLBYAC3));		assertEquals(f5.length, 1);		assertEquals(f5[0], null);			}		class MyDePacketizer extends com.sun.media.codec.audio.ulaw.DePacketizer	{		public Format[] getProtected1()		{	return this.inputFormats;		}				public Format[] getProtected2()		{	return this.outputFormats;		}	}}

⌨️ 快捷键说明

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