Android Mediacodec Status (states) conversion analysis

Source: Internet
Author: User

* Due to work needs, need to use MEDIACODEC to achieve playback and transcode functions, so in the learning process translated Google's official Mediacodec API document, due to the author's level limit, the text inevitably have errors and inappropriate, hope to criticize.

* Reprint Please specify source:


There are three states within the Mediacodec life cycle:Stopped, executing or released, where

  Stopped state contains three seed states:uninitialized, configured and Error

  executing states contain three seed states:flushed, Running and end-of-stream

Because the MEDIACODEC in different data processing mode between the state of the conversion will be a little different, so we are the synchronous processing mode and asynchronous processing mode of the state transition to do a detailed analysis

state transitions in synchronous mode (asynchronous processing using buffers)

  First, let's take a look at the flowchart of state transitions, as follows:

 1. When passing

Android Mediacodec Status (states) conversion analysis

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.