diff --git a/api/current.txt b/api/current.txt index 19274831cccb0..cb9212dbdc84d 100644 --- a/api/current.txt +++ b/api/current.txt @@ -14993,6 +14993,7 @@ package android.media { field public static final java.lang.String KEY_AAC_SBR_MODE = "aac-sbr-mode"; field public static final java.lang.String KEY_BITRATE_MODE = "bitrate-mode"; field public static final java.lang.String KEY_BIT_RATE = "bitrate"; + field public static final java.lang.String KEY_CAPTURE_RATE = "capture-rate"; field public static final java.lang.String KEY_CHANNEL_COUNT = "channel-count"; field public static final java.lang.String KEY_CHANNEL_MASK = "channel-mask"; field public static final java.lang.String KEY_COLOR_FORMAT = "color-format"; diff --git a/media/java/android/media/MediaFormat.java b/media/java/android/media/MediaFormat.java index a95348f691407..a1ccf6011043e 100644 --- a/media/java/android/media/MediaFormat.java +++ b/media/java/android/media/MediaFormat.java @@ -43,7 +43,8 @@ import java.util.Map; * {@link #KEY_COLOR_FORMAT}Integerset by the user * for encoders, readable in the output format of decoders * {@link #KEY_FRAME_RATE}Integer or Floatencoder-only - * {@link #KEY_I_FRAME_INTERVAL}Integerencoder-only + * {@link #KEY_CAPTURE_RATE}Integer +* {@link #KEY_I_FRAME_INTERVAL}Integerencoder-only * {@link #KEY_MAX_WIDTH}Integerdecoder-only, optional, max-resolution width * {@link #KEY_MAX_HEIGHT}Integerdecoder-only, optional, max-resolution height * {@link #KEY_REPEAT_PREVIOUS_FRAME_AFTER}Longvideo encoder in surface-mode only @@ -205,6 +206,21 @@ public final class MediaFormat { */ public static final String KEY_FRAME_RATE = "frame-rate"; + /** + * A key describing the capture rate of a video format in frames/sec. + *

+ * When capture rate is different than the frame rate, it means that the + * video is acquired at a different rate than the playback, which produces + * slow motion or timelapse effect during playback. Application can use the + * value of this key to tell the relative speed ratio between capture and + * playback rates when the video was recorded. + *

+ *

+ * The associated value is an integer or a float. + *

+ */ + public static final String KEY_CAPTURE_RATE = "capture-rate"; + /** * A key describing the frequency of I frames expressed in secs * between I frames.