@Override public void produceResults( final Consumer<CloseableReference<CloseableImage>> consumer, final ProducerContext producerContext) { final ImageRequest imageRequest = producerContext.getImageRequest(); ProgressiveDecoder progressiveDecoder; if (!UriUtil.isNetworkUri(imageRequest.getSourceUri())) { progressiveDecoder = new LocalImagesProgressiveDecoder(consumer, producerContext); } else { ProgressiveJpegParser jpegParser = new ProgressiveJpegParser(mByteArrayPool); progressiveDecoder = new NetworkImagesProgressiveDecoder( consumer, producerContext, jpegParser, mProgressiveJpegConfig); } mInputProducer.produceResults(progressiveDecoder, producerContext); }
public void produceResults(Consumer consumer, ProducerContext producercontext) { consumer = new OnFirstImageConsumer(consumer, producercontext); mNextProducer1.produceResults(consumer, producercontext); }
void produceResultsInternal(Consumer<T> consumer, ProducerContext producerContext) { ProducerListener producerListener = producerContext.getListener(); producerListener.onProducerFinishWithSuccess(producerContext.getId(), PRODUCER_NAME, null); mInputProducer.produceResults(new ThrottlerConsumer(consumer), producerContext); }