共用方式為


MediaFormat.KeyMaxPtsGapToEncoder Field

Definition

Instruct the video encoder in "surface-input" mode to limit the gap of timestamp between any two adjacent frames fed to the encoder to the specified amount (in micro-second).

[Android.Runtime.Register("KEY_MAX_PTS_GAP_TO_ENCODER", ApiSince=29)]
public const string KeyMaxPtsGapToEncoder;
[<Android.Runtime.Register("KEY_MAX_PTS_GAP_TO_ENCODER", ApiSince=29)>]
val mutable KeyMaxPtsGapToEncoder : string

Field Value

Attributes

Remarks

Instruct the video encoder in "surface-input" mode to limit the gap of timestamp between any two adjacent frames fed to the encoder to the specified amount (in micro-second).

The associated value is a long int. When positive, it represents the max timestamp gap between two adjacent frames fed to the encoder. When negative, the absolute value represents a fixed timestamp gap between any two adjacent frames fed to the encoder. Note that this will also apply even when the original timestamp goes backward in time. Under normal conditions, such frames would be dropped and not sent to the encoder.

The output timestamp will be restored to the original timestamp and will not be affected.

This is used in some special scenarios where input frames arrive sparingly but it's undesirable to allocate more bits to any single frame, or when it's important to ensure all frames are captured (rather than captured in the correct order).

Java documentation for android.media.MediaFormat.KEY_MAX_PTS_GAP_TO_ENCODER.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to