Clarify Javadoc of EditedMediaItem.Builder.setDurationUs

PiperOrigin-RevId: 686521901
This commit is contained in:
kimvde 2024-10-16 08:44:50 -07:00 committed by Copybara-Service
parent d3b7f7e114
commit 31ef7ff088

View File

@ -152,18 +152,19 @@ public final class EditedMediaItem {
/** /**
* Sets the {@link MediaItem} duration in the output, in microseconds. * Sets the {@link MediaItem} duration in the output, in microseconds.
* *
* <p>For {@linkplain Transformer export}, this should be set for inputs that don't have an * <p>For {@linkplain Transformer export}, this should be set for non-image inputs that don't
* intrinsic duration (e.g. images). It will be ignored for inputs that do have an intrinsic * have an intrinsic duration (e.g. raw video data). It will be ignored for inputs that do have
* duration (e.g. video). * an intrinsic duration (e.g. encoded video data from input file).
* *
* <p>This should always be set for {@linkplain CompositionPlayer preview}. * <p>For {@linkplain CompositionPlayer preview}, this should be set for all non-image inputs
* (i.e. audio and video input).
*
* <p>This duration doesn't need to be set for images, because the default value is the {@link
* MediaItem}'s {@linkplain MediaItem.Builder#setImageDurationMs(long) image duration}.
* *
* <p>If {@linkplain MediaItem#clippingConfiguration clipping} is applied, this should be the * <p>If {@linkplain MediaItem#clippingConfiguration clipping} is applied, this should be the
* duration before clipping. * duration before clipping.
* *
* <p>The default value is the {@link MediaItem}'s {@linkplain
* MediaItem.Builder#setImageDurationMs(long) image duration}.
*
* @param durationUs The duration, in microseconds. * @param durationUs The duration, in microseconds.
* @return This builder. * @return This builder.
*/ */