Android Multimedia Framework

Source: Internet
Author: User


Http://www.meegozu.com/article-282-1.html

Opencore is a multimedia open source framework launched by Google and packetvideo. 264 decoder in all current open source H. the best decoder in 264 is tested on Win32 and armv4. The performance is much better, with an increase of about 20%!

Another common name of opencore is packetvideo, which is the multimedia core of Android. During the website protection process, packetvideo is the name of a company, and opencore is the name of the software layer of this multimedia framework. Android Developers have the same meanings. Compared with other android libraries, opencore has very large code. It is a C ++-based implementation that defines a full-featured operating system porting layer, various basic functions are encapsulated into classes, and interfaces at different levels are inherited.

Opencore is a multimedia framework. From a macro perspective, it mainly includes two aspects:

* Pvplayer: Provides Media Player functions to play back audio and video streams.
* Pvauthor: supports recording media streams to capture audio, video, and static images.

How does Android 2.3 stagefright select the OMX component?

OMX component

Http://www.cnblogs.com/super119/archive/2011/09/01/2161896.html

Android 2.3 comes with an executable program named stagefright, which is executed on the board.

Stagefright-l

All OMX components are displayed. OMX. PV comes with Android and is soft-decoded (Pv-Packet Video). Others are vendor's.

Then, how does stagefright select which OMX component is used to serve a specific decode or encode?

Stagefright has a command line option:-s (prefer software codec)

So let's look at the source code of stagefright and see what the-s option has done.

It turns out that the last parameter is passed in directly at the omxcodec: Create time, that is, the kprefersoftwarecodecs Member of the omxcodec class is set to true.

Therefore, it is actually omxcodec to decide which OMX component to choose. The caller can use the omxcodec: Create method.

Omxcodec: when creating, The findmatchingcodecs method of omxcodec will be called. This method will give the names of all satisfied OMX components. At this time, if

If kprefersoftwarecodecs is true, findmatchingcodecs puts soft codec (that is, OMX. PV) in front of the vector.

 

When kprefersoftwarecodecs is not true, the OMX component found by findmatchingcodecs is sorted in the order defined in the global variable kdecoderinfo (decode as an example, h. definition part of 264:

 

{Media_mimetype_video_avc, "OMX. qcom.7x30. Video. decoder. AVC "},
{Media_mimetype_video_avc, "OMX. qcom. Video. decoder. AVC "},
{Media_mimetype_video_avc, "OMX. Ti. Video. decoder "},
{Media_mimetype_video_avc, "OMX. Sec. AVC. decoder "},
{Media_mimetype_video_avc, "avcdecoder "},
// {Media_mimetype_video_avc, "OMX. PV. avcdec "},

 

Obviously, here we first consider the vendor's OMX components (from Qualcomm to Ti to Samsung), and then the software decoding that comes with it.

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.