21
HELSINKI UNIVERSITY OF TECHNOLOGY 3.12.2004 Telecommunications Software and Multimedia Laboratory T-111.550 Multimedia Seminar Fall 2004: Mobile Multimedia Application Platforms Microsoft Windows Mobile vs. Symbian Multimedia Juhani Nokela, 49539H Onni Valkeapää, 51505T

Microsoft Windows Mobile vs. Symbian Multimedia...Symbian OS is an open operating system for mobile phones. It is designed to work in environment set by 2G, 2,5G and 3G mobile phone

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Microsoft Windows Mobile vs. Symbian Multimedia...Symbian OS is an open operating system for mobile phones. It is designed to work in environment set by 2G, 2,5G and 3G mobile phone

HELSINKI UNIVERSITY OF TECHNOLOGY 3.12.2004 Telecommunications Software and Multimedia Laboratory T-111.550 Multimedia Seminar Fall 2004: Mobile Multimedia Application Platforms

Microsoft Windows Mobile vs. Symbian Multimedia

Juhani Nokela, 49539H

Onni Valkeapää, 51505T

Page 2: Microsoft Windows Mobile vs. Symbian Multimedia...Symbian OS is an open operating system for mobile phones. It is designed to work in environment set by 2G, 2,5G and 3G mobile phone

1

Abstract

This paper introduces the Windows Mobile and Symbian OS platforms and compares their multimedia capabilities. It shows that although both platforms can perform basic tasks related to multimedia (e.g. audio playback) their features are more constrained when it comes to playing video or drawing more than just basic graphics. The paper also shows that the basic working model behind the platforms is fundamentally different from each other; being a company owned by six large mobile phone manufacturers, Symbian targets at more open software development, while Windows Mobile is strictly controlled by one company, that is, Microsoft. In the beginning of the paper a broad overview of the background of the technologies is given and after that a more detailed technological description is provided. The comparison of the technologies is done using simple programming examples. Finally main findings are summarized.

TABLE OF CONTENTS

1 Introduction .......................................................................................................... 2 2 Background........................................................................................................... 2

2.1 Microsoft Windows Mobile ......................................................................... 2 2.2 Symbian OS.................................................................................................. 2

3 Technology description ........................................................................................ 3 3.1 Microsoft Windows Mobile ......................................................................... 3

3.1.1 .NET Compact Framework................................................................... 3 3.1.2 Microsoft Smartphone .......................................................................... 4 3.1.3 APIs for Microsoft Smartphone............................................................ 5 3.1.4 Windows Media Player......................................................................... 5

3.2 Symbian OS.................................................................................................. 5 3.2.1 Symbian OS v7.0s ................................................................................ 5 3.2.2 Multimedia Framework (MMF) ........................................................... 7 3.2.3 Future: Symbian OS v8.0 ..................................................................... 8

4 Comparisons, Programming examples ................................................................. 9 4.1 Audio ............................................................................................................ 9

4.1.1 Microsoft Smartphone: Playing and Recording Sounds....................... 9 4.1.2 Symbian OS v.7.0: Playing and Recording Sounds............................ 10

4.2 Video .......................................................................................................... 12 4.2.1 Video playback in Microsoft Smartphone.......................................... 12 4.2.2 Video playback in Symbian OS v.7.0................................................. 13

4.3 Graphics...................................................................................................... 13 4.3.1 Graphics in Microsoft Smartphone..................................................... 13 4.3.2 Graphics in Symbian OS v.7.0s.......................................................... 13

4.4 Games ......................................................................................................... 14 4.4.1 Smartphone Game Programming ....................................................... 14 4.4.2 Symbian OS v.7.0 game programming............................................... 15

5 Summary............................................................................................................. 16

Page 3: Microsoft Windows Mobile vs. Symbian Multimedia...Symbian OS is an open operating system for mobile phones. It is designed to work in environment set by 2G, 2,5G and 3G mobile phone

2

1 INTRODUCTION

This paper gives an overview of the technologies used in Microsoft Windows Mobile and Symbian OS software platforms. It focuses on the multimedia features of both systems and provides a comparison between them. Because the Symbian OS is primarily used in devices closely resembling more conventional mobile phones, the paper focuses on Windows Mobile’s Smartphone platform, which is targeted at the same kind of devices. The paper first discusses the operating system related features and after that, moves on to multimedia. At the end of the paper, simple programming examples are used to demonstrate the multimedia capabilities of systems.

2 BACKGROUND

2.1 Microsoft Windows Mobile

Windows Mobile [14] is Microsoft's software platform for Pocket PCs and Smartphones. It is designed to extend the familiarity of the Windows desktop environment to mobile devices, in terms of system development and usability. Windows Mobile is based on Windows CE operating system [34], which has been a stepping-stone for Microsoft to mobile systems.

There are currently three versions of Windows Mobile on the market: Windows

