use of org.codice.alliance.libs.mpegts.MpegTsDecoder in project alliance by codice.
the class MTSPacketToPESPacketDecoderTest method testDecode.
/**
* This test sends MTSPackets to the decoder so that the decoder outputs one video pes packet.
*
* @throws Exception
*/
@Test
public void testDecode() throws Exception {
MpegTsDecoder mpegTsDecoder = mock(MpegTsDecoder.class);
MTSPacketToPESPacketDecoder decoder = new MTSPacketToPESPacketDecoder(mpegTsDecoder);
MTSPacket mtsPacket = mock(MTSPacket.class);
EmbeddedChannel channel = new EmbeddedChannel(decoder);
channel.writeInbound(mtsPacket);
NettyUtility.read(channel);
verify(mpegTsDecoder).read(eq(mtsPacket), anyObject());
}
Aggregations