@Test public void shouldTriggerHasDataCommandForEof() { IOutput mediaSource = create.mediaSource() .with(1).frame() .construct(); mediaSource.start(); VideoDecoder decoder = create.videoDecoder().withDequeueOutputBufferIndex(0).construct(); decoder.start(); decoder.fillCommandQueues(); new PushDataCommandHandler(mediaSource, decoder, decoder).handle(); new EofCommandHandler(mediaSource, decoder, decoder).handle(); decoder.getFrame(); Frame actualFrame = decoder.getFrame(); assertEquals(Frame.EOF(), actualFrame); }
@Override public void handle() { Frame frame = inputWithAllocator.findFreeFrame(); if (frame == null) { restoreCommands(); return; } output.pull(frame); plugin.push(frame); plugin.checkIfOutputQueueHasData(); }
PushDataCommandHandler implements ICommandHandler { @Override public void handle() { Frame frame = inputWithAllocator.findFreeFrame(); if (frame == null) { restoreCommands(); return; } output.pull(frame); plugin.push(frame); plugin.checkIfOutputQueueHasData(); } }
PushDataCommandHandler implements ICommandHandler { @Override public void handle() { Frame frame = inputWithAllocator.findFreeFrame(); if (frame == null) { restoreCommands(); return; } output.pull(frame); plugin.push(frame); plugin.checkIfOutputQueueHasData(); } PushDataCommandHandler(IOutput output, Plugin plugin, IFrameAllocator frameAllocator); }
PushDataCommandHandler implements ICommandHandler { @Override public void handle() { Frame frame = inputWithAllocator.findFreeFrame(); if (frame == null) { restoreCommands(); return; } output.pull(frame); plugin.push(frame); plugin.checkIfOutputQueueHasData(); } PushDataCommandHandler(IOutput output, Plugin plugin, IFrameAllocator frameAllocator); @Override void handle(); }
PushDataCommandHandler implements ICommandHandler { @Override public void handle() { Frame frame = inputWithAllocator.findFreeFrame(); if (frame == null) { restoreCommands(); return; } output.pull(frame); plugin.push(frame); plugin.checkIfOutputQueueHasData(); } PushDataCommandHandler(IOutput output, Plugin plugin, IFrameAllocator frameAllocator); @Override void handle();  }