Mobile 2002, Windows Mobile 2003 and Windows Mobile 2003 Second Edition. The most significant difference between the versions 2002 and 2003 is the latter’s support for Microsoft’s .NET Framework [12], which is a managed execution environment for applications. In mobile devices, a scaled-down version of .NET Framework is used. The newest version of Windows Mobile, i.e. Windows Mobile 2003 Second Edition, is based on Windows CE version 4.21. At the time of writing, Windows CE 5.0 is on its way to markets. Along with the new version, comes an updated version of .NET Compact Framework [21].

2.2 Symbian OS

Symbian OS is an open operating system for mobile phones. It is designed to work in environment set by 2G, 2,5G and 3G mobile phone requirements. The operating system is owned by a software licensing company called Symbian and in this is owned by some of the leading mobile phone manufacturers with following shares: [26]

- Nokia 47,9 % - Ericsson 15,6 % - Sony Ericsson 13,1 % - Panasonic 10,5 % - Siemens 8,4 % - Samsung 4,5 % In addition to its owners the operating system has been licensed to six other

companies that develop mobile phones around the world. Altogether these companies promote 21 phones and more is coming out all the time. Maybe the most well known Symbian phones are Nokia Communicator 9290, Nokia 7650, Sony Ericsson P800 and Siemens SX1.

Page 4: Microsoft Windows Mobile vs. Symbian Multimedia...Symbian OS is an open operating system for mobile phones. It is designed to work in environment set by 2G, 2,5G and 3G mobile phone

3

At the moment there are three versions of Symbian shipping out in phones. The older

one, version 6.0 is slowly fading away, but still in use for example in Nokia Communicators. More relevant versions for today’s mobile communication are version 7.0 and especially version 7.0s. The biggest difference between versions 7 is that the s-version supports Java MIDP 2.0 and a completely new Multimedia Framework (MMF) is included [29]. Symbian has also released two new versions of the operating system, which are known as versions 8.0 and 8.1. For these versions there are only Nokia 6630 phone out that include version 8.0.

3 TECHNOLOGY DESCRIPTION

3.1 Microsoft Windows Mobile

3.1.1 .NET Compact Framework

.NET Framework [12] is an integral Windows component for building and running different kinds of software, including web-based applications and XML Web services. Various programming languages can be used in .NET development by using compilers designed for .NET Framework. Core of the .NET Framework is composed of the Common Language Runtime (CLR) and the Framework Class Libraries (FCL). The former is a programming language independent development and managed execution environment and the latter a set of prewritten services, which provide the basic functionality used in applications [37].

Fundamental working model of the .NET Framework and its CLR resembles

concepts used e.g. in Java Virtual Machine [12]. CLR’s purpose is to execute the code written for it – no matter what programming language is used. In other words, each CLR-compatible programming tool compiles its source code to a .NET executable, standardized Microsoft Intermediate Language (MSIL). When the application is finally executed, .NET Framework transforms the semi-compiled MSIL-code into a native code. This phase is called just in time compilation [32].

The Common Language Runtime is a key element of .NET Framework. It serves as a

mediator that manages code at runtime and provides applications with basic services, ranging from memory management to security issues [37]. Applications developed for .NET Framework are knit together with the runtime, and their code is called managed [37]. Code that does not target the runtime, i.e. unmanaged code, can also benefit from the managed features by loading CLR into its processes [37].

.NET Compact Framework [21] is a mobile-oriented version of the full .NET Framework. It uses a subset of .NET Framework’s FCL, which is adapted to be used with mobile devices with constrained features and resources. To minimize the battery consumption, .NET Compact Framework is optimized to avoid heavy use of RAM and CPU cycles [37]. CLR of .NET Compact Framework is approximately 12 percent the size of that used in full .NET Framework [22]. It is estimated, that Microsoft Smartphone, which uses the .NET Compact Framework, holds about one third of the 1500 interfaces used in traditional desktop Windows [32].

Page 5: Microsoft Windows Mobile vs. Symbian Multimedia...Symbian OS is an open operating system for mobile phones. It is designed to work in environment set by 2G, 2,5G and 3G mobile phone

4

Being a subset of .NET Framework, .NET Compact Framework allows the

programming tools of desktop environments to be used in mobile system development. Clear benefit of this relationship is the ability to exploit more wide-spread programming skills of desktop environments in mobile platform programming. On the contrary, as the .NET Compact Framework is more or less scaled-down version of the desktop system, some of the distinctive characteristics of mobile environment may not receive sufficient attention due to the changed purpose of use [32].

3.1.2 Microsoft Smartphone

Smartphone is a mobile device, which combines features and functionality of mobile phone and personal digital assistant (PDA). Microsoft Smartphone [36] is a software platform, which is built on Windows Mobile and .NET Compact Framework. Microsoft also offers a platform called Pocket PC, which is targeted at the PDAs and is similar to the Microsoft Smartphone. The difference between a Smartphone and PDA stems from their usage characteristics. Smartphone is primarily used as a mobile phone and therefore the Microsoft Smartphone is well tuned for tasks such as messaging and making calls [21]. Unlike the PDA, it is also designed to be used with one hand.

Currently, there are two development options available by Microsoft for

programming Smartphone 2003. One is to write native code using Microsoft’s embedded Visual C++ 4.0 and the other is to write managed code through Visual Studio .NET 2003. In both cases, a Smartphone 2003 software developer kit (SDK) is needed. Figure 1 show the Smartphone emulator, which can be used to test applications.

