@Test public void dequeueAndQueueInputBuffers() { new CopyDataCommandHandler(decoder, encoder).handle(); verify(mediaCodec, atLeastOnce()).dequeueInputBuffer(anyLong()); verify(mediaCodec).queueInputBuffer(eq(0), anyInt(), anyInt(), anyLong(), anyInt()); }
@Override public void handle() { Frame encoderFrame = input.findFreeFrame(); if (encoderFrame == null) { restoreCommands(); return; } Frame decoderFrame = output.getFrame(); if (decoderFrame == null) return; encoderFrame.copyDataFrom(decoderFrame); input.push(encoderFrame); output.releaseOutputBuffer(decoderFrame.getBufferIndex()); }
CopyDataCommandHandler implements ICommandHandler { @Override public void handle() { Frame encoderFrame = input.findFreeFrame(); if (encoderFrame == null) { restoreCommands(); return; } Frame decoderFrame = output.getFrame(); if (decoderFrame == null) return; encoderFrame.copyDataFrom(decoderFrame); input.push(encoderFrame); output.releaseOutputBuffer(decoderFrame.getBufferIndex()); } }
CopyDataCommandHandler implements ICommandHandler { @Override public void handle() { Frame encoderFrame = input.findFreeFrame(); if (encoderFrame == null) { restoreCommands(); return; } Frame decoderFrame = output.getFrame(); if (decoderFrame == null) return; encoderFrame.copyDataFrom(decoderFrame); input.push(encoderFrame); output.releaseOutputBuffer(decoderFrame.getBufferIndex()); } CopyDataCommandHandler(IPluginOutput output, MediaCodecPlugin input); }
CopyDataCommandHandler implements ICommandHandler { @Override public void handle() { Frame encoderFrame = input.findFreeFrame(); if (encoderFrame == null) { restoreCommands(); return; } Frame decoderFrame = output.getFrame(); if (decoderFrame == null) return; encoderFrame.copyDataFrom(decoderFrame); input.push(encoderFrame); output.releaseOutputBuffer(decoderFrame.getBufferIndex()); } CopyDataCommandHandler(IPluginOutput output, MediaCodecPlugin input); @Override void handle(); }
CopyDataCommandHandler implements ICommandHandler { @Override public void handle() { Frame encoderFrame = input.findFreeFrame(); if (encoderFrame == null) { restoreCommands(); return; } Frame decoderFrame = output.getFrame(); if (decoderFrame == null) return; encoderFrame.copyDataFrom(decoderFrame); input.push(encoderFrame); output.releaseOutputBuffer(decoderFrame.getBufferIndex()); } CopyDataCommandHandler(IPluginOutput output, MediaCodecPlugin input); @Override void handle();  }