Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

Литература_1 / sys_arch

.pdf
Скачиваний:
44
Добавлен:
02.04.2015
Размер:
3.14 Mб
Скачать

2008, QNX Software Systems GmbH & Co. KG.

Widget library

Divider widget (PtDivider)

This powerful widget manages its children in a unique and useful way. When you place two or more widgets inside a divider widget, it automatically puts little separators in between the child widgets. Using these separators, the user can drag back and forth, causing the child widgets on either side of the separator to be resized. This is very useful for creating resizable column headings for lists. In fact, if you drop a divider widget into a list widget, it will automatically turn your simple list into a resizable multi-column list.

Dividers aren’t limited to just labels or buttons. Any widgets can be placed inside to create side-by-side resizable trees, scroll areas, and so on.

Trend graph widgets (PtTrend and PtMTrend)

Realtime systems often require trend graphs. Photon comes with a trend bar widget, PtTrend, that supports the display of multiple trend lines simultaneously. If your graphics hardware supports masked blits, it can even smooth-scroll the trend across grid lines. The PtMTrend widget has additional features, such as a trace line, which make it appropriate for medical applications.

October 16, 2008

Chapter 16 The Photon microGUI 263

Widget library

2008, QNX Software Systems GmbH & Co. KG.

Color-selection widgets (PtColorSel, PtColorPanel, PtColorPatch, PtColorSelGroup, PtColorWell)

Photon provides several handy controls for building color-selection dialogs. This convenient set of widgets includes PtColorPanel, a compound widget that provides several ways to easily select a color.

Web client widget (PtWebClient)

264

Chapter 16 The Photon microGUI

October 16, 2008

2008, QNX Software Systems GmbH & Co. KG.

Widget library

The PtWebClient widget is used to start, interact, and control a web browser. The widget also provides a user-defined area within the application for the server to format and display web pages.

The application controls the server by setting widget resources. The server communicates status information and user interaction back to the application using the widget callbacks. The PtWebClient widget transparently supports the version of HTML that the server supports.

Convenience functions

Once a widget has been created, you can take advantage of Photon’s convenience functions to easily set up dialogs and control the widget.

Here are some examples of common dialogs created using the following convenience functions in Photon’s widget toolkit:

PtFileSelection() — create a file-selector dialog

PtFontSelection() — display a modal dialog for selecting a font

PtPrintSelection() — display a modal dialog for selecting print options

PtAlert() — display a message and request a response from the user

PtNotice() — display a message and wait for acknowledgment by the user

PtPrompt() — display a message and get textual input from the user.

For more information about these functions, see the Photon Library Reference.

File-selection dialog (PtFileSelection())

The PtFileSelection() function incorporates a tree widget that displays files, directories, links to files or directories, and custom entries. Besides selecting a particular file in response to an application prompt, users can also navigate an entire filesystem and choose their own file and directory.

October 16, 2008

Chapter 16 The Photon microGUI 265

Widget library

2008, QNX Software Systems GmbH & Co. KG.

Font-selection dialog (PtFontSelection())

To accommodate the wide selection of fonts available, Photon provides a handy font-selector. The dialog displays a list of all available fonts and allows the user to choose the typeface and style (bold, italic, etc.) and to indicate whether the font should be anti-aliased.

Print-selection dialog (PtPrintSelection())

The print selector lets a user select a printer or control its properties. The user may also select a range of pages as well as the number of copies to print.

Alert dialog (PtAlert())

266

Chapter 16 The Photon microGUI

October 16, 2008

2008, QNX Software Systems GmbH & Co. KG.

Driver development kits

This modal dialog is useful for informing the user of some significant event and waiting for a response (e.g. clicking a button).

Notice dialog (PtNotice())

This dialog can display a message that may or may not require a response. This type of dialog often contains an “OK” button for the user to acknowledge the notice.

Prompt dialog (PtPrompt())

Like the alert dialog, the prompt dialog displays a message that requires the user to respond, but it also provides a field for inputting text within the dialog.

Driver development kits

As a product geared towards developers, Photon offers all the tools needed to build high-performance, accelerated graphics drivers that can be readily tailored for particular graphics cards and chipsets.

Developers will be able to create drivers that support advanced graphics techniques (e.g. alpha-blending or chroma-key substitution) through a software-only approach, a perfect fallback for “simple” hardware that doesn’t directly handle such techniques.