Figure 1: Microsoft Smartphone emulator

Page 6: Microsoft Windows Mobile vs. Symbian Multimedia...Symbian OS is an open operating system for mobile phones. It is designed to work in environment set by 2G, 2,5G and 3G mobile phone

5

3.1.3 APIs for Microsoft Smartphone

Microsoft Smartphone platform provides system developers with set of APIs especially designed to exploit the capabilities of Smartphone devices. Smartphone API [37] provides tools, among other things, for connectivity, messaging, telephony and multimedia. Microsoft Smartphone’s multimedia-related APIs are listed in the table 1 [37]. For each API, a short description of its key features is given.

Table 1. Multimedia-related APIs of Microsoft Smartphone API Key features Game API (GAPI) Game API provides functions and structures which are

specially needed in games-programming. The most important features of GAPI are related to handling the device’s display and hardware keys.

MIDI API MIDI API is used to play MIDI file in Smartphone device. File is played by converting it to a specific WAV-format.

Vibrate API Vibrate API provides functions to control the vibration feature of the device. In Smartphone, vibration is defined as song, and with vibrate API song’s amplitude, frequency and duration can be controlled.

Voice Recorder Control API Voice Recorder Control API is used to record voice and sounds. It contains a function, which is used to start and stop the recording as well as playing the sound recorded.

3.1.4 Windows Media Player

Windows Mobile 2003 includes Microsoft’s Windows Media Player (WMP) [35], which is an application used to play different kinds of audio and video files. There are different versions of WMP, Smartphone 2003 uses the version 9 [35]. The WMP in Smartphone supports the Windows Media audio and video playback as well as MP3 playback, but for example MPEG1 and AVI playback are not supported.

Windows Media Player control is a set of APIs that can be used to add the

multimedia playback capabilities of Windows Media Player to applications and web pages [35]. Windows Mobile 2003 supports the WMP ActiveX controls embedded in web pages, but does not offer any WMP APIs to be used with applications [35].

3.2 Symbian OS

3.2.1 Symbian OS v7.0s

Symbian operating system v.7.0s is an improved version of 7.0. Especially multimedia capabilities have been improved to the s-version. Some of they key aspects of the whole operating system is, that it is fully multi-tasking and has an open application environment that supports some of the most common standards in the industry (for example Java’s J2ME) [29]. The user interface has not been standardized in Symbian, so all the manufacturers can develop their own. The most used user

Page 7: Microsoft Windows Mobile vs. Symbian Multimedia...Symbian OS is an open operating system for mobile phones. It is designed to work in environment set by 2G, 2,5G and 3G mobile phone

6

interface in Symbian phones is Nokia’s Series 60 that has been licensed also outside Nokia [33].

Symbian has been designed especially for mobile phones, so all the different parts of

the architecture have been thought that in mind. The architecture Symbian uses can be found from figure 2 [29] and from there can be seen, that telephony part has been isolated from the other parts, so they won’t interfere with it.

Figure 2: Symbian OS architecture For the developers the native language of Symbian is C++ and there is available for

example a development environment from Borland called C++BuilderX Mobile Edition 1.5. In addition to C++ Symbian also supports Java in the Application framework [27]. This framework supports different kind of user interfaces, internationalization and runs all the applications as separate processes as the operating system is fully multi-tasking [29].

Symbian offers to its licensees and development partners Symbian OS kit that is

focused for developing the applications with C++. The C++ used in Symbian is not a pure C++, but its dialect called Symbian C++. For most of the users this is not a problem, but with some old gcc versions there might be problems. Also some differences are in the memory allocation as the standard C++ is not efficient enough due to the constraints in mobile devices [32].

In Java world Symbian supports MIDP v.2.0 with CLDC and in Communicators also

PersonalJava with JavaPhone. The MIDP (The Mobile Information Device Profile) with the CLDC (Connected Limited Device Configuration) are an integral part of Java 2 Platforms Mobile Edition (J2ME) [24]. Together these ensure that standard Java runtime environment can be used in Symbian phones and this gives wide range of

Page 8: Microsoft Windows Mobile vs. Symbian Multimedia...Symbian OS is an open operating system for mobile phones. It is designed to work in environment set by 2G, 2,5G and 3G mobile phone

7

different Java APIs available to developers. MIDP also offers wide range of multimedia support that will make developing different multimedia applications and games much easier.

Sun has made a preannouncement that PersonalJava with JavaPhone will be soon in

the End Of Life (EOL) [25] and in the Symbian world it has been just in the Communicators as it is much too heavy for lightweight mobile phones.

In addition to C++ and Java supports OPL (Open Programming Language) that

Symbian has made open source. This language is supposed to be a powerful but relatively easy programming language. It is a basic like language that has been used for over 60 applications in the open source community [16]. Also a company named AppForge has made a development tool called CrossFire that makes possible to write .NET applications to Symbian [34]. However, major part of the application development in Symbian world is concentrated to C++ and Java.

