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

Commit f8ccfd18 authored by Eino-Ville Talvala (Eddy)'s avatar Eino-Ville Talvala (Eddy)
Browse files

Better document formats for MediaCodec.QueueRequest#setHardwareBuffer

Opaque implementation-defined PRIVATE buffers are also supported
with hardware encoders.

Change-Id: I4935ac65205117c638133d18b9b26c7f7acf08c7
parent b6c8e08e
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -3401,13 +3401,15 @@ final public class MediaCodec {
        }

        /**
         * Set a harware graphic buffer to this queue request. Exactly one buffer must
         * Set a hardware graphic buffer to this queue request. Exactly one buffer must
         * be set for a queue request before calling {@link #queue}.
         * <p>
         * Note: buffers should have format {@link HardwareBuffer#YCBCR_420_888},
         * a single layer, and an appropriate usage ({@link HardwareBuffer#USAGE_CPU_READ_OFTEN}
         * for software codecs and {@link HardwareBuffer#USAGE_VIDEO_ENCODE} for hardware)
         * for codecs to recognize.  Codecs may throw exception if the buffer is not recognizable.
         * for codecs to recognize. Format {@link ImageFormat#PRIVATE} together with
         * usage {@link HardwareBuffer#USAGE_VIDEO_ENCODE} will also work for hardware codecs.
         * Codecs may throw exception if the buffer is not recognizable.
         *
         * @param buffer The hardware graphic buffer object
         * @return this object