private boolean isRequestingDefaultFrame(Options options) { Long specifiedFrame = options.get(VideoBitmapDecoder.TARGET_FRAME); return specifiedFrame != null && specifiedFrame == VideoBitmapDecoder.DEFAULT_FRAME; }
/** * Sets the time position of the frame to extract from a video. * * @param frameTimeMicros The time position in microseconds of the desired frame. If negative, the * Android framework implementation return a representative frame. */ public RequestOptions frame(long frameTimeMicros) { return set(VideoBitmapDecoder.TARGET_FRAME, frameTimeMicros); }
/** * Sets the time position of the frame to extract from a video. * * <p>This is a component option specific to {@link VideoBitmapDecoder}. If the default video * decoder is replaced or skipped because of your configuration, this option may be ignored. * * @see VideoBitmapDecoder#TARGET_FRAME * @param frameTimeMicros The time position in microseconds of the desired frame. If negative, the * Android framework implementation return a representative frame. */ @CheckResult public RequestOptions frame(@IntRange(from = 0) long frameTimeMicros) { return set(VideoBitmapDecoder.TARGET_FRAME, frameTimeMicros); }