3.2.2 Multimedia Framework (MMF)

The Multimedia Framework (MMF) in Symbian OS v.7.0s was totally new compared to old versions. This framework is lightweight and provides multi-threaded environment for handling different kind of multimedia data. As today’s phones need a lot of multimedia capabilities MMF was made to support audio and video playback, streaming and recording. It also includes Image Conversion Library (ICL) that supports the most basic image types and more types can be added later through the third party plug-ins [29]. Architecture of MMF is illustrated in figure 3 [29].

Figure 3: Architecture of MMF in Symbian OS v7.0s

Page 9: Microsoft Windows Mobile vs. Symbian Multimedia...Symbian OS is an open operating system for mobile phones. It is designed to work in environment set by 2G, 2,5G and 3G mobile phone

8

As from the figure 3’s ICL can be seen, the framework has been made so that third

parties can add supports to new file types later and therefore the framework is very extensible. To support the plug-in architecture there are different kinds of abstract and concrete classes that would help to create new plug-ins to support new media types. In here one can see the nature of Symbian as it is made to support the standards and is suppose to be an open environment for everyone. The framework nature also makes possible a concurrent processing of multiple multimedia data streams [29].

Lowest level in the framework is Media Support Library that at the moment only

supports audio through the DevSound. This level only supports streaming and some coded media formats that need hardware accelerator [32]. DevSound API offers wide range of different playbacks due to historical reasons as it can play tones for example.

In the next level there are different plug-ins for midi, audio, video, speech

recognition and camera. The plug-in for camera only makes available a small API to use onboard camera so the basic camera functions can be used. Midi client is just a straightforward API to support playback and Midi events. The difference between audio and video is that the Symbian provides an audio engine that support some of the audio types historical used in phone industry (WAV, AU, AIFF, PCM, A-Law, u-Law, GSM 6.10 etc), for the other types like MP3 and AAC there is an interface for third party engines, for the video support there is no engine supported by Symbian so it is completely dependent on RealOne’s, PV’s or some other vendors engine [32].

3.2.3 Future: Symbian OS v8.0

Symbian has released two new versions of its operating system that are 8.0 and 8.1. Nokia’s new 6630 phones have the 8.0 version but no other phones are shipping out yet. The difference between these two versions is not in the multimedia side, so the focus is in 8.0 in this paper.

The key updates in 8.0 are hard realtime capabilities in kernel, major upgrade in Java

to support for example 3D, OpenGL support and addition of Media Device Framework (MDF), which provides Hardware Abstraction Layer for multimedia hardware acceleration. Also some other enchantments have been made [30].

The improvements in kernel have been made so the performance of the Symbian OS

is improved and the manufacturers can use “single core” processors that integrate telephony and application processing. With this improvement the manufacturing costs of the phones can be reduced [30].

In Java side there are made a lot of improvements. New version of CLDC 1.1 and

some JSRs that include for example Mobile Media and 3D graphics are provided, so the functionality of Java is increased a lot. At the same time that the capabilities of Java are improved it is also made possible to scale applications, better than before, to different devices as the performance of the mobile phones can vary a lot [30].

3D support for mobile gaming and multimedia is also offered by offering OpenGL

ES API support. This probably is especially interesting for game manufacturers as this

Page 10: Microsoft Windows Mobile vs. Symbian Multimedia...Symbian OS is an open operating system for mobile phones. It is designed to work in environment set by 2G, 2,5G and 3G mobile phone

9

improves a lot the graphical capabilities of mobile phones. The Media Device Framework offers an abstraction layer for hardware so

manufacturers can easily take advantages of the new hardware technologies without fearing that the investments made in software is lost. This framework offers support for video, audio and voice recognition, so it is seen as a major improvement in the industry by accelerating the time to market for new devices [22].

4 COMPARISONS, PROGRAMMING EXAMPLES

4.1 Audio

4.1.1 Microsoft Smartphone: Playing and Recording Sounds

There are two different ways of playing waveform sounds in applications designed for Windows CE based Smartphones. One is to use PlaySound-function [33] which provides basic and simple way for playing sounds. The other is to exploit the Waveform Audio API interface [21], which gives an exact control over possible audio I/O devices. It allows both playback and recording of sounds. The following code examples demonstrate the use of PlaySound-function: // plays the sound-file “sound.wav” stored in device’s memory: PlaySound (TEXT("\\SOUND.WAV"), NULL, SND_SYNC);

// plays the sound which is associated with the event “ButtonClick” in

// system registry:

PlaySound (TEXT("ButtonClick"), NULL, SND_SYNC);

Waveform Audio Interface provides another way to play sounds. It gives an extensive control over the audio devices available, but is to a certain extent more complex to use than PlaySound. Waveform Audio Interface uses Platform Invoke (P/Invoke) mechanism [21] to access the sound playing features provided by Windows CE, not available directly through .NET Compact Framework. The process of playing or recording a sound with Waveform Audio Interface can be divided into separate stages. First step is to determine which audio I/O devices are available at the current system. After that a waveform device for playback or recording must be opened. Before the file can be played or sound recorded, memory must be allocated for audio data blocks. After that the playback or recording can begin. The following simplified example demonstrate the use of Waveform Audio Interface: // Wave file is played using the WaveOut-class, which provides a

