OutputFrame
class OutputFrame
| kotlin.Any | |
| ↳ | android.media.MediaCodec.OutputFrame | 
A single output frame and its associated metadata.
Summary
| Public methods | |
|---|---|
| ArrayDeque<MediaCodec.BufferInfo!> | |
| MutableSet<String!> | 
            
             Returns an unmodifiable set of the names of entries that has changed from the previous frame.  | 
        
| Int | 
            getFlags()Returns the buffer flags.  | 
        
| MediaFormat | 
            
             Returns a read-only   | 
        
| HardwareBuffer? | 
            
             Returns the output hardware graphic buffer, or null if this frame is empty.  | 
        
| MediaCodec.LinearBlock? | 
            
             Returns the output linear block, or null if this frame is empty.  | 
        
| Long | 
            
             Returns the presentation timestamp in microseconds.  | 
        
Public methods
getBufferInfos
fun getBufferInfos(): ArrayDeque<MediaCodec.BufferInfo!>
| Return | |
|---|---|
ArrayDeque<MediaCodec.BufferInfo!> | 
            This value cannot be null. | 
          
getChangedKeys
fun getChangedKeys(): MutableSet<String!>
Returns an unmodifiable set of the names of entries that has changed from the previous frame. The entries may have been removed/changed/added. Client can find out what the change is by querying MediaFormat object returned from getFormat.
| Return | |
|---|---|
MutableSet<String!> | 
            This value cannot be null. | 
          
getFlags
fun getFlags(): Int
Returns the buffer flags.
| Return | |
|---|---|
Int | 
            Value is either 0 or a combination of android.media.MediaCodec#BUFFER_FLAG_SYNC_FRAME, android.media.MediaCodec#BUFFER_FLAG_KEY_FRAME, android.media.MediaCodec#BUFFER_FLAG_CODEC_CONFIG, android.media.MediaCodec#BUFFER_FLAG_END_OF_STREAM, android.media.MediaCodec#BUFFER_FLAG_PARTIAL_FRAME, android.media.MediaCodec.BUFFER_FLAG_MUXER_DATA, and android.media.MediaCodec#BUFFER_FLAG_DECODE_ONLY | 
          
getFormat
fun getFormat(): MediaFormat
Returns a read-only MediaFormat for this frame. The returned object is valid only until the client calls android.media.MediaCodec#releaseOutputBuffer.
| Return | |
|---|---|
MediaFormat | 
            This value cannot be null. | 
          
getHardwareBuffer
fun getHardwareBuffer(): HardwareBuffer?
Returns the output hardware graphic buffer, or null if this frame is empty.
| Exceptions | |
|---|---|
java.lang.IllegalStateException | 
            if this output frame is not graphic. | 
getLinearBlock
fun getLinearBlock(): MediaCodec.LinearBlock?
Returns the output linear block, or null if this frame is empty.
| Exceptions | |
|---|---|
java.lang.IllegalStateException | 
            if this output frame is not linear. | 
getPresentationTimeUs
fun getPresentationTimeUs(): Long
Returns the presentation timestamp in microseconds.