@Test
public void testEstablishOutputCodecId()
{
JNIMemoryManager.getMgr().flush();
IContainerFormat fmt = IContainerFormat.make();
fmt.setOutputFormat("flv", null, null);
assertEquals(ICodec.ID.CODEC_ID_FLV1,
fmt.establishOutputCodecId(ICodec.Type.CODEC_TYPE_VIDEO));
assertEquals(ICodec.ID.CODEC_ID_MP3,
fmt.establishOutputCodecId(ICodec.Type.CODEC_TYPE_AUDIO));
fmt.setOutputFormat("mp4", null, null);
assertEquals(ICodec.ID.CODEC_ID_MPEG4,
fmt.establishOutputCodecId(ICodec.Type.CODEC_TYPE_VIDEO));
assertEquals(ICodec.ID.CODEC_ID_AAC,
fmt.establishOutputCodecId(ICodec.Type.CODEC_TYPE_AUDIO));
fmt.setOutputFormat("3gp", null, null);
assertEquals(ICodec.ID.CODEC_ID_H263,
fmt.establishOutputCodecId(ICodec.Type.CODEC_TYPE_VIDEO));
assertEquals(ICodec.ID.CODEC_ID_AMR_NB,
fmt.establishOutputCodecId(ICodec.Type.CODEC_TYPE_AUDIO));
fmt.delete();
assertEquals(0, JNIMemoryManager.getMgr().getNumPinnedObjects());
}