Java 类com.bumptech.glide.load.resource.bitmap.ImageVideoBitmapDecoder 实例源码

项目:GlidePlus    文件:ImageWrapperStreamResourceDecoder.java   
public ImageWrapperStreamResourceDecoder(Context context) {
    StreamBitmapDecoder streamBitmapDecoder = new StreamBitmapDecoder(context);
    FileDescriptorBitmapDecoder fileDescriptorBitmapDecoder = new FileDescriptorBitmapDecoder(context);
    ImageVideoBitmapDecoder imageVideoBitmapDecoder = new ImageVideoBitmapDecoder(streamBitmapDecoder, fileDescriptorBitmapDecoder);
    GifResourceDecoder gifResourceDecoder = new GifResourceDecoder();
    BitmapPool bitmapPool = Glide.get(context).getBitmapPool();
    this.gifBitmapDecoder = new ImageWrapperResourceDecoder(imageVideoBitmapDecoder, gifResourceDecoder, bitmapPool);
}
项目:saarang-iosched    文件:BitmapRequestBuilder.java   
public BitmapRequestBuilder<ModelType, TranscodeType> imageDecoder(ResourceDecoder<InputStream, Bitmap> decoder) {
    imageDecoder = decoder;
    super.decoder(new ImageVideoBitmapDecoder(decoder, videoDecoder));
    return this;
}
项目:saarang-iosched    文件:BitmapRequestBuilder.java   
public BitmapRequestBuilder<ModelType, TranscodeType> videoDecoder(
        ResourceDecoder<ParcelFileDescriptor, Bitmap> decoder) {
    videoDecoder = decoder;
    super.decoder(new ImageVideoBitmapDecoder(imageDecoder, decoder));
    return this;
}
项目:AppDevFestSudeste2015    文件:BitmapRequestBuilder.java   
public BitmapRequestBuilder<ModelType, TranscodeType> imageDecoder(ResourceDecoder<InputStream, Bitmap> decoder) {
    imageDecoder = decoder;
    super.decoder(new ImageVideoBitmapDecoder(decoder, videoDecoder));
    return this;
}
项目:AppDevFestSudeste2015    文件:BitmapRequestBuilder.java   
public BitmapRequestBuilder<ModelType, TranscodeType> videoDecoder(
        ResourceDecoder<ParcelFileDescriptor, Bitmap> decoder) {
    videoDecoder = decoder;
    super.decoder(new ImageVideoBitmapDecoder(imageDecoder, decoder));
    return this;
}
项目:devfestnorte-app    文件:BitmapRequestBuilder.java   
public BitmapRequestBuilder<ModelType, TranscodeType> imageDecoder(ResourceDecoder<InputStream, Bitmap> decoder) {
    imageDecoder = decoder;
    super.decoder(new ImageVideoBitmapDecoder(decoder, videoDecoder));
    return this;
}
项目:devfestnorte-app    文件:BitmapRequestBuilder.java   
public BitmapRequestBuilder<ModelType, TranscodeType> videoDecoder(
        ResourceDecoder<ParcelFileDescriptor, Bitmap> decoder) {
    videoDecoder = decoder;
    super.decoder(new ImageVideoBitmapDecoder(imageDecoder, decoder));
    return this;
}
项目:saarang-iosched    文件:BitmapRequestBuilder.java   
public BitmapRequestBuilder<ModelType, TranscodeType> imageDecoder(ResourceDecoder<InputStream, Bitmap> decoder) {
    imageDecoder = decoder;
    super.decoder(new ImageVideoBitmapDecoder(decoder, videoDecoder));
    return this;
}
项目:saarang-iosched    文件:BitmapRequestBuilder.java   
public BitmapRequestBuilder<ModelType, TranscodeType> videoDecoder(
        ResourceDecoder<ParcelFileDescriptor, Bitmap> decoder) {
    videoDecoder = decoder;
    super.decoder(new ImageVideoBitmapDecoder(imageDecoder, decoder));
    return this;
}
项目:saarang-iosched    文件:BitmapRequestBuilder.java   
/**
 * Load images using the given {@link Downsampler}. Replaces any existing image decoder. Defaults to
 * {@link Downsampler#AT_LEAST}. Will be ignored if the data represented by the model is a video. This replaces any
 * previous calls to {@link #imageDecoder(ResourceDecoder)}  and {@link #decoder(ResourceDecoder)} with default
 * decoders with the appropriate options set.
 *
 * @see #imageDecoder
 *
 * @param downsampler The downsampler
 * @return This RequestBuilder
 */
private BitmapRequestBuilder<ModelType, TranscodeType> downsample(Downsampler downsampler) {
    this.downsampler = downsampler;
    imageDecoder = new StreamBitmapDecoder(downsampler, bitmapPool, decodeFormat);
    super.decoder(new ImageVideoBitmapDecoder(imageDecoder, videoDecoder));
    return this;
}
项目:AppDevFestSudeste2015    文件:BitmapRequestBuilder.java   
/**
 * Load images using the given {@link Downsampler}. Replaces any existing image decoder. Defaults to
 * {@link Downsampler#AT_LEAST}. Will be ignored if the data represented by the model is a video. This replaces any
 * previous calls to {@link #imageDecoder(ResourceDecoder)}  and {@link #decoder(ResourceDecoder)} with default
 * decoders with the appropriate options set.
 *
 * @see #imageDecoder
 *
 * @param downsampler The downsampler
 * @return This RequestBuilder
 */
private BitmapRequestBuilder<ModelType, TranscodeType> downsample(Downsampler downsampler) {
    this.downsampler = downsampler;
    imageDecoder = new StreamBitmapDecoder(downsampler, bitmapPool, decodeFormat);
    super.decoder(new ImageVideoBitmapDecoder(imageDecoder, videoDecoder));
    return this;
}
项目:devfestnorte-app    文件:BitmapRequestBuilder.java   
/**
 * Load images using the given {@link Downsampler}. Replaces any existing image decoder. Defaults to
 * {@link Downsampler#AT_LEAST}. Will be ignored if the data represented by the model is a video. This replaces any
 * previous calls to {@link #imageDecoder(ResourceDecoder)}  and {@link #decoder(ResourceDecoder)} with default
 * decoders with the appropriate options set.
 *
 * @see #imageDecoder
 *
 * @param downsampler The downsampler
 * @return This RequestBuilder
 */
private BitmapRequestBuilder<ModelType, TranscodeType> downsample(Downsampler downsampler) {
    this.downsampler = downsampler;
    imageDecoder = new StreamBitmapDecoder(downsampler, bitmapPool, decodeFormat);
    super.decoder(new ImageVideoBitmapDecoder(imageDecoder, videoDecoder));
    return this;
}
项目:saarang-iosched    文件:BitmapRequestBuilder.java   
/**
 * Load images using the given {@link Downsampler}. Replaces any existing image decoder. Defaults to
 * {@link Downsampler#AT_LEAST}. Will be ignored if the data represented by the model is a video. This replaces any
 * previous calls to {@link #imageDecoder(ResourceDecoder)}  and {@link #decoder(ResourceDecoder)} with default
 * decoders with the appropriate options set.
 *
 * @see #imageDecoder
 *
 * @param downsampler The downsampler
 * @return This RequestBuilder
 */
private BitmapRequestBuilder<ModelType, TranscodeType> downsample(Downsampler downsampler) {
    this.downsampler = downsampler;
    imageDecoder = new StreamBitmapDecoder(downsampler, bitmapPool, decodeFormat);
    super.decoder(new ImageVideoBitmapDecoder(imageDecoder, videoDecoder));
    return this;
}