symba (779893), страница 7
Текст из файла (страница 7)
Audio format supportprovided by Symbian includes WAV, AU, RAW (in various formats), PCM,µ-Law, A-Law, etc. Licensees typically add their own support for popularformats, such as MP3 and AAC, often with implementations optimizedfor their particular hardware.Support is also provided for video recording, playback and streaming. The framework allows developers to write efficient and powerfulplug-ins, using a range of re-usable software components that representfiles, memory buffers, sockets, audio devices, screens, etc. In addition, aMIDI client API is available.
The lower level of the subsystem, known asthe Media Device Framework (MDF) was added in Symbian OS v8.0; itincludes support for audio, video and MIDI as well as providing transparent support for hardware acceleration. Figure 1.5 shows the interactionbetween the MMF and the MDF.The release of Symbian OS v9 marked a major turning point, withthe introduction of an enhanced security architecture.
This architectureprovides the platform with the ability to defend itself against malicious orbadly implemented programs (malware).In the multimedia subsystem, process boundaries were added to allowenforcement of the platform security constraints. For example, there isnow a client–server boundary in the middle of the hardware abstractionlayer to restrict priority requests for the audio hardware to clients with theappropriate privilege.12INTRODUCTIONMultimedia ApplicationApplicationsClient APIsMMF Controller FrameworkMMFController PluginsDevSoundDevVideoMDFHardwareFigure 1.5AudioCodecsVideoCodecsAudioDriversVideoDriversMultimedia Framework and Media Device FrameworkThe multimedia subsystem on the latest versions of Symbian OS, v9.4and v9.5, provides support for rich multimedia capabilities: audio andvideo recording; playback and streaming; cameras with high resolutions;audio adaptation, routing and policy; use of audio, video and graphicshardware acceleration; digital TV and FM/digital radio support.1.6 A Peek into the FutureThe global smartphone market has never been so exciting.
With over 200million Symbian smartphones shipped, high smartphone sales growth indeveloping markets, and increasing mass market requirements, Symbian’saddressable market is broadening across segments and regions.9 Thisrapid growth in shipments driven by a shift towards mid-range handsets,along with ever-increasing consumer demand for high-end multimediafeatures, leads the future development of Symbian OS.The multimedia subsystem’s future development will be driven by anumber of factors:• Power management – multimedia features consume lots of power andthis is only increased by trends towards higher screen resolutions and9 Seewww.symbian.com/about/fastfacts.html to get the latest figures.A PEEK INTO THE FUTURE13lower bulk memory costs enabling higher quality content consumption. These issues can be mitigated by intelligent design of softwaresubsystems and hardware components.
The subsystems need to bescalable so that they take advantage of hardware acceleration whereit is present but work purely in software on mid-range devices.Examples of this are the Media Device Framework, described inSection 2.4, Section 4.2 and Section 5.7, and the new graphics architecture, ScreenPlay.10 Future smartphones are likely to be poweredby multi-core processors.
Symbian is adding support for symmetricmulti-processing (SMP), which will improve battery life by accessingmultiple cores only while running demanding high-end multimediaapplications and powering them down when they are not in use.Symbian continue to optimize performance in these areas.• High-bandwidth networks – cellular networks with LTE and super 3Gas well as WiFi and WiMAX access will enable large quantities ofhigh quality content to be transferred over the air for immediateconsumption. Symbian is enabling super-fast content downloads onthese networks with a new IP networking architecture, FreeWay.11• The home network – a totally connected home where your contentmay be stored on your PC, but played on your stereo in anotherroom, all orchestrated by your mobile device.
This functionality isenabled by universal plug and play (UPnP) technology. The mobiledevice is also able to originate and consume media. As the numberof connected devices in the home grows, the demands on the userinterface and media playback capabilities of mobile devices willincrease significantly.• User-generated content – sites such as YouTube demonstrate the interest in this feature, and mobile devices are ideal for capturing thiscontent because you rarely forget to take your phone with you.Mobile social networking is also likely to drive the creation and consumption of multimedia content. To enable this, users are likely todemand better on-device multimedia editing tools.• Open standards – the Khronos group is defining a number of openstandard, royalty-free APIs to enable authoring and playback ofdynamic media on a wide variety of platforms and devices.
Symbian and several of its licensees are members of the group and arelikely to adopt the standards as and when they become available.12• More memory – currently a lot of multimedia applications are limitedby the available RAM on the device. This often restricts the size10 Seewww.symbian.com/symbianos/os screenplay.html for more information.See www.symbian.com/symbianos/os freeway.html for more information.12 Chapter 2 has more information on upcoming support for Khronos standards in Symbian OS.1114INTRODUCTIONand quality of images and video content that can be manipulated. Inaddition to the gradual improvement in device specifications, Symbianis making a major improvement in system RAM usage with the deliveryof demand paging.13 Code on a Symbian smartphone is stored inNAND Flash memory and must be copied into RAM before it canexecute.
Demand paging means that only the required ‘pages’ of codewithin a DLL are kept in RAM; previously the entire DLL would needto remain loaded. This should free up more memory for applicationdevelopers, enabling more advanced content manipulation.Now, we invite you to continue with us to the next chapters of thebook, where we take a closer look at the multimedia subsystem, itsarchitecture and each of its building blocks.13 For details of the demand paging system and its benefits, see www.iqmagazineonline.com/article.php?crumb=SEARCH&issue=23&article id=706.2Multimedia ArchitectureThe current multimedia architecture was introduced in Symbian OSv7.0s and has been extended and improved in subsequent releases.This chapter provides an overview of the architecture and its underlyingfunctionality, followed by a description of the separate parts of themultimedia subsystem and the associated multimedia APIs available.Among other things, the Symbian OS multimedia APIs can be used to:play and record audio and video data; perform image manipulation andprocessing; access the camera hardware; access the radio tuner hardware.However, before getting into the Symbian OS multimedia architecture,we take a quick look at the following Symbian OS concepts that arecommonly used while writing a multimedia application:• ECOM – a framework which allows an easy way to write extensibleapplications• platform security – a significant addition to Symbian OS v9, providinga defense mechanism against malicious or badly written code• the Content Access Framework (CAF) – a framework which providesapplications with a common method of accessing content whereverand however it is stored on the device.2.1 The ECOM FrameworkThe ECOM framework is the Symbian OS plug-in framework.
It is intendedto be synonymous with Microsoft’s Component Object Model (COM)architecture, with the first letter coming from the original name of SymbianOS – EPOC32 – by convention with other Symbian components, such asESock, ETel and EKern.A plug-in is a way to extend the functionality of an application byallowing different implementations of a defined interface to be provided.16MULTIMEDIA ARCHITECTUREMany Symbian OS system services use ECOM plug-ins; for example, themessaging architecture uses ECOM plug-ins to extend support for newmessage types and the socket server uses plug-ins to provide support fordifferent networking protocols.
Of more relevance to this discussion, theSymbian OS multimedia framework (Section 2.4.1) uses ECOM plug-insto enable the playback and recording of different audio and video formats,while the image conversion library (Section 2.4.3) uses ECOM to providesupport for image formats, such as JPEG, PNG and TIFF.Using a framework that allows the loading of custom modules meansthat Symbian OS can be extended by phone manufacturers and thirdparties. Support for different multimedia formats can be added as necessary, independent of the general multimedia implementation supplied bySymbian OS.On early versions of Symbian OS, different multimedia formats werehandled through the use of generic polymorphic interface DLLs and amultimedia framework that was able to discover and instantiate eachavailable implementation.
ECOM provides a further abstraction and themultimedia subsystem no longer takes responsibility for determiningwhich plug-ins are available, deferring instead to ECOM.ECOM provides a single mechanism to:• register and discover interface implementations• select an appropriate implementation to use• provide version control for the plug-ins.In fact, an ECOM plug-in is just a particular type of polymorphic Symbian OS DLL, which is identified by a unique identifier built into the binarythrough the Symbian OS tool chain. Further detail about the role of ECOMwithin Symbian OS and how to write an ECOM plug-in can be foundwithin the Symbian Developer Library documentation, for example, inthe System Libraries documentation within the Symbian OS Guide.
Yourchosen SDK also provides an example ECOM plug-in implementation, inthe syslibs directory of the Symbian OS example set.2.2 Platform SecurityPlatform security was introduced in Symbian OS v9.1 in order to preservethe open nature of the platform, while protecting users from securitythreats (such as those typically seen with desktop computers).