// simple interface for playing audio-files:

WaveOut wo = new WaveOut();

// File is played using the Play-method. Parameters are: file name to

// be played, audio buffer size, volume for the left/right channel:

wo.Play(fileName, 512*1024, 0xffff, 0xffff);

Page 11: Microsoft Windows Mobile vs. Symbian Multimedia...Symbian OS is an open operating system for mobile phones. It is designed to work in environment set by 2G, 2,5G and 3G mobile phone

10

// Recording of a sound is done using the WaveIn-class, which is

// similar to the WaveOut:

WaveIn wi = new WaveIn();

// Before the recording can begin, the Preload function must be called

// to initialize the buffers and sound system. Parameters are: maximum

// recording length (ms), buffer size:

wi.Preload(3000, 256*1024);

// The recording is started using Start method and stopped/saved using

// the Save method:

wi.Start();

wi.Save(fileName);

4.1.2 Symbian OS v.7.0: Playing and Recording Sounds

Symbian offers a various ways to play different types of audio even without third-party plugins. WAV-files can be easily played with C++ application as the operating system does most of the work. However, the more interesting part for Symbian is the Java support so here it is shown how an audio file is played using the Mobile Media API. [35]

import javax.microedition.media.*;

import javax.microedition.media.control.*;

import java.io.*;

public class AudioPlayer implements Runnable {

private MIDletController controller;

private Player player;

private VolumeControl volumeControl;

private String url;

// This makes reference to controller so AudioPlayer can

// make call backs

public AudioPlayer(MIDletController controller)

{

this.controller = controller;

}

// This initialization puts the player to separate thread

public void initializeAudio(String url)

{

this.url = url;

Thread initializer = new Thread(this);

initializer.start();

}

// In the run method the actual moving of the player through

Page 12: Microsoft Windows Mobile vs. Symbian Multimedia...Symbian OS is an open operating system for mobile phones. It is designed to work in environment set by 2G, 2,5G and 3G mobile phone

11

// its states is done. First a player is created to with a

// source url. Then additional initializations are done

// including setting the volume and finally the player is

// started

public void run()

{

try {

player = Manager.createPlayer(url);

controller.updateProgressGauge();

player.addPlayerListener(controller);

player.realize();

controller.updateProgressGauge();

player.prefetch();

controller.updateProgressGauge();

volumeControl =

(VolumeControl)player.getControl("VolumeControl");

volumeControl.setLevel(50);

controller.updateProgressGauge();

player.start();

} catch (IOException ioe) {

controller.showAlert("Unable to connect to resource"

, ioe.getMessage());

} catch (MediaException me) {

controller.showAlert("Unable to create media player"

, me.getMessage());

}

}

// This is for a restart of the player if needed

public void replay()

{

try{

player.start();

} catch (MediaException me) {

controller.showAlert("MediaException thrown",

me.getMessage());

}

}

// This is for setting the volume right

public void setVolume(int level)

{

volumeControl.setLevel(level);

}

// This is for closing the player

Page 13: Microsoft Windows Mobile vs. Symbian Multimedia...Symbian OS is an open operating system for mobile phones. It is designed to work in environment set by 2G, 2,5G and 3G mobile phone

12

public void close()

{

player.close();

controller = null;

url = null;

}

} MIDP also offers a way for capturing audio from an onboard hardware. The record of

a media is from any input and the media playback does not necessary have to be supported. Here is a short fragment of a code that records five seconds from audio device. [35]

try {

// Create a Player that captures live audio.

Player player = Manager.createPlayer("capture://audio");

player.realize();

// Here a recordcontrol is obtained from the player and used

// for to record audio from device

RecordControl rc =

(RecordControl)player.getControl(“RecordControl”);

ByteArrayOutputStream output = new ByteArrayOutputStream();

rc.setRecordStream(output);

player.prefetch();

// this will start recording if the player has started already

// otherwise it waits for the player to start

rc.startRecord();

player.start();

Thread.currentThread().sleep(5000);

rc.commit();

player.close();

} catch (IOException ioe) {

} catch (MediaException me) {

} catch (InterruptedException ie) {

}

4.2 Video

4.2.1 Video playback in Microsoft Smartphone

Windows Mobile supports video playback in Smartphone devices through the Windows Media Player (WMP) [35]. It supports video formats, which are encoded using Windows Media format (.wmv) or Advanced System Format (.asf). The latter is a specification, which allows video content, compressed with a wide variety of different

Page 14: Microsoft Windows Mobile vs. Symbian Multimedia...Symbian OS is an open operating system for mobile phones. It is designed to work in environment set by 2G, 2,5G and 3G mobile phone

13

codecs, to be stored in ASF-file and played back in WMP [14]. Playback of AVI and MPEG-1 video files is not supported in WMP of Microsoft

