MediaCodec.BufferFlagDecodeOnly Field
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Caution
This constant will be removed in the future version. Use Android.Media.MediaCodecBufferFlags enum directly instead of this field.
This indicates that the buffer is decoded and updates the internal state of the decoder, but does not produce any output buffer.
[Android.Runtime.Register("BUFFER_FLAG_DECODE_ONLY", ApiSince=34)]
[System.Obsolete("This constant will be removed in the future version. Use Android.Media.MediaCodecBufferFlags enum directly instead of this field.", true)]
public const Android.Media.MediaCodecBufferFlags BufferFlagDecodeOnly = 32;
[<Android.Runtime.Register("BUFFER_FLAG_DECODE_ONLY", ApiSince=34)>]
[<System.Obsolete("This constant will be removed in the future version. Use Android.Media.MediaCodecBufferFlags enum directly instead of this field.", true)>]
val mutable BufferFlagDecodeOnly : Android.Media.MediaCodecBufferFlags
Field Value
Value = 32- Attributes
Remarks
This indicates that the buffer is decoded and updates the internal state of the decoder, but does not produce any output buffer.
When a buffer has this flag set, OnFrameRenderedListener#onFrameRendered(MediaCodec, long, long)
and Callback#onOutputBufferAvailable(MediaCodec, int, BufferInfo)
will not be called for that given buffer.
For example, when seeking to a certain frame, that frame may need to reference previous frames in order for it to produce output. The preceding frames can be marked with this flag so that they are only decoded and their data is used when decoding the latter frame that should be initially displayed post-seek. Another example would be trick play, trick play is when a video is fast-forwarded and only a subset of the frames is to be rendered on the screen. The frames not to be rendered can be marked with this flag for the same reason as the above one. Marking frames with this flag improves the overall performance of playing a video stream as fewer frames need to be passed back to the app.
In CodecCapabilities#FEATURE_TunneledPlayback
, buffers marked with this flag are not rendered on the output surface.
A frame should not be marked with this flag and #BUFFER_FLAG_END_OF_STREAM
simultaneously, doing so will produce a InvalidBufferFlagsException
Java documentation for android.media.MediaCodec.BUFFER_FLAG_DECODE_ONLY
.
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.