}
@Test
public void testGetCodec()
{
// First the video stream
ICodec codec = null;
ICodec.Type type = null;
ICodec.ID id = null;
mCoder = getStreamCoder(sampleFile, 0);
codec = mCoder.getCodec();
assertTrue(codec != null);
type = mCoder.getCodecType();
assertTrue(type == codec.getType());
assertTrue(type == ICodec.Type.CODEC_TYPE_VIDEO);
id = mCoder.getCodecID();
assertTrue(id == codec.getID());
log.debug("Video type: {}", id);
assertTrue(id == ICodec.ID.CODEC_ID_FLV1);
// Then the audio stream.
mCoder = getStreamCoder(sampleFile, 1);
codec = mCoder.getCodec();
assertTrue(codec != null);
type = mCoder.getCodecType();
assertTrue(type == codec.getType());
assertTrue(type == ICodec.Type.CODEC_TYPE_AUDIO);
id = mCoder.getCodecID();
assertTrue(id == codec.getID());
assertTrue(id == ICodec.ID.CODEC_ID_MP3);
}