Smartphones. There is however some third-party video player applications, which can be installed in Smartphone. PocketTV [21] is a movie player for PocketPC and Smartphone devices, which enables the playback of MPEG-1 video. DVD-to-Smartphone [6] is software, which can be used to watch DVD-movies in Smartphone. It converts and compresses the DVD-video to MPEG-4 format, allowing the data of original video to fit in small capacity memory cards used in Smartphones.

4.2.2 Video playback in Symbian OS v.7.0

As mentioned earlier Symbian, does not support native video playback. There are still third-party plugins for example RealOne’s player, Packet Videos pvPlayer and an open-source project Helix. These players support variety of media types for example realvideo, MPEG-4, H.263 etc. There is also a SmartMovie video player and converter where one can convert the video in computer and then watch it in Symbian phone. This player uses Xvid codec and the converter uses DirectShow codecs so one can download any codec from Internet to create a video for Symbian. [23]

It is also possible to make a MIDlet as in audio part that creates a video player by

using the Mobile Media API. However, the 7.0s version includes only a subset of Mobile Media API and that does only support audio playback, volume control and tone generator [35]. The version 8.0 however includes the full support for Mobile Media API.

4.3 Graphics

4.3.1 Graphics in Microsoft Smartphone

.NET Compact Framework’s graphics-related features are constrained compared to those in full .NET Framework. Although .NET Compact Framework supports basic drawing primitives and their fill methods (i.e. ellipse, line, image, polygon, rectangle, string, and region) [36], more complicated methods for drawing, filling and transforming, as well as 3d are not supported. .NET Compact Framework is able to create transparency using the color key, but neither alpha blending nor pixel-by-pixel blending of source and background colors is supported.

Smartphone’s game API (GAPI) [31] enables direct access to device’s display and

video frame buffer memory, which provides a way to create faster animated graphics (see section 4.4.1). Although it is originally designed for games development, it is equally useful in applications, which require fast graphics and ability to use the entire display area.

4.3.2 Graphics in Symbian OS v.7.0s

Symbian uses shared heap to share applications access to screen, keyboard, pointing devices, scalable fonts, and bitmaps. Also a generic framework, the Graphics Device Interface (GDI), is provided for drawing to any graphics device. It can be also used to drawing to windows, bitmaps or printers [29].

Page 15: Microsoft Windows Mobile vs. Symbian Multimedia...Symbian OS is an open operating system for mobile phones. It is designed to work in environment set by 2G, 2,5G and 3G mobile phone

14

For mobile phones the readability of the text is very important, as many times the

size of the display is small, in Symbian this problem is solved by supporting anti-aliasing for all text types. As there is no 3D support in version 7.0s the 2D graphics has still a hardware accelerator support in HAL (Hardware Abstract Layer). This feature supports for example following operations: rectangle fill, polygon drawing and rectangle invert [29].

Prior to Symbian 7.0 there was not a direct screen access implemented to Symbian. In

the version 7.0 this enchantment was made so no tricks are needed anymore to bypass the window server. Symbian has two ways for easy direct screen access. CdirectScreenAccess is a classic way, which hides the complexity and gives structured callbacks. Another way is to use RdirectScreenAccess that is not an active object so developer has to develop a way to handle asynchronous nature of the Window server that CdirectScreenAccess does automatically [28].

4.4 Games

4.4.1 Smartphone Game Programming

Microsoft Smartphone’s game API (GAPI) [37] provides functions to be used especially in games programming. It can also be exploited in applications where the whole display area is needed or in applications, which need the exact control over the device’s hardware keys. GAPI addresses the need for fast graphics by allowing direct access to the display’s video frame buffer memory. It hides the operating system’s menu bar and thus allows the whole display to be used for game application. For controlling the game, GAPI allows applications to take control of the hardware keys. Smartphone APIs can also be used to add effects, such as flashing display’s backlight and vibrating the device.

The following code example shows how the most common GAPI functions are used

in game application. Comments explain the purpose of each function: // Device’s display can be set to full screen mode by using the

// GXOpenDisplay function. The same function ensures exclusive access

// to the video frame buffer. When the GX_FULLSCREEN parameter is

// used, hWnd is a handle to full screen mode:

GXOpenDisplay(hWnd, GX_FULLSCREEN);

// Device’s display-properties can be accessed using the

// GXGetDisplayProperties-function, which returns a structure with

// detailed information about the display hardware:

GXDisplayProperties gx_displayprop;

gx_displayprop = GXGetDisplayProperties();

// Button-handling can be taken over by using GXOpenInput-function.

// All hardware button presses generate appropriate messages to the

// application instead of being sent to shell:

GXOpenInput();

Page 16: Microsoft Windows Mobile vs. Symbian Multimedia...Symbian OS is an open operating system for mobile phones. It is designed to work in environment set by 2G, 2,5G and 3G mobile phone

15

// Most suitable control layout for a game can be switched on

// using the GXGetDefaultKeys-function, which returns a list of

// virtual key codes. For example, the virtual key “vKA” is a key

// code of the best key to use for “shoot” or “jump” button in a game.

// Parameters define the orientation of the device;

// GX_NORMALKEYS corresponds to portrait orientation, GX_LANDSKAPEKEYS

// to landscape orientation

GXKeyList gx_keylist;

