The Symbian OS (779886), страница 42
Текст из файла (страница 42)
The Symbian-based NokianGage integrated an FM radio along with game graphics and stereosound.The new device trends include full-stereo sound, multimegapixelcameras with true optics (true camera lenses and optical zooming)for both still and movie images, hardware-accelerated graphics, multiplehigh-pixel-density displays, and onboard high-definition broadcast TV.Symbian OS v9 supports these hardware features with a new Multimedia Framework that is lightweight and flexible and aims to provideMULTIMEDIA AND GRAPHICS SERVICES BLOCK179consistent and hardware-independent interfaces at the application level,while providing flexible support to device makers wanting to integrate theavailable multimedia hardware and support new multimedia applicationsand services.Graphics Design GoalsGraphics is central to the goals of the OS to provide an easy-to-use,consumer-oriented operating system capable of driving a wide range ofdevices but offering a sophisticated and, above all, open (to third-partyapplication developers) platform for general application development.From the beginning, the system has been optimized to produce fastgraphics on low-power devices.
The importance of rich font support wasrecognized early on, including support for exotic scripts. Increasingly, thefocus for graphics has moved towards multimedia applications and games,making device graphics generally more critical, as well as specificallymaking it more important to support open graphics standards.On the one hand, Symbian offers a much more integrated graphicsarchitecture optimized for its device class than, for example, Linux, whichrequires licensing an application-level graphical toolkit, for example,Trolltech or GNU, on top of which to either license or implement abespoke user interface.
On the other hand, the Symbian graphics solutionaims to be more carefully architected, more modular, and better-scaledthan a system such as Windows Mobile, which has a monolithic userinterface implementation (with its origins in the PC-centric, legacy designof Windows itself).Multimedia Design GoalsThe first implementation of a multimedia server was introduced in Symbian OS v7. It was enhanced and substantially re-architected in SymbianOS v8 and has evolved significantly in Symbian OS v9. Partly, its evolution is the result of the rapid pace at which multimedia hardware andservices have migrated to mobile phones and the push from both licenseesand operators to integrate sophisticated new hardware and support newmedia services, and partly it is a natural evolution enabled by otherenhancements in Symbian OS (including the adoption of the real-timekernel, which opened the way for a significant change in phone hardwarecomplexity, and platform security, which makes Symbian OS an idealplatform for a movie and music player, including DRM-protected mediacards and downloads).The Multimedia Framework therefore provides a single extensibleframework for integrating support for audio, video, MIDI, automatedspeech recognition, cameras, and integrated broadcast tuners.
Its purposeis to consolidate and standardize the multimedia APIs, so that they are180THE OS SERVICES LAYERcommon across all devices based on Symbian OS, while also providinga flexible foundation for extension and customization.The framework is designed around the concept of controllers thatprovide a full range of standard multimedia functions (such as audioand video recording and playback, as well as more advanced functionssuch as speech recognition) and define standard APIs, allowing uniformclient access across all Symbian OS devices regardless of their differentcapabilities, and a standard plug-in interface.The framework is implemented as a lightweight, multithreaded, ECOMconforming plug-in framework, which may run as one or more threads inthe client application process, and consists of a number of componentsthat implement the application-level interfaces.The actual implementation on any device is provided by controllerplug-ins which are supplied by licensees and used by client applicationsto access multimedia functions.
The media capabilities of a given devicetherefore depend on the available hardware and the supporting controller plug-ins, and are ultimately determined by the underlying devicehardware. Multiple controllers may be available for any given format.Applications can choose whether they want to select a controller or toleave selection to the framework.The Image Conversion Library provides an extensible plug-in framework, also conforming to ECOM, and a standard set of conversionplug-ins supporting conversions between standard image formats.
TheCamera component defines a standard API for onboard cameras andprovides a reference implementation. The Broadcast Tuner componentprovides a standard API for onboard radio tuners.The camera and tuner APIs are implemented as frameworks into whichcustom plug-ins are loaded to support specific hardware available on different Symbian OS devices but provide a standard API both for plug-inwriters and for client applications, so that applications can work consistently across different phones including phones from different vendors.The framework also defines the lower-level interface to the MediaDevice Framework (see Chapter 10), which defines device-level plug-ininterfaces including support for hardware accelerators, and provides astandard set of device drivers.The framework is heavily plug-in dependent.
From a client applicationperspective, it provides a rich and consistent set of interfaces for all kindsof multimedia. From a system perspective, it provides a number of differentplug-in interfaces to support writing of plug-ins that implement chosenlevels of support (from logical to physical) for the onboard hardware.By default, Symbian supplies only a simple audio plug-in, supportingWAV, AU and RAW formats. Codec implementations are provided fora number of encodings including various PCM encodings, A-Law andu-Law, and GSM6.10. Licensees are expected to supply the full set ofMULTIMEDIA AND GRAPHICS SERVICES BLOCK181plug-ins required on a particular phone, providing custom controllers,codecs, and format support.OpenGL ESOpenGL ES is an open standard for 2D and 3D graphics, specificallytargeted at embedded systems including consoles and phones.
It definesapplication APIs for rendering, texture mapping, and other graphicaleffects, as well as a portable binding to native windowing systems, as asubset of the workstation- and desktop-oriented OpenGL standard.OpenGL ES support in Symbian OS consists of a framework thatimplements the API binding and a standard client API definition but not aconcrete implementation. A stub implementation is supplied by OpenGLES Headers and the OpenGL ES component is a reference implementationof a third-party OpenGL ES renderer. The API includes Display Properties(optional in the OpenGL ES standard) that encapsulate drawing properties(e.g.
displaying rectangles and clipping regions), enabling drawing to bedelegated to threads that don’t have access to an RWindow object.The framework is provided to implement the OpenGL ES binding andensure compatibility between different devices.Windowing ModelThe Window Server is at the heart of the graphics architecture of SymbianOS and it is central to the event-handling model that drives applications.Unlike many other operating systems, in Symbian OS there is no notionof character-based applications or devices (there are no teletypes orgreen-screen terminals in mobile phones).
All applications in SymbianOS are intrinsically graphical and the screen is where application eventsare realized, as well as being an important source of application events.The Window Server is at the heart of screen control and is, therefore,central to applications.The Window Server uses the concept of application-owned windowsonto the display device to serialize access to the display by multiple concurrent applications.
A window on a Symbian OS device is a rectangularscreen region that can be drawn to on behalf of its owning application inresponse either to system or application events, and which receives focusevents as well as keyboard and pointer (pen) events. The Window Serverowns the screen as a resource and owns the single event queue throughwhich all device events, whether system- or application-originated, arehandled, managing kernel and application events as well as events generated by the Window Server itself and distributing them to applicationsor system user interface components (status bars and so on). The WindowServer implements a classic Symbian OS pattern – serializing access toshared resources, which in this case include the physical display and182THE OS SERVICES LAYERinteraction and other events.