Condividi tramite


MediaFormat.KeySlowMotionMarkers Field

Definition

A key for retrieving the slow-motion marker information associated with a video track.

[Android.Runtime.Register("KEY_SLOW_MOTION_MARKERS", ApiSince=31)]
public const string KeySlowMotionMarkers;
[<Android.Runtime.Register("KEY_SLOW_MOTION_MARKERS", ApiSince=31)>]
val mutable KeySlowMotionMarkers : string

Field Value

Attributes

Remarks

A key for retrieving the slow-motion marker information associated with a video track.

The associated value is a ByteBuffer in ByteOrder#BIG_ENDIAN (networking order) of the following format:

float(32) playbackRate;
                unsigned int(32) numMarkers;
                for (i = 0;i < numMarkers; i++) {
                    int(64) timestampUs;
                    float(32) speedRatio;
                }

The meaning of each field is as follows: <table border="1" width="90%" align="center" cellpadding="5"> <tbody> <tr> <td>playbackRate</td> <td>The frame rate at which the playback should happen (or the flattened clip should be).</td> </tr> <tr> <td>numMarkers</td> <td>The number of slow-motion markers that follows.</td> </tr> <tr> <td>timestampUs</td> <td>The starting point of a new segment.</td> </tr> <tr> <td>speedRatio</td> <td>The playback speed for that segment. The playback speed is a floating point number, indicating how fast the time progresses relative to that written in the container. (Eg. 4.0 means time goes 4x as fast, which makes 30fps become 120fps.)</td> </tr> </table>

The following constraints apply to the timestampUs of the markers:

<li>The timestampUs shall be monotonically increasing.</li> <li>The timestampUs shall fall within the time span of the video track.</li> <li>The first timestampUs should match that of the first video sample.</li>

Java documentation for android.media.MediaFormat.KEY_SLOW_MOTION_MARKERS.

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