gx_keylist = GXGetDefaultKeys(GX_NORMALKEYS);

// The GXBeginDraw function prepares the display for drawing. It

// returns a pointer to the start of display memory:

unsigned short *buffer = (unsigned short*)GXBeginDraw();

// GAPI operations can be suspended and resumed using GXSuspend and

// GXResume functions respectively:

GXSuspend();

GXResume();

// The drawing can be finished and resources released using the

// following functions:

GXEndDraw();

GXCloseInput();

GXCloseDisplay();

4.4.2 Symbian OS v.7.0 game programming

For Symbian the release of version 7.0s was a major when thinking about the support to gaming. MIDP 2.0 and MMF offer a various ways to make games for any Symbian phone. Even a pure handheld console Nokia N-Gage is based on Symbian architecture. However the operating system in that is the older version 6.1.

As Symbian does not offer any API just for game developing the Java support is big

boost for game developing. There are a lot of games even today that can be easily ported to Symbian, thanks to its Java capabilities.

As Symbian’s native language is C++ there are many games developed in that

environment too. Especially as the C++ code is more efficient, as its native to Symbian, there is also a lot of development done in that side. Of course the trouble in that, is that there is no common user interface, but at the moment Nokia’s Series 60 has gained popularity, so this is a possible solution for the problem.

The following code is an example from a bouncing ball application. In this short code

we do the following things: [28] - clean up the previous position of our ball on screen - update the position of the ball - copy the image of the ball to the new position - flush the screen buffer

Page 17: Microsoft Windows Mobile vs. Symbian Multimedia...Symbian OS is an open operating system for mobile phones. It is designed to work in environment set by 2G, 2,5G and 3G mobile phone

16

- reset the timer

void CDDBouncingBallEngine::RunL()

{

// Force screen update: this required for WINS, but may

// not be for all hardware

iDirectScreenAccess->ScreenDevice()->Update();

TRect sourceRect(iPosition,iBallImage->SizeInPixels());

iGc->Clear(sourceRect);

// Update the balls position

MoveBall();

// and draw ball

iGc->BitBlt(iPosition, iBallImage);

iClient.Flush();

// Renew request

After(TTimeIntervalMicroSeconds32(KGenerationInterval));

}

5 SUMMARY

There is a big difference in the way of thinking between the Symbian and Microsoft world. As the Symbian is very modular and support wide variety of plugins and even promotes the third parties to do these, Microsoft wants to keep as much as possible to their own. Of course, this is partly due also to their different ownership. As the Microsoft is a normal limited company the Symbian is a joint-company of six big mobile phone companies.

Both sides of these have their pros and cons. With open standards the Symbian lures

the open source community and small businesses to develop a lot of different applications. In the other hand, Microsoft way of protecting its own software also makes application developers safer as they have to follow just one company, not many smaller ones.

The other big difference comes from the developing environment. Microsoft

promotes its own .NET architecture also in the mobile side as the Symbian tries to get all the best from the Java world, by following the latest standards in that. Symbian also has other developing environments, but these are not promoted as much as the Java. One could even say, that Symbian is trying to get the lead with so fashionable J2EE, J2ME and other Java speak. As a minor notice the open standards idea of Symbian can be seen from the Appforges Crossfire application that will bring .NET developing to Symbian.

The support for audio is in decent level already in mobile phones. Both systems have

ways to play different audio files and complete control through APIs to audio devices onboard. In a future there will not probably be any big differences in this side, as most

Page 18: Microsoft Windows Mobile vs. Symbian Multimedia...Symbian OS is an open operating system for mobile phones. It is designed to work in environment set by 2G, 2,5G and 3G mobile phone

17

of the limitations are due the mass memory and headphones that are not the issues of operating system.

In the graphics side the battle is just going to begin. As in the past there have not

really been 3D graphics, but for the future versions it is coming. Symbian already has a full steam promoting its OpenGL support in the 8.0 versions and Microsoft is probably very close too especially in its Windows CE 5.0 operating system. For consumers it is interesting to see, do we get the same kind competition as in the PC market where the difference is made in the hardware. The safer bet for direction is the way gaming consoles are coming. For few years there is always some kind of standard before the evolution takes a leap.

Video has been said to be the killer application in 3G mobile phoning. It is not yet

reclaimed its promises as the display side and the size of the video file has been too big for video. From today’s phones this can be seen also, as neither of the systems offer native support for example MPEG-video. This support is however supported through third party applications and for the both there is also a way to convert DVDs to mobile phones This can be seen mainly just a geek playing with the latest technology, but sure it is some kind of mark for what is coming.

In gaming there is one big difference. Symbian doesn’t offer anything just for the

game developing, even though it is promoting all kind of development in that side. In the contrast Microsoft is offering an API just for games in Smartphone. Symbian is still not weaponless in this issue as its offers Java support that makes available a lot of features that support game development.

It can be said, that both systems offer more common features especially in

multimedia side than differences. It can be seen, that Microsoft still believes its own power, but not as much as in the computer side. Of course, this is due the fact that Microsoft is the challenger with its Smartphone to the old mobile phone companies that try to keep Microsoft away from the phone industry.

