VideoDecoder extends Decoder implements IVideoOutput { public VideoDecoder(IMediaCodec mediaCodec) { super(mediaCodec, MediaFormatType.VIDEO); } VideoDecoder(IMediaCodec mediaCodec); @Override void drain(int bufferIndex); @Override void push(Frame frame); @Override void stop(); Resolution getOutputResolution();  }
@Test public void mustSetOutputSurface() { VideoDecoder decoder = create.videoDecoder().construct(); ISurfaceWrapper surface = create.surfaceContainer().construct(); decoder.setOutputSurface(surface); assertNull(decoder.getSurface()); }
@Test public void isLastFile_returnsFalse() { VideoDecoder decoder = create.videoDecoder().construct(); assertFalse(decoder.isLastFile()); }
@Test public void mediaCodec_releaseOutputBuffer_doRenderVariableMustBeTrue() { IMediaCodec mediaCodec = create.mediaCodec() .withDequeueOutputBufferIndex(1) .construct(); VideoDecoder decoder = create.videoDecoder() .with(mediaCodec) .construct(); ISurfaceWrapper surface = create.surfaceContainer().construct(); decoder.setOutputSurface(surface); decoder.releaseOutputBuffer(1); verify(mediaCodec).releaseOutputBuffer(eq(1), eq(true)); }