Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4628f423 authored by Lajos Molnar's avatar Lajos Molnar Committed by Automerger Merge Worker
Browse files

Merge "media: clarify MediaFormat.KEY_FRAME_RATE for video encoders" into...

Merge "media: clarify MediaFormat.KEY_FRAME_RATE for video encoders" into tm-dev am: 42e8a228 am: 341487c3

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18605610



Change-Id: Ia7f9f022ac7c3b4253806ca004467e89e81e4301
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents f61f7755 341487c3
Loading
Loading
Loading
Loading
+15 −5
Original line number Original line Diff line number Diff line
@@ -457,17 +457,27 @@ public final class MediaFormat {


    /**
    /**
     * A key describing the frame rate of a video format in frames/sec.
     * A key describing the frame rate of a video format in frames/sec.
     * <p>
     * The associated value is normally an integer when the value is used by the platform,
     * The associated value is normally an integer when the value is used by the platform,
     * but video codecs also accept float configuration values.
     * but video codecs also accept float configuration values.
     * Specifically, {@link MediaExtractor#getTrackFormat MediaExtractor} provides an integer
     * Specifically, {@link MediaExtractor#getTrackFormat MediaExtractor} provides an integer
     * value corresponding to the frame rate information of the track if specified and non-zero.
     * value corresponding to the frame rate information of the track if specified and non-zero.
     * Otherwise, this key is not present. {@link MediaCodec#configure MediaCodec} accepts both
     * Otherwise, this key is not present. {@link MediaCodec#configure MediaCodec} accepts both
     * float and integer values. This represents the desired operating frame rate if the
     * float and integer values.
     * <p>
     * This represents the desired operating frame rate if the
     * {@link #KEY_OPERATING_RATE} is not present and {@link #KEY_PRIORITY} is {@code 0}
     * {@link #KEY_OPERATING_RATE} is not present and {@link #KEY_PRIORITY} is {@code 0}
     * (realtime). For video encoders this value corresponds to the intended frame rate,
     * (realtime). Otherwise, this is just informational.
     * although encoders are expected
     * <p>
     * to support variable frame rate based on {@link MediaCodec.BufferInfo#presentationTimeUs
     * For video encoders this value corresponds to the intended frame rate (the rate at which
     * buffer timestamp}. This key is not used in the {@code MediaCodec}
     * the application intends to send frames to the encoder, as calculated by the buffer
     * timestamps, and not from the actual real-time rate that the frames are sent to
     * the encoder). Encoders use this hint for rate control, specifically for the initial
     * frames, as encoders are expected to support variable frame rate (for rate control) based
     * on the actual {@link MediaCodec.BufferInfo#presentationTimeUs buffer timestamps} of
     * subsequent frames.
     * <p>
     * This key is not used in the {@code MediaCodec}
     * {@link MediaCodec#getInputFormat input}/{@link MediaCodec#getOutputFormat output} formats,
     * {@link MediaCodec#getInputFormat input}/{@link MediaCodec#getOutputFormat output} formats,
     * nor by {@link MediaMuxer#addTrack MediaMuxer}.
     * nor by {@link MediaMuxer#addTrack MediaMuxer}.
     */
     */