REFERENCES

[1] Advanced Systems Format (ASF) Specification http://www.microsoft.com/windows/windowsmedia/format/asfspec.aspx [2] Appforge http://www.appforge.com/ [3] Crooks, Clayton E. 2003. Developing Tablet PC applications. Charles River Media. pp 37-38 [4] Developing Applications for Windows Mobile: FAQ http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnppcgen/html/devmobfaq.asp [5] Differences between the .NET Compact Framework and the full .NET Framework http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_evtuv/html/etcondifferenceswithnetframework.asp

Page 19: Microsoft Windows Mobile vs. Symbian Multimedia...Symbian OS is an open operating system for mobile phones. It is designed to work in environment set by 2G, 2,5G and 3G mobile phone

18

[6] DVD-to-Smartphone http://www.smartphone.net/software_detail.asp?id=724 [7] Hiipakka, J. 2004. Symbian OS 7.0S - Multimedia Framework http://www.tml.hut.fi/Opinnot/T-111.550/T-111.550-20041019-Symbian.pdf [8] How to Create a Microsoft .NET Compact Framework-based Image Button http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetcomp/html/ImageButton.asp [9] Jakl, A. The workflow of C++ game development http://www.symbian.com/developer/techlib/papers/workflowcppgame/WorkflowOfGameDevelopment.pdf [10] Joende, M. Working with the Mobile Media API – Part 1 and 2 Part 1: http://www.symbian.com/developer/techlib/papers/Working_with_Mobile_Media_API.pdf Part 2: http://www.symbian.com/developer/techlib/papers/midptools/MobileMediapart2_v1.1.pdf [11] Microsoft .NET Compact Framework http://msdn.microsoft.com/smartclient/understanding/netcf/ [12] Microsoft .NET Framework Developer Center http://msdn.microsoft.com/netframework/ [13] Microsoft .NET Framework Technology Overview http://msdn.microsoft.com/netframework/technologyinfo/overview/default.aspx [14] Mobile and Embedded Application Developer Center http://msdn.microsoft.com/mobility/windowsmobile/default.aspx [15] NewLC - The Symbian OS C++ Developer Community http://www.newlc.com/ [16] OPL-dev project http://opl-dev.sourceforge.net/ [17] Overview of the .NET Framework http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpovrintroductiontonetframeworksdk.asp [18] Overview of Windows Media 9 Series http://www.microsoft.com/windows/windowsmedia/technologies/overview.aspx [19] PocketTV

Page 20: Microsoft Windows Mobile vs. Symbian Multimedia...Symbian OS is an open operating system for mobile phones. It is designed to work in environment set by 2G, 2,5G and 3G mobile phone

19

http://www.pockettv.com/ [20] Series60 platform http://www.series60.com/ [21] Recording and Playing Sound with the Waveform Audio Interface http://msdn.microsoft.com/mobility/samples/default.aspx?pull=/library/en-us/dnnetcomp/html/waveinout.asp#waveinout_topic_002 [22] Similarities between the .NET Compact Framework and the full .NET Framework http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_evtuv/html/etconsimilaritieswithnetframework.asp [23] SmartMovie http://www.lonelycatgames.com/mobile/smartmovie/smartmovie.html [24] Sun: J2ME Mobile Information Device Profile (MIDP) http://java.sun.com/products/midp/ [25] Sun: PersonalJava http://java.sun.com/products/personaljava/ [26] Symbian OS - the mobile operating system http://www.symbian.com/index.jsp [27] Symbian Developer Network http://www.symbian.com/developer/index.html [28] Symbian: Implementing Direct Screen Access http://www.symbian.com/developer/techlib/papers/dsa/direct_screen_access.pdf [29] Symbian OS Version 7.0s functional description http://www.symbian.com/technology/symbos-v7s-det.htm [30] Symbian OS Version 8.0 functional description http://www.symbian.com/technology/symbos-v8x-det.html [31] Technical Documentation for Windows Mobile http://msdn.microsoft.com/mobility/windowsmobile/howto/documentation/default.aspx [32] Mikkonen, T. 2004. Mobiiliohjelmointi. Gummerrus Kirjapaino Oy. pp. 13-15 [33] Using the PlaySound Function http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcewave/html/_wcesdk_using_the_playsound_function.asp [34] Windows CE Product Information http://msdn.microsoft.com/mobility/othertech/windowsce/default.aspx

Page 21: Microsoft Windows Mobile vs. Symbian Multimedia...Symbian OS is an open operating system for mobile phones. It is designed to work in environment set by 2G, 2,5G and 3G mobile phone

20

[35] Windows Media Overview and Optimization for Windows CE .NET 4.2 http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncenet/html/conwindowsmediaoverviewoptimizationforwindowscenet42.asp [36] Windows Mobile-based Smartphones http://www.microsoft.com/windowsmobile/smartphone/default.mspx [37] Windows Mobile-Based Smartphone API Reference http://msdn.microsoft.com/library/default.asp?url=/library/en-us/apisp/html/sp__windowsmobile_api_reference.asp