Brew advanced and proficient-3G mobile value-added business operation, customization and development-49-brew SDK nine functions Multimedia System

Source: Internet
Author: User

Multimedia support is mainly implemented by the imedia interface. Many media interfaces are derived from the imedia interface, as shown in Figure 11-3:

Figure11-3:ImediaSome media formats supported by the API

 

The imedia interface provides an abstract base class for all brew multimedia objects, and provides operations such as playing, recording, and searching, stopping, pausing, and resuming media objects related to playing/recording, developers can perform operations on all multimedia objects through the imedia interface. The multimedia framework in brew is 11-4.

 

Figure11-4: Multimedia architecture in mobile phones

 

The playback status of the media conforms to the finite state machine model. Generally, there are six statuses: idle, ready, play, play_pause, record, and record_pause. imedia uses the media state machine 11-5.

Figure11-5:ImediaMultimedia state machine used

 

Various methods using the imedia interface must be switched according to the state of this state machine to ensure maximum use. If a status error occurs, you must reset the state machine.

The imedia multimedia playback process is 11-6, showing the changes in the status of multimedia objects between ready and play.

 

Figure11-6:ImediaMultimedia playback process

Brew3.x also provides abundant support for image processing. Brew applications can use ibitmap and idisplay for bitmap operations. idib is an interface and data structure derived from ibitmap. The idib data structure member variable can be used to locate the position of the image point (pixel) in the bitmap, and how to parse the color value of the image point. The idib structure can be used to directly operate the bitmap data. One way to scale an image is through the itransform interface. You need to obtain the itransform handle through the target bitmap. The location of the scaled target bitmap is specified by the user, and the scaling must be set through aeetransformmatrix, another method is to use ibitmapscale, ibitmaprot, and ibitmapfx in combination. You can use idisplay_setprefs to handle display screen rotation events.

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.