Multimedia support is mainly implemented by the imedia interface. Many media interfaces are derived from the imedia interface, as shown in Figure 11-3:
Figure 11-3: some media formats supported by the imedia Interface
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.
Figure 11-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.
Figure 11-5: multimedia state machine used by imedia
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.
Figure 11-6: imedia multimedia 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.
This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/wireless_com/archive/2010/03/31/5435864.aspx