The Photon graphics driver development kit provides full source code for several sample drivers as well as detailed instructions for handling the hardware-dependent issues involved in developing custom drivers.

October 16, 2008

Chapter 16 The Photon microGUI 267

Summary

2008, QNX Software Systems GmbH & Co. KG.

Summary

Photon represents a new approach to GUI building — using a microkernel and a team of cooperating processes, rather than the monolithic approach typified by other windowing systems. As a result, Photon exhibits a unique set of capabilities:

Low memory requirements enable Photon to deliver a high level of windowing functionality to environments where only a graphics library might have been allowed within the memory constraints.

Photon provides a very flexible, user-extensible architecture that allows developers to extend the GUI in directions unique to their applications.

With flexible cross-platform connectivity, Photon applications can be used from virtually any connected desktop environment.

268

Chapter 16 The Photon microGUI

October 16, 2008

Chapter 17

Multimedia

In this chapter. . .

Overview 271

The MME resource managers 274

October 16, 2008

Chapter 17 Multimedia 269

2008, QNX Software Systems GmbH & Co. KG.

Overview

Overview

The QNX Aviage multimedia suite consists of several packages, including the multimedia core package, codec packages that provide WMA9, MP3, and AAC decoding and encoding, and software packages that support iPod and PlaysForSure media players.

The major component of the multimedia core package is the MultiMedia Engine (MME). The MME provides the main interfaces for configuring and controlling your multimedia applications. Designed to run on the QNX Neutrino OS, which can be installed on a wide variety of hardware platforms, the MME provides consumer-product developers a component-based solution that reduces the work required to develop and deliver multimedia products to their end customers.

 

HMI

 

 

 

QDB

 

MME API

 

 

 

 

 

 

 

 

mme

 

 

 

 

 

 

Output

 

 

io-media

 

devices

 

 

 

 

MME DB

 

 

 

 

 

 

 

 

Output

mediastores

Software

 

 

drivers

codecs

DSP/

 

 

library

Media output

 

io-fs-tmpfs

hardware

io-display

playing

 

 

 

io-audio

io-fs-pfs

codecs

 

...

 

 

...

 

io-fs-ipod

 

 

Mediastores

 

 

 

 

 

External

 

 

 

 

 

 

 

 

device

 

 

 

 

control

 

 

Source media data

 

 

 

High-level view of the MME components.

The MME is designed to simplify and speed development of end-user applications that require device and filesystem access, content synchronization, playback control, and audio and graphics delivery. It handles multiple clients, sessions and streams, and abstracts hardware and protocol dependencies from other functional areas. It provides integration with a wide variety of media sources, including those requiring Digital Rights Management (DRM), and provides a high-level API for media transport control, device control and browsing, and media library management; and it automatically detects media devices and integrates their contents into a general database view. The applications the MME can be used to develop include:

transport media systems

in-seat entertainment systems

October 16, 2008

Chapter 17 Multimedia 271

Overview

2008, QNX Software Systems GmbH & Co. KG.

medical device imaging and sound monitoring units

industrial control systems

The MME lets Human-Machine Interface (HMI) developers apply their talents to designing the best possible user experience instead of focusing on managing the media. When you build a client application that uses the MME, you can focus on:

designing and building the best possible user interface (HMI)

implementing simple playback functionality such as track session creation, “play”, “next”, “pause” etc.

configuring audio and video output

You need to know about the configurations for your system’s storage devices, but you can leave a long list of responsibilities to the MME:

device and mediastore insertion and removal — HDD, CD, DVD, USB key with media, etc.

mediastore synchronization — find, itemize, extract, and manage media content and metadata

input and output media connection management

extensible support for specialized consumer devices, as well as for hardware offload to digital signal processors (DSPs)

For a more in-depth description of the MME architecture, see Introduction to the

MME.

MME functional areas

The MME is designed to bring together media management and playback control, providing a single, consistent interface for client applications. Internally, it has the broad functional areas described below.

Mediastore access

Mediastores are any source for multimedia data, including hard drives, DVDs, CDs and media devices such as iPods or MP3 players. The MME’s mediastore access capabilities include:

detection of devices, and integration of content from static and dynamic media sources: drives, external players, USB stores, iPods, networks

media stack and protocol implementations for diverse protocols: iPod Access Protocol, MTP, etc., many with DRM requirements

management of different media filesystem and stream formats: DOS FAT32, UDF 2.01, etc.

272

Chapter 17 Multimedia

October 16, 2008

Соседние файлы в папке Литература_1