Loading core/api/current.txt +4 −0 Original line number Diff line number Diff line Loading @@ -22240,6 +22240,10 @@ package android.media { field public static final String KEY_COLOR_TRANSFER_REQUEST = "color-transfer-request"; field public static final String KEY_COMPLEXITY = "complexity"; field public static final String KEY_CREATE_INPUT_SURFACE_SUSPENDED = "create-input-buffers-suspended"; field public static final String KEY_CROP_BOTTOM = "crop-bottom"; field public static final String KEY_CROP_LEFT = "crop-left"; field public static final String KEY_CROP_RIGHT = "crop-right"; field public static final String KEY_CROP_TOP = "crop-top"; field public static final String KEY_DURATION = "durationUs"; field public static final String KEY_ENCODER_DELAY = "encoder-delay"; field public static final String KEY_ENCODER_PADDING = "encoder-padding"; media/java/android/media/MediaCodec.java +12 −8 Original line number Diff line number Diff line Loading @@ -223,19 +223,19 @@ import java.util.concurrent.locks.ReentrantLock; </thead> <tbody> <tr> <td>{@code "crop-left"}</td> <td>{@link MediaFormat#KEY_CROP_LEFT}</td> <td>Integer</td> <td>The left-coordinate (x) of the crop rectangle</td> </tr><tr> <td>{@code "crop-top"}</td> <td>{@link MediaFormat#KEY_CROP_TOP}</td> <td>Integer</td> <td>The top-coordinate (y) of the crop rectangle</td> </tr><tr> <td>{@code "crop-right"}</td> <td>{@link MediaFormat#KEY_CROP_RIGHT}</td> <td>Integer</td> <td>The right-coordinate (x) <strong>MINUS 1</strong> of the crop rectangle</td> </tr><tr> <td>{@code "crop-bottom"}</td> <td>{@link MediaFormat#KEY_CROP_BOTTOM}</td> <td>Integer</td> <td>The bottom-coordinate (y) <strong>MINUS 1</strong> of the crop rectangle</td> </tr><tr> Loading @@ -251,12 +251,16 @@ import java.util.concurrent.locks.ReentrantLock; <pre class=prettyprint> MediaFormat format = decoder.getOutputFormat(…); int width = format.getInteger(MediaFormat.KEY_WIDTH); if (format.containsKey("crop-left") && format.containsKey("crop-right")) { width = format.getInteger("crop-right") + 1 - format.getInteger("crop-left"); if (format.containsKey(MediaFormat.KEY_CROP_LEFT) && format.containsKey(MediaFormat.KEY_CROP_RIGHT)) { width = format.getInteger(MediaFormat.KEY_CROP_RIGHT) + 1 - format.getInteger(MediaFormat.KEY_CROP_LEFT); } int height = format.getInteger(MediaFormat.KEY_HEIGHT); if (format.containsKey("crop-top") && format.containsKey("crop-bottom")) { height = format.getInteger("crop-bottom") + 1 - format.getInteger("crop-top"); if (format.containsKey(MediaFormat.KEY_CROP_TOP) && format.containsKey(MediaFormat.KEY_CROP_BOTTOM)) { height = format.getInteger(MediaFormat.KEY_CROP_BOTTOM) + 1 - format.getInteger(MediaFormat.KEY_CROP_TOP); } </pre> <p class=note> Loading media/java/android/media/MediaFormat.java +36 −0 Original line number Diff line number Diff line Loading @@ -358,6 +358,42 @@ public final class MediaFormat { */ public static final String KEY_HEIGHT = "height"; /** * A key describing the bottom-coordinate (y) of the crop rectangle. * This is the bottom-most row included in the crop frame, * where row indices start at 0. * Additional information on the crop rectangle semantics can be found at * {@link android.media.MediaCodec}. */ public static final String KEY_CROP_BOTTOM = "crop-bottom"; /** * A key describing the left-coordinate (x) of the crop rectangle. * This is the left-most column included in the crop frame, * where column indices start at 0. * Additional information on the crop rectangle semantics can be found at * {@link android.media.MediaCodec}. */ public static final String KEY_CROP_LEFT = "crop-left"; /** * A key describing the right-coordinate (x) of the crop rectangle. * This is the right-most column included in the crop frame, * where column indices start at 0. * Additional information on the crop rectangle semantics can be found at * {@link android.media.MediaCodec}. */ public static final String KEY_CROP_RIGHT = "crop-right"; /** * A key describing the top-coordinate (y) of the crop rectangle. * This is the top-most row included in the crop frame, * where row indices start at 0. * Additional information on the crop rectangle semantics can be found at * {@link android.media.MediaCodec}. */ public static final String KEY_CROP_TOP = "crop-top"; /** * A key describing the maximum expected width of the content in a video * decoder format, in case there are resolution changes in the video content. Loading Loading
core/api/current.txt +4 −0 Original line number Diff line number Diff line Loading @@ -22240,6 +22240,10 @@ package android.media { field public static final String KEY_COLOR_TRANSFER_REQUEST = "color-transfer-request"; field public static final String KEY_COMPLEXITY = "complexity"; field public static final String KEY_CREATE_INPUT_SURFACE_SUSPENDED = "create-input-buffers-suspended"; field public static final String KEY_CROP_BOTTOM = "crop-bottom"; field public static final String KEY_CROP_LEFT = "crop-left"; field public static final String KEY_CROP_RIGHT = "crop-right"; field public static final String KEY_CROP_TOP = "crop-top"; field public static final String KEY_DURATION = "durationUs"; field public static final String KEY_ENCODER_DELAY = "encoder-delay"; field public static final String KEY_ENCODER_PADDING = "encoder-padding";
media/java/android/media/MediaCodec.java +12 −8 Original line number Diff line number Diff line Loading @@ -223,19 +223,19 @@ import java.util.concurrent.locks.ReentrantLock; </thead> <tbody> <tr> <td>{@code "crop-left"}</td> <td>{@link MediaFormat#KEY_CROP_LEFT}</td> <td>Integer</td> <td>The left-coordinate (x) of the crop rectangle</td> </tr><tr> <td>{@code "crop-top"}</td> <td>{@link MediaFormat#KEY_CROP_TOP}</td> <td>Integer</td> <td>The top-coordinate (y) of the crop rectangle</td> </tr><tr> <td>{@code "crop-right"}</td> <td>{@link MediaFormat#KEY_CROP_RIGHT}</td> <td>Integer</td> <td>The right-coordinate (x) <strong>MINUS 1</strong> of the crop rectangle</td> </tr><tr> <td>{@code "crop-bottom"}</td> <td>{@link MediaFormat#KEY_CROP_BOTTOM}</td> <td>Integer</td> <td>The bottom-coordinate (y) <strong>MINUS 1</strong> of the crop rectangle</td> </tr><tr> Loading @@ -251,12 +251,16 @@ import java.util.concurrent.locks.ReentrantLock; <pre class=prettyprint> MediaFormat format = decoder.getOutputFormat(…); int width = format.getInteger(MediaFormat.KEY_WIDTH); if (format.containsKey("crop-left") && format.containsKey("crop-right")) { width = format.getInteger("crop-right") + 1 - format.getInteger("crop-left"); if (format.containsKey(MediaFormat.KEY_CROP_LEFT) && format.containsKey(MediaFormat.KEY_CROP_RIGHT)) { width = format.getInteger(MediaFormat.KEY_CROP_RIGHT) + 1 - format.getInteger(MediaFormat.KEY_CROP_LEFT); } int height = format.getInteger(MediaFormat.KEY_HEIGHT); if (format.containsKey("crop-top") && format.containsKey("crop-bottom")) { height = format.getInteger("crop-bottom") + 1 - format.getInteger("crop-top"); if (format.containsKey(MediaFormat.KEY_CROP_TOP) && format.containsKey(MediaFormat.KEY_CROP_BOTTOM)) { height = format.getInteger(MediaFormat.KEY_CROP_BOTTOM) + 1 - format.getInteger(MediaFormat.KEY_CROP_TOP); } </pre> <p class=note> Loading
media/java/android/media/MediaFormat.java +36 −0 Original line number Diff line number Diff line Loading @@ -358,6 +358,42 @@ public final class MediaFormat { */ public static final String KEY_HEIGHT = "height"; /** * A key describing the bottom-coordinate (y) of the crop rectangle. * This is the bottom-most row included in the crop frame, * where row indices start at 0. * Additional information on the crop rectangle semantics can be found at * {@link android.media.MediaCodec}. */ public static final String KEY_CROP_BOTTOM = "crop-bottom"; /** * A key describing the left-coordinate (x) of the crop rectangle. * This is the left-most column included in the crop frame, * where column indices start at 0. * Additional information on the crop rectangle semantics can be found at * {@link android.media.MediaCodec}. */ public static final String KEY_CROP_LEFT = "crop-left"; /** * A key describing the right-coordinate (x) of the crop rectangle. * This is the right-most column included in the crop frame, * where column indices start at 0. * Additional information on the crop rectangle semantics can be found at * {@link android.media.MediaCodec}. */ public static final String KEY_CROP_RIGHT = "crop-right"; /** * A key describing the top-coordinate (y) of the crop rectangle. * This is the top-most row included in the crop frame, * where row indices start at 0. * Additional information on the crop rectangle semantics can be found at * {@link android.media.MediaCodec}. */ public static final String KEY_CROP_TOP = "crop-top"; /** * A key describing the maximum expected width of the content in a video * decoder format, in case there are resolution changes in the video content. Loading