Real Player in Android

Source: Internet
Author: User

1. In the previous introduction, from Java to mediaplayer --- binder --- mediaplayerservice: The client has already been clarified. However, in mediaplayerservice: client <mediaplayerservice: Create-> new client/mediaplayerservice: Client: setdatasource-> getplayertype/createplayer-> Android: createplayer>, Android:: After createplayer, save the newly created real player to mediaplayerservice: mplayer in client.

 

2. What is the real player?

According to my understanding, there are pvplayer, stagefrightplayer, midifile, and vorbisplayer. Each player processes different media types and completes division of work through the return values of getplayertype (const char * URL. Each player has its own expertise and does what it is good. For detailed division of labor, see the code sp <mediaplayerbase> createplayer (player_type
Playertype, void * cookie,
Notify_callback_f notifyfunc) function.

3. What should I do if I want to implement hardware Demux and hardware decoder on my own chip (for example, for TS stream in the set-top box?

According to my understanding, there are two methods:

1) implement all the interface functions based on the mediaplayerinterface, create a xxplayer, and add it to Android: createplayer. The specific implementation of each interface function is the same as that of the previous implementation in the Linux environment. It is simple and the previous achievements can be used.

2) Write extractor and decoder plug-ins in the current player (such as stagefrightplayer.

To implement the second solution, you must first understand the architecture of stagefrightplayer. Why do you need to know both of them, because how to do it depends on your chief architect or CTO.

 

 

 

 

 

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: info-contact@alibabacloud.com 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.