Skip to content

MediaCodec

Devrath edited this page Nov 21, 2021 · 3 revisions

Introduction

  • MediaCodec is used to access the low-level media codecs.
  • Low level media codec include things like encoder and decoder.
  • Codec processes input data to provide and generate output data.
  • It processes the data asynchronously
  • It uses a set of input and output buffers as seen in the diagram above.

How it works

  • Client requests for the buffer packets from the codec.
  • Then client populates the buffer packets with data and sends the data back to the codec for processing.
  • The codec processes the buffer packets one by one and transforms them.
  • Finally the client again requests it or receives the transformed buffer packets.
  • After receiving the buffer packets from the codec, The client utilizes them and sends the emptied buffer packets back to codec.

More information

  • Codec is used to decode a media file and encode it to another one.
Clone this wiki locally